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 _get(target, property, receiver) { 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(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

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

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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }

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

function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { 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(_e2) { throw _e2; }, 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 = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

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 _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 _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 _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_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 _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; } 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 { Date.prototype.toString.call(Reflect.construct(Date, [], 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 _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; }

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

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"], {
  /***/
  "./node_modules/@angular/common/fesm2015/common.js":
  /*!*********************************************************!*\
    !*** ./node_modules/@angular/common/fesm2015/common.js ***!
    \*********************************************************/

  /*! exports provided: ɵangular_packages_common_common_c, ɵangular_packages_common_common_h, ɵangular_packages_common_common_g, ɵangular_packages_common_common_f, ɵangular_packages_common_common_k, ɵangular_packages_common_common_j, ɵangular_packages_common_common_i, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_e, ɵangular_packages_common_common_d, ɵregisterLocaleData, registerLocaleData, formatDate, formatCurrency, formatNumber, formatPercent, NgLocaleLocalization, NgLocalization, Plural, NumberFormatStyle, FormStyle, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getNumberOfCurrencyDigits, getCurrencySymbol, getLocaleDayPeriods, getLocaleDayNames, getLocaleMonthNames, getLocaleId, getLocaleEraNames, getLocaleWeekEndRange, getLocaleFirstDayOfWeek, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocalePluralCase, getLocaleTimeFormat, getLocaleNumberSymbol, getLocaleNumberFormat, getLocaleCurrencyName, getLocaleCurrencySymbol, ɵparseCookieValue, CommonModule, DeprecatedI18NPipesModule, NgClass, NgClassBase, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgStyleBase, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet, DOCUMENT, AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe, KeyValuePipe, DeprecatedDatePipe, DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe, ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID, ɵPLATFORM_WORKER_APP_ID, ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, VERSION, ViewportScroller, ɵNullViewportScroller, ɵNgClassImplProvider__POST_R3__, ɵNgClassR2Impl, ɵNgClassImpl, ɵNgStyleImplProvider__POST_R3__, ɵNgStyleR2Impl, ɵNgStyleImpl, ɵngStyleDirectiveDef__POST_R3__, ɵngClassDirectiveDef__POST_R3__, PlatformLocation, LOCATION_INITIALIZED, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "formatCurrency", function () {
      return formatCurrency;
    });
    /* 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__, "NgLocaleLocalization", function () {
      return NgLocaleLocalization;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "getLocaleFirstDayOfWeek", function () {
      return getLocaleFirstDayOfWeek;
    });
    /* 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__, "getLocaleExtraDayPeriodRules", function () {
      return getLocaleExtraDayPeriodRules;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriods", function () {
      return getLocaleExtraDayPeriods;
    });
    /* 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__, "getLocaleNumberSymbol", function () {
      return getLocaleNumberSymbol;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getLocaleNumberFormat", function () {
      return getLocaleNumberFormat;
    });
    /* 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__, "ɵparseCookieValue", function () {
      return parseCookieValue;
    });
    /* harmony export (binding) */


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


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


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


    __webpack_require__.d(__webpack_exports__, "NgClassBase", function () {
      return NgClassBase;
    });
    /* 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__, "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__, "NgStyleBase", function () {
      return NgStyleBase;
    });
    /* 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__, "NgComponentOutlet", function () {
      return NgComponentOutlet;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "DatePipe", function () {
      return DatePipe;
    });
    /* 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__, "LowerCasePipe", function () {
      return LowerCasePipe;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "DeprecatedPercentPipe", function () {
      return DeprecatedPercentPipe;
    });
    /* 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__, "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__, "VERSION", function () {
      return VERSION;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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-webworker` provides
     * one suitable for use with web workers.
     *
     * 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 independent.
     *
     * \@publicApi
     * @abstract
     */


    var PlatformLocation = function PlatformLocation() {
      _classCallCheck(this, PlatformLocation);
    };

    if (false) {}
    /**
     * \@description
     * Indicates when a location is initialized.
     *
     * \@publicApi
     * @type {?}
     */


    var LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized');
    /**
     * \@description
     * A serializable version of the event from `onPopState` or `onHashChange`
     *
     * \@publicApi
     * @record
     */

    function LocationChangeEvent() {}

    if (false) {}
    /**
     * \@publicApi
     * @record
     */


    function LocationChangeListener() {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @abstract
     */


    var LocationStrategy = function LocationStrategy() {
      _classCallCheck(this, LocationStrategy);
    };

    if (false) {}
    /**
     * 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
     * @type {?}
     */


    var APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @record
     */

    function PopStateEvent() {}

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} platformStrategy
       * @param {?} platformLocation
       */
      function Location(platformStrategy, platformLocation) {
        var _this2 = this;

        _classCallCheck(this, Location);

        /**
         * \@internal
         */
        this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        /**
         * \@internal
         */

        this._urlChangeListeners = [];
        this._platformStrategy = platformStrategy;
        /** @type {?} */

        var browserBaseHref = this._platformStrategy.getBaseHref();

        this._platformLocation = platformLocation;
        this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref));

        this._platformStrategy.onPopState(
        /**
        * @param {?} ev
        * @return {?}
        */
        function (ev) {
          _this2._subject.emit({
            'url': _this2.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.
       *
       * @return {?} 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.
         * @return {?} 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.
         *
         * @return {?} 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 + Location.normalizeQueryParams(query));
        }
        /**
         * Normalizes a URL path by stripping any trailing slashes.
         *
         * @param {?} url String representing a URL.
         *
         * @return {?} 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.
         *
         * @return {?} 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.
         *
         * @return {?}
         */

      }, {
        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 + Location.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.
         * @return {?}
         */

      }, {
        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 + Location.normalizeQueryParams(query)), state);
        }
        /**
         * Navigates forward in the platform's history.
         * @return {?}
         */

      }, {
        key: "forward",
        value: function forward() {
          this._platformStrategy.forward();
        }
        /**
         * Navigates back in the platform's history.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "onUrlChange",
        value: function onUrlChange(fn) {
          var _this3 = this;

          this._urlChangeListeners.push(fn);

          this.subscribe(
          /**
          * @param {?} v
          * @return {?}
          */
          function (v) {
            _this3._notifyUrlChangeListeners(v.url, v.state);
          });
        }
        /**
         * \@internal
         * @param {?=} url
         * @param {?=} state
         * @return {?}
         */

      }, {
        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(
          /**
          * @param {?} fn
          * @return {?}
          */
          function (fn) {
            return fn(url, state);
          });
        }
        /**
         * Subscribes to the platform's `popState` events.
         *
         * @param {?} onNext
         * @param {?=} onThrow
         * @param {?=} onReturn
         * @return {?} Subscribed events.
         */

      }, {
        key: "subscribe",
        value: function subscribe(onNext, onThrow, onReturn) {
          return this._subject.subscribe({
            next: onNext,
            error: onThrow,
            complete: onReturn
          });
        }
        /**
         * Normalizes URL parameters by prepending with `?` if needed.
         *
         * @param {?} params String of URL parameters.
         *
         * @return {?} The normalized URL parameters string.
         */

      }], [{
        key: "normalizeQueryParams",
        value: function normalizeQueryParams(params) {
          return params && params[0] !== '?' ? '?' + params : params;
        }
        /**
         * Joins two parts of a URL with a slash if needed.
         *
         * @param {?} start  URL string
         * @param {?} end    URL string
         *
         *
         * @return {?} The joined URL string.
         */

      }, {
        key: "joinWithSlash",
        value: function joinWithSlash(start, end) {
          if (start.length == 0) {
            return end;
          }

          if (end.length == 0) {
            return start;
          }
          /** @type {?} */


          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.
         *
         * @return {?} The URL string, modified if needed.
         */

      }, {
        key: "stripTrailingSlash",
        value: function stripTrailingSlash(url) {
          /** @type {?} */
          var match = url.match(/#|\?|$/);
          /** @type {?} */

          var pathEndIdx = match && match.index || url.length;
          /** @type {?} */

          var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
          return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
        }
      }]);

      return Location;
    }();

    Location.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    Location.ctorParameters = function () {
      return [{
        type: LocationStrategy
      }, {
        type: PlatformLocation
      }];
    };

    if (false) {}
    /**
     * @param {?} baseHref
     * @param {?} url
     * @return {?}
     */


    function _stripBaseHref(baseHref, url) {
      return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;
    }
    /**
     * @param {?} url
     * @return {?}
     */


    function _stripIndexHtml(url) {
      return url.replace(/\/index.html$/, '');
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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 (_LocationStrategy) {
      _inherits(HashLocationStrategy, _LocationStrategy);

      var _super = _createSuper(HashLocationStrategy);

      /**
       * @param {?} _platformLocation
       * @param {?=} _baseHref
       */
      function HashLocationStrategy(_platformLocation, _baseHref) {
        var _this4;

        _classCallCheck(this, HashLocationStrategy);

        _this4 = _super.call(this);
        _this4._platformLocation = _platformLocation;
        _this4._baseHref = '';

        if (_baseHref != null) {
          _this4._baseHref = _baseHref;
        }

        return _this4;
      }
      /**
       * @param {?} fn
       * @return {?}
       */


      _createClass2(HashLocationStrategy, [{
        key: "onPopState",
        value: function onPopState(fn) {
          this._platformLocation.onPopState(fn);

          this._platformLocation.onHashChange(fn);
        }
        /**
         * @return {?}
         */

      }, {
        key: "getBaseHref",
        value: function getBaseHref() {
          return this._baseHref;
        }
        /**
         * @param {?=} includeHash
         * @return {?}
         */

      }, {
        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

          /** @type {?} */
          var path = this._platformLocation.hash;
          if (path == null) path = '#';
          return path.length > 0 ? path.substring(1) : path;
        }
        /**
         * @param {?} internal
         * @return {?}
         */

      }, {
        key: "prepareExternalUrl",
        value: function prepareExternalUrl(internal) {
          /** @type {?} */
          var url = Location.joinWithSlash(this._baseHref, internal);
          return url.length > 0 ? '#' + url : url;
        }
        /**
         * @param {?} state
         * @param {?} title
         * @param {?} path
         * @param {?} queryParams
         * @return {?}
         */

      }, {
        key: "pushState",
        value: function pushState(state, title, path, queryParams) {
          /** @type {?} */
          var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));

          if (url.length == 0) {
            url = this._platformLocation.pathname;
          }

          this._platformLocation.pushState(state, title, url);
        }
        /**
         * @param {?} state
         * @param {?} title
         * @param {?} path
         * @param {?} queryParams
         * @return {?}
         */

      }, {
        key: "replaceState",
        value: function replaceState(state, title, path, queryParams) {
          /** @type {?} */
          var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));

          if (url.length == 0) {
            url = this._platformLocation.pathname;
          }

          this._platformLocation.replaceState(state, title, url);
        }
        /**
         * @return {?}
         */

      }, {
        key: "forward",
        value: function forward() {
          this._platformLocation.forward();
        }
        /**
         * @return {?}
         */

      }, {
        key: "back",
        value: function back() {
          this._platformLocation.back();
        }
      }]);

      return HashLocationStrategy;
    }(LocationStrategy);

    HashLocationStrategy.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    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]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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 element to the document. This URL prefix that will be preserved
     * when generating and recognizing URLs.
     *
     * 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`.
     *
     * 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`.
     *
     * \@usageNotes
     *
     * ### Example
     *
     * {\@example common/location/ts/path_location_component.ts region='LocationComponent'}
     *
     * \@publicApi
     */


    var PathLocationStrategy = /*#__PURE__*/function (_LocationStrategy2) {
      _inherits(PathLocationStrategy, _LocationStrategy2);

      var _super2 = _createSuper(PathLocationStrategy);

      /**
       * @param {?} _platformLocation
       * @param {?=} href
       */
      function PathLocationStrategy(_platformLocation, href) {
        var _this5;

        _classCallCheck(this, PathLocationStrategy);

        _this5 = _super2.call(this);
        _this5._platformLocation = _platformLocation;

        if (href == null) {
          href = _this5._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.");
        }

        _this5._baseHref = href;
        return _this5;
      }
      /**
       * @param {?} fn
       * @return {?}
       */


      _createClass2(PathLocationStrategy, [{
        key: "onPopState",
        value: function onPopState(fn) {
          this._platformLocation.onPopState(fn);

          this._platformLocation.onHashChange(fn);
        }
        /**
         * @return {?}
         */

      }, {
        key: "getBaseHref",
        value: function getBaseHref() {
          return this._baseHref;
        }
        /**
         * @param {?} internal
         * @return {?}
         */

      }, {
        key: "prepareExternalUrl",
        value: function prepareExternalUrl(internal) {
          return Location.joinWithSlash(this._baseHref, internal);
        }
        /**
         * @param {?=} includeHash
         * @return {?}
         */

      }, {
        key: "path",
        value: function path() {
          var includeHash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

          /** @type {?} */
          var pathname = this._platformLocation.pathname + Location.normalizeQueryParams(this._platformLocation.search);
          /** @type {?} */

          var hash = this._platformLocation.hash;
          return hash && includeHash ? "".concat(pathname).concat(hash) : pathname;
        }
        /**
         * @param {?} state
         * @param {?} title
         * @param {?} url
         * @param {?} queryParams
         * @return {?}
         */

      }, {
        key: "pushState",
        value: function pushState(state, title, url, queryParams) {
          /** @type {?} */
          var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));

          this._platformLocation.pushState(state, title, externalUrl);
        }
        /**
         * @param {?} state
         * @param {?} title
         * @param {?} url
         * @param {?} queryParams
         * @return {?}
         */

      }, {
        key: "replaceState",
        value: function replaceState(state, title, url, queryParams) {
          /** @type {?} */
          var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));

          this._platformLocation.replaceState(state, title, externalUrl);
        }
        /**
         * @return {?}
         */

      }, {
        key: "forward",
        value: function forward() {
          this._platformLocation.forward();
        }
        /**
         * @return {?}
         */

      }, {
        key: "back",
        value: function back() {
          this._platformLocation.back();
        }
      }]);

      return PathLocationStrategy;
    }(LocationStrategy);

    PathLocationStrategy.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    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]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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

    /**
     * \@internal
     * @type {?}
     */


    var CURRENCIES_EN = {
      'ADP': [undefined, undefined, 0],
      'AFN': [undefined, undefined, 0],
      'ALL': [undefined, undefined, 0],
      'AMD': [undefined, undefined, 0],
      '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, '$', 0],
      '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, '$', 0],
      'HKD': ['HK$', '$'],
      'HNL': [undefined, 'L'],
      'HRK': [undefined, 'kn'],
      'HUF': [undefined, 'Ft', 2],
      'IDR': [undefined, 'Rp', 0],
      '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, '₮', 0],
      'MRO': [undefined, undefined, 0],
      'MUR': [undefined, 'Rs', 0],
      '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', 0],
      '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, 0],
      'UAH': [undefined, '₴'],
      'UGX': [undefined, undefined, 0],
      'USD': ['$'],
      'UYI': [undefined, undefined, 0],
      'UYU': [undefined, '$'],
      'UZS': [undefined, undefined, 0],
      'VEF': [undefined, 'Bs'],
      'VND': ['₫', undefined, 0],
      'VUV': [undefined, undefined, 0],
      'XAF': ['FCFA', undefined, 0],
      'XCD': ['EC$', '$'],
      'XOF': ['CFA', undefined, 0],
      'XPF': ['CFPF', undefined, 0],
      'YER': [undefined, undefined, 0],
      'ZAR': [undefined, 'R'],
      'ZMK': [undefined, undefined, 0],
      'ZMW': [undefined, 'ZK'],
      'ZWD': [undefined, undefined, 0]
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @enum {number} */

    var NumberFormatStyle = {
      Decimal: 0,
      Percent: 1,
      Currency: 2,
      Scientific: 3
    };
    NumberFormatStyle[NumberFormatStyle.Decimal] = 'Decimal';
    NumberFormatStyle[NumberFormatStyle.Percent] = 'Percent';
    NumberFormatStyle[NumberFormatStyle.Currency] = 'Currency';
    NumberFormatStyle[NumberFormatStyle.Scientific] = 'Scientific';
    /** @enum {number} */

    var Plural = {
      Zero: 0,
      One: 1,
      Two: 2,
      Few: 3,
      Many: 4,
      Other: 5
    };
    Plural[Plural.Zero] = 'Zero';
    Plural[Plural.One] = 'One';
    Plural[Plural.Two] = 'Two';
    Plural[Plural.Few] = 'Few';
    Plural[Plural.Many] = 'Many';
    Plural[Plural.Other] = 'Other';
    /** @enum {number} */

    var FormStyle = {
      Format: 0,
      Standalone: 1
    };
    FormStyle[FormStyle.Format] = 'Format';
    FormStyle[FormStyle.Standalone] = 'Standalone';
    /** @enum {number} */

    var TranslationWidth = {
      /** 1 character for `en-US`. For example: 'S' */
      Narrow: 0,

      /** 3 characters for `en-US`. For example: 'Sun' */
      Abbreviated: 1,

      /** Full length for `en-US`. For example: "Sunday" */
      Wide: 2,

      /** 2 characters for `en-US`, For example: "Su" */
      Short: 3
    };
    TranslationWidth[TranslationWidth.Narrow] = 'Narrow';
    TranslationWidth[TranslationWidth.Abbreviated] = 'Abbreviated';
    TranslationWidth[TranslationWidth.Wide] = 'Wide';
    TranslationWidth[TranslationWidth.Short] = 'Short';
    /** @enum {number} */

    var FormatWidth = {
      /**
       * For `en-US`, 'M/d/yy, h:mm a'`
       * (Example: `6/15/15, 9:03 AM`)
       */
      Short: 0,

      /**
       * For `en-US`, `'MMM d, y, h:mm:ss a'`
       * (Example: `Jun 15, 2015, 9:03:01 AM`)
       */
      Medium: 1,

      /**
       * For `en-US`, `'MMMM d, y, h:mm:ss a z'`
       * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)
       */
      Long: 2,

      /**
       * 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`)
       */
      Full: 3
    };
    FormatWidth[FormatWidth.Short] = 'Short';
    FormatWidth[FormatWidth.Medium] = 'Medium';
    FormatWidth[FormatWidth.Long] = 'Long';
    FormatWidth[FormatWidth.Full] = 'Full';
    /** @enum {number} */

    var NumberSymbol = {
      /**
       * Decimal separator.
       * For `en-US`, the dot character.
       * Example : 2,345`.`67
       */
      Decimal: 0,

      /**
       * Grouping separator, typically for thousands.
       * For `en-US`, the comma character.
       * Example: 2`,`345.67
       */
      Group: 1,

      /**
       * List-item separator.
       * Example: "one, two, and three"
       */
      List: 2,

      /**
       * Sign for percentage (out of 100).
       * Example: 23.4%
       */
      PercentSign: 3,

      /**
       * Sign for positive numbers.
       * Example: +23
       */
      PlusSign: 4,

      /**
       * Sign for negative numbers.
       * Example: -23
       */
      MinusSign: 5,

      /**
       * Computer notation for exponential value (n times a power of 10).
       * Example: 1.2E3
       */
      Exponential: 6,

      /**
       * Human-readable format of exponential.
       * Example: 1.2x103
       */
      SuperscriptingExponent: 7,

      /**
       * Sign for permille (out of 1000).
       * Example: 23.4‰
       */
      PerMille: 8,

      /**
       * Infinity, can be used with plus and minus.
       * Example: ∞, +∞, -∞
       */
      Infinity: 9,

      /**
       * Not a number.
       * Example: NaN
       */
      NaN: 10,

      /**
       * Symbol used between time units.
       * Example: 10:52
       */
      TimeSeparator: 11,

      /**
       * Decimal separator for currency values (fallback to `Decimal`).
       * Example: $2,345.67
       */
      CurrencyDecimal: 12,

      /**
       * Group separator for currency values (fallback to `Group`).
       * Example: $2,345.67
       */
      CurrencyGroup: 13
    };
    NumberSymbol[NumberSymbol.Decimal] = 'Decimal';
    NumberSymbol[NumberSymbol.Group] = 'Group';
    NumberSymbol[NumberSymbol.List] = 'List';
    NumberSymbol[NumberSymbol.PercentSign] = 'PercentSign';
    NumberSymbol[NumberSymbol.PlusSign] = 'PlusSign';
    NumberSymbol[NumberSymbol.MinusSign] = 'MinusSign';
    NumberSymbol[NumberSymbol.Exponential] = 'Exponential';
    NumberSymbol[NumberSymbol.SuperscriptingExponent] = 'SuperscriptingExponent';
    NumberSymbol[NumberSymbol.PerMille] = 'PerMille';
    NumberSymbol[NumberSymbol.Infinity] = 'Infinity';
    NumberSymbol[NumberSymbol.NaN] = 'NaN';
    NumberSymbol[NumberSymbol.TimeSeparator] = 'TimeSeparator';
    NumberSymbol[NumberSymbol.CurrencyDecimal] = 'CurrencyDecimal';
    NumberSymbol[NumberSymbol.CurrencyGroup] = 'CurrencyGroup';
    /** @enum {number} */

    var WeekDay = {
      Sunday: 0,
      Monday: 1,
      Tuesday: 2,
      Wednesday: 3,
      Thursday: 4,
      Friday: 5,
      Saturday: 6
    };
    WeekDay[WeekDay.Sunday] = 'Sunday';
    WeekDay[WeekDay.Monday] = 'Monday';
    WeekDay[WeekDay.Tuesday] = 'Tuesday';
    WeekDay[WeekDay.Wednesday] = 'Wednesday';
    WeekDay[WeekDay.Thursday] = 'Thursday';
    WeekDay[WeekDay.Friday] = 'Friday';
    WeekDay[WeekDay.Saturday] = 'Saturday';
    /**
     * Retrieves the locale ID from the currently loaded locale.
     * The loaded locale could be, for example, a global one rather than a regional one.
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code, such as `fr-FR`.
     * @return {?} The locale code. For example, `fr`.
     */

    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.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} formStyle The required grammatical form.
     * @param {?} width The required character width.
     * @return {?} An array of localized period strings. For example, `[AM, PM]` for `en-US`.
     */


    function getLocaleDayPeriods(locale, formStyle, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      var amPmData =
      /** @type {?} */
      [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone]];
      /** @type {?} */

      var amPm = getLastDefinedValue(amPmData, formStyle);
      return getLastDefinedValue(amPm, width);
    }
    /**
     * Retrieves days of the week for the given locale, using the Gregorian calendar.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} formStyle The required grammatical form.
     * @param {?} width The required character width.
     * @return {?} An array of localized name strings.
     * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.
     */


    function getLocaleDayNames(locale, formStyle, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      var daysData =
      /** @type {?} */
      [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]];
      /** @type {?} */

      var days = getLastDefinedValue(daysData, formStyle);
      return getLastDefinedValue(days, width);
    }
    /**
     * Retrieves months of the year for the given locale, using the Gregorian calendar.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} formStyle The required grammatical form.
     * @param {?} width The required character width.
     * @return {?} An array of localized name strings.
     * For example,  `[January, February, ...]` for `en-US`.
     */


    function getLocaleMonthNames(locale, formStyle, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      var monthsData =
      /** @type {?} */
      [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]];
      /** @type {?} */

      var months = getLastDefinedValue(monthsData, formStyle);
      return getLastDefinedValue(months, width);
    }
    /**
     * Retrieves Gregorian-calendar eras for the given locale.
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} width The required character width.
     * @return {?} An array of localized era strings.
     * For example, `[AD, BC]` for `en-US`.
     */


    function getLocaleEraNames(locale, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      var erasData =
      /** @type {?} */
      data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras];
      return getLastDefinedValue(erasData, width);
    }
    /**
     * Retrieves the first day of the week for the given locale.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} 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.
     */


    function getLocaleFirstDayOfWeek(locale) {
      /** @type {?} */
      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.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The range of day values, `[startDay, endDay]`.
     */


    function getLocaleWeekEndRange(locale) {
      /** @type {?} */
      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.
     *
     * @see `FormatWidth` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} width The format type.
     * @return {?} The localized formating string.
     */


    function getLocaleDateFormat(locale, width) {
      /** @type {?} */
      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.
     *
     * @see `FormatWidth` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} width The format type.
     * @return {?} The localized formatting string.
     */


    function getLocaleTimeFormat(locale, width) {
      /** @type {?} */
      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.
     *
     * @see `FormatWidth` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} width The format type.
     * @return {?} The localized formatting string.
     */


    function getLocaleDateTimeFormat(locale, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      var dateTimeFormatData =
      /** @type {?} */
      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.
     * @see `NumberSymbol` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale The locale code.
     * @param {?} symbol The symbol to localize.
     * @return {?} The character for the localized symbol.
     */


    function getLocaleNumberSymbol(locale, symbol) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      /** @type {?} */

      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. |
     *
     * @see `NumberFormatStyle` / [CLDR website](http://cldr.unicode.org/translation/number-patterns) / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @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`.)
     * @return {?} The localized format string.
     */


    function getLocaleNumberFormat(locale, type) {
      /** @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`.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The localized symbol character,
     * or `null` if the main country cannot be determined.
     */


    function getLocaleCurrencySymbol(locale) {
      /** @type {?} */
      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`.
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The currency name,
     * or `null` if the main country cannot be determined.
     */


    function getLocaleCurrencyName(locale) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null;
    }
    /**
     * Retrieves the currency values for a given locale.
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The currency values.
     */


    function getLocaleCurrencies(locale) {
      /** @type {?} */
      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
     * @type {?}
     */


    var getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"];
    /**
     * @param {?} data
     * @return {?}
     */

    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).
     *
     * @see `getLocaleExtraDayPeriods()` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The rules for the locale, a single time value or array of *from-time, to-time*,
     * or null if no periods are available.
     *
     */


    function getLocaleExtraDayPeriodRules(locale) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      checkFullData(data);
      /** @type {?} */

      var rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2
      /* ExtraDayPeriodsRules */
      ] || [];
      return rules.map(
      /**
      * @param {?} rule
      * @return {?}
      */
      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).
     *
     * @see `getLocaleExtraDayPeriodRules()` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?} formStyle The required grammatical form.
     * @param {?} width The required character width.
     * @return {?} The translated day-period strings.
     */


    function getLocaleExtraDayPeriods(locale, formStyle, width) {
      /** @type {?} */
      var data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale);
      checkFullData(data);
      /** @type {?} */

      var dayPeriodsData =
      /** @type {?} */
      [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0
      /* ExtraDayPeriodFormats */
      ], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1
      /* ExtraDayPeriodStandalone */
      ]];
      /** @type {?} */

      var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
      return getLastDefinedValue(dayPeriods, width) || [];
    }
    /**
     * 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.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @template T
     * @param {?} data The data array to retrieve from.
     * @param {?} index A 0-based index into the array to start from.
     * @return {?} The value immediately before the given index position.
     */


    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"
     * @param {?} time
     * @return {?}
     */


    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$`.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} code The currency code.
     * @param {?} format The format, `wide` or `narrow`.
     * @param {?=} locale A locale code for the locale format rules to use.
     *
     * @return {?} The symbol, or the currency code if no symbol is available.0
     */


    function getCurrencySymbol(code, format) {
      var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';

      /** @type {?} */
      var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];
      /** @type {?} */

      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

    /** @type {?} */


    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.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} code The currency code.
     * @return {?} The number of decimal digits, typically 0 or 2.
     */

    function getNumberOfCurrencyDigits(code) {
      /** @type {?} */
      var digits;
      /** @type {?} */

      var currency = CURRENCIES_EN[code];

      if (currency) {
        digits = currency[2
        /* NbOfDigits */
        ];
      }

      return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    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

    /** @type {?} */

    var NAMED_FORMATS = {};
    /** @type {?} */

    var DATE_FORMATS_SPLIT = /((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|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]*)/;
    /** @enum {number} */

    var ZoneWidth = {
      Short: 0,
      ShortGMT: 1,
      Long: 2,
      Extended: 3
    };
    ZoneWidth[ZoneWidth.Short] = 'Short';
    ZoneWidth[ZoneWidth.ShortGMT] = 'ShortGMT';
    ZoneWidth[ZoneWidth.Long] = 'Long';
    ZoneWidth[ZoneWidth.Extended] = 'Extended';
    /** @enum {number} */

    var DateType = {
      FullYear: 0,
      Month: 1,
      Date: 2,
      Hours: 3,
      Minutes: 4,
      Seconds: 5,
      FractionalSeconds: 6,
      Day: 7
    };
    DateType[DateType.FullYear] = 'FullYear';
    DateType[DateType.Month] = 'Month';
    DateType[DateType.Date] = 'Date';
    DateType[DateType.Hours] = 'Hours';
    DateType[DateType.Minutes] = 'Minutes';
    DateType[DateType.Seconds] = 'Seconds';
    DateType[DateType.FractionalSeconds] = 'FractionalSeconds';
    DateType[DateType.Day] = 'Day';
    /** @enum {number} */

    var TranslationType = {
      DayPeriods: 0,
      Days: 1,
      Months: 2,
      Eras: 3
    };
    TranslationType[TranslationType.DayPeriods] = 'DayPeriods';
    TranslationType[TranslationType.Days] = 'Days';
    TranslationType[TranslationType.Months] = 'Months';
    TranslationType[TranslationType.Eras] = 'Eras';
    /**
     * \@ngModule CommonModule
     * \@description
     *
     * Formats a date according to locale rules.
     *
     * @see `DatePipe` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @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.
     *
     * @return {?} The formatted date string.
     *
     */

    function formatDate(value, format, locale, timezone) {
      /** @type {?} */
      var date = toDate(value);
      /** @type {?} */

      var namedFormat = getNamedFormat(locale, format);
      format = namedFormat || format;
      /** @type {?} */

      var parts = [];
      /** @type {?} */

      var match;

      while (format) {
        match = DATE_FORMATS_SPLIT.exec(format);

        if (match) {
          parts = parts.concat(match.slice(1));
          /** @type {?} */

          var part = parts.pop();

          if (!part) {
            break;
          }

          format = part;
        } else {
          parts.push(format);
          break;
        }
      }
      /** @type {?} */


      var dateTimezoneOffset = date.getTimezoneOffset();

      if (timezone) {
        dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
        date = convertTimezoneToLocal(date, timezone, true);
      }
      /** @type {?} */


      var text = '';
      parts.forEach(
      /**
      * @param {?} value
      * @return {?}
      */
      function (value) {
        /** @type {?} */
        var dateFormatter = getDateFormatter(value);
        text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
      });
      return text;
    }
    /**
     * @param {?} locale
     * @param {?} format
     * @return {?}
     */


    function getNamedFormat(locale, format) {
      /** @type {?} */
      var localeId = getLocaleId(locale);
      NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};

      if (NAMED_FORMATS[localeId][format]) {
        return NAMED_FORMATS[localeId][format];
      }
      /** @type {?} */


      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':
          /** @type {?} */
          var shortTime = getNamedFormat(locale, 'shortTime');
          /** @type {?} */

          var shortDate = getNamedFormat(locale, 'shortDate');
          formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
          break;

        case 'medium':
          /** @type {?} */
          var mediumTime = getNamedFormat(locale, 'mediumTime');
          /** @type {?} */

          var mediumDate = getNamedFormat(locale, 'mediumDate');
          formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
          break;

        case 'long':
          /** @type {?} */
          var longTime = getNamedFormat(locale, 'longTime');
          /** @type {?} */

          var longDate = getNamedFormat(locale, 'longDate');
          formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
          break;

        case 'full':
          /** @type {?} */
          var fullTime = getNamedFormat(locale, 'fullTime');
          /** @type {?} */

          var fullDate = getNamedFormat(locale, 'fullDate');
          formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
          break;
      }

      if (formatValue) {
        NAMED_FORMATS[localeId][format] = formatValue;
      }

      return formatValue;
    }
    /**
     * @param {?} str
     * @param {?} opt_values
     * @return {?}
     */


    function formatDateTime(str, opt_values) {
      if (opt_values) {
        str = str.replace(/\{([^}]+)}/g,
        /**
        * @param {?} match
        * @param {?} key
        * @return {?}
        */
        function (match, key) {
          return opt_values != null && key in opt_values ? opt_values[key] : match;
        });
      }

      return str;
    }
    /**
     * @param {?} num
     * @param {?} digits
     * @param {?=} minusSign
     * @param {?=} trim
     * @param {?=} negWrap
     * @return {?}
     */


    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;

      /** @type {?} */
      var neg = '';

      if (num < 0 || negWrap && num <= 0) {
        if (negWrap) {
          num = -num + 1;
        } else {
          num = -num;
          neg = minusSign;
        }
      }
      /** @type {?} */


      var strNum = String(num);

      while (strNum.length < digits) {
        strNum = '0' + strNum;
      }

      if (trim) {
        strNum = strNum.substr(strNum.length - digits);
      }

      return neg + strNum;
    }
    /**
     * @param {?} milliseconds
     * @param {?} digits
     * @return {?}
     */


    function formatFractionalSeconds(milliseconds, digits) {
      /** @type {?} */
      var strMs = padNumber(milliseconds, 3);
      return strMs.substr(0, digits);
    }
    /**
     * Returns a date formatter that transforms a date into its locale digit representation
     * @param {?} name
     * @param {?} size
     * @param {?=} offset
     * @param {?=} trim
     * @param {?=} negWrap
     * @return {?}
     */


    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 (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          /** @type {?} */
          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);
          }
          /** @type {?} */


          var localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
          return padNumber(part, size, localeMinus, trim, negWrap);
        }
      );
    }
    /**
     * @param {?} part
     * @param {?} date
     * @return {?}
     */


    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
     * @param {?} name
     * @param {?} width
     * @param {?=} form
     * @param {?=} extended
     * @return {?}
     */


    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 (
        /**
        * @param {?} date
        * @param {?} locale
        * @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
     * @param {?} date
     * @param {?} locale
     * @param {?} name
     * @param {?} width
     * @param {?} form
     * @param {?} extended
     * @return {?}
     */


    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:
          /** @type {?} */
          var currentHours = date.getHours();
          /** @type {?} */

          var currentMinutes = date.getMinutes();

          if (extended) {
            /** @type {?} */
            var rules = getLocaleExtraDayPeriodRules(locale);
            /** @type {?} */

            var dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
            /** @type {?} */

            var result;
            rules.forEach(
            /**
            * @param {?} rule
            * @param {?} index
            * @return {?}
            */
            function (rule, index) {
              if (Array.isArray(rule)) {
                // morning, afternoon, evening, night
                var _rule$ = rule[0],
                    hoursFrom = _rule$.hours,
                    minutesFrom = _rule$.minutes;
                var _rule$2 = rule[1],
                    hoursTo = _rule$2.hours,
                    minutesTo = _rule$2.minutes;

                if (currentHours >= hoursFrom && currentMinutes >= minutesFrom && (currentHours < hoursTo || currentHours === hoursTo && currentMinutes < minutesTo)) {
                  result = dayPeriods[index];
                }
              } else {
                // noon or midnight
                // noon or midnight
                var hours = rule.hours,
                    minutes = rule.minutes;

                if (hours === currentHours && minutes === currentMinutes) {
                  result = dayPeriods[index];
                }
              }
            });

            if (result) {
              return result;
            }
          } // if no rules for the day periods, we use am/pm by default


          return getLocaleDayPeriods(locale, form,
          /** @type {?} */
          width)[currentHours < 12 ? 0 : 1];

        case TranslationType.Eras:
          return getLocaleEraNames(locale,
          /** @type {?} */
          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.

          /** @type {?} */
          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)
     * @param {?} width
     * @return {?}
     */


    function timeZoneGetter(width) {
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @param {?} offset
        * @return {?}
        */
        function (date, locale, offset) {
          /** @type {?} */
          var zone = -1 * offset;
          /** @type {?} */

          var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);
          /** @type {?} */

          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, "\""));
          }
        }
      );
    }
    /** @type {?} */


    var JANUARY = 0;
    /** @type {?} */

    var THURSDAY = 4;
    /**
     * @param {?} year
     * @return {?}
     */

    function getFirstThursdayOfYear(year) {
      /** @type {?} */
      var firstDayOfYear = new Date(year, JANUARY, 1).getDay();
      return new Date(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
    }
    /**
     * @param {?} datetime
     * @return {?}
     */


    function getThursdayThisWeek(datetime) {
      return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
    }
    /**
     * @param {?} size
     * @param {?=} monthBased
     * @return {?}
     */


    function weekGetter(size) {
      var monthBased = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          /** @type {?} */
          var result;

          if (monthBased) {
            /** @type {?} */
            var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;
            /** @type {?} */

            var today = date.getDate();
            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
          } else {
            /** @type {?} */
            var firstThurs = getFirstThursdayOfYear(date.getFullYear());
            /** @type {?} */

            var thisThurs = getThursdayThisWeek(date);
            /** @type {?} */

            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));
        }
      );
    }
    /** @type {?} */


    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

    /**
     * @param {?} format
     * @return {?}
     */

    function getDateFormatter(format) {
      if (DATE_FORMATS[format]) {
        return DATE_FORMATS[format];
      }
      /** @type {?} */


      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;
        // 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;
    }
    /**
     * @param {?} timezone
     * @param {?} fallback
     * @return {?}
     */


    function timezoneToOffset(timezone, fallback) {
      // Support: IE 9-11 only, Edge 13-15+
      // IE/Edge do not "understand" colon (`:`) in timezone
      timezone = timezone.replace(/:/g, '');
      /** @type {?} */

      var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
      return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
    }
    /**
     * @param {?} date
     * @param {?} minutes
     * @return {?}
     */


    function addDateMinutes(date, minutes) {
      date = new Date(date.getTime());
      date.setMinutes(date.getMinutes() + minutes);
      return date;
    }
    /**
     * @param {?} date
     * @param {?} timezone
     * @param {?} reverse
     * @return {?}
     */


    function convertTimezoneToLocal(date, timezone, reverse) {
      /** @type {?} */
      var reverseValue = reverse ? -1 : 1;
      /** @type {?} */

      var dateTimezoneOffset = date.getTimezoneOffset();
      /** @type {?} */

      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.
     * @param {?} value
     * @return {?}
     */


    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();
        /** @type {?} */

        var parsedNb = parseFloat(value); // any string that only contains numbers, like "1234" but not like "1234hello"

        if (!isNaN(
        /** @type {?} */
        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$map = value.split('-').map(
          /**
          * @param {?} val
          * @return {?}
          */
          function (val) {
            return +val;
          }),
              _value$split$map2 = _slicedToArray(_value$split$map, 3),
              y = _value$split$map2[0],
              m = _value$split$map2[1],
              d = _value$split$map2[2];

          return new Date(y, m - 1, d);
        }
        /** @type {?} */


        var match;

        if (match = value.match(ISO8601_DATE_REGEX)) {
          return isoStringToDate(match);
        }
      }
      /** @type {?} */


      var date = new Date(
      /** @type {?} */
      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.
     * @param {?} match
     * @return {?}
     */


    function isoStringToDate(match) {
      /** @type {?} */
      var date = new Date(0);
      /** @type {?} */

      var tzHour = 0;
      /** @type {?} */

      var tzMin = 0; // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100"

      /** @type {?} */

      var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;
      /** @type {?} */

      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]));
      /** @type {?} */

      var h = Number(match[4] || 0) - tzHour;
      /** @type {?} */

      var m = Number(match[5] || 0) - tzMin;
      /** @type {?} */

      var s = Number(match[6] || 0);
      /** @type {?} */

      var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
      timeSetter.call(date, h, m, s, ms);
      return date;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isDate(value) {
      return value instanceof Date && !isNaN(value.valueOf());
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
    /** @type {?} */

    var MAX_DIGITS = 22;
    /** @type {?} */

    var DECIMAL_SEP = '.';
    /** @type {?} */

    var ZERO_CHAR = '0';
    /** @type {?} */

    var PATTERN_SEP = ';';
    /** @type {?} */

    var GROUP_SEP = ',';
    /** @type {?} */

    var DIGIT_CHAR = '#';
    /** @type {?} */

    var CURRENCY_CHAR = '¤';
    /** @type {?} */

    var PERCENT_CHAR = '%';
    /**
     * Transforms a number to a locale string based on a style and a format.
     * @param {?} value
     * @param {?} pattern
     * @param {?} locale
     * @param {?} groupSymbol
     * @param {?} decimalSymbol
     * @param {?=} digitsInfo
     * @param {?=} isPercent
     * @return {?}
     */

    function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo) {
      var isPercent = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;

      /** @type {?} */
      var formattedText = '';
      /** @type {?} */

      var isZero = false;

      if (!isFinite(value)) {
        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);
      } else {
        /** @type {?} */
        var parsedNumber = parseNumber(value);

        if (isPercent) {
          parsedNumber = toPercent(parsedNumber);
        }
        /** @type {?} */


        var minInt = pattern.minInt;
        /** @type {?} */

        var minFraction = pattern.minFrac;
        /** @type {?} */

        var maxFraction = pattern.maxFrac;

        if (digitsInfo) {
          /** @type {?} */
          var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);

          if (parts === null) {
            throw new Error("".concat(digitsInfo, " is not a valid digit info"));
          }
          /** @type {?} */


          var minIntPart = parts[1];
          /** @type {?} */

          var minFractionPart = parts[3];
          /** @type {?} */

          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);
        /** @type {?} */

        var digits = parsedNumber.digits;
        /** @type {?} */

        var integerLen = parsedNumber.integerLen;
        /** @type {?} */

        var exponent = parsedNumber.exponent;
        /** @type {?} */

        var decimals = [];
        isZero = digits.every(
        /**
        * @param {?} d
        * @return {?}
        */
        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

        /** @type {?} */


        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.
     *
     * @see `formatNumber()` / `DecimalPipe` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @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 {?=} digitsInfo
     * @return {?} The formatted currency value.
     *
     */


    function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
      /** @type {?} */
      var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);
      /** @type {?} */

      var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
      pattern.minFrac = getNumberOfCurrencyDigits(
      /** @type {?} */
      currencyCode);
      pattern.maxFrac = pattern.minFrac;
      /** @type {?} */

      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, '');
    }
    /**
     * \@ngModule CommonModule
     * \@description
     *
     * Formats a number as a percentage according to locale rules.
     *
     * @see `formatNumber()` / `DecimalPipe` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     * \@publicApi
     *
     * @param {?} value The number to format.
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?=} digitsInfo
     * @return {?} The formatted percentage value.
     *
     */


    function formatPercent(value, locale, digitsInfo) {
      /** @type {?} */
      var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);
      /** @type {?} */

      var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
      /** @type {?} */

      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.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     *
     * \@publicApi
     * @param {?} value The number to format.
     * @param {?} locale A locale code for the locale format rules to use.
     * @param {?=} digitsInfo
     * @return {?} The formatted text string.
     */


    function formatNumber(value, locale, digitsInfo) {
      /** @type {?} */
      var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);
      /** @type {?} */

      var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));
      return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);
    }
    /**
     * @record
     */


    function ParsedNumberFormat() {}

    if (false) {}
    /**
     * @param {?} format
     * @param {?=} minusSign
     * @return {?}
     */


    function parseNumberFormat(format) {
      var minusSign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';

      /** @type {?} */
      var p = {
        minInt: 1,
        minFrac: 0,
        maxFrac: 0,
        posPre: '',
        posSuf: '',
        negPre: '',
        negSuf: '',
        gSize: 0,
        lgSize: 0
      };
      /** @type {?} */

      var patternParts = format.split(PATTERN_SEP);
      /** @type {?} */

      var positive = patternParts[0];
      /** @type {?} */

      var negative = patternParts[1];
      /** @type {?} */

      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)];
      /** @type {?} */

      var integer = positiveParts[0];
      /** @type {?} */

      var fraction = positiveParts[1] || '';
      p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));

      for (var i = 0; i < fraction.length; i++) {
        /** @type {?} */
        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;
        }
      }
      /** @type {?} */


      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) {
        /** @type {?} */
        var trunkLen = positive.length - p.posPre.length - p.posSuf.length;
        /** @type {?} */

        var 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;
    }
    /**
     * @record
     */


    function ParsedNumber() {}

    if (false) {} // Transforms a parsed number into a percentage by multiplying it by 100

    /**
     * @param {?} parsedNumber
     * @return {?}
     */


    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

      /** @type {?} */


      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/
     * @param {?} num
     * @return {?}
     */


    function parseNumber(num) {
      /** @type {?} */
      var numStr = Math.abs(num) + '';
      /** @type {?} */

      var exponent = 0;
      /** @type {?} */

      var digits;
      /** @type {?} */

      var integerLen;
      /** @type {?} */

      var i;
      /** @type {?} */

      var j;
      /** @type {?} */

      var 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
     * @param {?} parsedNumber
     * @param {?} minFrac
     * @param {?} maxFrac
     * @return {?}
     */


    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, ")."));
      }
      /** @type {?} */


      var digits = parsedNumber.digits;
      /** @type {?} */

      var fractionLen = digits.length - parsedNumber.integerLen;
      /** @type {?} */

      var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); // The index of the digit to where rounding is to occur

      /** @type {?} */

      var roundAt = fractionSize + parsedNumber.integerLen;
      /** @type {?} */

      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);
      }
      /** @type {?} */


      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

      /** @type {?} */

      var minLen = minFrac + parsedNumber.integerLen; // Do any carrying, e.g. a digit was rounded up to 10

      /** @type {?} */

      var carry = digits.reduceRight(
      /**
      * @param {?} carry
      * @param {?} d
      * @param {?} i
      * @param {?} digits
      * @return {?}
      */
      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++;
      }
    }
    /**
     * @param {?} text
     * @return {?}
     */


    function parseIntAutoRadix(text) {
      /** @type {?} */
      var result = parseInt(text);

      if (isNaN(result)) {
        throw new Error('Invalid integer literal when parsing ' + text);
      }

      return result;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @deprecated from v5
     * @type {?}
     */


    var DEPRECATED_PLURAL_FN = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('UseV4Plurals');
    /**
     * \@publicApi
     * @abstract
     */

    var NgLocalization = function NgLocalization() {
      _classCallCheck(this, NgLocalization);
    };

    if (false) {}
    /**
     * Returns the plural category for a given value.
     * - "=value" when the case exists,
     * - the plural category otherwise
     * @param {?} value
     * @param {?} cases
     * @param {?} ngLocalization
     * @param {?=} locale
     * @return {?}
     */


    function getPluralCategory(value, cases, ngLocalization, locale) {
      /** @type {?} */
      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 _super3 = _createSuper(NgLocaleLocalization);

      /**
       * @param {?} locale
       * @param {?=} deprecatedPluralFn
       */
      function NgLocaleLocalization(locale, deprecatedPluralFn) {
        var _this6;

        _classCallCheck(this, NgLocaleLocalization);

        _this6 = _super3.call(this);
        _this6.locale = locale;
        _this6.deprecatedPluralFn = deprecatedPluralFn;
        return _this6;
      }
      /**
       * @param {?} value
       * @param {?=} locale
       * @return {?}
       */


      _createClass2(NgLocaleLocalization, [{
        key: "getPluralCategory",
        value: function getPluralCategory(value, locale) {
          /** @type {?} */
          var plural = this.deprecatedPluralFn ? this.deprecatedPluralFn(locale || this.locale, value) : 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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    NgLocaleLocalization.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }, {
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [DEPRECATED_PLURAL_FN]
        }]
      }];
    };

    if (false) {}
    /**
     * Returns the plural case based on the locale
     *
     * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts
     * \@publicApi
     * @param {?} locale
     * @param {?} nLike
     * @return {?}
     */


    function getPluralCase(locale, nLike) {
      // TODO(vicb): lazy compute
      if (typeof nLike === 'string') {
        nLike = parseInt(
        /** @type {?} */
        nLike, 10);
      }
      /** @type {?} */


      var n =
      /** @type {?} */
      nLike;
      /** @type {?} */

      var nDecimal = n.toString().replace(/^[^.]*\.?/, '');
      /** @type {?} */

      var i = Math.floor(Math.abs(n));
      /** @type {?} */

      var v = nDecimal.length;
      /** @type {?} */

      var f = parseInt(nDecimal, 10);
      /** @type {?} */

      var t = parseInt(n.toString().replace(/^[^.]*\.?|0+$/g, ''), 10) || 0;
      /** @type {?} */

      var lang = locale.split('-')[0].toLowerCase();

      switch (lang) {
        case 'af':
        case 'asa':
        case 'az':
        case 'bem':
        case 'bez':
        case 'bg':
        case 'brx':
        case 'ce':
        case 'cgg':
        case 'chr':
        case 'ckb':
        case 'ee':
        case 'el':
        case 'eo':
        case 'es':
        case 'eu':
        case 'fo':
        case 'fur':
        case 'gsw':
        case 'ha':
        case 'haw':
        case 'hu':
        case 'jgo':
        case 'jmc':
        case 'ka':
        case 'kk':
        case 'kkj':
        case 'kl':
        case 'ks':
        case 'ksb':
        case 'ky':
        case 'lb':
        case 'lg':
        case 'mas':
        case 'mgo':
        case 'ml':
        case 'mn':
        case 'nb':
        case 'nd':
        case 'ne':
        case 'nn':
        case 'nnh':
        case 'nyn':
        case 'om':
        case 'or':
        case 'os':
        case 'ps':
        case 'rm':
        case 'rof':
        case 'rwk':
        case 'saq':
        case 'seh':
        case 'sn':
        case 'so':
        case 'sq':
        case 'ta':
        case 'te':
        case 'teo':
        case 'tk':
        case 'tr':
        case 'ug':
        case 'uz':
        case 'vo':
        case 'vun':
        case 'wae':
        case 'xog':
          if (n === 1) return Plural.One;
          return Plural.Other;

        case 'ak':
        case 'ln':
        case 'mg':
        case 'pa':
        case 'ti':
          if (n === Math.floor(n) && n >= 0 && n <= 1) return Plural.One;
          return Plural.Other;

        case 'am':
        case 'as':
        case 'bn':
        case 'fa':
        case 'gu':
        case 'hi':
        case 'kn':
        case 'mr':
        case 'zu':
          if (i === 0 || n === 1) return Plural.One;
          return Plural.Other;

        case 'ar':
          if (n === 0) return Plural.Zero;
          if (n === 1) return Plural.One;
          if (n === 2) return Plural.Two;
          if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10) return Plural.Few;
          if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99) return Plural.Many;
          return Plural.Other;

        case 'ast':
        case 'ca':
        case 'de':
        case 'en':
        case 'et':
        case 'fi':
        case 'fy':
        case 'gl':
        case 'it':
        case 'nl':
        case 'sv':
        case 'sw':
        case 'ur':
        case 'yi':
          if (i === 1 && v === 0) return Plural.One;
          return Plural.Other;

        case 'be':
          if (n % 10 === 1 && !(n % 100 === 11)) return Plural.One;
          if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 && !(n % 100 >= 12 && n % 100 <= 14)) return Plural.Few;
          if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14) return Plural.Many;
          return Plural.Other;

        case 'br':
          if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91)) return Plural.One;
          if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92)) return Plural.Two;
          if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) && !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 || n % 100 >= 90 && n % 100 <= 99)) return Plural.Few;
          if (!(n === 0) && n % 1e6 === 0) return Plural.Many;
          return Plural.Other;

        case 'bs':
        case 'hr':
        case 'sr':
          if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11)) return Plural.One;
          if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14) || f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 && !(f % 100 >= 12 && f % 100 <= 14)) return Plural.Few;
          return Plural.Other;

        case 'cs':
        case 'sk':
          if (i === 1 && v === 0) return Plural.One;
          if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0) return Plural.Few;
          if (!(v === 0)) return Plural.Many;
          return Plural.Other;

        case 'cy':
          if (n === 0) return Plural.Zero;
          if (n === 1) return Plural.One;
          if (n === 2) return Plural.Two;
          if (n === 3) return Plural.Few;
          if (n === 6) return Plural.Many;
          return Plural.Other;

        case 'da':
          if (n === 1 || !(t === 0) && (i === 0 || i === 1)) return Plural.One;
          return Plural.Other;

        case 'dsb':
        case 'hsb':
          if (v === 0 && i % 100 === 1 || f % 100 === 1) return Plural.One;
          if (v === 0 && i % 100 === 2 || f % 100 === 2) return Plural.Two;
          if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4) return Plural.Few;
          return Plural.Other;

        case 'ff':
        case 'fr':
        case 'hy':
        case 'kab':
          if (i === 0 || i === 1) return Plural.One;
          return Plural.Other;

        case 'fil':
          if (v === 0 && (i === 1 || i === 2 || i === 3) || v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) || !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9)) return Plural.One;
          return Plural.Other;

        case 'ga':
          if (n === 1) return Plural.One;
          if (n === 2) return Plural.Two;
          if (n === Math.floor(n) && n >= 3 && n <= 6) return Plural.Few;
          if (n === Math.floor(n) && n >= 7 && n <= 10) return Plural.Many;
          return Plural.Other;

        case 'gd':
          if (n === 1 || n === 11) return Plural.One;
          if (n === 2 || n === 12) return Plural.Two;
          if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19)) return Plural.Few;
          return Plural.Other;

        case 'gv':
          if (v === 0 && i % 10 === 1) return Plural.One;
          if (v === 0 && i % 10 === 2) return Plural.Two;
          if (v === 0 && (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80)) return Plural.Few;
          if (!(v === 0)) return Plural.Many;
          return Plural.Other;

        case 'he':
          if (i === 1 && v === 0) return Plural.One;
          if (i === 2 && v === 0) return Plural.Two;
          if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0) return Plural.Many;
          return Plural.Other;

        case 'is':
          if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0)) return Plural.One;
          return Plural.Other;

        case 'ksh':
          if (n === 0) return Plural.Zero;
          if (n === 1) return Plural.One;
          return Plural.Other;

        case 'kw':
        case 'naq':
        case 'se':
        case 'smn':
          if (n === 1) return Plural.One;
          if (n === 2) return Plural.Two;
          return Plural.Other;

        case 'lag':
          if (n === 0) return Plural.Zero;
          if ((i === 0 || i === 1) && !(n === 0)) return Plural.One;
          return Plural.Other;

        case 'lt':
          if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19)) return Plural.One;
          if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 && !(n % 100 >= 11 && n % 100 <= 19)) return Plural.Few;
          if (!(f === 0)) return Plural.Many;
          return Plural.Other;

        case 'lv':
        case 'prg':
          if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 || v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19) return Plural.Zero;
          if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) || !(v === 2) && f % 10 === 1) return Plural.One;
          return Plural.Other;

        case 'mk':
          if (v === 0 && i % 10 === 1 || f % 10 === 1) return Plural.One;
          return Plural.Other;

        case 'mt':
          if (n === 1) return Plural.One;
          if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10) return Plural.Few;
          if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19) return Plural.Many;
          return Plural.Other;

        case 'pl':
          if (i === 1 && v === 0) return Plural.One;
          if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14)) return Plural.Few;
          if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 || v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 || v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14) return Plural.Many;
          return Plural.Other;

        case 'pt':
          if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2)) return Plural.One;
          return Plural.Other;

        case 'ro':
          if (i === 1 && v === 0) return Plural.One;
          if (!(v === 0) || n === 0 || !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19) return Plural.Few;
          return Plural.Other;

        case 'ru':
        case 'uk':
          if (v === 0 && i % 10 === 1 && !(i % 100 === 11)) return Plural.One;
          if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 && !(i % 100 >= 12 && i % 100 <= 14)) return Plural.Few;
          if (v === 0 && i % 10 === 0 || v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 || v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14) return Plural.Many;
          return Plural.Other;

        case 'shi':
          if (i === 0 || n === 1) return Plural.One;
          if (n === Math.floor(n) && n >= 2 && n <= 10) return Plural.Few;
          return Plural.Other;

        case 'si':
          if (n === 0 || n === 1 || i === 0 && f === 1) return Plural.One;
          return Plural.Other;

        case 'sl':
          if (v === 0 && i % 100 === 1) return Plural.One;
          if (v === 0 && i % 100 === 2) return Plural.Two;
          if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0)) return Plural.Few;
          return Plural.Other;

        case 'tzm':
          if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99) return Plural.One;
          return Plural.Other;
        // When there is no specification, the default is always "other"
        // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules
        // > other (required—general plural form — also used if the language only has a single form)

        default:
          return Plural.Other;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * \@publicApi
     * @param {?} data
     * @param {?=} localeId
     * @param {?=} extraData
     * @return {?}
     */
    // 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[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId];
      }

      localeId = localeId.toLowerCase().replace(/_/g, '-');
      _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLOCALE_DATA"][localeId] = data;

      if (extraData) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLOCALE_DATA"][localeId][_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData] = extraData;
      }
    }
    /** @enum {number} */


    var ExtraLocaleDataIndex = {
      ExtraDayPeriodFormats: 0,
      ExtraDayPeriodStandalone: 1,
      ExtraDayPeriodsRules: 2
    };
    /** @enum {number} */

    var CurrencyIndex = {
      Symbol: 0,
      SymbolNarrow: 1,
      NbOfDigits: 2
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /**
     * @param {?} cookieStr
     * @param {?} name
     * @return {?}
     */

    function parseCookieValue(cookieStr, name) {
      name = encodeURIComponent(name);

      var _iterator = _createForOfIteratorHelper(cookieStr.split(';')),
          _step;

      try {
        for (_iterator.s(); !(_step = _iterator.n()).done;) {
          var cookie = _step.value;

          /** @type {?} */
          var eqIndex = cookie.indexOf('=');

          var _ref2 = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)],
              _ref3 = _slicedToArray(_ref2, 2),
              cookieName = _ref3[0],
              cookieValue = _ref3[1];

          if (cookieName.trim() === name) {
            return decodeURIComponent(cookieValue);
          }
        }
      } catch (err) {
        _iterator.e(err);
      } finally {
        _iterator.f();
      }

      return null;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 diff and convert ngStyle/ngClass instructions into [style] and [class] bindings.
     *
     * ngStyle and ngClass both accept various forms of input and behave differently than that
     * of how [style] and [class] behave in Angular.
     *
     * The differences are:
     *  - ngStyle and ngClass both **watch** their binding values for changes each time CD runs
     *    while [style] and [class] bindings do not (they check for identity changes)
     *  - ngStyle allows for unit-based keys (e.g. `{'max-width.px':value}`) and [style] does not
     *  - ngClass supports arrays of class values and [class] only accepts map and string values
     *  - ngClass allows for multiple className keys (space-separated) within an array or map
     *     (as the * key) while [class] only accepts a simple key/value map object
     *
     * Having Angular understand and adapt to all the different forms of behavior is complicated
     * and unnecessary. Instead, ngClass and ngStyle should have their input values be converted
     * into something that the core-level [style] and [class] bindings understand.
     *
     * This [StylingDiffer] class handles this conversion by creating a new input value each time
     * the inner representation of the binding value have changed.
     *
     * ## Why do we care about ngStyle/ngClass?
     * The styling algorithm code (documented inside of `render3/interfaces/styling.ts`) needs to
     * respect and understand the styling values emitted through ngStyle and ngClass (when they
     * are present and used in a template).
     *
     * Instead of having these directives manage styling on their own, they should be included
     * into the Angular styling algorithm that exists for [style] and [class] bindings.
     *
     * Here's why:
     *
     * - If ngStyle/ngClass is used in combination with [style]/[class] bindings then the
     *   styles and classes would fall out of sync and be applied and updated at
     *   inconsistent times
     * - Both ngClass/ngStyle do not respect [class.name] and [style.prop] bindings
     *   (they will write over them given the right combination of events)
     *
     *   ```
     *   <!-- if `w1` is updated then it will always override `w2`
     *        if `w2` is updated then it will always override `w1`
     *        if both are updated at the same time then `w1` wins -->
     *   <div [ngStyle]="{width:w1}" [style.width]="w2">...</div>
     *
     *   <!-- if `w1` is updated then it will always lose to `w2`
     *        if `w2` is updated then it will always override `w1`
     *        if both are updated at the same time then `w2` wins -->
     *   <div [style]="{width:w1}" [style.width]="w2">...</div>
     *   ```
     * - ngClass/ngStyle were written as a directives and made use of maps, closures and other
     *   expensive data structures which were evaluated each time CD runs
     * @template T
     */


    var StylingDiffer = /*#__PURE__*/function () {
      /**
       * @param {?} _name
       * @param {?} _options
       */
      function StylingDiffer(_name, _options) {
        _classCallCheck(this, StylingDiffer);

        this._name = _name;
        this._options = _options;
        this.value = null;
        this._lastSetValue = null;
        this._lastSetValueType = 0
        /* Null */
        ;
        this._lastSetValueIdentityChange = false;
      }
      /**
       * Sets (updates) the styling value within the differ.
       *
       * Only when `hasValueChanged` is called then this new value will be evaluted
       * and checked against the previous value.
       *
       * @param {?} value the new styling value provided from the ngClass/ngStyle binding
       * @return {?}
       */


      _createClass2(StylingDiffer, [{
        key: "setValue",
        value: function setValue(value) {
          if (Array.isArray(value)) {
            this._lastSetValueType = 4
            /* Array */
            ;
          } else if (value instanceof Set) {
            this._lastSetValueType = 8
            /* Set */
            ;
          } else if (value && typeof value === 'string') {
            if (!(this._options & 4
            /* AllowStringValue */
            )) {
              throw new Error(this._name + ' string values are not allowed');
            }

            this._lastSetValueType = 1
            /* String */
            ;
          } else {
            this._lastSetValueType = value ? 2
            /* Map */
            : 0
            /* Null */
            ;
          }

          this._lastSetValueIdentityChange = true;
          this._lastSetValue = value || null;
        }
        /**
         * Determines whether or not the value has changed.
         *
         * This function can be called right after `setValue()` is called, but it can also be
         * called incase the existing value (if it's a collection) changes internally. If the
         * value is indeed a collection it will do the necessary diffing work and produce a
         * new object value as assign that to `value`.
         *
         * @return {?} whether or not the value has changed in some way.
         */

      }, {
        key: "hasValueChanged",
        value: function hasValueChanged() {
          /** @type {?} */
          var valueHasChanged = this._lastSetValueIdentityChange;
          if (!valueHasChanged && !(this._lastSetValueType & 14
          /* Collection */
          )) return false;
          /** @type {?} */

          var finalValue = null;
          /** @type {?} */

          var trimValues = this._options & 1
          /* TrimProperties */
          ? true : false;
          /** @type {?} */

          var parseOutUnits = this._options & 8
          /* AllowUnits */
          ? true : false;
          /** @type {?} */

          var allowSubKeys = this._options & 2
          /* AllowSubKeys */
          ? true : false;

          switch (this._lastSetValueType) {
            // case 1: [input]="string"
            case 1
            /* String */
            :
              /** @type {?} */
              var tokens =
              /** @type {?} */
              this._lastSetValue.split(/\s+/g);

              if (this._options & 16
              /* ForceAsMap */
              ) {
                  finalValue = {};
                  tokens.forEach(
                  /**
                  * @param {?} token
                  * @param {?} i
                  * @return {?}
                  */
                  function (token, i) {
                    return (
                      /** @type {?} */
                      finalValue[token] = true
                    );
                  });
                } else {
                finalValue = tokens.reduce(
                /**
                * @param {?} str
                * @param {?} token
                * @param {?} i
                * @return {?}
                */
                function (str, token, i) {
                  return str + (i ? ' ' : '') + token;
                });
              }

              break;
            // case 2: [input]="{key:value}"

            case 2
            /* Map */
            :
              /** @type {?} */
              var map =
              /** @type {?} */
              this._lastSetValue;
              /** @type {?} */

              var keys = Object.keys(map);

              if (!valueHasChanged) {
                if (this.value) {
                  // we know that the classExp value exists and that it is
                  // a map (otherwise an identity change would have occurred)
                  valueHasChanged = mapHasChanged(keys,
                  /** @type {?} */
                  this.value, map);
                } else {
                  valueHasChanged = true;
                }
              }

              if (valueHasChanged) {
                finalValue = bulidMapFromValues(this._name, trimValues, parseOutUnits, allowSubKeys, map, keys);
              }

              break;
            // case 3a: [input]="[str1, str2, ...]"
            // case 3b: [input]="Set"

            case 4
            /* Array */
            :
            case 8
            /* Set */
            :
              /** @type {?} */
              var values = Array.from(
              /** @type {?} */
              this._lastSetValue);

              if (!valueHasChanged) {
                /** @type {?} */
                var _keys = Object.keys(
                /** @type {?} */
                this.value);

                valueHasChanged = !arrayEqualsArray(_keys, values);
              }

              if (valueHasChanged) {
                finalValue = bulidMapFromValues(this._name, trimValues, parseOutUnits, allowSubKeys, values);
              }

              break;
            // case 4: [input]="null|undefined"

            default:
              finalValue = null;
              break;
          }

          if (valueHasChanged) {
            /** @type {?} */
            this.value =
            /** @type {?} */
            finalValue;
          }

          return valueHasChanged;
        }
      }]);

      return StylingDiffer;
    }();

    if (false) {}
    /** @enum {number} */


    var StylingDifferOptions = {
      None: 0,
      TrimProperties: 1,
      AllowSubKeys: 2,
      AllowStringValue: 4,
      AllowUnits: 8,
      ForceAsMap: 16
    };
    /** @enum {number} */

    var StylingDifferValueTypes = {
      Null: 0,
      String: 1,
      Map: 2,
      Array: 4,
      Set: 8,
      Collection: 14
    };
    /**
     * builds and returns a map based on the values input value
     *
     * If the `keys` param is provided then the `values` param is treated as a
     * string map. Otherwise `values` is treated as a string array.
     * @param {?} errorPrefix
     * @param {?} trim
     * @param {?} parseOutUnits
     * @param {?} allowSubKeys
     * @param {?} values
     * @param {?=} keys
     * @return {?}
     */

    function bulidMapFromValues(errorPrefix, trim, parseOutUnits, allowSubKeys, values, keys) {
      /** @type {?} */
      var map = {};

      if (keys) {
        // case 1: map
        for (var i = 0; i < keys.length; i++) {
          /** @type {?} */
          var key = keys[i];
          key = trim ? key.trim() : key;
          /** @type {?} */

          var value =
          /** @type {?} */
          values[key];
          setMapValues(map, key, value, parseOutUnits, allowSubKeys);
        }
      } else {
        // case 2: array
        for (var _i2 = 0; _i2 < values.length; _i2++) {
          /** @type {?} */
          var _value2 =
          /** @type {?} */
          values[_i2];
          assertValidValue(errorPrefix, _value2);
          _value2 = trim ? _value2.trim() : _value2;
          setMapValues(map, _value2, true, false, allowSubKeys);
        }
      }

      return map;
    }
    /**
     * @param {?} errorPrefix
     * @param {?} value
     * @return {?}
     */


    function assertValidValue(errorPrefix, value) {
      if (typeof value !== 'string') {
        throw new Error("".concat(errorPrefix, " can only toggle CSS classes expressed as strings, got ").concat(value));
      }
    }
    /**
     * @param {?} map
     * @param {?} key
     * @param {?} value
     * @param {?} parseOutUnits
     * @param {?} allowSubKeys
     * @return {?}
     */


    function setMapValues(map, key, value, parseOutUnits, allowSubKeys) {
      if (allowSubKeys && key.indexOf(' ') > 0) {
        /** @type {?} */
        var innerKeys = key.split(/\s+/g);

        for (var j = 0; j < innerKeys.length; j++) {
          setIndividualMapValue(map, innerKeys[j], value, parseOutUnits);
        }
      } else {
        setIndividualMapValue(map, key, value, parseOutUnits);
      }
    }
    /**
     * @param {?} map
     * @param {?} key
     * @param {?} value
     * @param {?} parseOutUnits
     * @return {?}
     */


    function setIndividualMapValue(map, key, value, parseOutUnits) {
      if (parseOutUnits) {
        /** @type {?} */
        var values = normalizeStyleKeyAndValue(key, value);
        value = values.value;
        key = values.key;
      }

      map[key] = value;
    }
    /**
     * @param {?} key
     * @param {?} value
     * @return {?}
     */


    function normalizeStyleKeyAndValue(key, value) {
      /** @type {?} */
      var index = key.indexOf('.');

      if (index > 0) {
        /** @type {?} */
        var unit = key.substr(index + 1);
        key = key.substring(0, index);

        if (value != null) {
          // we should not convert null values to string
          value += unit;
        }
      }

      return {
        key: key,
        value: value
      };
    }
    /**
     * @param {?} keys
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    function mapHasChanged(keys, a, b) {
      /** @type {?} */
      var oldKeys = Object.keys(a);
      /** @type {?} */

      var newKeys = keys; // the keys are different which means the map changed

      if (!arrayEqualsArray(oldKeys, newKeys)) {
        return true;
      }

      for (var i = 0; i < newKeys.length; i++) {
        /** @type {?} */
        var key = newKeys[i];

        if (a[key] !== b[key]) {
          return true;
        }
      }

      return false;
    }
    /**
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    function arrayEqualsArray(a, b) {
      if (a && b) {
        if (a.length !== b.length) return false;

        for (var i = 0; i < a.length; i++) {
          if (b.indexOf(a[i]) === -1) return false;
        }

        return true;
      }

      return false;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Used as a token for an injected service within the NgClass directive.
     *
     * NgClass behaves differenly whether or not VE is being used or not. If
     * present then the legacy ngClass diffing algorithm will be used as an
     * injected service. Otherwise the new diffing algorithm (which delegates
     * to the `[class]` binding) will be used. This toggle behavior is done so
     * via the ivy_switch mechanism.
     * @abstract
     */


    var NgClassImpl = function NgClassImpl() {
      _classCallCheck(this, NgClassImpl);
    };

    if (false) {}

    var NgClassR2Impl = /*#__PURE__*/function () {
      /**
       * @param {?} _iterableDiffers
       * @param {?} _keyValueDiffers
       * @param {?} _ngEl
       * @param {?} _renderer
       */
      function NgClassR2Impl(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {
        _classCallCheck(this, NgClassR2Impl);

        this._iterableDiffers = _iterableDiffers;
        this._keyValueDiffers = _keyValueDiffers;
        this._ngEl = _ngEl;
        this._renderer = _renderer;
        this._initialClasses = [];
      }
      /**
       * @return {?}
       */


      _createClass2(NgClassR2Impl, [{
        key: "getValue",
        value: function getValue() {
          return null;
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setClass",
        value: function setClass(value) {
          this._removeClasses(this._initialClasses);

          this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : [];

          this._applyClasses(this._initialClasses);

          this._applyClasses(this._rawClass);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setNgClass",
        value: function setNgClass(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();
            }
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "applyChanges",
        value: function applyChanges() {
          if (this._iterableDiffer) {
            /** @type {?} */
            var iterableChanges = this._iterableDiffer.diff(
            /** @type {?} */
            this._rawClass);

            if (iterableChanges) {
              this._applyIterableChanges(iterableChanges);
            }
          } else if (this._keyValueDiffer) {
            /** @type {?} */
            var keyValueChanges = this._keyValueDiffer.diff(
            /** @type {?} */
            this._rawClass);

            if (keyValueChanges) {
              this._applyKeyValueChanges(keyValueChanges);
            }
          }
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_applyKeyValueChanges",
        value: function _applyKeyValueChanges(changes) {
          var _this7 = this;

          changes.forEachAddedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this7._toggleClass(record.key, record.currentValue);
          });
          changes.forEachChangedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this7._toggleClass(record.key, record.currentValue);
          });
          changes.forEachRemovedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            if (record.previousValue) {
              _this7._toggleClass(record.key, false);
            }
          });
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_applyIterableChanges",
        value: function _applyIterableChanges(changes) {
          var _this8 = this;

          changes.forEachAddedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            if (typeof record.item === 'string') {
              _this8._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(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this8._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).
         * @private
         * @param {?} rawClassVal
         * @return {?}
         */

      }, {
        key: "_applyClasses",
        value: function _applyClasses(rawClassVal) {
          var _this9 = this;

          if (rawClassVal) {
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
              /** @type {?} */
              rawClassVal.forEach(
              /**
              * @param {?} klass
              * @return {?}
              */
              function (klass) {
                return _this9._toggleClass(klass, true);
              });
            } else {
              Object.keys(rawClassVal).forEach(
              /**
              * @param {?} klass
              * @return {?}
              */
              function (klass) {
                return _this9._toggleClass(klass, !!rawClassVal[klass]);
              });
            }
          }
        }
        /**
         * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup
         * purposes.
         * @private
         * @param {?} rawClassVal
         * @return {?}
         */

      }, {
        key: "_removeClasses",
        value: function _removeClasses(rawClassVal) {
          var _this10 = this;

          if (rawClassVal) {
            if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {
              /** @type {?} */
              rawClassVal.forEach(
              /**
              * @param {?} klass
              * @return {?}
              */
              function (klass) {
                return _this10._toggleClass(klass, false);
              });
            } else {
              Object.keys(rawClassVal).forEach(
              /**
              * @param {?} klass
              * @return {?}
              */
              function (klass) {
                return _this10._toggleClass(klass, false);
              });
            }
          }
        }
        /**
         * @private
         * @param {?} klass
         * @param {?} enabled
         * @return {?}
         */

      }, {
        key: "_toggleClass",
        value: function _toggleClass(klass, enabled) {
          var _this11 = this;

          klass = klass.trim();

          if (klass) {
            klass.split(/\s+/g).forEach(
            /**
            * @param {?} klass
            * @return {?}
            */
            function (klass) {
              if (enabled) {
                _this11._renderer.addClass(_this11._ngEl.nativeElement, klass);
              } else {
                _this11._renderer.removeClass(_this11._ngEl.nativeElement, klass);
              }
            });
          }
        }
      }]);

      return NgClassR2Impl;
    }();

    NgClassR2Impl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    NgClassR2Impl.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"]
      }];
    };

    if (false) {}

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

        this._value = null;
        this._ngClassDiffer = new StylingDiffer('NgClass', 1
        /* TrimProperties */
        | 2
        /* AllowSubKeys */
        | 4
        /* AllowStringValue */
        | 16
        /* ForceAsMap */
        );
        this._classStringDiffer = null;
      }
      /**
       * @return {?}
       */


      _createClass2(NgClassR3Impl, [{
        key: "getValue",
        value: function getValue() {
          return this._value;
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setClass",
        value: function setClass(value) {
          // early exit incase the binding gets emitted as an empty value which
          // means there is no reason to instantiate and diff the values...
          if (!value && !this._classStringDiffer) return;
          this._classStringDiffer = this._classStringDiffer || new StylingDiffer('class', 4
          /* AllowStringValue */
          | 16
          /* ForceAsMap */
          );

          this._classStringDiffer.setValue(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setNgClass",
        value: function setNgClass(value) {
          this._ngClassDiffer.setValue(value);
        }
        /**
         * @return {?}
         */

      }, {
        key: "applyChanges",
        value: function applyChanges() {
          /** @type {?} */
          var classChanged = this._classStringDiffer ? this._classStringDiffer.hasValueChanged() : false;
          /** @type {?} */

          var ngClassChanged = this._ngClassDiffer.hasValueChanged();

          if (classChanged || ngClassChanged) {
            /** @type {?} */
            var value = this._ngClassDiffer.value;

            if (this._classStringDiffer) {
              /** @type {?} */
              var classValue = this._classStringDiffer.value;

              if (classValue) {
                value = value ? Object.assign({}, classValue, value) : classValue;
              }
            }

            this._value = value;
          }
        }
      }]);

      return NgClassR3Impl;
    }();

    NgClassR3Impl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];

    if (false) {} // the implementation for both NgStyleR2Impl and NgStyleR3Impl are
    // not ivy_switch'd away, instead they are only hooked up into the
    // DI via NgStyle's directive's provider property.

    /** @type {?} */


    var NgClassImplProvider__PRE_R3__ = {
      provide: NgClassImpl,
      useClass: NgClassR2Impl
    };
    /** @type {?} */

    var NgClassImplProvider__POST_R3__ = {
      provide: NgClassImpl,
      useClass: NgClassR3Impl
    };
    /** @type {?} */

    var NgClassImplProvider = NgClassImplProvider__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /*
     * NgClass (as well as NgStyle) behaves differently when loaded in the VE and when not.
     *
     * If the VE is present (which is for older versions of Angular) then NgClass will inject
     * the legacy diffing algorithm as a service and delegate all styling changes to that.
     *
     * If the VE is not present then NgStyle will normalize (through the injected service) and
     * then write all styling changes to the `[style]` binding directly (through a host binding).
     * Then Angular will notice the host binding change and treat the changes as styling
     * changes and apply them via the core styling instructions that exist within Angular.
     */
    // used when the VE is present

    /** @type {?} */

    var ngClassDirectiveDef__PRE_R3__ = undefined; // used when the VE is not present (note the directive will
    // never be instantiated normally because it is apart of a
    // base class)

    var ɵ0 =
    /**
    * @return {?}
    */
    function ɵ0() {},
        ɵ1 =
    /**
    * @return {?}
    */
    function ɵ1() {},
        ɵ2 =
    /**
    * @param {?} rf
    * @param {?} ctx
    * @param {?} elIndex
    * @return {?}
    */
    function ɵ2(rf, ctx, elIndex) {
      if (rf & 1
      /* Create */
      ) {
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵallocHostVars"])(1);
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyling"])();
        }

      if (rf & 2
      /* Update */
      ) {
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"])(ctx.getValue());
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstylingApply"])();
        }
    };
    /** @type {?} */


    var ngClassDirectiveDef__POST_R3__ = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"])({
      type:
      /** @type {?} */
      ɵ0,
      selectors:
      /** @type {?} */
      null,
      factory: ɵ1,
      hostBindings: ɵ2
    });
    /** @type {?} */

    var ngClassDirectiveDef = ngClassDirectiveDef__PRE_R3__;
    /**
     * Serves as the base non-VE container for NgClass.
     *
     * While this is a base class that NgClass extends from, the
     * class itself acts as a container for non-VE code to setup
     * a link to the `[class]` host binding (via the static
     * `ngDirectiveDef` property on the class).
     *
     * Note that the `ngDirectiveDef` property's code is switched
     * depending if VE is present or not (this allows for the
     * binding code to be set only for newer versions of Angular).
     *
     * \@publicApi
     */

    var NgClassBase = /*#__PURE__*/function () {
      /**
       * @param {?} _delegate
       */
      function NgClassBase(_delegate) {
        _classCallCheck(this, NgClassBase);

        this._delegate = _delegate;
      }
      /**
       * @return {?}
       */


      _createClass2(NgClassBase, [{
        key: "getValue",
        value: function getValue() {
          return this._delegate.getValue();
        }
      }]);

      return NgClassBase;
    }();
    /** @nocollapse */


    NgClassBase.ngDirectiveDef = ngClassDirectiveDef;

    if (false) {}
    /**
     * \@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 (_NgClassBase) {
      _inherits(NgClass, _NgClassBase);

      var _super4 = _createSuper(NgClass);

      /**
       * @param {?} delegate
       */
      function NgClass(delegate) {
        _classCallCheck(this, NgClass);

        return _super4.call(this, delegate);
      }
      /**
       * @param {?} value
       * @return {?}
       */


      _createClass2(NgClass, [{
        key: "ngDoCheck",

        /**
         * @return {?}
         */
        value: function ngDoCheck() {
          this._delegate.applyChanges();
        }
      }, {
        key: "klass",
        set: function set(value) {
          this._delegate.setClass(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "ngClass",
        set: function set(value) {
          this._delegate.setNgClass(value);
        }
      }]);

      return NgClass;
    }(NgClassBase);

    NgClass.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngClass]',
        providers: [NgClassImplProvider]
      }]
    }];
    /** @nocollapse */

    NgClass.ctorParameters = function () {
      return [{
        type: NgClassImpl
      }];
    };

    NgClass.propDecorators = {
      klass: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
        args: ['class']
      }],
      ngClass: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
        args: ['ngClass']
      }]
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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 () {
      /**
       * @param {?} _viewContainerRef
       */
      function NgComponentOutlet(_viewContainerRef) {
        _classCallCheck(this, NgComponentOutlet);

        this._viewContainerRef = _viewContainerRef;
        this._componentRef = null;
        this._moduleRef = null;
      }
      /**
       * @param {?} changes
       * @return {?}
       */


      _createClass2(NgComponentOutlet, [{
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          this._viewContainerRef.clear();

          this._componentRef = null;

          if (this.ngComponentOutlet) {
            /** @type {?} */
            var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;

            if (changes['ngComponentOutletNgModuleFactory']) {
              if (this._moduleRef) this._moduleRef.destroy();

              if (this.ngComponentOutletNgModuleFactory) {
                /** @type {?} */
                var parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]);
                this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);
              } else {
                this._moduleRef = null;
              }
            }
            /** @type {?} */


            var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver : elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]);
            /** @type {?} */

            var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);
            this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this._moduleRef) this._moduleRef.destroy();
        }
      }]);

      return NgComponentOutlet;
    }();

    NgComponentOutlet.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngComponentOutlet]'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @template T
     */


    var NgForOfContext = /*#__PURE__*/function () {
      /**
       * @param {?} $implicit
       * @param {?} ngForOf
       * @param {?} index
       * @param {?} count
       */
      function NgForOfContext($implicit, ngForOf, index, count) {
        _classCallCheck(this, NgForOfContext);

        this.$implicit = $implicit;
        this.ngForOf = ngForOf;
        this.index = index;
        this.count = count;
      }
      /**
       * @return {?}
       */


      _createClass2(NgForOfContext, [{
        key: "first",
        get: function get() {
          return this.index === 0;
        }
        /**
         * @return {?}
         */

      }, {
        key: "last",
        get: function get() {
          return this.index === this.count - 1;
        }
        /**
         * @return {?}
         */

      }, {
        key: "even",
        get: function get() {
          return this.index % 2 === 0;
        }
        /**
         * @return {?}
         */

      }, {
        key: "odd",
        get: function get() {
          return !this.even;
        }
      }]);

      return NgForOfContext;
    }();

    if (false) {}
    /**
     * 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 userObservable | async as 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.
     * - `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
     * @template T
     */


    var NgForOf = /*#__PURE__*/function () {
      /**
       * @param {?} _viewContainer
       * @param {?} _template
       * @param {?} _differs
       */
      function NgForOf(_viewContainer, _template, _differs) {
        _classCallCheck(this, NgForOf);

        this._viewContainer = _viewContainer;
        this._template = _template;
        this._differs = _differs;
        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).
       * @param {?} ngForOf
       * @return {?}
       */


      _createClass2(NgForOf, [{
        key: "ngDoCheck",

        /**
         * Applies the changes when needed.
         * @return {?}
         */
        value: function ngDoCheck() {
          if (this._ngForOfDirty) {
            this._ngForOfDirty = false; // React on ngForOf changes only once all inputs have been initialized

            /** @type {?} */

            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) {
            /** @type {?} */
            var changes = this._differ.diff(this._ngForOf);

            if (changes) this._applyChanges(changes);
          }
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_applyChanges",
        value: function _applyChanges(changes) {
          var _this12 = this;

          /** @type {?} */
          var insertTuples = [];
          changes.forEachOperation(
          /**
          * @param {?} item
          * @param {?} adjustedPreviousIndex
          * @param {?} currentIndex
          * @return {?}
          */
          function (item, adjustedPreviousIndex, currentIndex) {
            if (item.previousIndex == null) {
              /** @type {?} */
              var view = _this12._viewContainer.createEmbeddedView(_this12._template, new NgForOfContext(
              /** @type {?} */
              null, _this12._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);
              /** @type {?} */


              var tuple = new RecordViewTuple(item, view);
              insertTuples.push(tuple);
            } else if (currentIndex == null) {
              _this12._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);
            } else if (adjustedPreviousIndex !== null) {
              /** @type {?} */
              var _view2 =
              /** @type {?} */
              _this12._viewContainer.get(adjustedPreviousIndex);

              _this12._viewContainer.move(_view2, currentIndex);
              /** @type {?} */


              var _tuple = new RecordViewTuple(item,
              /** @type {?} */
              _view2);

              insertTuples.push(_tuple);
            }
          });

          for (var i = 0; i < insertTuples.length; i++) {
            this._perViewChange(insertTuples[i].view, insertTuples[i].record);
          }

          for (var _i3 = 0, ilen = this._viewContainer.length; _i3 < ilen; _i3++) {
            /** @type {?} */
            var viewRef =
            /** @type {?} */
            this._viewContainer.get(_i3);

            viewRef.context.index = _i3;
            viewRef.context.count = ilen;
            viewRef.context.ngForOf = this._ngForOf;
          }

          changes.forEachIdentityChange(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            /** @type {?} */
            var viewRef =
            /** @type {?} */
            _this12._viewContainer.get(record.currentIndex);

            viewRef.context.$implicit = record.item;
          });
        }
        /**
         * @private
         * @param {?} view
         * @param {?} record
         * @return {?}
         */

      }, {
        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.
         * @template T
         * @param {?} dir
         * @param {?} ctx
         * @return {?}
         */

      }, {
        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 node object ID.
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "ngForTrackBy",
        set: function set(fn) {
          if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])() && fn != null && typeof fn !== 'function') {
            // TODO(vicb): use a log service once there is a public one available
            if (
            /** @type {?} */
            console &&
            /** @type {?} */
            console.warn) {
              console.warn("trackBy must be a function, but received ".concat(JSON.stringify(fn), ". ") + "See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.");
            }
          }

          this._trackByFn = fn;
        }
        /**
         * @return {?}
         */
        ,
        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-syntax#template-reference-variables--var-)
         * @param {?} value
         * @return {?}
         */

      }, {
        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;
          }
        }
      }], [{
        key: "ngTemplateContextGuard",
        value: function ngTemplateContextGuard(dir, ctx) {
          return true;
        }
      }]);

      return NgForOf;
    }();

    NgForOf.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngFor][ngForOf]'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * @template T
     */


    var RecordViewTuple =
    /**
     * @param {?} record
     * @param {?} view
     */
    function RecordViewTuple(record, view) {
      _classCallCheck(this, RecordViewTuple);

      this.record = record;
      this.view = view;
    };

    if (false) {}
    /**
     * @param {?} type
     * @return {?}
     */


    function getTypeName(type) {
      return type['name'] || typeof type;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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](guide/template-syntax#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]="hero-list" [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 () {
      /**
       * @param {?} _viewContainer
       * @param {?} templateRef
       */
      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.
       * @param {?} condition
       * @return {?}
       */


      _createClass2(NgIf, [{
        key: "_updateView",

        /**
         * @private
         * @return {?}
         */
        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);
              }
            }
          }
        }
      }, {
        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.
         * @param {?} templateRef
         * @return {?}
         */

      }, {
        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.
         * @param {?} templateRef
         * @return {?}
         */

      }, {
        key: "ngIfElse",
        set: function set(templateRef) {
          assertTemplate('ngIfElse', templateRef);
          this._elseTemplateRef = templateRef;
          this._elseViewRef = null; // clear previous view if any.

          this._updateView();
        }
      }]);

      return NgIf;
    }();

    NgIf.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngIf]'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * \@publicApi
     */


    var NgIfContext = function NgIfContext() {
      _classCallCheck(this, NgIfContext);

      this.$implicit = null;
      this.ngIf = null;
    };

    if (false) {}
    /**
     * @param {?} property
     * @param {?} templateRef
     * @return {?}
     */


    function assertTemplate(property, templateRef) {
      /** @type {?} */
      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), "'."));
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var SwitchView = /*#__PURE__*/function () {
      /**
       * @param {?} _viewContainerRef
       * @param {?} _templateRef
       */
      function SwitchView(_viewContainerRef, _templateRef) {
        _classCallCheck(this, SwitchView);

        this._viewContainerRef = _viewContainerRef;
        this._templateRef = _templateRef;
        this._created = false;
      }
      /**
       * @return {?}
       */


      _createClass2(SwitchView, [{
        key: "create",
        value: function create() {
          this._created = true;

          this._viewContainerRef.createEmbeddedView(this._templateRef);
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this._created = false;

          this._viewContainerRef.clear();
        }
        /**
         * @param {?} created
         * @return {?}
         */

      }, {
        key: "enforceState",
        value: function enforceState(created) {
          if (created && !this._created) {
            this.create();
          } else if (!created && this._created) {
            this.destroy();
          }
        }
      }]);

      return SwitchView;
    }();

    if (false) {}
    /**
     * \@ngModule CommonModule
     *
     * \@description A structural directive that adds or removes templates (displaying or hiding views)
     * when the next match expression matches the switch expression.
     *
     * 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;
      }
      /**
       * @param {?} newValue
       * @return {?}
       */


      _createClass2(NgSwitch, [{
        key: "_addCase",

        /**
         * \@internal
         * @return {?}
         */
        value: function _addCase() {
          return this._caseCount++;
        }
        /**
         * \@internal
         * @param {?} view
         * @return {?}
         */

      }, {
        key: "_addDefault",
        value: function _addDefault(view) {
          if (!this._defaultViews) {
            this._defaultViews = [];
          }

          this._defaultViews.push(view);
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_matchCase",
        value: function _matchCase(value) {
          /** @type {?} */
          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;
        }
        /**
         * @private
         * @param {?} useDefault
         * @return {?}
         */

      }, {
        key: "_updateDefaultCases",
        value: function _updateDefaultCases(useDefault) {
          if (this._defaultViews && useDefault !== this._defaultUsed) {
            this._defaultUsed = useDefault;

            for (var i = 0; i < this._defaultViews.length; i++) {
              /** @type {?} */
              var defaultView = this._defaultViews[i];
              defaultView.enforceState(useDefault);
            }
          }
        }
      }, {
        key: "ngSwitch",
        set: function set(newValue) {
          this._ngSwitch = newValue;

          if (this._caseCount === 0) {
            this._updateDefaultCases(true);
          }
        }
      }]);

      return NgSwitch;
    }();

    NgSwitch.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngSwitch]'
      }]
    }];
    NgSwitch.propDecorators = {
      ngSwitch: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} viewContainer
       * @param {?} templateRef
       * @param {?} ngSwitch
       */
      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.
       * @return {?}
       */


      _createClass2(NgSwitchCase, [{
        key: "ngDoCheck",
        value: function ngDoCheck() {
          this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
        }
      }]);

      return NgSwitchCase;
    }();

    NgSwitchCase.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngSwitchCase]'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * \@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 =
    /**
     * @param {?} viewContainer
     * @param {?} templateRef
     * @param {?} ngSwitch
     */
    function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {
      _classCallCheck(this, NgSwitchDefault);

      ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
    };

    NgSwitchDefault.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngSwitchDefault]'
      }]
    }];
    /** @nocollapse */

    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"]
        }]
      }];
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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 () {
      /**
       * @param {?} _localization
       */
      function NgPlural(_localization) {
        _classCallCheck(this, NgPlural);

        this._localization = _localization;
        this._caseViews = {};
      }
      /**
       * @param {?} value
       * @return {?}
       */


      _createClass2(NgPlural, [{
        key: "addCase",

        /**
         * @param {?} value
         * @param {?} switchView
         * @return {?}
         */
        value: function addCase(value, switchView) {
          this._caseViews[value] = switchView;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_updateView",
        value: function _updateView() {
          this._clearViews();
          /** @type {?} */


          var cases = Object.keys(this._caseViews);
          /** @type {?} */

          var key = getPluralCategory(this._switchValue, cases, this._localization);

          this._activateView(this._caseViews[key]);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_clearViews",
        value: function _clearViews() {
          if (this._activeView) this._activeView.destroy();
        }
        /**
         * @private
         * @param {?} view
         * @return {?}
         */

      }, {
        key: "_activateView",
        value: function _activateView(view) {
          if (view) {
            this._activeView = view;

            this._activeView.create();
          }
        }
      }, {
        key: "ngPlural",
        set: function set(value) {
          this._switchValue = value;

          this._updateView();
        }
      }]);

      return NgPlural;
    }();

    NgPlural.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngPlural]'
      }]
    }];
    /** @nocollapse */

    NgPlural.ctorParameters = function () {
      return [{
        type: NgLocalization
      }];
    };

    NgPlural.propDecorators = {
      ngPlural: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * \@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 =
    /**
     * @param {?} value
     * @param {?} template
     * @param {?} viewContainer
     * @param {?} ngPlural
     */
    function NgPluralCase(value, template, viewContainer, ngPlural) {
      _classCallCheck(this, NgPluralCase);

      this.value = value;
      /** @type {?} */

      var isANumber = !isNaN(Number(value));
      ngPlural.addCase(isANumber ? "=".concat(value) : value, new SwitchView(viewContainer, template));
    };

    NgPluralCase.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngPluralCase]'
      }]
    }];
    /** @nocollapse */

    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"]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Used as a token for an injected service within the NgStyle directive.
     *
     * NgStyle behaves differenly whether or not VE is being used or not. If
     * present then the legacy ngClass diffing algorithm will be used as an
     * injected service. Otherwise the new diffing algorithm (which delegates
     * to the `[style]` binding) will be used. This toggle behavior is done so
     * via the ivy_switch mechanism.
     * @abstract
     */


    var NgStyleImpl = function NgStyleImpl() {
      _classCallCheck(this, NgStyleImpl);
    };

    if (false) {}

    var NgStyleR2Impl = /*#__PURE__*/function () {
      /**
       * @param {?} _ngEl
       * @param {?} _differs
       * @param {?} _renderer
       */
      function NgStyleR2Impl(_ngEl, _differs, _renderer) {
        _classCallCheck(this, NgStyleR2Impl);

        this._ngEl = _ngEl;
        this._differs = _differs;
        this._renderer = _renderer;
      }
      /**
       * @return {?}
       */


      _createClass2(NgStyleR2Impl, [{
        key: "getValue",
        value: function getValue() {
          return null;
        }
        /**
         * A map of 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.
         * @param {?} values
         * @return {?}
         */

      }, {
        key: "setNgStyle",
        value: function setNgStyle(values) {
          this._ngStyle = values;

          if (!this._differ && values) {
            this._differ = this._differs.find(values).create();
          }
        }
        /**
         * Applies the new styles if needed.
         * @return {?}
         */

      }, {
        key: "applyChanges",
        value: function applyChanges() {
          if (this._differ) {
            /** @type {?} */
            var changes = this._differ.diff(this._ngStyle);

            if (changes) {
              this._applyChanges(changes);
            }
          }
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_applyChanges",
        value: function _applyChanges(changes) {
          var _this13 = this;

          changes.forEachRemovedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this13._setStyle(record.key, null);
          });
          changes.forEachAddedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this13._setStyle(record.key, record.currentValue);
          });
          changes.forEachChangedItem(
          /**
          * @param {?} record
          * @return {?}
          */
          function (record) {
            return _this13._setStyle(record.key, record.currentValue);
          });
        }
        /**
         * @private
         * @param {?} nameAndUnit
         * @param {?} value
         * @return {?}
         */

      }, {
        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,
            /** @type {?} */
            value);
          } else {
            this._renderer.removeStyle(this._ngEl.nativeElement, name);
          }
        }
      }]);

      return NgStyleR2Impl;
    }();

    NgStyleR2Impl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /** @nocollapse */

    NgStyleR2Impl.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"]
      }];
    };

    if (false) {}

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

        this._differ = new StylingDiffer('NgStyle', 8
        /* AllowUnits */
        );
        this._value = null;
      }
      /**
       * @return {?}
       */


      _createClass2(NgStyleR3Impl, [{
        key: "getValue",
        value: function getValue() {
          return this._value;
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setNgStyle",
        value: function setNgStyle(value) {
          this._differ.setValue(value);
        }
        /**
         * @return {?}
         */

      }, {
        key: "applyChanges",
        value: function applyChanges() {
          if (this._differ.hasValueChanged()) {
            this._value = this._differ.value;
          }
        }
      }]);

      return NgStyleR3Impl;
    }();

    NgStyleR3Impl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];

    if (false) {} // the implementation for both NgClassR2Impl and NgClassR3Impl are
    // not ivy_switch'd away, instead they are only hooked up into the
    // DI via NgStyle's directive's provider property.

    /** @type {?} */


    var NgStyleImplProvider__PRE_R3__ = {
      provide: NgStyleImpl,
      useClass: NgStyleR2Impl
    };
    /** @type {?} */

    var NgStyleImplProvider__POST_R3__ = {
      provide: NgStyleImpl,
      useClass: NgStyleR3Impl
    };
    /** @type {?} */

    var NgStyleImplProvider = NgStyleImplProvider__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /*
     * NgStyle (as well as NgClass) behaves differently when loaded in the VE and when not.
     *
     * If the VE is present (which is for older versions of Angular) then NgStyle will inject
     * the legacy diffing algorithm as a service and delegate all styling changes to that.
     *
     * If the VE is not present then NgStyle will normalize (through the injected service) and
     * then write all styling changes to the `[style]` binding directly (through a host binding).
     * Then Angular will notice the host binding change and treat the changes as styling
     * changes and apply them via the core styling instructions that exist within Angular.
     */
    // used when the VE is present

    /** @type {?} */

    var ngStyleDirectiveDef__PRE_R3__ = undefined; // used when the VE is not present (note the directive will
    // never be instantiated normally because it is apart of a
    // base class)

    var ɵ0$1 =
    /**
    * @return {?}
    */
    function ɵ0$1() {},
        ɵ1$1 =
    /**
    * @return {?}
    */
    function ɵ1$1() {},
        ɵ2$1 =
    /**
    * @param {?} rf
    * @param {?} ctx
    * @param {?} elIndex
    * @return {?}
    */
    function ɵ2$1(rf, ctx, elIndex) {
      if (rf & 1
      /* Create */
      ) {
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyling"])();
        }

      if (rf & 2
      /* Update */
      ) {
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleMap"])(ctx.getValue());
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstylingApply"])();
        }
    };
    /** @type {?} */


    var ngStyleDirectiveDef__POST_R3__ = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"])({
      type:
      /** @type {?} */
      ɵ0$1,
      selectors:
      /** @type {?} */
      null,
      factory: ɵ1$1,
      hostBindings: ɵ2$1
    });
    /** @type {?} */

    var ngStyleDirectiveDef = ngStyleDirectiveDef__PRE_R3__;
    /**
     * Serves as the base non-VE container for NgStyle.
     *
     * While this is a base class that NgStyle extends from, the
     * class itself acts as a container for non-VE code to setup
     * a link to the `[style]` host binding (via the static
     * `ngDirectiveDef` property on the class).
     *
     * Note that the `ngDirectiveDef` property's code is switched
     * depending if VE is present or not (this allows for the
     * binding code to be set only for newer versions of Angular).
     *
     * \@publicApi
     */

    var NgStyleBase = /*#__PURE__*/function () {
      /**
       * @param {?} _delegate
       */
      function NgStyleBase(_delegate) {
        _classCallCheck(this, NgStyleBase);

        this._delegate = _delegate;
      }
      /**
       * @return {?}
       */


      _createClass2(NgStyleBase, [{
        key: "getValue",
        value: function getValue() {
          return this._delegate.getValue();
        }
      }]);

      return NgStyleBase;
    }();
    /** @nocollapse */


    NgStyleBase.ngDirectiveDef = ngStyleDirectiveDef;

    if (false) {}
    /**
     * \@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 (_NgStyleBase) {
      _inherits(NgStyle, _NgStyleBase);

      var _super5 = _createSuper(NgStyle);

      /**
       * @param {?} delegate
       */
      function NgStyle(delegate) {
        _classCallCheck(this, NgStyle);

        return _super5.call(this, delegate);
      }
      /**
       * @param {?} value
       * @return {?}
       */


      _createClass2(NgStyle, [{
        key: "ngDoCheck",

        /**
         * @return {?}
         */
        value: function ngDoCheck() {
          this._delegate.applyChanges();
        }
      }, {
        key: "ngStyle",
        set: function set(value) {
          this._delegate.setNgStyle(value);
        }
      }]);

      return NgStyle;
    }(NgStyleBase);

    NgStyle.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngStyle]',
        providers: [NgStyleImplProvider]
      }]
    }];
    /** @nocollapse */

    NgStyle.ctorParameters = function () {
      return [{
        type: NgStyleImpl
      }];
    };

    NgStyle.propDecorators = {
      ngStyle: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"],
        args: ['ngStyle']
      }]
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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 () {
      /**
       * @param {?} _viewContainerRef
       */
      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;
      }
      /**
       * @param {?} changes
       * @return {?}
       */


      _createClass2(NgTemplateOutlet, [{
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          /** @type {?} */
          var recreateView = this._shouldRecreateView(changes);

          if (recreateView) {
            if (this._viewRef) {
              this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef));
            }

            if (this.ngTemplateOutlet) {
              this._viewRef = this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext);
            }
          } 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).
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_shouldRecreateView",
        value: function _shouldRecreateView(changes) {
          /** @type {?} */
          var ctxChange = changes['ngTemplateOutletContext'];
          return !!changes['ngTemplateOutlet'] || ctxChange && this._hasContextShapeChanged(ctxChange);
        }
        /**
         * @private
         * @param {?} ctxChange
         * @return {?}
         */

      }, {
        key: "_hasContextShapeChanged",
        value: function _hasContextShapeChanged(ctxChange) {
          /** @type {?} */
          var prevCtxKeys = Object.keys(ctxChange.previousValue || {});
          /** @type {?} */

          var currCtxKeys = Object.keys(ctxChange.currentValue || {});

          if (prevCtxKeys.length === currCtxKeys.length) {
            var _iterator2 = _createForOfIteratorHelper(currCtxKeys),
                _step2;

            try {
              for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                var propName = _step2.value;

                if (prevCtxKeys.indexOf(propName) === -1) {
                  return true;
                }
              }
            } catch (err) {
              _iterator2.e(err);
            } finally {
              _iterator2.f();
            }

            return false;
          } else {
            return true;
          }
        }
        /**
         * @private
         * @param {?} ctx
         * @return {?}
         */

      }, {
        key: "_updateExistingContext",
        value: function _updateExistingContext(ctx) {
          for (var _i4 = 0, _Object$keys = Object.keys(ctx); _i4 < _Object$keys.length; _i4++) {
            var propName = _Object$keys[_i4];

            /** @type {?} */

            /** @type {?} */
            this._viewRef.context[propName] =
            /** @type {?} */
            this.ngTemplateOutletContext[propName];
          }
        }
      }]);

      return NgTemplateOutlet;
    }();

    NgTemplateOutlet.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngTemplateOutlet]'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A collection of Angular directives that are likely to be used in each and every Angular
     * application.
     * @type {?}
     */


    var COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} type
     * @param {?} value
     * @return {?}
     */

    function invalidPipeArgumentError(type, value) {
      return Error("InvalidPipeArgument: '".concat(value, "' for pipe '").concat(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type), "'"));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var NumberFormatter = /*#__PURE__*/function () {
      function NumberFormatter() {
        _classCallCheck(this, NumberFormatter);
      }

      _createClass2(NumberFormatter, null, [{
        key: "format",

        /**
         * @param {?} num
         * @param {?} locale
         * @param {?} style
         * @param {?=} opts
         * @return {?}
         */
        value: function format(num, locale, style) {
          var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
          var minimumIntegerDigits = opts.minimumIntegerDigits,
              minimumFractionDigits = opts.minimumFractionDigits,
              maximumFractionDigits = opts.maximumFractionDigits,
              currency = opts.currency,
              _opts$currencyAsSymbo = opts.currencyAsSymbol,
              currencyAsSymbol = _opts$currencyAsSymbo === void 0 ? false : _opts$currencyAsSymbo;
          /** @type {?} */

          var options = {
            minimumIntegerDigits: minimumIntegerDigits,
            minimumFractionDigits: minimumFractionDigits,
            maximumFractionDigits: maximumFractionDigits,
            style: NumberFormatStyle[style].toLowerCase()
          };

          if (style == NumberFormatStyle.Currency) {
            options.currency = typeof currency == 'string' ? currency : undefined;
            options.currencyDisplay = currencyAsSymbol ? 'symbol' : 'code';
          }

          return new Intl.NumberFormat(locale, options).format(num);
        }
      }]);

      return NumberFormatter;
    }();
    /** @type {?} */


    var DATE_FORMATS_SPLIT$1 = /((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/;
    /** @type {?} */

    var PATTERN_ALIASES = {
      // Keys are quoted so they do not get renamed during closure compilation.
      'yMMMdjms': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 3), digitCondition('day', 1), digitCondition('hour', 1), digitCondition('minute', 1), digitCondition('second', 1)])),
      'yMdjm': datePartGetterFactory(combine([digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1), digitCondition('hour', 1), digitCondition('minute', 1)])),
      'yMMMMEEEEd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 4), nameCondition('weekday', 4), digitCondition('day', 1)])),
      'yMMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 4), digitCondition('day', 1)])),
      'yMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 3), digitCondition('day', 1)])),
      'yMd': datePartGetterFactory(combine([digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1)])),
      'jms': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('second', 1), digitCondition('minute', 1)])),
      'jm': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('minute', 1)]))
    };
    /** @type {?} */

    var DATE_FORMATS$1 = {
      // Keys are quoted so they do not get renamed.
      'yyyy': datePartGetterFactory(digitCondition('year', 4)),
      'yy': datePartGetterFactory(digitCondition('year', 2)),
      'y': datePartGetterFactory(digitCondition('year', 1)),
      'MMMM': datePartGetterFactory(nameCondition('month', 4)),
      'MMM': datePartGetterFactory(nameCondition('month', 3)),
      'MM': datePartGetterFactory(digitCondition('month', 2)),
      'M': datePartGetterFactory(digitCondition('month', 1)),
      'LLLL': datePartGetterFactory(nameCondition('month', 4)),
      'L': datePartGetterFactory(nameCondition('month', 1)),
      'dd': datePartGetterFactory(digitCondition('day', 2)),
      'd': datePartGetterFactory(digitCondition('day', 1)),
      'HH': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), false)))),
      'H': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), false))),
      'hh': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), true)))),
      'h': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),
      'jj': datePartGetterFactory(digitCondition('hour', 2)),
      'j': datePartGetterFactory(digitCondition('hour', 1)),
      'mm': digitModifier(datePartGetterFactory(digitCondition('minute', 2))),
      'm': datePartGetterFactory(digitCondition('minute', 1)),
      'ss': digitModifier(datePartGetterFactory(digitCondition('second', 2))),
      's': datePartGetterFactory(digitCondition('second', 1)),
      // while ISO 8601 requires fractions to be prefixed with `.` or `,`
      // we can be just safely rely on using `sss` since we currently don't support single or two digit
      // fractions
      'sss': datePartGetterFactory(digitCondition('second', 3)),
      'EEEE': datePartGetterFactory(nameCondition('weekday', 4)),
      'EEE': datePartGetterFactory(nameCondition('weekday', 3)),
      'EE': datePartGetterFactory(nameCondition('weekday', 2)),
      'E': datePartGetterFactory(nameCondition('weekday', 1)),
      'a': hourClockExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),
      'Z': timeZoneGetter$1('short'),
      'z': timeZoneGetter$1('long'),
      'ww': datePartGetterFactory({}),
      // Week of year, padded (00-53). Week 01 is the week with the
      // first Thursday of the year. not support ?
      'w': datePartGetterFactory({}),
      // Week of year (0-53). Week 1 is the week with the first Thursday
      // of the year not support ?
      'G': datePartGetterFactory(nameCondition('era', 1)),
      'GG': datePartGetterFactory(nameCondition('era', 2)),
      'GGG': datePartGetterFactory(nameCondition('era', 3)),
      'GGGG': datePartGetterFactory(nameCondition('era', 4))
    };
    /**
     * @param {?} inner
     * @return {?}
     */

    function digitModifier(inner) {
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          /** @type {?} */
          var result = inner(date, locale);
          return result.length == 1 ? '0' + result : result;
        }
      );
    }
    /**
     * @param {?} inner
     * @return {?}
     */


    function hourClockExtractor(inner) {
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          return inner(date, locale).split(' ')[1];
        }
      );
    }
    /**
     * @param {?} inner
     * @return {?}
     */


    function hourExtractor(inner) {
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          return inner(date, locale).split(' ')[0];
        }
      );
    }
    /**
     * @param {?} date
     * @param {?} locale
     * @param {?} options
     * @return {?}
     */


    function intlDateFormat(date, locale, options) {
      return new Intl.DateTimeFormat(locale, options).format(date).replace(/[\u200e\u200f]/g, '');
    }
    /**
     * @param {?} timezone
     * @return {?}
     */


    function timeZoneGetter$1(timezone) {
      // To workaround `Intl` API restriction for single timezone let format with 24 hours

      /** @type {?} */
      var options = {
        hour: '2-digit',
        hour12: false,
        timeZoneName: timezone
      };
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          /** @type {?} */
          var result = intlDateFormat(date, locale, options); // Then extract first 3 letters that related to hours

          return result ? result.substring(3) : '';
        }
      );
    }
    /**
     * @param {?} options
     * @param {?} value
     * @return {?}
     */


    function hour12Modify(options, value) {
      options.hour12 = value;
      return options;
    }
    /**
     * @param {?} prop
     * @param {?} len
     * @return {?}
     */


    function digitCondition(prop, len) {
      /** @type {?} */
      var result = {};
      result[prop] = len === 2 ? '2-digit' : 'numeric';
      return result;
    }
    /**
     * @param {?} prop
     * @param {?} len
     * @return {?}
     */


    function nameCondition(prop, len) {
      /** @type {?} */
      var result = {};

      if (len < 4) {
        result[prop] = len > 1 ? 'short' : 'narrow';
      } else {
        result[prop] = 'long';
      }

      return result;
    }
    /**
     * @param {?} options
     * @return {?}
     */


    function combine(options) {
      return options.reduce(
      /**
      * @param {?} merged
      * @param {?} opt
      * @return {?}
      */
      function (merged, opt) {
        return Object.assign({}, merged, opt);
      }, {});
    }
    /**
     * @param {?} ret
     * @return {?}
     */


    function datePartGetterFactory(ret) {
      return (
        /**
        * @param {?} date
        * @param {?} locale
        * @return {?}
        */
        function (date, locale) {
          return intlDateFormat(date, locale, ret);
        }
      );
    }
    /** @type {?} */


    var DATE_FORMATTER_CACHE = new Map();
    /**
     * @param {?} format
     * @param {?} date
     * @param {?} locale
     * @return {?}
     */

    function dateFormatter(format, date, locale) {
      /** @type {?} */
      var fn = PATTERN_ALIASES[format];
      if (fn) return fn(date, locale);
      /** @type {?} */

      var cacheKey = format;
      /** @type {?} */

      var parts = DATE_FORMATTER_CACHE.get(cacheKey);

      if (!parts) {
        parts = [];
        /** @type {?} */

        var match;
        DATE_FORMATS_SPLIT$1.exec(format);
        /** @type {?} */

        var _format = format;

        while (_format) {
          match = DATE_FORMATS_SPLIT$1.exec(_format);

          if (match) {
            parts = parts.concat(match.slice(1));
            _format =
            /** @type {?} */
            parts.pop();
          } else {
            parts.push(_format);
            _format = null;
          }
        }

        DATE_FORMATTER_CACHE.set(cacheKey, parts);
      }

      return parts.reduce(
      /**
      * @param {?} text
      * @param {?} part
      * @return {?}
      */
      function (text, part) {
        /** @type {?} */
        var fn = DATE_FORMATS$1[part];
        return text + (fn ? fn(date, locale) : partToTime(part));
      }, '');
    }
    /**
     * @param {?} part
     * @return {?}
     */


    function partToTime(part) {
      return part === '\'\'' ? '\'' : part.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
    }

    var DateFormatter = /*#__PURE__*/function () {
      function DateFormatter() {
        _classCallCheck(this, DateFormatter);
      }

      _createClass2(DateFormatter, null, [{
        key: "format",

        /**
         * @param {?} date
         * @param {?} locale
         * @param {?} pattern
         * @return {?}
         */
        value: function format(date, locale, pattern) {
          return dateFormatter(pattern, date, locale);
        }
      }]);

      return DateFormatter;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@ngModule CommonModule
     * \@description
     *
     * Formats a date according to locale rules.
     *
     * Where:
     * - `expression` is a date object or a number (milliseconds since UTC epoch) or an ISO string
     * (https://www.w3.org/TR/NOTE-datetime).
     * - `format` indicates which date/time components to include. The format can be predefined as
     *   shown below or custom as shown in the table.
     *   - `'medium'`: equivalent to `'yMMMdjms'` (e.g. `Sep 3, 2010, 12:05:08 PM` for `en-US`)
     *   - `'short'`: equivalent to `'yMdjm'` (e.g. `9/3/2010, 12:05 PM` for `en-US`)
     *   - `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. `Friday, September 3, 2010` for `en-US`)
     *   - `'longDate'`: equivalent to `'yMMMMd'` (e.g. `September 3, 2010` for `en-US`)
     *   - `'mediumDate'`: equivalent to `'yMMMd'` (e.g. `Sep 3, 2010` for `en-US`)
     *   - `'shortDate'`: equivalent to `'yMd'` (e.g. `9/3/2010` for `en-US`)
     *   - `'mediumTime'`: equivalent to `'jms'` (e.g. `12:05:08 PM` for `en-US`)
     *   - `'shortTime'`: equivalent to `'jm'` (e.g. `12:05 PM` for `en-US`)
     *
     *
     *  | Component | Symbol | Narrow | Short Form   | Long Form         | Numeric   | 2-digit   |
     *  |-----------|:------:|--------|--------------|-------------------|-----------|-----------|
     *  | era       |   G    | G (A)  | GGG (AD)     | GGGG (Anno Domini)| -         | -         |
     *  | year      |   y    | -      | -            | -                 | y (2015)  | yy (15)   |
     *  | month     |   M    | L (S)  | MMM (Sep)    | MMMM (September)  | M (9)     | MM (09)   |
     *  | day       |   d    | -      | -            | -                 | d (3)     | dd (03)   |
     *  | weekday   |   E    | E (S)  | EEE (Sun)    | EEEE (Sunday)     | -         | -         |
     *  | hour      |   j    | -      | -            | -                 | j (13)    | jj (13)   |
     *  | hour12    |   h    | -      | -            | -                 | h (1 PM)  | hh (01 PM)|
     *  | hour24    |   H    | -      | -            | -                 | H (13)    | HH (13)   |
     *  | minute    |   m    | -      | -            | -                 | m (5)     | mm (05)   |
     *  | second    |   s    | -      | -            | -                 | s (9)     | ss (09)   |
     *  | timezone  |   z    | -      | -            | z (Pacific Standard Time)| -  | -         |
     *  | timezone  |   Z    | -      | Z (GMT-8:00) | -                 | -         | -         |
     *  | timezone  |   a    | -      | a (PM)       | -                 | -         | -         |
     *
     * In javascript, only the components specified will be respected (not the ordering,
     * punctuations, ...) and details of the formatting will be dependent on the locale.
     *
     * Timezone of the formatted text will be the local system timezone of the end-user's machine.
     *
     * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not
     * applied and the formatted text will have the same day, month and year of the expression.
     *
     * WARNINGS:
     * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.
     *   Instead users should treat the date as an immutable object and change the reference when the
     *   pipe needs to re-run (this is to avoid reformatting the date on every change detection run
     *   which would be an expensive operation).
     * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera
     *   browsers.
     *
     * \@usageNotes
     *
     * ### Examples
     *
     * Assuming `dateObj` is (year: 2010, month: 9, day: 3, hour: 12 PM, minute: 05, second: 08)
     * in the _local_ time and locale is 'en-US':
     *
     * {\@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}
     *
     * \@publicApi
     */


    var DeprecatedDatePipe = /*#__PURE__*/function () {
      /**
       * @param {?} _locale
       */
      function DeprecatedDatePipe(_locale) {
        _classCallCheck(this, DeprecatedDatePipe);

        this._locale = _locale;
      }
      /**
       * @param {?} value
       * @param {?=} pattern
       * @return {?}
       */


      _createClass2(DeprecatedDatePipe, [{
        key: "transform",
        value: function transform(value) {
          var pattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'mediumDate';
          if (value == null || value === '' || value !== value) return null;
          /** @type {?} */

          var date;

          if (typeof value === 'string') {
            value = value.trim();
          }

          if (isDate$1(value)) {
            date = value;
          } else if (!isNaN(value - parseFloat(value))) {
            date = new Date(parseFloat(value));
          } else if (typeof value === 'string' && /^(\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(
            /**
            * @param {?} val
            * @return {?}
            */
            function (val) {
              return parseInt(val, 10);
            }),
                _value$split$map4 = _slicedToArray(_value$split$map3, 3),
                y = _value$split$map4[0],
                m = _value$split$map4[1],
                d = _value$split$map4[2];

            date = new Date(y, m - 1, d);
          } else {
            date = new Date(value);
          }

          if (!isDate$1(date)) {
            /** @type {?} */
            var match;

            if (typeof value === 'string' && (match = value.match(ISO8601_DATE_REGEX))) {
              date = isoStringToDate(match);
            } else {
              throw invalidPipeArgumentError(DeprecatedDatePipe, value);
            }
          }

          return DateFormatter.format(date, this._locale, DeprecatedDatePipe._ALIASES[pattern] || pattern);
        }
      }]);

      return DeprecatedDatePipe;
    }();
    /**
     * \@internal
     */


    DeprecatedDatePipe._ALIASES = {
      'medium': 'yMMMdjms',
      'short': 'yMdjm',
      'fullDate': 'yMMMMEEEEd',
      'longDate': 'yMMMMd',
      'mediumDate': 'yMMMd',
      'shortDate': 'yMd',
      'mediumTime': 'jms',
      'shortTime': 'jm'
    };
    DeprecatedDatePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'date',
        pure: true
      }]
    }];
    /** @nocollapse */

    DeprecatedDatePipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @param {?} value
     * @return {?}
     */


    function isDate$1(value) {
      return value instanceof Date && !isNaN(value.valueOf());
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} pipe
     * @param {?} locale
     * @param {?} value
     * @param {?} style
     * @param {?=} digits
     * @param {?=} currency
     * @param {?=} currencyAsSymbol
     * @return {?}
     */


    function formatNumber$1(pipe, locale, value, style, digits) {
      var currency = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
      var currencyAsSymbol = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
      if (value == null) return null; // Convert strings to numbers

      value = typeof value === 'string' && !isNaN(+value - parseFloat(value)) ? +value : value;

      if (typeof value !== 'number') {
        throw invalidPipeArgumentError(pipe, value);
      }
      /** @type {?} */


      var minInt;
      /** @type {?} */

      var minFraction;
      /** @type {?} */

      var maxFraction;

      if (style !== NumberFormatStyle.Currency) {
        // rely on Intl default for currency
        minInt = 1;
        minFraction = 0;
        maxFraction = 3;
      }

      if (digits) {
        /** @type {?} */
        var parts = digits.match(NUMBER_FORMAT_REGEXP);

        if (parts === null) {
          throw new Error("".concat(digits, " is not a valid digit info for number pipes"));
        }

        if (parts[1] != null) {
          // min integer digits
          minInt = parseIntAutoRadix(parts[1]);
        }

        if (parts[3] != null) {
          // min fraction digits
          minFraction = parseIntAutoRadix(parts[3]);
        }

        if (parts[5] != null) {
          // max fraction digits
          maxFraction = parseIntAutoRadix(parts[5]);
        }
      }

      return NumberFormatter.format(
      /** @type {?} */
      value, locale, style, {
        minimumIntegerDigits: minInt,
        minimumFractionDigits: minFraction,
        maximumFractionDigits: maxFraction,
        currency: currency,
        currencyAsSymbol: currencyAsSymbol
      });
    }
    /**
     * Formats a number as text. Group sizing and separator and other locale-specific
     * configurations are based on the active locale.
     *
     * where `expression` is a number:
     *  - `digitInfo` is a `string` which has a following format: <br>
     *     <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>
     *   - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
     *   - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.
     *   - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.
     *
     * For more information on the acceptable range for each of these numbers and other
     * details see your native internationalization library.
     *
     * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
     * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
     *
     * \@usageNotes
     *
     * ### Example
     *
     * {\@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
     *
     * \@ngModule CommonModule
     * \@publicApi
     */


    var DeprecatedDecimalPipe = /*#__PURE__*/function () {
      /**
       * @param {?} _locale
       */
      function DeprecatedDecimalPipe(_locale) {
        _classCallCheck(this, DeprecatedDecimalPipe);

        this._locale = _locale;
      }
      /**
       * @param {?} value
       * @param {?=} digits
       * @return {?}
       */


      _createClass2(DeprecatedDecimalPipe, [{
        key: "transform",
        value: function transform(value, digits) {
          return formatNumber$1(DeprecatedDecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);
        }
      }]);

      return DeprecatedDecimalPipe;
    }();

    DeprecatedDecimalPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'number'
      }]
    }];
    /** @nocollapse */

    DeprecatedDecimalPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * \@ngModule CommonModule
     *
     * \@description
     *
     * Formats a number as percentage according to locale rules.
     *
     * - `digitInfo` See {\@link DecimalPipe} for detailed description.
     *
     * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
     * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
     *
     * \@usageNotes
     *
     * ### Example
     *
     * {\@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}
     *
     * \@publicApi
     */


    var DeprecatedPercentPipe = /*#__PURE__*/function () {
      /**
       * @param {?} _locale
       */
      function DeprecatedPercentPipe(_locale) {
        _classCallCheck(this, DeprecatedPercentPipe);

        this._locale = _locale;
      }
      /**
       * @param {?} value
       * @param {?=} digits
       * @return {?}
       */


      _createClass2(DeprecatedPercentPipe, [{
        key: "transform",
        value: function transform(value, digits) {
          return formatNumber$1(DeprecatedPercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);
        }
      }]);

      return DeprecatedPercentPipe;
    }();

    DeprecatedPercentPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'percent'
      }]
    }];
    /** @nocollapse */

    DeprecatedPercentPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * \@ngModule CommonModule
     * \@description
     *
     * Formats a number as currency using locale rules.
     *
     * Use `currency` to format a number as currency.
     *
     * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
     *    as `USD` for the US dollar and `EUR` for the euro.
     * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.
     *   - `true`: use symbol (e.g. `$`).
     *   - `false`(default): use code (e.g. `USD`).
     * - `digitInfo` See {\@link DecimalPipe} for detailed description.
     *
     * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
     * and may require a polyfill. See [Browser Support](guide/browser-support) for details.
     *
     * \@usageNotes
     *
     * ### Example
     *
     * {\@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}
     *
     * \@publicApi
     */


    var DeprecatedCurrencyPipe = /*#__PURE__*/function () {
      /**
       * @param {?} _locale
       */
      function DeprecatedCurrencyPipe(_locale) {
        _classCallCheck(this, DeprecatedCurrencyPipe);

        this._locale = _locale;
      }
      /**
       * @param {?} value
       * @param {?=} currencyCode
       * @param {?=} symbolDisplay
       * @param {?=} digits
       * @return {?}
       */


      _createClass2(DeprecatedCurrencyPipe, [{
        key: "transform",
        value: function transform(value) {
          var currencyCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'USD';
          var symbolDisplay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
          var digits = arguments.length > 3 ? arguments[3] : undefined;
          return formatNumber$1(DeprecatedCurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);
        }
      }]);

      return DeprecatedCurrencyPipe;
    }();

    DeprecatedCurrencyPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'currency'
      }]
    }];
    /** @nocollapse */

    DeprecatedCurrencyPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A collection of deprecated i18n pipes that require intl api
     *
     * @deprecated from v5
     * @type {?}
     */


    var COMMON_DEPRECATED_I18N_PIPES = [DeprecatedDecimalPipe, DeprecatedPercentPipe, DeprecatedCurrencyPipe, DeprecatedDatePipe];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     */

    function SubscriptionStrategy() {}

    if (false) {}

    var ObservableStrategy = /*#__PURE__*/function () {
      function ObservableStrategy() {
        _classCallCheck(this, ObservableStrategy);
      }

      _createClass2(ObservableStrategy, [{
        key: "createSubscription",

        /**
         * @param {?} async
         * @param {?} updateLatestValue
         * @return {?}
         */
        value: function createSubscription(async, updateLatestValue) {
          return async.subscribe({
            next: updateLatestValue,
            error:
            /**
            * @param {?} e
            * @return {?}
            */
            function error(e) {
              throw e;
            }
          });
        }
        /**
         * @param {?} subscription
         * @return {?}
         */

      }, {
        key: "dispose",
        value: function dispose(subscription) {
          subscription.unsubscribe();
        }
        /**
         * @param {?} subscription
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(subscription) {
          subscription.unsubscribe();
        }
      }]);

      return ObservableStrategy;
    }();

    var PromiseStrategy = /*#__PURE__*/function () {
      function PromiseStrategy() {
        _classCallCheck(this, PromiseStrategy);
      }

      _createClass2(PromiseStrategy, [{
        key: "createSubscription",

        /**
         * @param {?} async
         * @param {?} updateLatestValue
         * @return {?}
         */
        value: function createSubscription(async, updateLatestValue) {
          return async.then(updateLatestValue,
          /**
          * @param {?} e
          * @return {?}
          */
          function (e) {
            throw e;
          });
        }
        /**
         * @param {?} subscription
         * @return {?}
         */

      }, {
        key: "dispose",
        value: function dispose(subscription) {}
        /**
         * @param {?} subscription
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(subscription) {}
      }]);

      return PromiseStrategy;
    }();
    /** @type {?} */


    var _promiseStrategy = new PromiseStrategy();
    /** @type {?} */


    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 () {
      /**
       * @param {?} _ref
       */
      function AsyncPipe(_ref) {
        _classCallCheck(this, AsyncPipe);

        this._ref = _ref;
        this._latestValue = null;
        this._latestReturnedValue = null;
        this._subscription = null;
        this._obj = null;
        this._strategy =
        /** @type {?} */
        null;
      }
      /**
       * @return {?}
       */


      _createClass2(AsyncPipe, [{
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this._subscription) {
            this._dispose();
          }
        }
        /**
         * @param {?} obj
         * @return {?}
         */

      }, {
        key: "transform",
        value: function transform(obj) {
          if (!this._obj) {
            if (obj) {
              this._subscribe(obj);
            }

            this._latestReturnedValue = this._latestValue;
            return this._latestValue;
          }

          if (obj !== this._obj) {
            this._dispose();

            return this.transform(
            /** @type {?} */
            obj);
          }

          if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵlooseIdentical"])(this._latestValue, this._latestReturnedValue)) {
            return this._latestReturnedValue;
          }

          this._latestReturnedValue = this._latestValue;
          return _angular_core__WEBPACK_IMPORTED_MODULE_0__["WrappedValue"].wrap(this._latestValue);
        }
        /**
         * @private
         * @param {?} obj
         * @return {?}
         */

      }, {
        key: "_subscribe",
        value: function _subscribe(obj) {
          var _this14 = this;

          this._obj = obj;
          this._strategy = this._selectStrategy(obj);
          this._subscription = this._strategy.createSubscription(obj,
          /**
          * @param {?} value
          * @return {?}
          */
          function (value) {
            return _this14._updateLatestValue(obj, value);
          });
        }
        /**
         * @private
         * @param {?} obj
         * @return {?}
         */

      }, {
        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);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_dispose",
        value: function _dispose() {
          this._strategy.dispose(
          /** @type {?} */
          this._subscription);

          this._latestValue = null;
          this._latestReturnedValue = null;
          this._subscription = null;
          this._obj = null;
        }
        /**
         * @private
         * @param {?} async
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_updateLatestValue",
        value: function _updateLatestValue(async, value) {
          if (async === this._obj) {
            this._latestValue = value;

            this._ref.markForCheck();
          }
        }
      }]);

      return AsyncPipe;
    }();

    AsyncPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'async',
        pure: false
      }]
    }];
    /** @nocollapse */

    AsyncPipe.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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",

        /**
         * @param {?} value The string to transform to lower case.
         * @return {?}
         */
        value: function transform(value) {
          if (!value) return value;

          if (typeof value !== 'string') {
            throw invalidPipeArgumentError(LowerCasePipe, value);
          }

          return value.toLowerCase();
        }
      }]);

      return LowerCasePipe;
    }();

    LowerCasePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'lowercase'
      }]
    }]; //
    // 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
    // (http://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
    //

    /** @type {?} */

    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",

        /**
         * @param {?} value The string to transform to title case.
         * @return {?}
         */
        value: function transform(value) {
          if (!value) return value;

          if (typeof value !== 'string') {
            throw invalidPipeArgumentError(TitleCasePipe, value);
          }

          return value.replace(unicodeWordMatch,
          /**
          * @param {?} txt
          * @return {?}
          */
          function (txt) {
            return txt[0].toUpperCase() + txt.substr(1).toLowerCase();
          });
        }
      }]);

      return TitleCasePipe;
    }();

    TitleCasePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'titlecase'
      }]
    }];
    /**
     * 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",

        /**
         * @param {?} value The string to transform to upper case.
         * @return {?}
         */
        value: function transform(value) {
          if (!value) return value;

          if (typeof value !== 'string') {
            throw invalidPipeArgumentError(UpperCasePipe, value);
          }

          return value.toUpperCase();
        }
      }]);

      return UpperCasePipe;
    }();

    UpperCasePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'uppercase'
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // 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
     *
     * Examples are given in `en-US` locale.
     *
     * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).
     * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).
     * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM
     * GMT+1`).
     * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at
     * 9:03:01 AM GMT+01:00`).
     * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).
     * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).
     * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).
     * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).
     * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).
     * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).
     * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).
     * - `'fullTime'`: equivalent to `'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                              |
     *  | 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 () {
      /**
       * @param {?} locale
       */
      function DatePipe(locale) {
        _classCallCheck(this, DatePipe);

        this.locale = locale;
      }
      /**
       * @param {?} value The date expression: a `Date` object,  a number
       * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).
       * @param {?=} format The date/time components to include, using predefined options or a
       * custom format string.
       * @param {?=} timezone A timezone offset (such as `'+0430'`), or a standard
       * UTC/GMT or continental US timezone abbreviation.
       * When not supplied, uses the end-user's local system timezone.
       * @param {?=} locale A locale code for the locale format rules to use.
       * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
       * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
       * @return {?} A date string in the desired format.
       */


      _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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'date',
        pure: true
      }]
    }];
    /** @nocollapse */

    DatePipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    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 () {
      /**
       * @param {?} _localization
       */
      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).
       * @return {?}
       */


      _createClass2(I18nPluralPipe, [{
        key: "transform",
        value: function transform(value, pluralMap, locale) {
          if (value == null) return '';

          if (typeof pluralMap !== 'object' || pluralMap === null) {
            throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);
          }
          /** @type {?} */


          var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
          return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
        }
      }]);

      return I18nPluralPipe;
    }();

    I18nPluralPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'i18nPlural',
        pure: true
      }]
    }];
    /** @nocollapse */

    I18nPluralPipe.ctorParameters = function () {
      return [{
        type: NgLocalization
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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",

        /**
         * @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`.
         * @return {?}
         */
        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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'i18nSelect',
        pure: true
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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",

        /**
         * @param {?} value A value of any type to convert into a JSON-format string.
         * @return {?}
         */
        value: function transform(value) {
          return JSON.stringify(value, null, 2);
        }
      }]);

      return JsonPipe;
    }();

    JsonPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'json',
        pure: false
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @template K, V
     * @param {?} key
     * @param {?} value
     * @return {?}
     */

    function makeKeyValuePair(key, value) {
      return {
        key: key,
        value: value
      };
    }
    /**
     * A key value pair.
     * Usually used to represent the key value pairs from a Map or Object.
     *
     * \@publicApi
     * @record
     * @template K, V
     */


    function KeyValue() {}

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} differs
       */
      function KeyValuePipe(differs) {
        _classCallCheck(this, KeyValuePipe);

        this.differs = differs;
        this.keyValues = [];
      }
      /**
       * @template K, V
       * @param {?} input
       * @param {?=} compareFn
       * @return {?}
       */


      _createClass2(KeyValuePipe, [{
        key: "transform",
        value: function transform(input) {
          var _this15 = 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();
          }
          /** @type {?} */


          var differChanges = this.differ.diff(
          /** @type {?} */
          input);

          if (differChanges) {
            this.keyValues = [];
            differChanges.forEachItem(
            /**
            * @param {?} r
            * @return {?}
            */
            function (r) {
              _this15.keyValues.push(makeKeyValuePair(r.key,
              /** @type {?} */
              r.currentValue));
            });
            this.keyValues.sort(compareFn);
          }

          return this.keyValues;
        }
      }]);

      return KeyValuePipe;
    }();

    KeyValuePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'keyvalue',
        pure: false
      }]
    }];
    /** @nocollapse */

    KeyValuePipe.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]
      }];
    };

    if (false) {}
    /**
     * @template K, V
     * @param {?} keyValueA
     * @param {?} keyValueB
     * @return {?}
     */


    function defaultComparator(keyValueA, keyValueB) {
      /** @type {?} */
      var a = keyValueA.key;
      /** @type {?} */

      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.

      /** @type {?} */


      var aString = String(a);
      /** @type {?} */

      var bString = String(b);
      return aString == bString ? 0 : aString < bString ? -1 : 1;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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 () {
      /**
       * @param {?} _locale
       */
      function DecimalPipe(_locale) {
        _classCallCheck(this, DecimalPipe);

        this._locale = _locale;
      }
      /**
       * @param {?} value The number to be formatted.
       * @param {?=} digitsInfo Decimal representation options, specified by a string
       * in the following format:<br>
       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
       *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
       * Default is `1`.
       *   - `minFractionDigits`: The minimum number of digits after the decimal point.
       * Default is `0`.
       *   - `maxFractionDigits`: The maximum number of digits after the decimal point.
       * Default is `3`.
       * @param {?=} locale A locale code for the locale format rules to use.
       * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
       * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
       * @return {?}
       */


      _createClass2(DecimalPipe, [{
        key: "transform",
        value: function transform(value, digitsInfo, locale) {
          if (isEmpty(value)) return null;
          locale = locale || this._locale;

          try {
            /** @type {?} */
            var num = strToNumber(value);
            return formatNumber(num, locale, digitsInfo);
          } catch (error) {
            throw invalidPipeArgumentError(DecimalPipe, error.message);
          }
        }
      }]);

      return DecimalPipe;
    }();

    DecimalPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'number'
      }]
    }];
    /** @nocollapse */

    DecimalPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} _locale
       */
      function PercentPipe(_locale) {
        _classCallCheck(this, PercentPipe);

        this._locale = _locale;
      }
      /**
       *
       * @param {?} value The number to be formatted as a percentage.
       * @param {?=} digitsInfo Decimal representation options, specified by a string
       * in the following format:<br>
       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
       *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
       * Default is `1`.
       *   - `minFractionDigits`: The minimum number of digits after the decimal point.
       * Default is `0`.
       *   - `maxFractionDigits`: The maximum number of digits after the decimal point.
       * Default is `0`.
       * @param {?=} locale A locale code for the locale format rules to use.
       * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
       * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
       * @return {?}
       */


      _createClass2(PercentPipe, [{
        key: "transform",
        value: function transform(value, digitsInfo, locale) {
          if (isEmpty(value)) return null;
          locale = locale || this._locale;

          try {
            /** @type {?} */
            var num = strToNumber(value);
            return formatPercent(num, locale, digitsInfo);
          } catch (error) {
            throw invalidPipeArgumentError(PercentPipe, error.message);
          }
        }
      }]);

      return PercentPipe;
    }();

    PercentPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'percent'
      }]
    }];
    /** @nocollapse */

    PercentPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * \@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.
     *
     * @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 () {
      /**
       * @param {?} _locale
       */
      function CurrencyPipe(_locale) {
        _classCallCheck(this, CurrencyPipe);

        this._locale = _locale;
      }
      /**
       *
       * @param {?} value The number to be formatted as currency.
       * @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.
       * @param {?=} display The format for the currency indicator. One of the following:
       *   - `code`: Show the code (such as `USD`).
       *   - `symbol`(default): Show the symbol (such as `$`).
       *   - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their
       * currency.
       * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the
       * locale has no narrow symbol, uses the standard symbol for the locale.
       *   - String: Use the given string value instead of a code or a symbol.
       * For example, an empty string will suppress the currency & symbol.
       *   - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.
       *
       * @param {?=} digitsInfo Decimal representation options, specified by a string
       * in the following format:<br>
       * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
       *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
       * Default is `1`.
       *   - `minFractionDigits`: The minimum number of digits after the decimal point.
       * Default is `2`.
       *   - `maxFractionDigits`: The maximum number of digits after the decimal point.
       * Default is `2`.
       * If not provided, the number will be formatted with the proper amount of digits,
       * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.
       * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.
       * @param {?=} locale A locale code for the locale format rules to use.
       * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.
       * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).
       * @return {?}
       */


      _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 (isEmpty(value)) return null;
          locale = locale || this._locale;

          if (typeof display === 'boolean') {
            if (
            /** @type {?} */
            console &&
            /** @type {?} */
            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';
          }
          /** @type {?} */


          var currency = currencyCode || 'USD';

          if (display !== 'code') {
            if (display === 'symbol' || display === 'symbol-narrow') {
              currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);
            } else {
              currency = display;
            }
          }

          try {
            /** @type {?} */
            var num = strToNumber(value);
            return formatCurrency(num, locale, currency, currencyCode, digitsInfo);
          } catch (error) {
            throw invalidPipeArgumentError(CurrencyPipe, error.message);
          }
        }
      }]);

      return CurrencyPipe;
    }();

    CurrencyPipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'currency'
      }]
    }];
    /** @nocollapse */

    CurrencyPipe.ctorParameters = function () {
      return [{
        type: String,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @param {?} value
     * @return {?}
     */


    function isEmpty(value) {
      return value == null || value === '' || value !== value;
    }
    /**
     * Transforms a string into a number (if needed).
     * @param {?} value
     * @return {?}
     */


    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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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",

        /**
         * @param {?} value
         * @param {?} start
         * @param {?=} end
         * @return {?}
         */
        value: function transform(value, start, end) {
          if (value == null) return value;

          if (!this.supports(value)) {
            throw invalidPipeArgumentError(SlicePipe, value);
          }

          return value.slice(start, end);
        }
        /**
         * @private
         * @param {?} obj
         * @return {?}
         */

      }, {
        key: "supports",
        value: function supports(obj) {
          return typeof obj === 'string' || Array.isArray(obj);
        }
      }]);

      return SlicePipe;
    }();

    SlicePipe.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }, {
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
      args: [{
        name: 'slice',
        pure: false
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A collection of Angular pipes that are likely to be used in each and every application.
     * @type {?}
     */

    var COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // 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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
        exports: [COMMON_DIRECTIVES, COMMON_PIPES],
        providers: [{
          provide: NgLocalization,
          useClass: NgLocaleLocalization
        }]
      }]
    }];
    var ɵ0$2 = getPluralCase;
    /**
     * A module that contains the deprecated i18n pipes.
     *
     * @deprecated from v5
     * \@publicApi
     */

    var DeprecatedI18NPipesModule = function DeprecatedI18NPipesModule() {
      _classCallCheck(this, DeprecatedI18NPipesModule);
    };

    DeprecatedI18NPipesModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        declarations: [COMMON_DEPRECATED_I18N_PIPES],
        exports: [COMMON_DEPRECATED_I18N_PIPES],
        providers: [{
          provide: DEPRECATED_PLURAL_FN,
          useValue: ɵ0$2
        }]
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @type {?}
     */

    var DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */

    var PLATFORM_BROWSER_ID = 'browser';
    /** @type {?} */

    var PLATFORM_SERVER_ID = 'server';
    /** @type {?} */

    var PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
    /** @type {?} */

    var PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
    /**
     * Returns whether a platform id represents a browser platform.
     * \@publicApi
     * @param {?} platformId
     * @return {?}
     */

    function isPlatformBrowser(platformId) {
      return platformId === PLATFORM_BROWSER_ID;
    }
    /**
     * Returns whether a platform id represents a server platform.
     * \@publicApi
     * @param {?} platformId
     * @return {?}
     */


    function isPlatformServer(platformId) {
      return platformId === PLATFORM_SERVER_ID;
    }
    /**
     * Returns whether a platform id represents a web worker app platform.
     * \@publicApi
     * @param {?} platformId
     * @return {?}
     */


    function isPlatformWorkerApp(platformId) {
      return platformId === PLATFORM_WORKER_APP_ID;
    }
    /**
     * Returns whether a platform id represents a web worker UI platform.
     * \@publicApi
     * @param {?} platformId
     * @return {?}
     */


    function isPlatformWorkerUi(platformId) {
      return platformId === PLATFORM_WORKER_UI_ID;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @type {?}
     */


    var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('8.2.14');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
     *
     * \@publicApi
     * @abstract
     */

    var ViewportScroller = function ViewportScroller() {
      _classCallCheck(this, ViewportScroller);
    }; // De-sugared tree-shakable injection
    // See #23917

    /** @nocollapse */

    /** @nocollapse */


    ViewportScroller.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({
      token: ViewportScroller,
      providedIn: 'root',
      factory:
      /**
      * @nocollapse @return {?}
      */
      function factory() {
        return new BrowserViewportScroller(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT), window, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ErrorHandler"]));
      }
    });

    if (false) {}
    /**
     * Manages the scroll position for a browser window.
     */


    var BrowserViewportScroller = /*#__PURE__*/function () {
      /**
       * @param {?} document
       * @param {?} window
       * @param {?} errorHandler
       */
      function BrowserViewportScroller(document, window, errorHandler) {
        _classCallCheck(this, BrowserViewportScroller);

        this.document = document;
        this.window = window;
        this.errorHandler = errorHandler;

        this.offset =
        /**
        * @return {?}
        */
        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.
       *
       * @return {?}
       */


      _createClass2(BrowserViewportScroller, [{
        key: "setOffset",
        value: function setOffset(offset) {
          if (Array.isArray(offset)) {
            this.offset =
            /**
            * @return {?}
            */
            function () {
              return offset;
            };
          } else {
            this.offset = offset;
          }
        }
        /**
         * Retrieves the current scroll position.
         * @return {?} The position in screen coordinates.
         */

      }, {
        key: "getScrollPosition",
        value: function getScrollPosition() {
          if (this.supportScrollRestoration()) {
            return [this.window.scrollX, this.window.scrollY];
          } else {
            return [0, 0];
          }
        }
        /**
         * Sets the scroll position.
         * @param {?} position The new position in screen coordinates.
         * @return {?}
         */

      }, {
        key: "scrollToPosition",
        value: function scrollToPosition(position) {
          if (this.supportScrollRestoration()) {
            this.window.scrollTo(position[0], position[1]);
          }
        }
        /**
         * Scrolls to an anchor element.
         * @param {?} anchor The ID of the anchor element.
         * @return {?}
         */

      }, {
        key: "scrollToAnchor",
        value: function scrollToAnchor(anchor) {
          if (this.supportScrollRestoration()) {
            // Escape anything passed to `querySelector` as it can throw errors and stop the application
            // from working if invalid values are passed.
            if (this.window.CSS && this.window.CSS.escape) {
              anchor = this.window.CSS.escape(anchor);
            } else {
              anchor = anchor.replace(/(\"|\'\ |:|\.|\[|\]|,|=)/g, '\\$1');
            }

            try {
              /** @type {?} */
              var elSelectedById = this.document.querySelector("#".concat(anchor));

              if (elSelectedById) {
                this.scrollToElement(elSelectedById);
                return;
              }
              /** @type {?} */


              var elSelectedByName = this.document.querySelector("[name='".concat(anchor, "']"));

              if (elSelectedByName) {
                this.scrollToElement(elSelectedByName);
                return;
              }
            } catch (e) {
              this.errorHandler.handleError(e);
            }
          }
        }
        /**
         * Disables automatic scroll restoration provided by the browser.
         * @param {?} scrollRestoration
         * @return {?}
         */

      }, {
        key: "setHistoryScrollRestoration",
        value: function setHistoryScrollRestoration(scrollRestoration) {
          if (this.supportScrollRestoration()) {
            /** @type {?} */
            var _history = this.window.history;

            if (_history && _history.scrollRestoration) {
              _history.scrollRestoration = scrollRestoration;
            }
          }
        }
        /**
         * @private
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "scrollToElement",
        value: function scrollToElement(el) {
          /** @type {?} */
          var rect = el.getBoundingClientRect();
          /** @type {?} */

          var left = rect.left + this.window.pageXOffset;
          /** @type {?} */

          var top = rect.top + this.window.pageYOffset;
          /** @type {?} */

          var offset = this.offset();
          this.window.scrollTo(left - offset[0], top - offset[1]);
        }
        /**
         * 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.
         * @private
         * @return {?}
         */

      }, {
        key: "supportScrollRestoration",
        value: function supportScrollRestoration() {
          try {
            return !!this.window && !!this.window.scrollTo;
          } catch (_a) {
            return false;
          }
        }
      }]);

      return BrowserViewportScroller;
    }();

    if (false) {}
    /**
     * Provides an empty implementation of the viewport scroller. This will
     * live in \@angular/common as it will be used by both platform-server and platform-webworker.
     */


    var NullViewportScroller = /*#__PURE__*/function () {
      function NullViewportScroller() {
        _classCallCheck(this, NullViewportScroller);
      }

      _createClass2(NullViewportScroller, [{
        key: "setOffset",

        /**
         * Empty implementation
         * @param {?} offset
         * @return {?}
         */
        value: function setOffset(offset) {}
        /**
         * Empty implementation
         * @return {?}
         */

      }, {
        key: "getScrollPosition",
        value: function getScrollPosition() {
          return [0, 0];
        }
        /**
         * Empty implementation
         * @param {?} position
         * @return {?}
         */

      }, {
        key: "scrollToPosition",
        value: function scrollToPosition(position) {}
        /**
         * Empty implementation
         * @param {?} anchor
         * @return {?}
         */

      }, {
        key: "scrollToAnchor",
        value: function scrollToAnchor(anchor) {}
        /**
         * Empty implementation
         * @param {?} scrollRestoration
         * @return {?}
         */

      }, {
        key: "setHistoryScrollRestoration",
        value: function setHistoryScrollRestoration(scrollRestoration) {}
      }]);

      return NullViewportScroller;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=common.js.map

    /***/

  },

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

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

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

    var _BoundPropertyMapping;

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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "NgModuleCompiler", function () {
      return NgModuleCompiler;
    });
    /* 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__, "DYNAMIC_TYPE", function () {
      return DYNAMIC_TYPE;
    });
    /* 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__, "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__, "CastExpr", function () {
      return CastExpr;
    });
    /* 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__, "CommentStmt", function () {
      return CommentStmt;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ConditionalExpr", function () {
      return ConditionalExpr;
    });
    /* 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__, "Expression", function () {
      return Expression;
    });
    /* 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__, "literalMap", function () {
      return literalMap;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "InstantiateExpr", function () {
      return InstantiateExpr;
    });
    /* 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__, "JSDocCommentStmt", function () {
      return JSDocCommentStmt;
    });
    /* 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__, "LiteralMapExpr", function () {
      return LiteralMapExpr;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "NotExpr", function () {
      return NotExpr;
    });
    /* 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__, "ReturnStatement", function () {
      return ReturnStatement;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ThrowStmt", function () {
      return ThrowStmt;
    });
    /* 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__, "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__, "StmtModifier", function () {
      return StmtModifier;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Version", function () {
      return Version;
    });
    /* 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__, "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__, "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__, "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__, "makeBindingParser", function () {
      return makeBindingParser;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "compileBaseDefFromMetadata", function () {
      return compileBaseDefFromMetadata;
    });
    /* 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__, "parseHostBindings", function () {
      return parseHostBindings;
    });
    /* harmony export (binding) */


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "AttrAst", function () {
      return AttrAst;
    });
    /* 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__, "ReferenceAst", function () {
      return ReferenceAst;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "DirectiveAst", function () {
      return DirectiveAst;
    });
    /* 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__, "NgContentAst", function () {
      return NgContentAst;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "CompileSummaryKind", function () {
      return CompileSummaryKind;
    });
    /* 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__, "CompileStylesheetMetadata", function () {
      return CompileStylesheetMetadata;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "analyzeNgModules", function () {
      return analyzeNgModules;
    });
    /* 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__, "mergeAnalyzedFiles", function () {
      return mergeAnalyzedFiles;
    });
    /* harmony export (binding) */


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


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


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


    __webpack_require__.d(__webpack_exports__, "isFormattedError", function () {
      return isFormattedError;
    });
    /* 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__, "ResolvedStaticSymbol", function () {
      return ResolvedStaticSymbol;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "StaticSymbolResolver", function () {
      return StaticSymbolResolver;
    });
    /* 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__, "AotSummaryResolver", function () {
      return AotSummaryResolver;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Serializer", function () {
      return Serializer;
    });
    /* 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__, "Xtb", function () {
      return Xtb;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Conditional", function () {
      return Conditional;
    });
    /* 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__, "SafePropertyRead", function () {
      return SafePropertyRead;
    });
    /* 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__, "BindingPipe", function () {
      return BindingPipe;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "visitAstChildren", function () {
      return visitAstChildren;
    });
    /* 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__, "ParsedEvent", function () {
      return ParsedEvent;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Text", function () {
      return Text$3;
    });
    /* 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__, "Attribute", function () {
      return Attribute;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "splitNsName", function () {
      return splitNsName;
    });
    /* 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__, "getNsPrefix", function () {
      return getNsPrefix;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "mergeNsAndName", function () {
      return mergeNsAndName;
    });
    /* 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__, "debugOutputAstAsTypeScript", function () {
      return debugOutputAstAsTypeScript;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TypeScriptEmitter", function () {
      return TypeScriptEmitter;
    });
    /* 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__, "EMPTY_PARSE_LOCATION", function () {
      return EMPTY_PARSE_LOCATION;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "StyleCompiler", function () {
      return StyleCompiler;
    });
    /* 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__, "splitClasses", function () {
      return splitClasses;
    });
    /* harmony export (binding) */


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "R3BoundTarget", function () {
      return R3BoundTarget;
    });
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 http://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 Inc. All Rights Reserved.
     *
     * Use 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 _this16 = this;

        var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
            closedByChildren = _ref4.closedByChildren,
            implicitNamespacePrefix = _ref4.implicitNamespacePrefix,
            _ref4$contentType = _ref4.contentType,
            contentType = _ref4$contentType === void 0 ? TagContentType.PARSABLE_DATA : _ref4$contentType,
            _ref4$closedByParent = _ref4.closedByParent,
            closedByParent = _ref4$closedByParent === void 0 ? false : _ref4$closedByParent,
            _ref4$isVoid = _ref4.isVoid,
            isVoid = _ref4$isVoid === void 0 ? false : _ref4$isVoid,
            _ref4$ignoreFirstLf = _ref4.ignoreFirstLf,
            ignoreFirstLf = _ref4$ignoreFirstLf === void 0 ? false : _ref4$ignoreFirstLf;

        _classCallCheck(this, HtmlTagDefinition);

        this.closedByChildren = {};
        this.closedByParent = false;
        this.canSelfClose = false;

        if (closedByChildren && closedByChildren.length > 0) {
          closedByChildren.forEach(function (tagName) {
            return _this16.closedByChildren[tagName] = true;
          });
        }

        this.isVoid = isVoid;
        this.closedByParent = closedByParent || isVoid;
        this.implicitNamespacePrefix = implicitNamespacePrefix || null;
        this.contentType = contentType;
        this.ignoreFirstLf = ignoreFirstLf;
      }

      _createClass2(HtmlTagDefinition, [{
        key: "isClosedByChild",
        value: function isClosedByChild(name) {
          return this.isVoid || name.toLowerCase() in this.closedByChildren;
        }
      }]);

      return HtmlTagDefinition;
    }();

    var _DEFAULT_TAG_DEFINITION; // see http://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) {
      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'
          }),
          '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({
            contentType: TagContentType.ESCAPABLE_RAW_TEXT
          }),
          'textarea': new HtmlTagDefinition({
            contentType: TagContentType.ESCAPABLE_RAW_TEXT,
            ignoreFirstLf: true
          })
        };
      }

      return TAG_DEFINITIONS[tagName.toLowerCase()] || _DEFAULT_TAG_DEFINITION;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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\\()|' + //":not("
    '([-\\w]+)|' + // "tag"
    '(?:\\.([-\\w]+))|' + // ".class"
    // "-" should appear first in the regexp below as FF31 parses "[.-\w]" as a range
    '(?:\\[([-.\\w*]+)(?:=([\"\']?)([^\\]\"\']*)\\5)?\\])|' + // "[name]", "[name=value]",
    // "[name="value"]",
    // "[name='value']"
    '(\\))|' + // ")"
    '(\\s*,\\s*)', // ","
    '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]) {
              if (inNot) {
                throw new Error('Nesting :not is not allowed in a selector');
              }

              inNot = true;
              current = new CssSelector();
              cssSelector.notSelectors.push(current);
            }

            if (match[2]) {
              current.setElement(match[2]);
            }

            if (match[3]) {
              current.addClassName(match[3]);
            }

            if (match[4]) {
              current.addAttribute(match[4], match[6]);
            }

            if (match[7]) {
              inNot = false;
              current = cssSelector;
            }

            if (match[8]) {
              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 _i5 = 0; _i5 < attrs.length; _i5 += 2) {
              var _isTerminal2 = _i5 === attrs.length - 2;

              var name = attrs[_i5];
              var value = attrs[_i5 + 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 _i6 = 0; _i6 < classNames.length; _i6++) {
              var className = classNames[_i6];
              result = this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;
              result = this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) || result;
            }
          }

          if (attrs) {
            for (var _i7 = 0; _i7 < attrs.length; _i7 += 2) {
              var name = attrs[_i7];
              var value = attrs[_i7 + 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 Inc. All Rights Reserved.
     *
     * Use 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,
        ngInjectableDef: 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";
      ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native";
      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({
      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 Inc. All Rights Reserved.
     *
     * Use 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] : null;

        _classCallCheck(this, Type$1);

        this.modifiers = modifiers;

        if (!modifiers) {
          this.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 _super6 = _createSuper(BuiltinType);

      function BuiltinType(name) {
        var _this17;

        var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

        _classCallCheck(this, BuiltinType);

        _this17 = _super6.call(this, modifiers);
        _this17.name = name;
        return _this17;
      }

      _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 _super7 = _createSuper(ExpressionType);

      function ExpressionType(value) {
        var _this18;

        var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
        var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

        _classCallCheck(this, ExpressionType);

        _this18 = _super7.call(this, modifiers);
        _this18.value = value;
        _this18.typeParams = typeParams;
        return _this18;
      }

      _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 _super8 = _createSuper(ArrayType);

      function ArrayType(of) {
        var _this19;

        var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

        _classCallCheck(this, ArrayType);

        _this19 = _super8.call(this, modifiers);
        _this19.of = of;
        return _this19;
      }

      _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 _super9 = _createSuper(MapType);

      function MapType(valueType) {
        var _this20;

        var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

        _classCallCheck(this, MapType);

        _this20 = _super9.call(this, modifiers);
        _this20.valueType = valueType || null;
        return _this20;
      }

      _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 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) {
          return new InvokeFunctionExpr(this, params, null, sourceSpan);
        }
      }, {
        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 _super10 = _createSuper(ReadVarExpr);

      function ReadVarExpr(name, type, sourceSpan) {
        var _this21;

        _classCallCheck(this, ReadVarExpr);

        _this21 = _super10.call(this, type, sourceSpan);

        if (typeof name === 'string') {
          _this21.name = name;
          _this21.builtin = null;
        } else {
          _this21.name = null;
          _this21.builtin = name;
        }

        return _this21;
      }

      _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 _super11 = _createSuper(TypeofExpr);

      function TypeofExpr(expr, type, sourceSpan) {
        var _this22;

        _classCallCheck(this, TypeofExpr);

        _this22 = _super11.call(this, type, sourceSpan);
        _this22.expr = expr;
        return _this22;
      }

      _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 _super12 = _createSuper(WrappedNodeExpr);

      function WrappedNodeExpr(node, type, sourceSpan) {
        var _this23;

        _classCallCheck(this, WrappedNodeExpr);

        _this23 = _super12.call(this, type, sourceSpan);
        _this23.node = node;
        return _this23;
      }

      _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 _super13 = _createSuper(WriteVarExpr);

      function WriteVarExpr(name, value, type, sourceSpan) {
        var _this24;

        _classCallCheck(this, WriteVarExpr);

        _this24 = _super13.call(this, type || value.type, sourceSpan);
        _this24.name = name;
        _this24.value = value;
        return _this24;
      }

      _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 _super14 = _createSuper(WriteKeyExpr);

      function WriteKeyExpr(receiver, index, value, type, sourceSpan) {
        var _this25;

        _classCallCheck(this, WriteKeyExpr);

        _this25 = _super14.call(this, type || value.type, sourceSpan);
        _this25.receiver = receiver;
        _this25.index = index;
        _this25.value = value;
        return _this25;
      }

      _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 _super15 = _createSuper(WritePropExpr);

      function WritePropExpr(receiver, name, value, type, sourceSpan) {
        var _this26;

        _classCallCheck(this, WritePropExpr);

        _this26 = _super15.call(this, type || value.type, sourceSpan);
        _this26.receiver = receiver;
        _this26.name = name;
        _this26.value = value;
        return _this26;
      }

      _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 _super16 = _createSuper(InvokeMethodExpr);

      function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {
        var _this27;

        _classCallCheck(this, InvokeMethodExpr);

        _this27 = _super16.call(this, type, sourceSpan);
        _this27.receiver = receiver;
        _this27.args = args;

        if (typeof method === 'string') {
          _this27.name = method;
          _this27.builtin = null;
        } else {
          _this27.name = null;
          _this27.builtin = method;
        }

        return _this27;
      }

      _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 _super17 = _createSuper(InvokeFunctionExpr);

      function InvokeFunctionExpr(fn, args, type, sourceSpan) {
        var _this28;

        var pure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;

        _classCallCheck(this, InvokeFunctionExpr);

        _this28 = _super17.call(this, type, sourceSpan);
        _this28.fn = fn;
        _this28.args = args;
        _this28.pure = pure;
        return _this28;
      }

      _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 _super18 = _createSuper(InstantiateExpr);

      function InstantiateExpr(classExpr, args, type, sourceSpan) {
        var _this29;

        _classCallCheck(this, InstantiateExpr);

        _this29 = _super18.call(this, type, sourceSpan);
        _this29.classExpr = classExpr;
        _this29.args = args;
        return _this29;
      }

      _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 _super19 = _createSuper(LiteralExpr);

      function LiteralExpr(value, type, sourceSpan) {
        var _this30;

        _classCallCheck(this, LiteralExpr);

        _this30 = _super19.call(this, type, sourceSpan);
        _this30.value = value;
        return _this30;
      }

      _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 ExternalExpr = /*#__PURE__*/function (_Expression11) {
      _inherits(ExternalExpr, _Expression11);

      var _super20 = _createSuper(ExternalExpr);

      function ExternalExpr(value, type) {
        var _this31;

        var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;

        _classCallCheck(this, ExternalExpr);

        _this31 = _super20.call(this, type, sourceSpan);
        _this31.value = value;
        _this31.typeParams = typeParams;
        return _this31;
      }

      _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 (_Expression12) {
      _inherits(ConditionalExpr, _Expression12);

      var _super21 = _createSuper(ConditionalExpr);

      function ConditionalExpr(condition, trueCase) {
        var _this32;

        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);

        _this32 = _super21.call(this, type || trueCase.type, sourceSpan);
        _this32.condition = condition;
        _this32.falseCase = falseCase;
        _this32.trueCase = trueCase;
        return _this32;
      }

      _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 (_Expression13) {
      _inherits(NotExpr, _Expression13);

      var _super22 = _createSuper(NotExpr);

      function NotExpr(condition, sourceSpan) {
        var _this33;

        _classCallCheck(this, NotExpr);

        _this33 = _super22.call(this, BOOL_TYPE, sourceSpan);
        _this33.condition = condition;
        return _this33;
      }

      _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 (_Expression14) {
      _inherits(AssertNotNull, _Expression14);

      var _super23 = _createSuper(AssertNotNull);

      function AssertNotNull(condition, sourceSpan) {
        var _this34;

        _classCallCheck(this, AssertNotNull);

        _this34 = _super23.call(this, condition.type, sourceSpan);
        _this34.condition = condition;
        return _this34;
      }

      _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 (_Expression15) {
      _inherits(CastExpr, _Expression15);

      var _super24 = _createSuper(CastExpr);

      function CastExpr(value, type, sourceSpan) {
        var _this35;

        _classCallCheck(this, CastExpr);

        _this35 = _super24.call(this, type, sourceSpan);
        _this35.value = value;
        return _this35;
      }

      _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 (_Expression16) {
      _inherits(FunctionExpr, _Expression16);

      var _super25 = _createSuper(FunctionExpr);

      function FunctionExpr(params, statements, type, sourceSpan, name) {
        var _this36;

        _classCallCheck(this, FunctionExpr);

        _this36 = _super25.call(this, type, sourceSpan);
        _this36.params = params;
        _this36.statements = statements;
        _this36.name = name;
        return _this36;
      }

      _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) {
          var modifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);
        }
      }]);

      return FunctionExpr;
    }(Expression);

    var BinaryOperatorExpr = /*#__PURE__*/function (_Expression17) {
      _inherits(BinaryOperatorExpr, _Expression17);

      var _super26 = _createSuper(BinaryOperatorExpr);

      function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan) {
        var _this37;

        var parens = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;

        _classCallCheck(this, BinaryOperatorExpr);

        _this37 = _super26.call(this, type || lhs.type, sourceSpan);
        _this37.operator = operator;
        _this37.rhs = rhs;
        _this37.parens = parens;
        _this37.lhs = lhs;
        return _this37;
      }

      _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 (_Expression18) {
      _inherits(ReadPropExpr, _Expression18);

      var _super27 = _createSuper(ReadPropExpr);

      function ReadPropExpr(receiver, name, type, sourceSpan) {
        var _this38;

        _classCallCheck(this, ReadPropExpr);

        _this38 = _super27.call(this, type, sourceSpan);
        _this38.receiver = receiver;
        _this38.name = name;
        return _this38;
      }

      _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 (_Expression19) {
      _inherits(ReadKeyExpr, _Expression19);

      var _super28 = _createSuper(ReadKeyExpr);

      function ReadKeyExpr(receiver, index, type, sourceSpan) {
        var _this39;

        _classCallCheck(this, ReadKeyExpr);

        _this39 = _super28.call(this, type, sourceSpan);
        _this39.receiver = receiver;
        _this39.index = index;
        return _this39;
      }

      _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 (_Expression20) {
      _inherits(LiteralArrayExpr, _Expression20);

      var _super29 = _createSuper(LiteralArrayExpr);

      function LiteralArrayExpr(entries, type, sourceSpan) {
        var _this40;

        _classCallCheck(this, LiteralArrayExpr);

        _this40 = _super29.call(this, type, sourceSpan);
        _this40.entries = entries;
        return _this40;
      }

      _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 (_Expression21) {
      _inherits(LiteralMapExpr, _Expression21);

      var _super30 = _createSuper(LiteralMapExpr);

      function LiteralMapExpr(entries, type, sourceSpan) {
        var _this41;

        _classCallCheck(this, LiteralMapExpr);

        _this41 = _super30.call(this, type, sourceSpan);
        _this41.entries = entries;
        _this41.valueType = null;

        if (type) {
          _this41.valueType = type.valueType;
        }

        return _this41;
      }

      _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 (_Expression22) {
      _inherits(CommaExpr, _Expression22);

      var _super31 = _createSuper(CommaExpr);

      function CommaExpr(parts, sourceSpan) {
        var _this42;

        _classCallCheck(this, CommaExpr);

        _this42 = _super31.call(this, parts[parts.length - 1].type, sourceSpan);
        _this42.parts = parts;
        return _this42;
      }

      _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 Statement = /*#__PURE__*/function () {
      function Statement(modifiers, sourceSpan) {
        _classCallCheck(this, Statement);

        this.modifiers = modifiers || [];
        this.sourceSpan = sourceSpan || null;
      }

      _createClass2(Statement, [{
        key: "hasModifier",
        value: function hasModifier(modifier) {
          return this.modifiers.indexOf(modifier) !== -1;
        }
      }]);

      return Statement;
    }();

    var DeclareVarStmt = /*#__PURE__*/function (_Statement) {
      _inherits(DeclareVarStmt, _Statement);

      var _super32 = _createSuper(DeclareVarStmt);

      function DeclareVarStmt(name, value, type) {
        var _this43;

        var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
        var sourceSpan = arguments.length > 4 ? arguments[4] : undefined;

        _classCallCheck(this, DeclareVarStmt);

        _this43 = _super32.call(this, modifiers, sourceSpan);
        _this43.name = name;
        _this43.value = value;
        _this43.type = type || value && value.type || null;
        return _this43;
      }

      _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 _super33 = _createSuper(DeclareFunctionStmt);

      function DeclareFunctionStmt(name, params, statements, type) {
        var _this44;

        var modifiers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
        var sourceSpan = arguments.length > 5 ? arguments[5] : undefined;

        _classCallCheck(this, DeclareFunctionStmt);

        _this44 = _super33.call(this, modifiers, sourceSpan);
        _this44.name = name;
        _this44.params = params;
        _this44.statements = statements;
        _this44.type = type || null;
        return _this44;
      }

      _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 _super34 = _createSuper(ExpressionStatement);

      function ExpressionStatement(expr, sourceSpan) {
        var _this45;

        _classCallCheck(this, ExpressionStatement);

        _this45 = _super34.call(this, null, sourceSpan);
        _this45.expr = expr;
        return _this45;
      }

      _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 _super35 = _createSuper(ReturnStatement);

      function ReturnStatement(value, sourceSpan) {
        var _this46;

        _classCallCheck(this, ReturnStatement);

        _this46 = _super35.call(this, null, sourceSpan);
        _this46.value = value;
        return _this46;
      }

      _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(type, modifiers) {
        _classCallCheck(this, AbstractClassPart);

        this.modifiers = modifiers;

        if (!modifiers) {
          this.modifiers = [];
        }

        this.type = type || null;
      }

      _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 _super36 = _createSuper(ClassField);

      function ClassField(name, type) {
        var _this47;

        var modifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
        var initializer = arguments.length > 3 ? arguments[3] : undefined;

        _classCallCheck(this, ClassField);

        _this47 = _super36.call(this, type, modifiers);
        _this47.name = name;
        _this47.initializer = initializer;
        return _this47;
      }

      _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 _super37 = _createSuper(ClassMethod);

      function ClassMethod(name, params, body, type) {
        var _this48;

        var modifiers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;

        _classCallCheck(this, ClassMethod);

        _this48 = _super37.call(this, type, modifiers);
        _this48.name = name;
        _this48.params = params;
        _this48.body = body;
        return _this48;
      }

      _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 _super38 = _createSuper(ClassGetter);

      function ClassGetter(name, body, type) {
        var _this49;

        var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

        _classCallCheck(this, ClassGetter);

        _this49 = _super38.call(this, type, modifiers);
        _this49.name = name;
        _this49.body = body;
        return _this49;
      }

      _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 _super39 = _createSuper(ClassStmt);

      function ClassStmt(name, parent, fields, getters, constructorMethod, methods) {
        var _this50;

        var modifiers = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
        var sourceSpan = arguments.length > 7 ? arguments[7] : undefined;

        _classCallCheck(this, ClassStmt);

        _this50 = _super39.call(this, modifiers, sourceSpan);
        _this50.name = name;
        _this50.parent = parent;
        _this50.fields = fields;
        _this50.getters = getters;
        _this50.constructorMethod = constructorMethod;
        _this50.methods = methods;
        return _this50;
      }

      _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 _super40 = _createSuper(IfStmt);

      function IfStmt(condition, trueCase) {
        var _this51;

        var falseCase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
        var sourceSpan = arguments.length > 3 ? arguments[3] : undefined;

        _classCallCheck(this, IfStmt);

        _this51 = _super40.call(this, null, sourceSpan);
        _this51.condition = condition;
        _this51.trueCase = trueCase;
        _this51.falseCase = falseCase;
        return _this51;
      }

      _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 CommentStmt = /*#__PURE__*/function (_Statement7) {
      _inherits(CommentStmt, _Statement7);

      var _super41 = _createSuper(CommentStmt);

      function CommentStmt(comment) {
        var _this52;

        var multiline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var sourceSpan = arguments.length > 2 ? arguments[2] : undefined;

        _classCallCheck(this, CommentStmt);

        _this52 = _super41.call(this, null, sourceSpan);
        _this52.comment = comment;
        _this52.multiline = multiline;
        return _this52;
      }

      _createClass2(CommentStmt, [{
        key: "isEquivalent",
        value: function isEquivalent(stmt) {
          return stmt instanceof CommentStmt;
        }
      }, {
        key: "visitStatement",
        value: function visitStatement(visitor, context) {
          return visitor.visitCommentStmt(this, context);
        }
      }]);

      return CommentStmt;
    }(Statement);

    var JSDocCommentStmt = /*#__PURE__*/function (_Statement8) {
      _inherits(JSDocCommentStmt, _Statement8);

      var _super42 = _createSuper(JSDocCommentStmt);

      function JSDocCommentStmt() {
        var _this53;

        var tags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        var sourceSpan = arguments.length > 1 ? arguments[1] : undefined;

        _classCallCheck(this, JSDocCommentStmt);

        _this53 = _super42.call(this, null, sourceSpan);
        _this53.tags = tags;
        return _this53;
      }

      _createClass2(JSDocCommentStmt, [{
        key: "isEquivalent",
        value: function isEquivalent(stmt) {
          return stmt instanceof JSDocCommentStmt && this.toString() === stmt.toString();
        }
      }, {
        key: "visitStatement",
        value: function visitStatement(visitor, context) {
          return visitor.visitJSDocCommentStmt(this, context);
        }
      }, {
        key: "toString",
        value: function toString() {
          return serializeTags(this.tags);
        }
      }]);

      return JSDocCommentStmt;
    }(Statement);

    var TryCatchStmt = /*#__PURE__*/function (_Statement9) {
      _inherits(TryCatchStmt, _Statement9);

      var _super43 = _createSuper(TryCatchStmt);

      function TryCatchStmt(bodyStmts, catchStmts, sourceSpan) {
        var _this54;

        _classCallCheck(this, TryCatchStmt);

        _this54 = _super43.call(this, null, sourceSpan);
        _this54.bodyStmts = bodyStmts;
        _this54.catchStmts = catchStmts;
        return _this54;
      }

      _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 (_Statement10) {
      _inherits(ThrowStmt, _Statement10);

      var _super44 = _createSuper(ThrowStmt);

      function ThrowStmt(error, sourceSpan) {
        var _this55;

        _classCallCheck(this, ThrowStmt);

        _this55 = _super44.call(this, null, sourceSpan);
        _this55.error = error;
        return _this55;
      }

      _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: "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: "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 _this56 = this;

          var entries = ast.entries.map(function (entry) {
            return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this56, context), entry.quoted);
          });
          var mapType = new MapType(ast.valueType, null);
          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 _this57 = this;

          return exprs.map(function (expr) {
            return expr.visitExpression(_this57, 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), 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), context);
        }
      }, {
        key: "visitExpressionStmt",
        value: function visitExpressionStmt(stmt, context) {
          return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan), context);
        }
      }, {
        key: "visitReturnStmt",
        value: function visitReturnStmt(stmt, context) {
          return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);
        }
      }, {
        key: "visitDeclareClassStmt",
        value: function visitDeclareClassStmt(stmt, context) {
          var _this58 = this;

          var parent = stmt.parent.visitExpression(this, context);
          var getters = stmt.getters.map(function (getter) {
            return new ClassGetter(getter.name, _this58.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, _this58.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), 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), context);
        }
      }, {
        key: "visitThrowStmt",
        value: function visitThrowStmt(stmt, context) {
          return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);
        }
      }, {
        key: "visitCommentStmt",
        value: function visitCommentStmt(stmt, context) {
          return this.transformStmt(stmt, context);
        }
      }, {
        key: "visitJSDocCommentStmt",
        value: function visitJSDocCommentStmt(stmt, context) {
          return this.transformStmt(stmt, context);
        }
      }, {
        key: "visitAllStatements",
        value: function visitAllStatements(stmts, context) {
          var _this59 = this;

          return stmts.map(function (stmt) {
            return stmt.visitStatement(_this59, 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 _this60 = this;

          type.value.visitExpression(this, context);

          if (type.typeParams !== null) {
            type.typeParams.forEach(function (param) {
              return _this60.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: "visitExternalExpr",
        value: function visitExternalExpr(ast, context) {
          var _this61 = this;

          if (ast.typeParams) {
            ast.typeParams.forEach(function (type) {
              return type.visitType(_this61, 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: "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 _this62 = this;

          ast.entries.forEach(function (entry) {
            return entry.value.visitExpression(_this62, 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 _this63 = this;

          exprs.forEach(function (expr) {
            return expr.visitExpression(_this63, 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 _this64 = this;

          stmt.parent.visitExpression(this, context);
          stmt.getters.forEach(function (getter) {
            return _this64.visitAllStatements(getter.body, context);
          });

          if (stmt.constructorMethod) {
            this.visitAllStatements(stmt.constructorMethod.body, context);
          }

          stmt.methods.forEach(function (method) {
            return _this64.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: "visitCommentStmt",
        value: function visitCommentStmt(stmt, context) {
          return stmt;
        }
      }, {
        key: "visitJSDocCommentStmt",
        value: function visitJSDocCommentStmt(stmt, context) {
          return stmt;
        }
      }, {
        key: "visitAllStatements",
        value: function visitAllStatements(stmts, context) {
          var _this65 = this;

          stmts.forEach(function (stmt) {
            return stmt.visitStatement(_this65, 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 _super45 = _createSuper(_ReadVarVisitor);

      function _ReadVarVisitor() {
        var _this66;

        _classCallCheck(this, _ReadVarVisitor);

        _this66 = _super45.apply(this, arguments);
        _this66.varNames = new Set();
        return _this66;
      }

      _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 _super46 = _createSuper(_FindExternalReferencesVisitor);

      function _FindExternalReferencesVisitor() {
        var _this67;

        _classCallCheck(this, _FindExternalReferencesVisitor);

        _this67 = _super46.apply(this, arguments);
        _this67.externalReferences = [];
        return _this67;
      }

      _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 _super47 = _createSuper(_ApplySourceSpanTransformer);

      function _ApplySourceSpanTransformer(sourceSpan) {
        var _this68;

        _classCallCheck(this, _ApplySourceSpanTransformer);

        _this68 = _super47.call(this);
        _this68.sourceSpan = sourceSpan;
        return _this68;
      }

      _createClass2(_ApplySourceSpanTransformer, [{
        key: "_clone",
        value: function _clone(obj) {
          var clone = Object.create(obj.constructor.prototype);

          for (var _i8 = 0, _Object$keys2 = Object.keys(obj); _i8 < _Object$keys2.length; _i8++) {
            var prop = _Object$keys2[_i8];
            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 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) {
      var typeParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var typeModifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
      return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;
    }

    function expressionType(expr) {
      var typeModifiers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var typeParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
      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 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) {
      return new IfStmt(condition, thenClause, elseClause);
    }

    function literal(value, type, sourceSpan) {
      return new LiteralExpr(value, type, 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 '';
      var out = '*\n';

      var _iterator3 = _createForOfIteratorHelper(tags),
          _step3;

      try {
        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
          var tag = _step3.value;
          out += ' *'; // If the tagToString is multi-line, insert " * " prefixes on subsequent lines.

          out += tagToString(tag).replace(/\n/g, '\n * ');
          out += '\n';
        }
      } catch (err) {
        _iterator3.e(err);
      } finally {
        _iterator3.f();
      }

      out += ' ';
      return out;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _len = arguments.length, m = new Array(_len), _key = 0; _key < _len; _key++) {
          m[_key] = arguments[_key];
        }

        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 _this69 = this;

          return arr.map(function (value) {
            return visitValue(value, _this69, context);
          });
        }
      }, {
        key: "visitStringMap",
        value: function visitStringMap(map, context) {
          var _this70 = this;

          var result = {};
          Object.keys(map).forEach(function (key) {
            result[key] = visitValue(map[key], _this70, 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 += String.fromCharCode(codePoint);
        } else if (codePoint <= 0x7ff) {
          encoded += String.fromCharCode(codePoint >> 6 & 0x1F | 0xc0, codePoint & 0x3f | 0x80);
        } else if (codePoint <= 0xffff) {
          encoded += String.fromCharCode(codePoint >> 12 | 0xe0, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80);
        } else if (codePoint <= 0x1fffff) {
          encoded += String.fromCharCode(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 (token instanceof Array) {
        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;
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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';
    /**
     * Context to use when producing a key.
     *
     * This ensures we see the constant not the reference variable when producing
     * a key.
     */

    var KEY_CONTEXT = {};
    /**
     * 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 (_Expression23) {
      _inherits(FixupExpression, _Expression23);

      var _super48 = _createSuper(FixupExpression);

      function FixupExpression(resolved) {
        var _this71;

        _classCallCheck(this, FixupExpression);

        _this71 = _super48.call(this, resolved.type);
        _this71.resolved = resolved;
        _this71.original = resolved;
        return _this71;
      }

      _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() {
        _classCallCheck(this, ConstantPool);

        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 || 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();
            this.statements.push(variable(name).set(literal).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));
            fixup.fixup(variable(name));
          }

          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$1) {
          // Create a pure function that builds an array of a mix of constant  and variable expressions
          if (literal$1 instanceof LiteralArrayExpr) {
            var argumentsForKey = literal$1.entries.map(function (e) {
              return e.isConstant() ? e : literal(null);
            });
            var key = this.keyOf(literalArr(argumentsForKey));
            return this._getLiteralFactory(key, literal$1.entries, function (entries) {
              return literalArr(entries);
            });
          } else {
            var expressionForKey = literalMap(literal$1.entries.map(function (e) {
              return {
                key: e.key,
                value: e.value.isConstant() ? e.value : literal(null),
                quoted: e.quoted
              };
            }));

            var _key2 = this.keyOf(expressionForKey);

            return this._getLiteralFactory(_key2, literal$1.entries.map(function (e) {
              return e.value;
            }), function (entries) {
              return literalMap(entries.map(function (value, index) {
                return {
                  key: literal$1.entries[index].key,
                  value: value,
                  quoted: literal$1.entries[index].quoted
                };
              }));
            });
          }
        }
      }, {
        key: "_getLiteralFactory",
        value: function _getLiteralFactory(key, values, resultMap) {
          var _this72 = 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() ? _this72.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 'ngComponentDef';

            case 1
            /* Directive */
            :
              return 'ngDirectiveDef';

            case 0
            /* Injector */
            :
              return 'ngInjectorDef';

            case 3
            /* Pipe */
            :
              return 'ngPipeDef';
          }

          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.visitBinaryOperatorExpr = invalid;
        this.visitReadPropExpr = invalid;
        this.visitReadKeyExpr = invalid;
        this.visitCommaExpr = 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 _this73 = this;

          return "[".concat(ast.entries.map(function (entry) {
            return entry.visitExpression(_this73, context);
          }).join(','), "]");
        }
      }, {
        key: "visitLiteralMapExpr",
        value: function visitLiteralMapExpr(ast, context) {
          var _this74 = 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(_this74, 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;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          moduleUrl = _ref5.moduleUrl,
          styles = _ref5.styles,
          styleUrls = _ref5.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(_ref6) {
        var encapsulation = _ref6.encapsulation,
            template = _ref6.template,
            templateUrl = _ref6.templateUrl,
            htmlAst = _ref6.htmlAst,
            styles = _ref6.styles,
            styleUrls = _ref6.styleUrls,
            externalStylesheets = _ref6.externalStylesheets,
            animations = _ref6.animations,
            ngContentSelectors = _ref6.ngContentSelectors,
            interpolation = _ref6.interpolation,
            isInline = _ref6.isInline,
            preserveWhitespaces = _ref6.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 () {
      _createClass2(CompileDirectiveMetadata, null, [{
        key: "create",
        value: function create(_ref7) {
          var isHost = _ref7.isHost,
              type = _ref7.type,
              isComponent = _ref7.isComponent,
              selector = _ref7.selector,
              exportAs = _ref7.exportAs,
              changeDetection = _ref7.changeDetection,
              inputs = _ref7.inputs,
              outputs = _ref7.outputs,
              host = _ref7.host,
              providers = _ref7.providers,
              viewProviders = _ref7.viewProviders,
              queries = _ref7.queries,
              guards = _ref7.guards,
              viewQueries = _ref7.viewQueries,
              entryComponents = _ref7.entryComponents,
              template = _ref7.template,
              componentViewType = _ref7.componentViewType,
              rendererType = _ref7.rendererType,
              componentFactory = _ref7.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
          });
        }
      }]);

      function CompileDirectiveMetadata(_ref8) {
        var isHost = _ref8.isHost,
            type = _ref8.type,
            isComponent = _ref8.isComponent,
            selector = _ref8.selector,
            exportAs = _ref8.exportAs,
            changeDetection = _ref8.changeDetection,
            inputs = _ref8.inputs,
            outputs = _ref8.outputs,
            hostListeners = _ref8.hostListeners,
            hostProperties = _ref8.hostProperties,
            hostAttributes = _ref8.hostAttributes,
            providers = _ref8.providers,
            viewProviders = _ref8.viewProviders,
            queries = _ref8.queries,
            guards = _ref8.guards,
            viewQueries = _ref8.viewQueries,
            entryComponents = _ref8.entryComponents,
            template = _ref8.template,
            componentViewType = _ref8.componentViewType,
            rendererType = _ref8.rendererType,
            componentFactory = _ref8.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
          };
        }
      }]);

      return CompileDirectiveMetadata;
    }();

    var CompilePipeMetadata = /*#__PURE__*/function () {
      function CompilePipeMetadata(_ref9) {
        var type = _ref9.type,
            name = _ref9.name,
            pure = _ref9.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(_ref10) {
        var type = _ref10.type,
            providers = _ref10.providers,
            declaredDirectives = _ref10.declaredDirectives,
            exportedDirectives = _ref10.exportedDirectives,
            declaredPipes = _ref10.declaredPipes,
            exportedPipes = _ref10.exportedPipes,
            entryComponents = _ref10.entryComponents,
            bootstrapComponents = _ref10.bootstrapComponents,
            importedModules = _ref10.importedModules,
            exportedModules = _ref10.exportedModules,
            schemas = _ref10.schemas,
            transitiveModule = _ref10.transitiveModule,
            id = _ref10.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, _ref11) {
      var useClass = _ref11.useClass,
          useValue = _ref11.useValue,
          useExisting = _ref11.useExisting,
          useFactory = _ref11.useFactory,
          deps = _ref11.deps,
          multi = _ref11.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 Inc. All Rights Reserved.
     *
     * Use 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.select = {
      name: 'ɵɵselect',
      moduleName: CORE$1
    };
    Identifiers$1.updateSyntheticHostBinding = {
      name: 'ɵɵupdateSyntheticHostBinding',
      moduleName: CORE$1
    };
    Identifiers$1.componentHostSyntheticListener = {
      name: 'ɵɵcomponentHostSyntheticListener',
      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.styling = {
      name: 'ɵɵstyling',
      moduleName: CORE$1
    };
    Identifiers$1.styleMap = {
      name: 'ɵɵstyleMap',
      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.stylingApply = {
      name: 'ɵɵstylingApply',
      moduleName: CORE$1
    };
    Identifiers$1.styleSanitizer = {
      name: 'ɵɵstyleSanitizer',
      moduleName: CORE$1
    };
    Identifiers$1.elementHostAttrs = {
      name: 'ɵɵelementHostAttrs',
      moduleName: CORE$1
    };
    Identifiers$1.containerCreate = {
      name: 'ɵɵcontainer',
      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.textBinding = {
      name: 'ɵɵtextBinding',
      moduleName: CORE$1
    };
    Identifiers$1.enableBindings = {
      name: 'ɵɵenableBindings',
      moduleName: CORE$1
    };
    Identifiers$1.disableBindings = {
      name: 'ɵɵdisableBindings',
      moduleName: CORE$1
    };
    Identifiers$1.allocHostVars = {
      name: 'ɵɵallocHostVars',
      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.i18nLocalize = {
      name: 'ɵɵi18nLocalize',
      moduleName: CORE$1
    };
    Identifiers$1.load = {
      name: 'ɵɵload',
      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.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.defineBase = {
      name: 'ɵɵdefineBase',
      moduleName: CORE$1
    };
    Identifiers$1.BaseDef = {
      name: 'ɵɵBaseDef',
      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.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.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.loadViewQuery = {
      name: 'ɵɵloadViewQuery',
      moduleName: CORE$1
    };
    Identifiers$1.contentQuery = {
      name: 'ɵɵcontentQuery',
      moduleName: CORE$1
    };
    Identifiers$1.loadContentQuery = {
      name: 'ɵɵloadContentQuery',
      moduleName: CORE$1
    };
    Identifiers$1.NgOnChangesFeature = {
      name: 'ɵɵNgOnChangesFeature',
      moduleName: CORE$1
    };
    Identifiers$1.InheritDefinitionFeature = {
      name: 'ɵɵInheritDefinitionFeature',
      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.defaultStyleSanitizer = {
      name: 'ɵɵdefaultStyleSanitizer',
      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
    };
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 () {
      function ParseSourceSpan(start, end) {
        var details = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

        _classCallCheck(this, ParseSourceSpan);

        this.start = start;
        this.end = end;
        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 EMPTY_PARSE_LOCATION = new ParseLocation(new ParseSourceFile('', ''), 0, 0, 0);
    var EMPTY_SOURCE_SPAN = new ParseSourceSpan(EMPTY_PARSE_LOCATION, EMPTY_PARSE_LOCATION);
    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 Inc. All Rights Reserved.
     *
     * Use 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, valueSpan, i18n) {
        _classCallCheck(this, BoundAttribute);

        this.name = name;
        this.type = type;
        this.securityContext = securityContext;
        this.value = value;
        this.unit = unit;
        this.sourceSpan = sourceSpan;
        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) {
          return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, 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; // If the element is empty then the source span should include any closing tag

        if (children.length === 0 && startSourceSpan && endSourceSpan) {
          this.sourceSpan = new ParseSourceSpan(sourceSpan.start, endSourceSpan.end);
        }
      }

      _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;
      }

      _createClass2(Content, [{
        key: "visit",
        value: function visit(visitor) {
          return visitor.visitContent(this);
        }
      }]);

      return Content;
    }();

    var Variable = /*#__PURE__*/function () {
      function Variable(name, value, sourceSpan, valueSpan) {
        _classCallCheck(this, Variable);

        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
        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 _iterator4 = _createForOfIteratorHelper(nodes),
            _step4;

        try {
          for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
            var node = _step4.value;
            var newNode = visitor.visit(node) || node.visit(visitor);
          }
        } catch (err) {
          _iterator4.e(err);
        } finally {
          _iterator4.f();
        }
      } else {
        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);
            }
          }
        } catch (err) {
          _iterator5.e(err);
        } finally {
          _iterator5.f();
        }
      }

      return result;
    }

    function transformAll(visitor, nodes) {
      var result = [];
      var changed = false;

      var _iterator6 = _createForOfIteratorHelper(nodes),
          _step6;

      try {
        for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
          var node = _step6.value;
          var newNode = node.visit(visitor);

          if (newNode) {
            result.push(newNode);
          }

          changed = changed || newNode != node;
        }
      } catch (err) {
        _iterator6.e(err);
      } finally {
        _iterator6.f();
      }

      return changed ? result : nodes;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
     * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)
     * @param meaning
     * @param description
     * @param id
     */
    function Message(nodes, placeholders, placeholderToMessage, meaning, description, id) {
      _classCallCheck(this, Message);

      this.nodes = nodes;
      this.placeholders = placeholders;
      this.placeholderToMessage = placeholderToMessage;
      this.meaning = meaning;
      this.description = description;
      this.id = id;

      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, sourceSpan) {
        _classCallCheck(this, TagPlaceholder);

        this.tag = tag;
        this.attrs = attrs;
        this.startName = startName;
        this.closeName = closeName;
        this.children = children;
        this.isVoid = isVoid;
        this.sourceSpan = sourceSpan;
      }

      _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 _this75 = this;

          var children = container.children.map(function (n) {
            return n.visit(_this75, context);
          });
          return new Container(children, container.sourceSpan);
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this76 = this;

          var cases = {};
          Object.keys(icu.cases).forEach(function (key) {
            return cases[key] = icu.cases[key].visit(_this76, 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 _this77 = this;

          var children = ph.children.map(function (n) {
            return n.visit(_this77, context);
          });
          return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);
        }
      }, {
        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 _this78 = this;

          container.children.forEach(function (child) {
            return child.visit(_this78);
          });
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this79 = this;

          Object.keys(icu.cases).forEach(function (k) {
            icu.cases[k].visit(_this79);
          });
        }
      }, {
        key: "visitTagPlaceholder",
        value: function visitTagPlaceholder(ph, context) {
          var _this80 = this;

          ph.children.forEach(function (child) {
            return child.visit(_this80);
          });
        }
      }, {
        key: "visitPlaceholder",
        value: function visitPlaceholder(ph, context) {}
      }, {
        key: "visitIcuPlaceholder",
        value: function visitIcuPlaceholder(ph, context) {}
      }]);

      return RecurseVisitor;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _digest2(message) {
      return message.id || sha1(serializeNodes(message.nodes).join('') + "[".concat(message.meaning, "]"));
    }

    function decimalDigest(message) {
      if (message.id) {
        return message.id;
      }

      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 _this81 = this;

          return "[".concat(container.children.map(function (child) {
            return child.visit(_this81);
          }).join(', '), "]");
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this82 = this;

          var strCases = Object.keys(icu.cases).map(function (k) {
            return "".concat(k, " {").concat(icu.cases[k].visit(_this82), "}");
          });
          return "{".concat(icu.expression, ", ").concat(icu.type, ", ").concat(strCases.join(', '), "}");
        }
      }, {
        key: "visitTagPlaceholder",
        value: function visitTagPlaceholder(ph, context) {
          var _this83 = 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(_this83);
          }).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 _super49 = _createSuper(_SerializerIgnoreIcuExpVisitor);

      function _SerializerIgnoreIcuExpVisitor() {
        _classCallCheck(this, _SerializerIgnoreIcuExpVisitor);

        return _super49.apply(this, arguments);
      }

      _createClass2(_SerializerIgnoreIcuExpVisitor, [{
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this84 = this;

          var strCases = Object.keys(icu.cases).map(function (k) {
            return "".concat(k, " {").concat(icu.cases[k].visit(_this84), "}");
          }); // 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 http://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 = stringToWords32(utf8, Endian.Big);
      var len = utf8.length * 8;
      var w = new Array(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 _fk = fk(j, b, c, d),
              _fk2 = _slicedToArray(_fk, 2),
              f = _fk2[0],
              k = _fk2[1];

          var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);
          var _ref12 = [d, c, rol32(b, 30), a, temp];
          e = _ref12[0];
          d = _ref12[1];
          c = _ref12[2];
          b = _ref12[3];
          a = _ref12[4];
        }

        var _ref13 = [add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)];
        a = _ref13[0];
        b = _ref13[1];
        c = _ref13[2];
        d = _ref13[3];
        e = _ref13[4];
      }

      return byteStringToHexString(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 _ref14 = [hash32(utf8, 0), hash32(utf8, 102072)],
          hi = _ref14[0],
          lo = _ref14[1];

      if (hi == 0 && (lo == 0 || lo == 1)) {
        hi = hi ^ 0x130f9bef;
        lo = lo ^ -0x6b5f56d8;
      }

      return [hi, lo];
    }

    function computeMsgId(msg, meaning) {
      var _fingerprint = fingerprint(msg),
          _fingerprint2 = _slicedToArray(_fingerprint, 2),
          hi = _fingerprint2[0],
          lo = _fingerprint2[1];

      if (meaning) {
        var _fingerprint3 = fingerprint(meaning),
            _fingerprint4 = _slicedToArray(_fingerprint3, 2),
            him = _fingerprint4[0],
            lom = _fingerprint4[1];

        var _add = add64(rol64([hi, lo], 1), [him, lom]);

        var _add2 = _slicedToArray(_add, 2);

        hi = _add2[0];
        lo = _add2[1];
      }

      return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));
    }

    function hash32(str, c) {
      var a = 0x9e3779b9,
          b = 0x9e3779b9;
      var i;
      var len = str.length;

      for (i = 0; i + 12 <= len; i += 12) {
        a = add32(a, wordAt(str, i, Endian.Little));
        b = add32(b, wordAt(str, i + 4, Endian.Little));
        c = add32(c, wordAt(str, i + 8, Endian.Little));

        var _mix = mix([a, b, c]);

        var _mix2 = _slicedToArray(_mix, 3);

        a = _mix2[0];
        b = _mix2[1];
        c = _mix2[2];
      }

      a = add32(a, wordAt(str, i, Endian.Little));
      b = add32(b, wordAt(str, i + 4, Endian.Little)); // the first byte of c is reserved for the length

      c = add32(c, len);
      c = add32(c, wordAt(str, i + 8, Endian.Little) << 8);
      return mix([a, b, c])[2];
    } // clang-format off


    function mix(_ref15) {
      var _ref16 = _slicedToArray(_ref15, 3),
          a = _ref16[0],
          b = _ref16[1],
          c = _ref16[2];

      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(_ref17, _ref18) {
      var _ref19 = _slicedToArray(_ref17, 2),
          ah = _ref19[0],
          al = _ref19[1];

      var _ref20 = _slicedToArray(_ref18, 2),
          bh = _ref20[0],
          bl = _ref20[1];

      var _add32to = add32to64(al, bl),
          _add32to2 = _slicedToArray(_add32to, 2),
          carry = _add32to2[0],
          l = _add32to2[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(_ref21, count) {
      var _ref22 = _slicedToArray(_ref21, 2),
          hi = _ref22[0],
          lo = _ref22[1];

      var h = hi << count | lo >>> 32 - count;
      var l = lo << count | hi >>> 32 - count;
      return [h, l];
    }

    function stringToWords32(str, endian) {
      var words32 = Array(str.length + 3 >>> 2);

      for (var i = 0; i < words32.length; i++) {
        words32[i] = wordAt(str, i * 4, endian);
      }

      return words32;
    }

    function byteAt(str, index) {
      return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;
    }

    function wordAt(str, index, endian) {
      var word = 0;

      if (endian === Endian.Big) {
        for (var i = 0; i < 4; i++) {
          word += byteAt(str, index + i) << 24 - 8 * i;
        }
      } else {
        for (var _i9 = 0; _i9 < 4; _i9++) {
          word += byteAt(str, index + _i9) << 8 * _i9;
        }
      }

      return word;
    }

    function words32ToByteString(words32) {
      return words32.reduce(function (str, word) {
        return str + word32ToByteString(word);
      }, '');
    }

    function word32ToByteString(word) {
      var str = '';

      for (var i = 0; i < 4; i++) {
        str += String.fromCharCode(word >>> 8 * (3 - i) & 0xff);
      }

      return str;
    }

    function byteStringToHexString(str) {
      var hex = '';

      for (var i = 0; i < str.length; i++) {
        var b = byteAt(str, i);
        hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);
      }

      return hex.toLowerCase();
    } // based on http://www.danvk.org/hex2dec.html (JS can not handle more than 56b)


    function byteStringToDecString(str) {
      var decimal = '';
      var toThePower = '1';

      for (var i = str.length - 1; i >= 0; i--) {
        decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));
        toThePower = numberTimesBigInt(256, toThePower);
      }

      return decimal.split('').reverse().join('');
    } // x and y decimal, lowest significant digit first


    function addBigInt(x, y) {
      var sum = '';
      var len = Math.max(x.length, y.length);

      for (var i = 0, carry = 0; i < len || carry; i++) {
        var tmpSum = carry + +(x[i] || 0) + +(y[i] || 0);

        if (tmpSum >= 10) {
          carry = 1;
          sum += tmpSum - 10;
        } else {
          carry = 0;
          sum += tmpSum;
        }
      }

      return sum;
    }

    function numberTimesBigInt(num, b) {
      var product = '';
      var bToThePower = b;

      for (; num !== 0; num = num >>> 1) {
        if (num & 1) product = addBigInt(product, bToThePower);
        bToThePower = addBigInt(bToThePower, bToThePower);
      }

      return product;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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",
        // Creates a name mapper, see `PlaceholderMapper`
        // Returning `null` means that no name mapping is used.
        value: 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 _super50 = _createSuper(SimplePlaceholderMapper);

      // create a mapping from the message
      function SimplePlaceholderMapper(message, mapName) {
        var _this85;

        _classCallCheck(this, SimplePlaceholderMapper);

        _this85 = _super50.call(this);
        _this85.mapName = mapName;
        _this85.internalToPublic = {};
        _this85.publicToNextId = {};
        _this85.publicToInternal = {};
        message.nodes.forEach(function (node) {
          return node.visit(_assertThisInitialized(_this85));
        });
        return _this85;
      }

      _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 Inc. All Rights Reserved.
     *
     * Use 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 _this86 = 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(_this86);
          });
          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 _this87 = this;

        _classCallCheck(this, Declaration);

        this.attrs = {};
        Object.keys(unescapedAttrs).forEach(function (k) {
          _this87.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 _this88 = 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) {
          _this88.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 _super51 = _createSuper(CR);

      function CR() {
        var ws = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;

        _classCallCheck(this, CR);

        return _super51.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 Inc. All Rights Reserved.
     *
     * Use 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 _super52 = _createSuper(Xmb);

      function Xmb() {
        _classCallCheck(this, Xmb);

        return _super52.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 _this89 = this;

          var nodes = [];
          container.children.forEach(function (node) {
            return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this89)));
          });
          return nodes;
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this90 = 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(_this90)), [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 _ref23,
              _this91 = this;

          return (_ref23 = []).concat.apply(_ref23, _toConsumableArray(nodes.map(function (node) {
            return node.visit(_this91);
          })));
        }
      }]);

      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 _this92 = 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(_this92);
            });
          }
        }
      }, {
        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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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_PREFIX = 'MSG_';
    /* Prefix for non-`goog.getMsg` i18n-related vars */

    var TRANSLATION_PREFIX = 'I18N_';
    /** Closure uses `goog.getMsg(message)` to lookup translations */

    var GOOG_GET_MSG = 'goog.getMsg';
    /** Name of the global variable that is used to determine if we use Closure translations or not */

    var NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
    /** I18n separators for metadata **/

    var I18N_MEANING_SEPARATOR = '|';
    var I18N_ID_SEPARATOR = '@@';
    /** 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 i18nTranslationToDeclStmt(variable$1, closureVar, message, meta, params) {
      var statements = []; // var I18N_X;

      statements.push(new DeclareVarStmt(variable$1.name, undefined, INFERRED_TYPE, null, variable$1.sourceSpan));
      var args = [literal(message)];

      if (params && Object.keys(params).length) {
        args.push(mapLiteral(params, true));
      } // Closure JSDoc comments


      var docStatements = i18nMetaToDocStmt(meta);
      var thenStatements = docStatements ? [docStatements] : [];
      var googFnCall = variable(GOOG_GET_MSG).callFn(args); // const MSG_... = goog.getMsg(..);

      thenStatements.push(closureVar.set(googFnCall).toConstDecl()); // I18N_X = MSG_...;

      thenStatements.push(new ExpressionStatement(variable$1.set(closureVar)));
      var localizeFnCall = importExpr(Identifiers$1.i18nLocalize).callFn(args); // I18N_X = i18nLocalize(...);

      var elseStatements = [new ExpressionStatement(variable$1.set(localizeFnCall))]; // if(ngI18nClosureMode) { ... } else { ... }

      statements.push(ifStmt(variable(NG_I18N_CLOSURE_MODE), thenStatements, elseStatements));
      return statements;
    } // Converts i18n meta information for a message (id, description, meaning)
    // to a JsDoc statement formatted as expected by the Closure compiler.


    function i18nMetaToDocStmt(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 : new JSDocCommentStmt(tags);
    }

    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 hasI18nAttrs(element) {
      return element.attrs.some(function (attr) {
        return isI18nAttribute(attr.name);
      });
    }

    function metaFromI18nMessage(message) {
      var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      return {
        id: typeof id === 'string' ? id : message.id || '',
        meaning: message.meaning || '',
        description: message.description || ''
      };
    }

    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 _len2 = arguments.length, values = new Array(_len2 > 2 ? _len2 - 2 : 0), _key3 = 2; _key3 < _len2; _key3++) {
        values[_key3 - 2] = arguments[_key3];
      }

      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;
    }

    function findIndex(items, callback) {
      for (var i = 0; i < items.length; i++) {
        if (callback(items[i])) {
          return i;
        }
      }

      return -1;
    }
    /**
     * 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(meta) {
      var id;
      var meaning;
      var description;

      if (meta) {
        var idIndex = meta.indexOf(I18N_ID_SEPARATOR);
        var descIndex = meta.indexOf(I18N_MEANING_SEPARATOR);
        var meaningAndDesc;

        var _ref24 = idIndex > -1 ? [meta.slice(0, idIndex), meta.slice(idIndex + 2)] : [meta, ''];

        var _ref25 = _slicedToArray(_ref24, 2);

        meaningAndDesc = _ref25[0];
        id = _ref25[1];

        var _ref26 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc];

        var _ref27 = _slicedToArray(_ref26, 2);

        meaning = _ref27[0];
        description = _ref27[1];
      }

      return {
        id: id,
        meaning: meaning,
        description: description
      };
    }
    /**
     * 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_PREFIX).concat(extra).toUpperCase();
    }
    /**
     * Generates translation declaration statements.
     *
     * @param variable Translation value reference
     * @param closureVar Variable for Closure `goog.getMsg` calls
     * @param message Text message to be translated
     * @param meta Object that contains meta information (id, meaning and description)
     * @param params Object with placeholders key-value pairs
     * @param transformFn Optional transformation (post processing) function reference
     * @returns Array of Statements that represent a given translation
     */


    function getTranslationDeclStmts(variable, closureVar, message, meta) {
      var params = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
      var transformFn = arguments.length > 5 ? arguments[5] : undefined;
      var statements = [];
      statements.push.apply(statements, _toConsumableArray(i18nTranslationToDeclStmt(variable, closureVar, message, meta, params)));

      if (transformFn) {
        statements.push(new ExpressionStatement(variable.set(transformFn(variable))));
      }

      return statements;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _value3 = _slicedToArray(value, 2);

          publicName = _value3[0];
          declaredName = _value3[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;
      }
    }

    function noop() {}

    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 Inc. All Rights Reserved.
     *
     * Use 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 = {}));
    /**
     * 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";
    })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));
    /**
     * Construct a factory function expression for the given `R3FactoryMetadata`.
     */


    function compileFactoryFunction(meta) {
      var isPipe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var t = variable('t');
      var statements = []; // 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.type) : 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, isPipe));
        }
      } else {
        var baseFactory = variable("\u0275".concat(meta.name, "_BaseFactory"));
        var getInheritedFactory = importExpr(Identifiers$1.getInheritedFactory);
        var baseFactoryStmt = baseFactory.set(getInheritedFactory.callFn([meta.type])).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 = makeErrorStmt(meta.name);
        }

        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.type)) {
          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, isPipe); // Either call `new delegate(...)` or `delegate(...)` depending on meta.useNewForDelegate.

        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(makeErrorStmt(meta.name));
      }

      return {
        factory: fn([new FnParam('t', DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, "".concat(meta.name, "_Factory")),
        statements: statements
      };
    }

    function injectDependencies(deps, injectFn, isPipe) {
      return deps.map(function (dep) {
        return compileInjectDependency(dep, injectFn, isPipe);
      });
    }

    function compileInjectDependency(dep, injectFn, isPipe) {
      // 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]);

        default:
          return unsupported("Unknown R3ResolvedDependencyType: ".concat(R3ResolvedDependencyType[dep.resolved]));
      }
    }
    /**
     * 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 _iterator7 = _createForOfIteratorHelper(type.diDeps),
          _step7;

      try {
        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
          var dependency = _step7.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,
              resolved: resolved,
              host: !!dependency.isHost,
              optional: !!dependency.isOptional,
              self: !!dependency.isSelf,
              skipSelf: !!dependency.isSkipSelf
            });
          } else {
            unsupported('dependency without a token');
          }
        }
      } catch (err) {
        _iterator7.e(err);
      } finally {
        _iterator7.f();
      }

      return deps;
    }

    function makeErrorStmt(name) {
      return new ThrowStmt(new InstantiateExpr(new ReadVarExpr('Error'), [literal("".concat(name, " has a constructor which is not compatible with Dependency Injection. It should probably not be @Injectable()."))]));
    }

    function isDelegatedMetadata(meta) {
      return meta.delegateType !== undefined;
    }

    function isExpressionFactoryMetadata(meta) {
      return meta.expression !== undefined;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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,
          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) {
      var params = null;

      if (numParams > 0) {
        params = [];

        for (var i = 0; i < numParams; i++) {
          params.push(DYNAMIC_TYPE);
        }
      }

      return expressionType(type, null, 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);
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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,
        deps: meta.ctorDeps,
        injectFn: Identifiers.inject
      };

      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.type);
        var deps = undefined;

        if (meta.userDeps !== undefined) {
          deps = meta.userDeps;
        }

        if (deps !== undefined) {
          // factory: () => new meta.useClass(...deps)
          result = compileFactoryFunction(Object.assign({}, factoryMeta, {
            delegate: meta.useClass,
            delegateDeps: deps,
            delegateType: R3FactoryDelegateType.Class
          }));
        } else if (useClassOnSelf) {
          result = compileFactoryFunction(factoryMeta);
        } else {
          result = compileFactoryFunction(Object.assign({}, factoryMeta, {
            delegate: meta.useClass,
            delegateType: R3FactoryDelegateType.Factory
          }));
        }
      } else if (meta.useFactory !== undefined) {
        result = compileFactoryFunction(Object.assign({}, factoryMeta, {
          delegate: meta.useFactory,
          delegateDeps: meta.userDeps || [],
          delegateType: R3FactoryDelegateType.Function
        }));
      } 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({}, factoryMeta, {
          expression: meta.useValue
        }));
      } else if (meta.useExisting !== undefined) {
        // useExisting is an `inject` call on the existing token.
        result = compileFactoryFunction(Object.assign({}, factoryMeta, {
          expression: importExpr(Identifiers.inject).callFn([meta.useExisting])
        }));
      } else {
        result = compileFactoryFunction(factoryMeta);
      }

      var token = meta.type;
      var providedIn = meta.providedIn;
      var expression = importExpr(Identifiers.ɵɵdefineInjectable).callFn([mapToMapExpression({
        token: token,
        factory: result.factory,
        providedIn: providedIn
      })]);
      var type = new ExpressionType(importExpr(Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)]));
      return {
        expression: expression,
        type: type,
        statements: result.statements
      };
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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;
        }
      }, {
        key: "toJSON",
        value: function toJSON() {
          var _this93 = 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(_this93.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)) : '';
        }
      }, {
        key: "currentLine",
        get: function get() {
          return this.lines.slice(-1)[0];
        }
      }]);

      return SourceMapGenerator;
    }();

    function toBase64String(value) {
      var b64 = '';
      value = utf8Encode(value);

      for (var i = 0; i < value.length;) {
        var i1 = value.charCodeAt(i++);
        var i2 = value.charCodeAt(i++);
        var i3 = value.charCodeAt(i++);
        b64 += toBase64Digit(i1 >> 2);
        b64 += toBase64Digit((i1 & 3) << 4 | (isNaN(i2) ? 0 : i2 >> 4));
        b64 += isNaN(i2) ? '=' : toBase64Digit((i2 & 15) << 2 | i3 >> 6);
        b64 += isNaN(i2) || isNaN(i3) ? '=' : 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 Inc. All Rights Reserved.
     *
     * Use 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: "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: "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;
        }
      }, {
        key: "_currentLine",
        get: function get() {
          return this._lines[this._lines.length - 1];
        }
      }, {
        key: "currentClass",
        get: function get() {
          return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;
        }
      }, {
        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: "visitExpressionStmt",
        value: function visitExpressionStmt(stmt, ctx) {
          stmt.expr.visitExpression(this, ctx);
          ctx.println(stmt, ';');
          return null;
        }
      }, {
        key: "visitReturnStmt",
        value: function visitReturnStmt(stmt, ctx) {
          ctx.print(stmt, "return ");
          stmt.value.visitExpression(this, ctx);
          ctx.println(stmt, ';');
          return null;
        }
      }, {
        key: "visitIfStmt",
        value: function visitIfStmt(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) {
          ctx.print(stmt, "throw ");
          stmt.error.visitExpression(this, ctx);
          ctx.println(stmt, ";");
          return null;
        }
      }, {
        key: "visitCommentStmt",
        value: function visitCommentStmt(stmt, ctx) {
          if (stmt.multiline) {
            ctx.println(stmt, "/* ".concat(stmt.comment, " */"));
          } else {
            stmt.comment.split('\n').forEach(function (line) {
              ctx.println(stmt, "// ".concat(line));
            });
          }

          return null;
        }
      }, {
        key: "visitJSDocCommentStmt",
        value: function visitJSDocCommentStmt(stmt, ctx) {
          ctx.println(stmt, "/*".concat(stmt.toString(), "*/"));
          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: "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: "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 _this94 = this;

          ctx.print(ast, "{");
          this.visitAllObjects(function (entry) {
            ctx.print(ast, "".concat(escapeIdentifier(entry.key, _this94._escapeDollarInStrings, entry.quoted), ":"));
            entry.value.visitExpression(_this94, 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 _this95 = this;

          this.visitAllObjects(function (expr) {
            return expr.visitExpression(_this95, 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 _this96 = this;

          statements.forEach(function (stmt) {
            return stmt.visitStatement(_this96, 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 Inc. All Rights Reserved.
     *
     * Use 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 _super53 = _createSuper(AbstractJsEmitterVisitor);

      function AbstractJsEmitterVisitor() {
        _classCallCheck(this, AbstractJsEmitterVisitor);

        return _super53.call(this, false);
      }

      _createClass2(AbstractJsEmitterVisitor, [{
        key: "visitDeclareClassStmt",
        value: function visitDeclareClassStmt(stmt, ctx) {
          var _this97 = 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 _this97._visitClassGetter(stmt, getter, ctx);
          });
          stmt.methods.forEach(function (method) {
            return _this97._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: "_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 Inc. All Rights Reserved.
     *
     * Use 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",

        /**
         *
         * @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.
         */
        value: 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 _super54 = _createSuper(JitEmitterVisitor);

      function JitEmitterVisitor(reflector) {
        var _this98;

        _classCallCheck(this, JitEmitterVisitor);

        _this98 = _super54.call(this);
        _this98.reflector = reflector;
        _this98._evalArgNames = [];
        _this98._evalArgValues = [];
        _this98._evalExportedVars = [];
        return _this98;
      }

      _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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 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: moduleType
      }; // 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), 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.type,
          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;
      }

      var fnCall = new InvokeFunctionExpr(
      /* fn */
      importExpr(Identifiers$1.setNgModuleScope),
      /* args */
      [moduleType, mapToMapExpression(scopeMap)],
      /* type */
      undefined,
      /* sourceSpan */
      undefined,
      /* pure */
      true);
      return fnCall.toStmt();
    }

    function _compileInjector(meta) {
      var result = compileFactoryFunction({
        name: meta.name,
        type: meta.type,
        deps: meta.deps,
        injectFn: Identifiers$1.inject
      });
      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)]));
      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 */
      'ngInjectorDef',
      /* type */
      INFERRED_TYPE,
      /* modifiers */
      [StmtModifier.Static],
      /* initializer */
      injectorDef)],
      /* getters */
      [],
      /* constructorMethod */
      new ClassMethod(null, [], []),
      /* methods */
      []));
    }

    function accessExportScope(module) {
      var selectorScope = new ReadPropExpr(module, 'ngModuleDef');
      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 Inc. All Rights Reserved.
     *
     * Use 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,
        quoted: false
      });
      var templateFactory = compileFactoryFunction({
        name: metadata.name,
        type: metadata.type,
        deps: metadata.deps,
        injectFn: Identifiers$1.directiveInject
      }, true);
      definitionMapValues.push({
        key: 'factory',
        value: templateFactory.factory,
        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, metadata.typeArgumentCount), new ExpressionType(new LiteralExpr(metadata.pipeName))]));
      return {
        expression: expression,
        type: type,
        statements: templateFactory.statements
      };
    }
    /**
     * Write a pipe definition to the output context.
     */


    function compilePipeFromRender2(outputCtx, pipe, reflector) {
      var definitionMapValues = [];
      var name = identifierName(pipe.type);

      if (!name) {
        return error("Cannot resolve the name of ".concat(pipe.type));
      }

      var metadata = {
        name: name,
        pipeName: pipe.name,
        type: outputCtx.importExpr(pipe.type.reference),
        typeArgumentCount: 0,
        deps: dependenciesFromGlobalMetadata(pipe.type, outputCtx, reflector),
        pure: pipe.pure
      };
      var res = compilePipeFromMetadata(metadata);
      var definitionField = outputCtx.constantPool.propertyNameOf(3
      /* Pipe */
      );
      outputCtx.statements.push(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 */
      []));
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 = function ParseSpan(start, end) {
      _classCallCheck(this, ParseSpan);

      this.start = start;
      this.end = end;
    };

    var AST = /*#__PURE__*/function () {
      function AST(span) {
        _classCallCheck(this, AST);

        this.span = span;
      }

      _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;
    }();
    /**
     * 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 (_AST) {
      _inherits(Quote, _AST);

      var _super55 = _createSuper(Quote);

      function Quote(span, prefix, uninterpretedExpression, location) {
        var _this99;

        _classCallCheck(this, Quote);

        _this99 = _super55.call(this, span);
        _this99.prefix = prefix;
        _this99.uninterpretedExpression = uninterpretedExpression;
        _this99.location = location;
        return _this99;
      }

      _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 (_AST2) {
      _inherits(EmptyExpr, _AST2);

      var _super56 = _createSuper(EmptyExpr);

      function EmptyExpr() {
        _classCallCheck(this, EmptyExpr);

        return _super56.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 (_AST3) {
      _inherits(ImplicitReceiver, _AST3);

      var _super57 = _createSuper(ImplicitReceiver);

      function ImplicitReceiver() {
        _classCallCheck(this, ImplicitReceiver);

        return _super57.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);
    /**
     * Multiple expressions separated by a semicolon.
     */


    var Chain = /*#__PURE__*/function (_AST4) {
      _inherits(Chain, _AST4);

      var _super58 = _createSuper(Chain);

      function Chain(span, expressions) {
        var _this100;

        _classCallCheck(this, Chain);

        _this100 = _super58.call(this, span);
        _this100.expressions = expressions;
        return _this100;
      }

      _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 (_AST5) {
      _inherits(Conditional, _AST5);

      var _super59 = _createSuper(Conditional);

      function Conditional(span, condition, trueExp, falseExp) {
        var _this101;

        _classCallCheck(this, Conditional);

        _this101 = _super59.call(this, span);
        _this101.condition = condition;
        _this101.trueExp = trueExp;
        _this101.falseExp = falseExp;
        return _this101;
      }

      _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 (_AST6) {
      _inherits(PropertyRead, _AST6);

      var _super60 = _createSuper(PropertyRead);

      function PropertyRead(span, receiver, name) {
        var _this102;

        _classCallCheck(this, PropertyRead);

        _this102 = _super60.call(this, span);
        _this102.receiver = receiver;
        _this102.name = name;
        return _this102;
      }

      _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;
    }(AST);

    var PropertyWrite = /*#__PURE__*/function (_AST7) {
      _inherits(PropertyWrite, _AST7);

      var _super61 = _createSuper(PropertyWrite);

      function PropertyWrite(span, receiver, name, value) {
        var _this103;

        _classCallCheck(this, PropertyWrite);

        _this103 = _super61.call(this, span);
        _this103.receiver = receiver;
        _this103.name = name;
        _this103.value = value;
        return _this103;
      }

      _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;
    }(AST);

    var SafePropertyRead = /*#__PURE__*/function (_AST8) {
      _inherits(SafePropertyRead, _AST8);

      var _super62 = _createSuper(SafePropertyRead);

      function SafePropertyRead(span, receiver, name) {
        var _this104;

        _classCallCheck(this, SafePropertyRead);

        _this104 = _super62.call(this, span);
        _this104.receiver = receiver;
        _this104.name = name;
        return _this104;
      }

      _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;
    }(AST);

    var KeyedRead = /*#__PURE__*/function (_AST9) {
      _inherits(KeyedRead, _AST9);

      var _super63 = _createSuper(KeyedRead);

      function KeyedRead(span, obj, key) {
        var _this105;

        _classCallCheck(this, KeyedRead);

        _this105 = _super63.call(this, span);
        _this105.obj = obj;
        _this105.key = key;
        return _this105;
      }

      _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 (_AST10) {
      _inherits(KeyedWrite, _AST10);

      var _super64 = _createSuper(KeyedWrite);

      function KeyedWrite(span, obj, key, value) {
        var _this106;

        _classCallCheck(this, KeyedWrite);

        _this106 = _super64.call(this, span);
        _this106.obj = obj;
        _this106.key = key;
        _this106.value = value;
        return _this106;
      }

      _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 (_AST11) {
      _inherits(BindingPipe, _AST11);

      var _super65 = _createSuper(BindingPipe);

      function BindingPipe(span, exp, name, args) {
        var _this107;

        _classCallCheck(this, BindingPipe);

        _this107 = _super65.call(this, span);
        _this107.exp = exp;
        _this107.name = name;
        _this107.args = args;
        return _this107;
      }

      _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;
    }(AST);

    var LiteralPrimitive = /*#__PURE__*/function (_AST12) {
      _inherits(LiteralPrimitive, _AST12);

      var _super66 = _createSuper(LiteralPrimitive);

      function LiteralPrimitive(span, value) {
        var _this108;

        _classCallCheck(this, LiteralPrimitive);

        _this108 = _super66.call(this, span);
        _this108.value = value;
        return _this108;
      }

      _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 (_AST13) {
      _inherits(LiteralArray, _AST13);

      var _super67 = _createSuper(LiteralArray);

      function LiteralArray(span, expressions) {
        var _this109;

        _classCallCheck(this, LiteralArray);

        _this109 = _super67.call(this, span);
        _this109.expressions = expressions;
        return _this109;
      }

      _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 (_AST14) {
      _inherits(LiteralMap, _AST14);

      var _super68 = _createSuper(LiteralMap);

      function LiteralMap(span, keys, values) {
        var _this110;

        _classCallCheck(this, LiteralMap);

        _this110 = _super68.call(this, span);
        _this110.keys = keys;
        _this110.values = values;
        return _this110;
      }

      _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 (_AST15) {
      _inherits(Interpolation, _AST15);

      var _super69 = _createSuper(Interpolation);

      function Interpolation(span, strings, expressions) {
        var _this111;

        _classCallCheck(this, Interpolation);

        _this111 = _super69.call(this, span);
        _this111.strings = strings;
        _this111.expressions = expressions;
        return _this111;
      }

      _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 (_AST16) {
      _inherits(Binary, _AST16);

      var _super70 = _createSuper(Binary);

      function Binary(span, operation, left, right) {
        var _this112;

        _classCallCheck(this, Binary);

        _this112 = _super70.call(this, span);
        _this112.operation = operation;
        _this112.left = left;
        _this112.right = right;
        return _this112;
      }

      _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);

    var PrefixNot = /*#__PURE__*/function (_AST17) {
      _inherits(PrefixNot, _AST17);

      var _super71 = _createSuper(PrefixNot);

      function PrefixNot(span, expression) {
        var _this113;

        _classCallCheck(this, PrefixNot);

        _this113 = _super71.call(this, span);
        _this113.expression = expression;
        return _this113;
      }

      _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 (_AST18) {
      _inherits(NonNullAssert, _AST18);

      var _super72 = _createSuper(NonNullAssert);

      function NonNullAssert(span, expression) {
        var _this114;

        _classCallCheck(this, NonNullAssert);

        _this114 = _super72.call(this, span);
        _this114.expression = expression;
        return _this114;
      }

      _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 (_AST19) {
      _inherits(MethodCall, _AST19);

      var _super73 = _createSuper(MethodCall);

      function MethodCall(span, receiver, name, args) {
        var _this115;

        _classCallCheck(this, MethodCall);

        _this115 = _super73.call(this, span);
        _this115.receiver = receiver;
        _this115.name = name;
        _this115.args = args;
        return _this115;
      }

      _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;
    }(AST);

    var SafeMethodCall = /*#__PURE__*/function (_AST20) {
      _inherits(SafeMethodCall, _AST20);

      var _super74 = _createSuper(SafeMethodCall);

      function SafeMethodCall(span, receiver, name, args) {
        var _this116;

        _classCallCheck(this, SafeMethodCall);

        _this116 = _super74.call(this, span);
        _this116.receiver = receiver;
        _this116.name = name;
        _this116.args = args;
        return _this116;
      }

      _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;
    }(AST);

    var FunctionCall = /*#__PURE__*/function (_AST21) {
      _inherits(FunctionCall, _AST21);

      var _super75 = _createSuper(FunctionCall);

      function FunctionCall(span, target, args) {
        var _this117;

        _classCallCheck(this, FunctionCall);

        _this117 = _super75.call(this, span);
        _this117.target = target;
        _this117.args = args;
        return _this117;
      }

      _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 (_AST22) {
      _inherits(ASTWithSource, _AST22);

      var _super76 = _createSuper(ASTWithSource);

      function ASTWithSource(ast, source, location, absoluteOffset, errors) {
        var _this118;

        _classCallCheck(this, ASTWithSource);

        _this118 = _super76.call(this, new ParseSpan(0, source == null ? 0 : source.length));
        _this118.ast = ast;
        _this118.source = source;
        _this118.location = location;
        _this118.errors = errors;
        _this118.sourceSpan = new AbsoluteSourceSpan(absoluteOffset, absoluteOffset + _this118.span.end);
        return _this118;
      }

      _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 TemplateBinding = function TemplateBinding(span, key, keyIsVar, name, expression) {
      _classCallCheck(this, TemplateBinding);

      this.span = span;
      this.key = key;
      this.keyIsVar = keyIsVar;
      this.name = name;
      this.expression = expression;
    };

    var NullAstVisitor = /*#__PURE__*/function () {
      function NullAstVisitor() {
        _classCallCheck(this, NullAstVisitor);
      }

      _createClass2(NullAstVisitor, [{
        key: "visitBinary",
        value: function visitBinary(ast, context) {}
      }, {
        key: "visitChain",
        value: function visitChain(ast, context) {}
      }, {
        key: "visitConditional",
        value: function visitConditional(ast, context) {}
      }, {
        key: "visitFunctionCall",
        value: function visitFunctionCall(ast, context) {}
      }, {
        key: "visitImplicitReceiver",
        value: function visitImplicitReceiver(ast, context) {}
      }, {
        key: "visitInterpolation",
        value: function visitInterpolation(ast, context) {}
      }, {
        key: "visitKeyedRead",
        value: function visitKeyedRead(ast, context) {}
      }, {
        key: "visitKeyedWrite",
        value: function visitKeyedWrite(ast, context) {}
      }, {
        key: "visitLiteralArray",
        value: function visitLiteralArray(ast, context) {}
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(ast, context) {}
      }, {
        key: "visitLiteralPrimitive",
        value: function visitLiteralPrimitive(ast, context) {}
      }, {
        key: "visitMethodCall",
        value: function visitMethodCall(ast, context) {}
      }, {
        key: "visitPipe",
        value: function visitPipe(ast, context) {}
      }, {
        key: "visitPrefixNot",
        value: function visitPrefixNot(ast, context) {}
      }, {
        key: "visitNonNullAssert",
        value: function visitNonNullAssert(ast, context) {}
      }, {
        key: "visitPropertyRead",
        value: function visitPropertyRead(ast, context) {}
      }, {
        key: "visitPropertyWrite",
        value: function visitPropertyWrite(ast, context) {}
      }, {
        key: "visitQuote",
        value: function visitQuote(ast, context) {}
      }, {
        key: "visitSafeMethodCall",
        value: function visitSafeMethodCall(ast, context) {}
      }, {
        key: "visitSafePropertyRead",
        value: function visitSafePropertyRead(ast, context) {}
      }]);

      return NullAstVisitor;
    }();

    var RecursiveAstVisitor$1 = /*#__PURE__*/function () {
      function RecursiveAstVisitor$1() {
        _classCallCheck(this, RecursiveAstVisitor$1);
      }

      _createClass2(RecursiveAstVisitor$1, [{
        key: "visitBinary",
        value: function visitBinary(ast, context) {
          ast.left.visit(this, context);
          ast.right.visit(this, context);
          return null;
        }
      }, {
        key: "visitChain",
        value: function visitChain(ast, context) {
          return this.visitAll(ast.expressions, context);
        }
      }, {
        key: "visitConditional",
        value: function visitConditional(ast, context) {
          ast.condition.visit(this, context);
          ast.trueExp.visit(this, context);
          ast.falseExp.visit(this, context);
          return null;
        }
      }, {
        key: "visitPipe",
        value: function visitPipe(ast, context) {
          ast.exp.visit(this, context);
          this.visitAll(ast.args, context);
          return null;
        }
      }, {
        key: "visitFunctionCall",
        value: function visitFunctionCall(ast, context) {
          ast.target.visit(this, context);
          this.visitAll(ast.args, context);
          return null;
        }
      }, {
        key: "visitImplicitReceiver",
        value: function visitImplicitReceiver(ast, context) {
          return null;
        }
      }, {
        key: "visitInterpolation",
        value: function visitInterpolation(ast, context) {
          return this.visitAll(ast.expressions, context);
        }
      }, {
        key: "visitKeyedRead",
        value: function visitKeyedRead(ast, context) {
          ast.obj.visit(this, context);
          ast.key.visit(this, context);
          return null;
        }
      }, {
        key: "visitKeyedWrite",
        value: function visitKeyedWrite(ast, context) {
          ast.obj.visit(this, context);
          ast.key.visit(this, context);
          ast.value.visit(this, context);
          return null;
        }
      }, {
        key: "visitLiteralArray",
        value: function visitLiteralArray(ast, context) {
          return this.visitAll(ast.expressions, context);
        }
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(ast, context) {
          return this.visitAll(ast.values, context);
        }
      }, {
        key: "visitLiteralPrimitive",
        value: function visitLiteralPrimitive(ast, context) {
          return null;
        }
      }, {
        key: "visitMethodCall",
        value: function visitMethodCall(ast, context) {
          ast.receiver.visit(this, context);
          return this.visitAll(ast.args, context);
        }
      }, {
        key: "visitPrefixNot",
        value: function visitPrefixNot(ast, context) {
          ast.expression.visit(this, context);
          return null;
        }
      }, {
        key: "visitNonNullAssert",
        value: function visitNonNullAssert(ast, context) {
          ast.expression.visit(this, context);
          return null;
        }
      }, {
        key: "visitPropertyRead",
        value: function visitPropertyRead(ast, context) {
          ast.receiver.visit(this, context);
          return null;
        }
      }, {
        key: "visitPropertyWrite",
        value: function visitPropertyWrite(ast, context) {
          ast.receiver.visit(this, context);
          ast.value.visit(this, context);
          return null;
        }
      }, {
        key: "visitSafePropertyRead",
        value: function visitSafePropertyRead(ast, context) {
          ast.receiver.visit(this, context);
          return null;
        }
      }, {
        key: "visitSafeMethodCall",
        value: function visitSafeMethodCall(ast, context) {
          ast.receiver.visit(this, context);
          return this.visitAll(ast.args, context);
        }
      }, {
        key: "visitAll",
        value: function visitAll(asts, context) {
          var _this119 = this;

          asts.forEach(function (ast) {
            return ast.visit(_this119, context);
          });
          return null;
        }
      }, {
        key: "visitQuote",
        value: function visitQuote(ast, context) {
          return null;
        }
      }]);

      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: "visitInterpolation",
        value: function visitInterpolation(ast, context) {
          return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));
        }
      }, {
        key: "visitLiteralPrimitive",
        value: function visitLiteralPrimitive(ast, context) {
          return new LiteralPrimitive(ast.span, ast.value);
        }
      }, {
        key: "visitPropertyRead",
        value: function visitPropertyRead(ast, context) {
          return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);
        }
      }, {
        key: "visitPropertyWrite",
        value: function visitPropertyWrite(ast, context) {
          return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));
        }
      }, {
        key: "visitSafePropertyRead",
        value: function visitSafePropertyRead(ast, context) {
          return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);
        }
      }, {
        key: "visitMethodCall",
        value: function visitMethodCall(ast, context) {
          return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
        }
      }, {
        key: "visitSafeMethodCall",
        value: function visitSafeMethodCall(ast, context) {
          return new SafeMethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));
        }
      }, {
        key: "visitFunctionCall",
        value: function visitFunctionCall(ast, context) {
          return new FunctionCall(ast.span, ast.target.visit(this), this.visitAll(ast.args));
        }
      }, {
        key: "visitLiteralArray",
        value: function visitLiteralArray(ast, context) {
          return new LiteralArray(ast.span, this.visitAll(ast.expressions));
        }
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(ast, context) {
          return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));
        }
      }, {
        key: "visitBinary",
        value: function visitBinary(ast, context) {
          return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));
        }
      }, {
        key: "visitPrefixNot",
        value: function visitPrefixNot(ast, context) {
          return new PrefixNot(ast.span, ast.expression.visit(this));
        }
      }, {
        key: "visitNonNullAssert",
        value: function visitNonNullAssert(ast, context) {
          return new NonNullAssert(ast.span, ast.expression.visit(this));
        }
      }, {
        key: "visitConditional",
        value: function visitConditional(ast, context) {
          return new Conditional(ast.span, 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.exp.visit(this), ast.name, this.visitAll(ast.args));
        }
      }, {
        key: "visitKeyedRead",
        value: function visitKeyedRead(ast, context) {
          return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));
        }
      }, {
        key: "visitKeyedWrite",
        value: function visitKeyedWrite(ast, context) {
          return new KeyedWrite(ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));
        }
      }, {
        key: "visitAll",
        value: function visitAll(asts) {
          var res = new Array(asts.length);

          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, this.visitAll(ast.expressions));
        }
      }, {
        key: "visitQuote",
        value: function visitQuote(ast, context) {
          return new Quote(ast.span, 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: "visitInterpolation",
        value: function visitInterpolation(ast, context) {
          var expressions = this.visitAll(ast.expressions);
          if (expressions !== ast.expressions) return new Interpolation(ast.span, 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, 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, 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, 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, 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, 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, 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, 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.keys, values);
          }

          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.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, 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, 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, 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, exp, ast.name, args);
          }

          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, 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, obj, key, value);
          }

          return ast;
        }
      }, {
        key: "visitAll",
        value: function visitAll(asts) {
          var res = new Array(asts.length);
          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, expressions);
          }

          return ast;
        }
      }, {
        key: "visitQuote",
        value: function visitQuote(ast, context) {
          return ast;
        }
      }]);

      return AstMemoryEfficientTransformer;
    }();

    function visitAstChildren(ast, visitor, context) {
      function visit(ast) {
        visitor.visit && visitor.visit(ast, context) || ast.visit(visitor, context);
      }

      function visitAll(asts) {
        asts.forEach(visit);
      }

      ast.visit({
        visitBinary: function visitBinary(ast) {
          visit(ast.left);
          visit(ast.right);
        },
        visitChain: function visitChain(ast) {
          visitAll(ast.expressions);
        },
        visitConditional: function visitConditional(ast) {
          visit(ast.condition);
          visit(ast.trueExp);
          visit(ast.falseExp);
        },
        visitFunctionCall: function visitFunctionCall(ast) {
          if (ast.target) {
            visit(ast.target);
          }

          visitAll(ast.args);
        },
        visitImplicitReceiver: function visitImplicitReceiver(ast) {},
        visitInterpolation: function visitInterpolation(ast) {
          visitAll(ast.expressions);
        },
        visitKeyedRead: function visitKeyedRead(ast) {
          visit(ast.obj);
          visit(ast.key);
        },
        visitKeyedWrite: function visitKeyedWrite(ast) {
          visit(ast.obj);
          visit(ast.key);
          visit(ast.obj);
        },
        visitLiteralArray: function visitLiteralArray(ast) {
          visitAll(ast.expressions);
        },
        visitLiteralMap: function visitLiteralMap(ast) {},
        visitLiteralPrimitive: function visitLiteralPrimitive(ast) {},
        visitMethodCall: function visitMethodCall(ast) {
          visit(ast.receiver);
          visitAll(ast.args);
        },
        visitPipe: function visitPipe(ast) {
          visit(ast.exp);
          visitAll(ast.args);
        },
        visitPrefixNot: function visitPrefixNot(ast) {
          visit(ast.expression);
        },
        visitNonNullAssert: function visitNonNullAssert(ast) {
          visit(ast.expression);
        },
        visitPropertyRead: function visitPropertyRead(ast) {
          visit(ast.receiver);
        },
        visitPropertyWrite: function visitPropertyWrite(ast) {
          visit(ast.receiver);
          visit(ast.value);
        },
        visitQuote: function visitQuote(ast) {},
        visitSafeMethodCall: function visitSafeMethodCall(ast) {
          visit(ast.receiver);
          visitAll(ast.args);
        },
        visitSafePropertyRead: function visitSafePropertyRead(ast) {
          visit(ast.receiver);
        }
      });
    } // Bindings


    var ParsedProperty = function ParsedProperty(name, expression, type, sourceSpan, valueSpan) {
      _classCallCheck(this, ParsedProperty);

      this.name = name;
      this.expression = expression;
      this.type = type;
      this.sourceSpan = sourceSpan;
      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;
    };

    var ParsedVariable = function ParsedVariable(name, value, sourceSpan) {
      _classCallCheck(this, ParsedVariable);

      this.name = name;
      this.value = value;
      this.sourceSpan = sourceSpan;
    };

    var BoundElementProperty = function BoundElementProperty(name, type, securityContext, value, unit, sourceSpan, valueSpan) {
      _classCallCheck(this, BoundElementProperty);

      this.name = name;
      this.type = type;
      this.securityContext = securityContext;
      this.value = value;
      this.unit = unit;
      this.sourceSpan = sourceSpan;
      this.valueSpan = valueSpan;
    };
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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) {
      if (!localResolver) {
        localResolver = new DefaultLocalResolver();
      }

      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);
      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";
    })(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 currValExpr = createCurrValueExpr(bindingId);
      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);
      }

      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 _super77 = _createSuper(_BuiltinAstConverter);

      function _BuiltinAstConverter(_converterFactory) {
        var _this120;

        _classCallCheck(this, _BuiltinAstConverter);

        _this120 = _super77.call(this);
        _this120._converterFactory = _converterFactory;
        return _this120;
      }

      _createClass2(_BuiltinAstConverter, [{
        key: "visitPipe",
        value: function visitPipe(ast, context) {
          var _this121 = this;

          var args = [ast.exp].concat(_toConsumableArray(ast.args)).map(function (ast) {
            return ast.visit(_this121, context);
          });
          return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createPipeConverter(ast.name, args.length));
        }
      }, {
        key: "visitLiteralArray",
        value: function visitLiteralArray(ast, context) {
          var _this122 = this;

          var args = ast.expressions.map(function (ast) {
            return ast.visit(_this122, context);
          });
          return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));
        }
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(ast, context) {
          var _this123 = this;

          var args = ast.values.map(function (ast) {
            return ast.visit(_this123, context);
          });
          return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralMapConverter(ast.keys));
        }
      }]);

      return _BuiltinAstConverter;
    }(AstTransformer$1);

    var _AstToIrVisitor = /*#__PURE__*/function () {
      function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction, baseSourceSpan) {
        _classCallCheck(this, _AstToIrVisitor);

        this._localResolver = _localResolver;
        this._implicitReceiver = _implicitReceiver;
        this.bindingId = bindingId;
        this.interpolationFunction = interpolationFunction;
        this.baseSourceSpan = baseSourceSpan;
        this._nodeMap = new Map();
        this._resultMap = new Map();
        this._currentTemporary = 0;
        this.temporaryCount = 0;
        this.usesImplicitReceiver = false;
      }

      _createClass2(_AstToIrVisitor, [{
        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: "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) {
          return this._localResolver.getLocal(name);
        }
      }, {
        key: "visitMethodCall",
        value: function visitMethodCall(ast, mode) {
          if (ast.receiver instanceof ImplicitReceiver && 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);

              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);
              }
            }

            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);

              if (result) {
                // Restore the previous "usesImplicitReceiver" state since the implicit
                // receiver has been replaced with a resolved local expression.
                this.usesImplicitReceiver = prevUsesImplicitReceiver;
              }
            }

            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);

            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;
              } else {
                // Otherwise it's an error.
                throw new Error('Cannot assign to a reference or variable!');
              }
            }
          } // 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 _this124 = this;

          return asts.map(function (ast) {
            return _this124._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 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.receiver, leftMostSafe.name, leftMostSafe.args));
          } else {
            this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, 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 a expression of the form a?.b.c?.d.e the 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 be transform 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 _this125 = this;

          var visit = function visit(visitor, ast) {
            return (_this125._nodeMap.get(ast) || ast).visit(visitor);
          };

          return ast.visit({
            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;
            },
            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 _this126 = this;

          var visit = function visit(visitor, ast) {
            return ast && (_this126._nodeMap.get(ast) || ast).visit(visitor);
          };

          var visitSome = function visitSome(visitor, ast) {
            return ast.some(function (ast) {
              return visit(visitor, ast);
            });
          };

          return ast.visit({
            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;
            },
            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 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);
            return new ParseSourceSpan(start, end);
          } else {
            return null;
          }
        }
      }]);

      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() {
        _classCallCheck(this, DefaultLocalResolver);
      }

      _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 _super78 = _createSuper(BuiltinFunctionCall);

      function BuiltinFunctionCall(span, args, converter) {
        var _this127;

        _classCallCheck(this, BuiltinFunctionCall);

        _this127 = _super78.call(this, span, null, args);
        _this127.args = args;
        _this127.converter = converter;
        return _this127;
      }

      return BuiltinFunctionCall;
    }(FunctionCall);
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _len3 = arguments.length, m = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {
              m[_key4] = arguments[_key4];
            }

            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 _len4 = arguments.length, m = new Array(_len4), _key5 = 0; _key5 < _len4; _key5++) {
              m[_key5] = arguments[_key5];
            }

            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 _this128 = this;

          return processRules(cssText, function (rule) {
            var selector = rule.selector;
            var content = rule.content;

            if (rule.selector[0] != '@') {
              selector = _this128._scopeSelector(rule.selector, scopeSelector, hostSelector, _this128.strictStyling);
            } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
              content = _this128._scopeSelectors(rule.content, scopeSelector, hostSelector);
            }

            return new CssRule(selector, content);
          });
        }
      }, {
        key: "_scopeSelector",
        value: function _scopeSelector(selector, scopeSelector, hostSelector, strict) {
          var _this129 = 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 (_this129._selectorNeedsScoping(shallowPart, scopeSelector)) {
                return strict ? _this129._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) : _this129._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 _this130 = 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 = _this130._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 _this131 = 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 = selector.replace(/(\[[^\]]*\])/g, function (_, keep) {
          var replaceBy = "__ph-".concat(_this131.index, "__");

          _this131.placeholders.push(keep);

          _this131.index++;
          return replaceBy;
        }); // 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(_this131.index, "__");

          _this131.placeholders.push(exp);

          _this131.index++;
          return pseudo + replaceBy;
        });
      }

      _createClass2(SafeSelector, [{
        key: "restore",
        value: function restore(content) {
          var _this132 = this;

          return content.replace(/__ph-(\d+)__/g, function (ph, index) {
            return _this132.placeholders[+index];
          });
        }
      }, {
        key: "content",
        value: function content() {
          return this._content;
        }
      }]);

      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 _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
    var _curlyRe = /([{}])/g;
    var OPEN_CURLY = '{';
    var CLOSE_CURLY = '}';
    var BLOCK_PLACEHOLDER = '%BLOCK%';

    var CssRule = function CssRule(selector, content) {
      _classCallCheck(this, CssRule);

      this.selector = selector;
      this.content = content;
    };

    function processRules(input, ruleCallback) {
      var inputWithEscapedBlocks = escapeBlocks(input);
      var nextBlockIndex = 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);
      });
    }

    var StringWithEscapedBlocks = function StringWithEscapedBlocks(escapedString, blocks) {
      _classCallCheck(this, StringWithEscapedBlocks);

      this.escapedString = escapedString;
      this.blocks = blocks;
    };

    function escapeBlocks(input) {
      var inputParts = input.split(_curlyRe);
      var resultParts = [];
      var escapedBlocks = [];
      var bracketCount = 0;
      var currentBlockParts = [];

      for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {
        var part = inputParts[partIndex];

        if (part == CLOSE_CURLY) {
          bracketCount--;
        }

        if (bracketCount > 0) {
          currentBlockParts.push(part);
        } else {
          if (currentBlockParts.length > 0) {
            escapedBlocks.push(currentBlockParts.join(''));
            resultParts.push(BLOCK_PLACEHOLDER);
            currentBlockParts = [];
          }

          resultParts.push(part);
        }

        if (part == OPEN_CURLY) {
          bracketCount++;
        }
      }

      if (currentBlockParts.length > 0) {
        escapedBlocks.push(currentBlockParts.join(''));
        resultParts.push(BLOCK_PLACEHOLDER);
      }

      return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _this133 = this;

          var styleExpressions = stylesheet.styles.map(function (plainStyle) {
            return literal(_this133._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 Inc. All Rights Reserved.
     *
     * Use 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: "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();
        }
      }, {
        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];
        }
      }]);

      return AstPath;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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$3 = /*#__PURE__*/function () {
      function Text$3(value, sourceSpan, i18n) {
        _classCallCheck(this, Text$3);

        this.value = value;
        this.sourceSpan = sourceSpan;
        this.i18n = i18n;
      }

      _createClass2(Text$3, [{
        key: "visit",
        value: function visit(visitor, context) {
          return visitor.visitText(this, context);
        }
      }]);

      return Text$3;
    }();

    var Expansion = /*#__PURE__*/function () {
      function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) {
        _classCallCheck(this, Expansion);

        this.switchValue = switchValue;
        this.type = type;
        this.cases = cases;
        this.sourceSpan = sourceSpan;
        this.switchValueSourceSpan = switchValueSourceSpan;
        this.i18n = i18n;
      }

      _createClass2(Expansion, [{
        key: "visit",
        value: function visit(visitor, context) {
          return visitor.visitExpansion(this, context);
        }
      }]);

      return Expansion;
    }();

    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 () {
      function Attribute(name, value, sourceSpan, valueSpan, i18n) {
        _classCallCheck(this, Attribute);

        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
        this.valueSpan = valueSpan;
        this.i18n = i18n;
      }

      _createClass2(Attribute, [{
        key: "visit",
        value: function visit(visitor, context) {
          return visitor.visitAttribute(this, context);
        }
      }]);

      return Attribute;
    }();

    var Element$1 = /*#__PURE__*/function () {
      function Element$1(name, attrs, children, sourceSpan) {
        var startSourceSpan = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
        var endSourceSpan = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
        var i18n = arguments.length > 6 ? arguments[6] : undefined;

        _classCallCheck(this, Element$1);

        this.name = name;
        this.attrs = attrs;
        this.children = children;
        this.sourceSpan = sourceSpan;
        this.startSourceSpan = startSourceSpan;
        this.endSourceSpan = endSourceSpan;
        this.i18n = i18n;
      }

      _createClass2(Element$1, [{
        key: "visit",
        value: function visit(visitor, context) {
          return visitor.visitElement(this, context);
        }
      }]);

      return Element$1;
    }();

    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 _super79 = _createSuper(_class);

        function _class() {
          _classCallCheck(this, _class);

          return _super79.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 Inc. All Rights Reserved.
     *
     * Use 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["TEXT"] = 4] = "TEXT";
      TokenType[TokenType["ESCAPABLE_RAW_TEXT"] = 5] = "ESCAPABLE_RAW_TEXT";
      TokenType[TokenType["RAW_TEXT"] = 6] = "RAW_TEXT";
      TokenType[TokenType["COMMENT_START"] = 7] = "COMMENT_START";
      TokenType[TokenType["COMMENT_END"] = 8] = "COMMENT_END";
      TokenType[TokenType["CDATA_START"] = 9] = "CDATA_START";
      TokenType[TokenType["CDATA_END"] = 10] = "CDATA_END";
      TokenType[TokenType["ATTR_NAME"] = 11] = "ATTR_NAME";
      TokenType[TokenType["ATTR_QUOTE"] = 12] = "ATTR_QUOTE";
      TokenType[TokenType["ATTR_VALUE"] = 13] = "ATTR_VALUE";
      TokenType[TokenType["DOC_TYPE"] = 14] = "DOC_TYPE";
      TokenType[TokenType["EXPANSION_FORM_START"] = 15] = "EXPANSION_FORM_START";
      TokenType[TokenType["EXPANSION_CASE_VALUE"] = 16] = "EXPANSION_CASE_VALUE";
      TokenType[TokenType["EXPANSION_CASE_EXP_START"] = 17] = "EXPANSION_CASE_EXP_START";
      TokenType[TokenType["EXPANSION_CASE_EXP_END"] = 18] = "EXPANSION_CASE_EXP_END";
      TokenType[TokenType["EXPANSION_FORM_END"] = 19] = "EXPANSION_FORM_END";
      TokenType[TokenType["EOF"] = 20] = "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 _super80 = _createSuper(TokenError);

      function TokenError(errorMsg, tokenType, span) {
        var _this134;

        _classCallCheck(this, TokenError);

        _this134 = _super80.call(this, span, errorMsg);
        _this134.tokenType = tokenType;
        return _this134;
      }

      return TokenError;
    }(ParseError);

    var TokenizeResult = function TokenizeResult(tokens, errors) {
      _classCallCheck(this, TokenizeResult);

      this.tokens = tokens;
      this.errors = errors;
    };

    function tokenize(source, url, getTagDefinition) {
      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
      return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options).tokenize();
    }

    var _CR_OR_CRLF_REGEXP = /\r\n?/g;

    function _unexpectedCharacterErrorMsg(charCode) {
      var _char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);

      return "Unexpected character \"".concat(_char, "\"");
    }

    function _unknownEntityErrorMsg(entitySrc) {
      return "Unknown entity \"".concat(entitySrc, "\" - use the \"&#<decimal>;\" or  \"&#x<hex>;\" syntax");
    }

    var _ControlFlowError = function _ControlFlowError(error) {
      _classCallCheck(this, _ControlFlowError);

      this.error = error;
    }; // See http://www.w3.org/TR/html51/syntax.html#writing


    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._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);

        try {
          this._cursor.init();
        } catch (e) {
          this.handleError(e);
        }
      }

      _createClass2(_Tokenizer, [{
        key: "_processCarriageReturns",
        value: function _processCarriageReturns(content) {
          // http://www.w3.org/TR/html5/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 start = this._cursor.clone();

            try {
              if (this._attemptCharCode($LT)) {
                if (this._attemptCharCode($BANG)) {
                  if (this._attemptCharCode($LBRACKET)) {
                    this._consumeCdata(start);
                  } else if (this._attemptCharCode($MINUS)) {
                    this._consumeComment(start);
                  } else {
                    this._consumeDocType(start);
                  }
                } else if (this._attemptCharCode($SLASH)) {
                  this._consumeTagClose(start);
                } else {
                  this._consumeTagOpen(start);
                }
              } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
                this._consumeText();
              }
            } catch (e) {
              this.handleError(e);
            }
          }

          this._beginToken(TokenType.EOF);

          this._endToken([]);

          return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);
        }
        /**
         * @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) {
          var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._cursor.clone();

          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);

          var end = this._cursor.clone();

          if (end.diff(start) < len) {
            throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
          }
        }
      }, {
        key: "_attemptUntilChar",
        value: function _attemptUntilChar(_char2) {
          while (this._cursor.peek() !== _char2) {
            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 _char3 = String.fromCodePoint(this._cursor.peek());

            this._cursor.advance();

            return _char3;
          }
        }
      }, {
        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) {
              throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), 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 _char4 = NAMED_ENTITIES[name];

            if (!_char4) {
              throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start));
            }

            return _char4;
          }
        }
      }, {
        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 _this135 = this;

          this._beginToken(TokenType.COMMENT_START, start);

          this._requireCharCode($MINUS);

          this._endToken([]);

          this._consumeRawText(false, function () {
            return _this135._attemptStr('-->');
          });

          this._beginToken(TokenType.COMMENT_END);

          this._requireStr('-->');

          this._endToken([]);
        }
      }, {
        key: "_consumeCdata",
        value: function _consumeCdata(start) {
          var _this136 = this;

          this._beginToken(TokenType.CDATA_START, start);

          this._requireStr('CDATA[');

          this._endToken([]);

          this._consumeRawText(false, function () {
            return _this136._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;
          var tokensBeforeTagOpen = this.tokens.length;

          var innerStart = this._cursor.clone();

          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._consumeAttributeName();

              this._attemptCharCodeUntilFn(isNotWhitespace);

              if (this._attemptCharCode($EQ)) {
                this._attemptCharCodeUntilFn(isNotWhitespace);

                this._consumeAttributeValue();
              }

              this._attemptCharCodeUntilFn(isNotWhitespace);
            }

            this._consumeTagOpenEnd();
          } catch (e) {
            if (e instanceof _ControlFlowError) {
              // When the start tag is invalid (including invalid "attributes"), assume we want a "<"
              this._cursor = innerStart;

              if (openTagToken) {
                this.tokens.length = tokensBeforeTagOpen;
              } // 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).contentType;

          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 _this137 = this;

          var textToken = this._consumeRawText(decodeEntities, function () {
            if (!_this137._attemptCharCode($LT)) return false;
            if (!_this137._attemptCharCode($SLASH)) return false;

            _this137._attemptCharCodeUntilFn(isNotWhitespace);

            if (!_this137._attemptStrCaseInsensitive(tagName)) return false;

            _this137._attemptCharCodeUntilFn(isNotWhitespace);

            return _this137._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);

          this._endToken([condition]);

          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(_char5) {
          var start = this._cursor.clone();

          this._attemptUntilChar(_char5);

          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 start = this._cursor.clone();

            var isInterpolation = this._attemptStr(this._interpolationConfig.start);

            this._cursor = start;
            return !isInterpolation;
          }

          return true;
        }
      }]);

      return _Tokenizer;
    }();

    function isNotWhitespace(code) {
      return !isWhitespace(code) || code === $EOF;
    }

    function isNameEnd(code) {
      return isWhitespace(code) || code === $GT || 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 === $EQ || isAsciiLetter(peek) || isDigit(peek);
    }

    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;
          this.state = Object.assign({}, fileOrCursor.state);
        } 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;

          if (leadingTriviaCodePoints) {
            start = start.clone();

            while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {
              start.advance();
            }
          }

          return new ParseSourceSpan(new ParseLocation(start.file, start.state.offset, start.state.line, start.state.column), new ParseLocation(this.file, this.state.offset, this.state.line, this.state.column));
        }
      }, {
        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);
        }
      }]);

      return PlainCharacterCursor;
    }();

    var EscapedCharacterCursor = /*#__PURE__*/function (_PlainCharacterCursor) {
      _inherits(EscapedCharacterCursor, _PlainCharacterCursor);

      var _super81 = _createSuper(EscapedCharacterCursor);

      function EscapedCharacterCursor(fileOrCursor, range) {
        var _this138;

        _classCallCheck(this, EscapedCharacterCursor);

        if (fileOrCursor instanceof EscapedCharacterCursor) {
          _this138 = _super81.call(this, fileOrCursor);
          _this138.internalState = Object.assign({}, fileOrCursor.internalState);
        } else {
          _this138 = _super81.call(this, fileOrCursor, range);
          _this138.internalState = _this138.state;
        }

        return _possibleConstructorReturn(_this138);
      }

      _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 _this139 = this;

          var peek = function peek() {
            return _this139.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 Inc. All Rights Reserved.
     *
     * Use 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 _super82 = _createSuper(TreeError);

      function TreeError(elementName, span, msg) {
        var _this140;

        _classCallCheck(this, TreeError);

        _this140 = _super82.call(this, span, msg);
        _this140.elementName = elementName;
        return _this140;
      }

      _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 tokensAndErrors = tokenize(source, url, this.getTagDefinition, options);
          var treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();
          return new ParseTreeResult(treeAndErrors.rootNodes, tokensAndErrors.errors.concat(treeAndErrors.errors));
        }
      }]);

      return Parser;
    }();

    var _TreeBuilder = /*#__PURE__*/function () {
      function _TreeBuilder(tokens, getTagDefinition) {
        _classCallCheck(this, _TreeBuilder);

        this.tokens = tokens;
        this.getTagDefinition = getTagDefinition;
        this._index = -1;
        this._rootNodes = [];
        this._errors = [];
        this._elementStack = [];

        this._advance();
      }

      _createClass2(_TreeBuilder, [{
        key: "build",
        value: function build() {
          while (this._peek.type !== TokenType.EOF) {
            if (this._peek.type === TokenType.TAG_OPEN_START) {
              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();
            }
          }

          return new ParseTreeResult(this._rootNodes, this._errors);
        }
      }, {
        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);

          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 parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();

          if (parsedExp.errors.length > 0) {
            this._errors = this._errors.concat(parsedExp.errors);
            return null;
          }

          var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);
          var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);
          return new ExpansionCase(value.parts[0], parsedExp.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 prefix = startTagToken.parts[0];
          var 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);
          var el = new Element$1(fullName, attrs, [], span, span, undefined);

          this._pushElement(el);

          if (selfClosing) {
            this._popElement(fullName);

            el.endSourceSpan = span;
          }
        }
      }, {
        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._getParentElement()) {
            this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
          }

          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)) {
            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));
          }
        }
      }, {
        key: "_popElement",
        value: function _popElement(fullName) {
          for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {
            var el = this._elementStack[stackIndex];

            if (el.name == fullName) {
              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), valueSpan);
        }
      }, {
        key: "_getParentElement",
        value: function _getParentElement() {
          return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;
        }
        /**
         * Returns the parent in the DOM and the container.
         *
         * `<ng-container>` elements are skipped as they are not rendered as DOM element.
         */

      }, {
        key: "_getParentElementSkippingContainers",
        value: function _getParentElementSkippingContainers() {
          var container = null;

          for (var i = this._elementStack.length - 1; i >= 0; i--) {
            if (!isNgContainer(this._elementStack[i].name)) {
              return {
                parent: this._elementStack[i],
                container: container
              };
            }

            container = this._elementStack[i];
          }

          return {
            parent: null,
            container: container
          };
        }
      }, {
        key: "_addToParent",
        value: function _addToParent(node) {
          var parent = this._getParentElement();

          if (parent != null) {
            parent.children.push(node);
          } else {
            this._rootNodes.push(node);
          }
        }
        /**
         * Insert a node between the parent and the container.
         * When no container is given, the node is appended as a child of the parent.
         * Also updates the element stack accordingly.
         *
         * @internal
         */

      }, {
        key: "_insertBeforeContainer",
        value: function _insertBeforeContainer(parent, container, node) {
          if (!container) {
            this._addToParent(node);

            this._elementStack.push(node);
          } else {
            if (parent) {
              // replace the container with the new node in the children
              var index = parent.children.indexOf(container);
              parent.children[index] = node;
            } else {
              this._rootNodes.push(node);
            }

            node.children.push(container);

            this._elementStack.splice(this._elementStack.indexOf(container), 0, node);
          }
        }
      }, {
        key: "_getElementFullName",
        value: function _getElementFullName(prefix, localName, parentElement) {
          if (prefix === '') {
            prefix = this.getTagDefinition(localName).implicitNamespacePrefix || '';

            if (prefix === '' && parentElement != null) {
              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 Inc. All Rights Reserved.
     *
     * Use 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 _super83 = _createSuper(HtmlParser);

      function HtmlParser() {
        _classCallCheck(this, HtmlParser);

        return _super83.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 Inc. All Rights Reserved.
     *
     * Use 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, visitAll$1(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);

          if (isNotBlank) {
            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);
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _super84 = _createSuper(ExpansionError);

      function ExpansionError(span, errorMsg) {
        _classCallCheck(this, ExpansionError);

        return _super84.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 Inc. All Rights Reserved.
     *
     * Use 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 */
    ,
    /* Animation */
    1), _defineProperty(_BoundPropertyMapping, 2
    /* Class */
    ,
    /* Attribute */
    2), _defineProperty(_BoundPropertyMapping, 0
    /* Property */
    ,
    /* Class */
    0), _defineProperty(_BoundPropertyMapping, 3
    /* Style */
    ,
    /* Property */
    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) {
        _classCallCheck(this, VariableAst);

        this.name = name;
        this.value = value;
        this.sourceSpan = sourceSpan;
      }

      _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);
        }
      }]);

      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 _super85 = _createSuper(RecursiveTemplateAstVisitor);

      function RecursiveTemplateAstVisitor() {
        _classCallCheck(this, RecursiveTemplateAstVisitor);

        return _super85.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 Inc. All Rights Reserved.
     *
     * Use 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 _super86 = _createSuper(ProviderError);

      function ProviderError(message, span) {
        _classCallCheck(this, ProviderError);

        return _super86.call(this, span, message);
      }

      return ProviderError;
    }(ParseError);

    var ProviderViewContext = function ProviderViewContext(reflector, component) {
      var _this141 = 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 (_this141.viewProviders.get(tokenReference(provider.token)) == null) {
          _this141.viewProviders.set(tokenReference(provider.token), true);
        }
      });
    };

    var ProviderElementContext = /*#__PURE__*/function () {
      function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {
        var _this142 = 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 _this142._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) {
          _this142._addQueryReadsTo(provider.token, provider.token, _this142._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(_this142.viewContext.reflector, Identifiers.ElementRef);

          _this142._addQueryReadsTo({
            value: refAst.name
          }, defaultQueryValue, _this142._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 || _this142._queriedTokens.get(tokenReference(provider.token));

          if (eager) {
            _this142._getOrCreateLocalProvider(provider.providerType, provider.token, true);
          }
        });
      }

      _createClass2(ProviderElementContext, [{
        key: "afterElement",
        value: function afterElement() {
          var _this143 = this;

          // collect lazy providers
          Array.from(this._allProviders.values()).forEach(function (provider) {
            _this143._getOrCreateLocalProvider(provider.providerType, provider.token, false);
          });
        }
      }, {
        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 _this144 = 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 = _this144._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 _this144._getDependency(resolvedProvider.providerType, dep, eager);
              });
            } else if (provider.useClass) {
              var _deps = provider.deps || provider.useClass.diDeps;

              transformedDeps = _deps.map(function (dep) {
                return _this144._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;
        }
      }, {
        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;
        }
      }]);

      return ProviderElementContext;
    }();

    var NgModuleProviderAnalyzer = /*#__PURE__*/function () {
      function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {
        var _this145 = 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, _this145._errors, _this145._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 _this146 = this;

          Array.from(this._allProviders.values()).forEach(function (provider) {
            _this146._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 _this147 = 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 = _this147._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 _this147._getDependency(dep, eager, resolvedProvider.sourceSpan);
              });
            } else if (provider.useClass) {
              var _deps2 = provider.deps || provider.useClass.diDeps;

              transformedDeps = _deps2.map(function (dep) {
                return _this147._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, _ref28) {
      var useExisting = _ref28.useExisting,
          useValue = _ref28.useValue,
          deps = _ref28.deps;
      return {
        token: provider.token,
        useClass: provider.useClass,
        useExisting: useExisting,
        useFactory: provider.useFactory,
        useValue: useValue,
        deps: deps,
        multi: provider.multi
      };
    }

    function _transformProviderAst(provider, _ref29) {
      var eager = _ref29.eager,
          providers = _ref29.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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 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: "getUsedPipes",
        value: function getUsedPipes() {
          return Array.from(this._usedPipes.values());
        }
      }, {
        key: "createBoundHostProperties",
        value: function createBoundHostProperties(dirMeta, sourceSpan) {
          var _this148 = this;

          if (dirMeta.hostProperties) {
            var boundProps = [];
            Object.keys(dirMeta.hostProperties).forEach(function (propName) {
              var expression = dirMeta.hostProperties[propName];

              if (typeof expression === 'string') {
                _this148.parsePropertyBinding(propName, expression, true, sourceSpan, sourceSpan.start.offset, undefined, [], boundProps);
              } else {
                _this148._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 _this149 = this;

          var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);
          return boundProps && boundProps.map(function (prop) {
            return _this149.createBoundElementProperty(elementSelector, prop);
          });
        }
      }, {
        key: "createDirectiveHostEventAsts",
        value: function createDirectiveHostEventAsts(dirMeta, sourceSpan) {
          var _this150 = 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.
                _this150.parseEvent(propName, expression, sourceSpan, sourceSpan, [], targetEvents);
              } else {
                _this150._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);
          }
        } // Parse an inline template binding. ie `<tag *tplKey="<tplValue>">`

      }, {
        key: "parseInlineTemplateBinding",
        value: function parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteOffset, targetMatchableAttrs, targetProps, targetVars) {
          var bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);

          for (var i = 0; i < bindings.length; i++) {
            var binding = bindings[i];

            if (binding.keyIsVar) {
              targetVars.push(new ParsedVariable(binding.key, binding.name, sourceSpan));
            } else if (binding.expression) {
              this._parsePropertyAst(binding.key, binding.expression, sourceSpan, undefined, targetMatchableAttrs, targetProps);
            } else {
              targetMatchableAttrs.push([binding.key, '']);
              this.parseLiteralAttr(binding.key, null, sourceSpan, absoluteOffset, undefined, targetMatchableAttrs, targetProps);
            }
          }
        }
      }, {
        key: "_parseTemplateBindings",
        value: function _parseTemplateBindings(tplKey, tplValue, sourceSpan) {
          var _this151 = this;

          var sourceInfo = sourceSpan.start.toString();

          try {
            var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, sourceSpan.start.offset);

            this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);

            bindingsResult.templateBindings.forEach(function (binding) {
              if (binding.expression) {
                _this151._checkPipes(binding.expression, sourceSpan);
              }
            });
            bindingsResult.warnings.forEach(function (warning) {
              _this151._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, targetProps) {
          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, valueSpan, targetMatchableAttrs, targetProps);
          } else {
            targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, '', absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, valueSpan));
          }
        }
      }, {
        key: "parsePropertyBinding",
        value: function parsePropertyBinding(name, expression, isHost, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps) {
          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, valueSpan, targetMatchableAttrs, targetProps);
          } else {
            this._parsePropertyAst(name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, valueSpan, targetMatchableAttrs, targetProps);
          }
        }
      }, {
        key: "parsePropertyInterpolation",
        value: function parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps) {
          var expr = this.parseInterpolation(value, valueSpan || sourceSpan);

          if (expr) {
            this._parsePropertyAst(name, expr, sourceSpan, valueSpan, targetMatchableAttrs, targetProps);

            return true;
          }

          return false;
        }
      }, {
        key: "_parsePropertyAst",
        value: function _parsePropertyAst(name, ast, sourceSpan, valueSpan, targetMatchableAttrs, targetProps) {
          targetMatchableAttrs.push([name, ast.source]);
          targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.DEFAULT, sourceSpan, valueSpan));
        }
      }, {
        key: "_parseAnimation",
        value: function _parseAnimation(name, expression, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps) {
          // 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, 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.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[1];

              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.valueSpan);
        }
      }, {
        key: "parseEvent",
        value: function parseEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents) {
          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 _iterator8 = _createForOfIteratorHelper(errors),
              _step8;

          try {
            for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
              var _error = _step8.value;

              this._reportError(_error.message, sourceSpan);
            }
          } catch (err) {
            _iterator8.e(err);
          } finally {
            _iterator8.f();
          }
        } // Make sure all the used pipes are known in `this.pipesByName`

      }, {
        key: "_checkPipes",
        value: function _checkPipes(ast, sourceSpan) {
          var _this152 = this;

          if (ast && this.pipesByName) {
            var collector = new PipeCollector();
            ast.visit(collector);
            collector.pipes.forEach(function (ast, pipeName) {
              var pipeMeta = _this152.pipesByName.get(pipeName);

              if (!pipeMeta) {
                _this152._reportError("The pipe '".concat(pipeName, "' could not be found"), new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));
              } else {
                _this152._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);
          }
        }
      }, {
        key: "interpolationConfig",
        get: function get() {
          return this._interpolationConfig;
        }
      }]);

      return BindingParser;
    }();

    var PipeCollector = /*#__PURE__*/function (_RecursiveAstVisitor$) {
      _inherits(PipeCollector, _RecursiveAstVisitor$);

      var _super87 = _createSuper(PipeCollector);

      function PipeCollector() {
        var _this153;

        _classCallCheck(this, PipeCollector);

        _this153 = _super87.apply(this, arguments);
        _this153.pipes = new Map();
        return _this153;
      }

      _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();
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 = '*';
    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 _super88 = _createSuper(TemplateParseError);

      function TemplateParseError(message, span, level) {
        _classCallCheck(this, TemplateParseError);

        return _super88.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: "parse",
        value: function parse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {
          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) {
            this._console.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);
              }
            });
          });
        }
      }, {
        key: "expressionParser",
        get: function get() {
          return this._exprParser;
        }
      }]);

      return TemplateParser;
    }();

    var TemplateParseVisitor = /*#__PURE__*/function () {
      function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {
        var _this154 = 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);

          _this154.selectorMatcher.addSelectables(selector, directive);

          _this154.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 _this155 = 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 = _this155._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 = _this155._normalizeAttributeName(attr.name);

            if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {
              templateValue = attr.value;
              templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);
            }

            var hasTemplateBinding = templateValue != null;

            if (hasTemplateBinding) {
              if (hasInlineTemplates) {
                _this155._reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *", attr.sourceSpan);
              }

              hasInlineTemplates = true;
              var _parsedVariables = [];

              _this155._bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attr.sourceSpan, attr.sourceSpan.start.offset, templateMatchableAttrs, templateElementOrDirectiveProps, _parsedVariables);

              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(_this155.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);
          }

          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);
          }

          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 _this156 = 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 = new Array(this.directivesIndex.size); // Whether any directive selector matches on the element name

          var matchElement = false;
          selectorMatcher.match(elementCssSelector, function (selector, directive) {
            directives[_this156.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 _this157 = this;

          var matchedReferences = new Set();
          var component = null;
          var directiveAsts = directives.map(function (directive) {
            var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, "Directive ".concat(identifierName(directive.type)));

            if (directive.isComponent) {
              component = directive;
            }

            var directiveProperties = [];

            var boundProperties = _this157._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 = _this157._checkPropertiesInSchema(elementName, hostProperties);

            var parsedEvents = _this157._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);

            _this157._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 = _this157.contentQueryStartId;
            _this157.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)) {
                _this157._reportError("There is no directive with \"exportAs\" set to \"".concat(elOrDirRef.value, "\""), elOrDirRef.sourceSpan);
              }
            } else if (!component) {
              var refToken = null;

              if (isTemplateElement) {
                refToken = createTokenForExternalReference(_this157.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 _this158 = this;

          var boundElementProps = [];
          props.forEach(function (prop) {
            if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {
              var boundProp = _this158._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 _this159 = 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) {
            _this159._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 _this160 = 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)) {
              _this160._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 _this161 = 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 */
            && !_this161._schemaRegistry.hasProperty(elementName, boundProp.name, _this161._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.";
              }

              _this161._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 Inc. All Rights Reserved.
     *
     * Use 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
      // construted 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';
    /**
     * 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(...)
     *   stylingApply(...)
     * }
     *
     * The creation/update methods within the builder class produce these instructions.
     */

    var StylingBuilder = /*#__PURE__*/function () {
      function StylingBuilder(_elementIndexExpr, _directiveExpr) {
        _classCallCheck(this, StylingBuilder);

        this._elementIndexExpr = _elementIndexExpr;
        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;
        /** 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 = []; // certain style properties ALWAYS need sanitization
        // this is checked each time new styles are encountered

        this._useDefaultSanitizer = false;
      }
      /**
       * 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 nameToMatch = name.substring(0, 5); // class | style

          var isStyle = nameToMatch === 'style';
          var isClass = isStyle ? false : nameToMatch === '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, unit) {
          if (isEmptyExpression(value)) {
            return null;
          }

          name = normalizePropName(name);

          var _parseProperty = parseProperty(name),
              property = _parseProperty.property,
              hasOverrideFlag = _parseProperty.hasOverrideFlag,
              bindingUnit = _parseProperty.unit;

          var entry = {
            name: property,
            unit: unit || bindingUnit,
            value: value,
            sourceSpan: sourceSpan,
            hasOverrideFlag: hasOverrideFlag
          };

          if (isMapBased) {
            this._useDefaultSanitizer = true;
            this._styleMapInput = entry;
          } else {
            (this._singleStyleInputs = this._singleStyleInputs || []).push(entry);
            this._useDefaultSanitizer = this._useDefaultSanitizer || isStyleSanitizable(name);
            registerIntoMap(this._stylesIndex, property);
          }

          this._lastStylingInput = entry;
          this._firstStylingInput = this._firstStylingInput || entry;
          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,
            unit: null
          };

          if (isMapBased) {
            this._classMapInput = entry;
          } else {
            (this._singleClassInputs = this._singleClassInputs || []).push(entry);
            registerIntoMap(this._classesIndex, property);
          }

          this._lastStylingInput = entry;
          this._firstStylingInput = this._firstStylingInput || entry;
          this.hasBindings = true;
          return entry;
        }
        /**
         * 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 _i10 = 0; _i10 < this._initialStyleValues.length; _i10 += 2) {
              attrs.push(literal(this._initialStyleValues[_i10]), literal(this._initialStyleValues[_i10 + 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: "buildHostAttrsInstruction",
        value: function buildHostAttrsInstruction(sourceSpan, attrs, constantPool) {
          var _this162 = this;

          if (this._directiveExpr && (attrs.length || this._hasInitialValues)) {
            return {
              sourceSpan: sourceSpan,
              reference: Identifiers$1.elementHostAttrs,
              allocateBindingSlots: 0,
              params: function params() {
                // params => elementHostAttrs(attrs)
                _this162.populateInitialStylingAttrs(attrs);

                var attrArray = !attrs.some(function (attr) {
                  return attr instanceof WrappedNodeExpr;
                }) ? getConstantLiteralFromArray(constantPool, attrs) : literalArr(attrs);
                return [attrArray];
              }
            };
          }

          return null;
        }
        /**
         * Builds an instruction with all the expressions and parameters for `styling`.
         *
         * The instruction generation code below is used for producing the AOT statement code which is
         * responsible for registering style/class bindings to an element.
         */

      }, {
        key: "buildStylingInstruction",
        value: function buildStylingInstruction(sourceSpan, constantPool) {
          if (this.hasBindings) {
            return {
              sourceSpan: sourceSpan,
              allocateBindingSlots: 0,
              reference: Identifiers$1.styling,
              params: function params() {
                return [];
              }
            };
          }

          return null;
        }
        /**
         * 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
          var totalBindingSlotsRequired = 1; // 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 && isClassBased) {
            totalBindingSlotsRequired += mapValue.expressions.length;
            reference = getClassMapInterpolationExpression(mapValue);
          } else {
            reference = isClassBased ? Identifiers$1.classMap : Identifiers$1.styleMap;
          }

          return {
            sourceSpan: stylingInput.sourceSpan,
            reference: reference,
            allocateBindingSlots: totalBindingSlotsRequired,
            supportsInterpolation: isClassBased,
            params: function params(convertFn) {
              var convertResult = convertFn(mapValue);
              return Array.isArray(convertResult) ? convertResult : [convertResult];
            }
          };
        }
      }, {
        key: "_buildSingleInputs",
        value: function _buildSingleInputs(reference, inputs, mapIndex, allowUnits, valueConverter, getInterpolationExpressionFn) {
          var totalBindingSlotsRequired = 0;
          return inputs.map(function (input) {
            var value = input.value.visit(valueConverter); // each styling binding value is stored in the LView

            var totalBindingSlotsRequired = 1;

            if (value instanceof Interpolation) {
              totalBindingSlotsRequired += value.expressions.length;

              if (getInterpolationExpressionFn) {
                reference = getInterpolationExpressionFn(value);
              }
            }

            return {
              sourceSpan: input.sourceSpan,
              supportsInterpolation: !!getInterpolationExpressionFn,
              allocateBindingSlots: totalBindingSlotsRequired,
              reference: reference,
              params: function params(convertFn) {
                // params => stylingProp(propName, value)
                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);
                }

                if (allowUnits && input.unit) {
                  params.push(literal(input.unit));
                }

                return params;
              }
            };
          });
        }
      }, {
        key: "_buildClassInputs",
        value: function _buildClassInputs(valueConverter) {
          if (this._singleClassInputs) {
            return this._buildSingleInputs(Identifiers$1.classProp, this._singleClassInputs, this._classesIndex, false, valueConverter);
          }

          return [];
        }
      }, {
        key: "_buildStyleInputs",
        value: function _buildStyleInputs(valueConverter) {
          if (this._singleStyleInputs) {
            return this._buildSingleInputs(Identifiers$1.styleProp, this._singleStyleInputs, this._stylesIndex, true, valueConverter, getStylePropInterpolationExpression);
          }

          return [];
        }
      }, {
        key: "_buildApplyFn",
        value: function _buildApplyFn() {
          return {
            sourceSpan: this._lastStylingInput ? this._lastStylingInput.sourceSpan : null,
            reference: Identifiers$1.stylingApply,
            allocateBindingSlots: 0,
            params: function params() {
              return [];
            }
          };
        }
      }, {
        key: "_buildSanitizerFn",
        value: function _buildSanitizerFn() {
          return {
            sourceSpan: this._firstStylingInput ? this._firstStylingInput.sourceSpan : null,
            reference: Identifiers$1.styleSanitizer,
            allocateBindingSlots: 0,
            params: function params() {
              return [importExpr(Identifiers$1.defaultStyleSanitizer)];
            }
          };
        }
        /**
         * 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) {
            if (this._useDefaultSanitizer) {
              instructions.push(this._buildSanitizerFn());
            }

            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)));
            instructions.push(this._buildApplyFn());
          }

          return instructions;
        }
      }]);

      return StylingBuilder;
    }();

    function registerIntoMap(map, key) {
      if (!map.has(key)) {
        map.set(key, map.size);
      }
    }

    function isStyleSanitizable(prop) {
      // Note that browsers support both the dash case and
      // camel case property names when setting through JS.
      return prop === 'background-image' || prop === 'backgroundImage' || prop === 'background' || prop === 'border-image' || prop === 'borderImage' || prop === 'filter' || prop === 'list-style' || prop === 'listStyle' || prop === 'list-style-image' || prop === 'listStyleImage' || prop === 'clip-path' || prop === 'clipPath';
    }
    /**
     * Simple helper function to either provide the constant literal that will house the value
     * here or a null value if the provided values are empty.
     */


    function getConstantLiteralFromArray(constantPool, values) {
      return values.length ? constantPool.getConstLiteral(literalArr(values), true) : NULL_EXPR;
    }
    /**
     * Simple helper function that adds a parameter or does nothing at all depending on the provided
     * predicate and totalExpectedArgs values
     */


    function addParam(params, predicate, value, argNumber, totalExpectedArgs) {
      if (predicate && value) {
        params.push(value);
      } else if (argNumber < totalExpectedArgs) {
        params.push(NULL_EXPR);
      }
    }

    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 unit = '';
      var property = name;
      var unitIndex = name.lastIndexOf('.');

      if (unitIndex > 0) {
        unit = name.substr(unitIndex + 1);
        property = name.substring(0, unitIndex);
      }

      return {
        property: property,
        unit: unit,
        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 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 Inc. All Rights Reserved.
     *
     * Use 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, type, numValue, strValue) {
        _classCallCheck(this, Token$1);

        this.index = index;
        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, code) {
      return new Token$1(index, TokenType$1.Character, code, String.fromCharCode(code));
    }

    function newIdentifierToken(index, text) {
      return new Token$1(index, TokenType$1.Identifier, 0, text);
    }

    function newKeywordToken(index, text) {
      return new Token$1(index, TokenType$1.Keyword, 0, text);
    }

    function newOperatorToken(index, text) {
      return new Token$1(index, TokenType$1.Operator, 0, text);
    }

    function newStringToken(index, text) {
      return new Token$1(index, TokenType$1.String, 0, text);
    }

    function newNumberToken(index, n) {
      return new Token$1(index, TokenType$1.Number, n, '');
    }

    function newErrorToken(index, message) {
      return new Token$1(index, TokenType$1.Error, 0, message);
    }

    var EOF = new Token$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, $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, code);
        }
      }, {
        key: "scanOperator",
        value: function scanOperator(start, str) {
          this.advance();
          return newOperatorToken(start, 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, 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, str) : newIdentifierToken(start, 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, 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, buffer + last);
        }
      }, {
        key: "error",
        value: function error(message, offset) {
          var position = this.index + offset;
          return newErrorToken(position, "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 Inc. All Rights Reserved.
     *
     * Use 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;
    };

    function _createInterpolateRegExp(config) {
      var pattern = escapeRegExp(config.start) + '([\\s\\S]*?)' + escapeRegExp(config.end);
      return new RegExp(pattern, 'g');
    }

    var Parser$1 = /*#__PURE__*/function () {
      function Parser$1(_lexer) {
        _classCallCheck(this, Parser$1);

        this._lexer = _lexer;
        this.errors = [];
      }

      _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: "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 = SimpleExpressionChecker.check(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);

          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) {
          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);
          return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);
        }
      }, {
        key: "parseTemplateBindings",
        value: function parseTemplateBindings(tplKey, tplValue, location, absoluteOffset) {
          var tokens = this._lexer.tokenize(tplValue);

          return new _ParseAST(tplValue, location, absoluteOffset, tokens, tplValue.length, false, this.errors, 0).parseTemplateBindings(tplKey);
        }
      }, {
        key: "parseInterpolation",
        value: function parseInterpolation(input, location, absoluteOffset) {
          var interpolationConfig = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_INTERPOLATION_CONFIG;
          var split = this.splitInterpolation(input, location, interpolationConfig);
          if (split == null) return null;
          var expressions = [];

          for (var i = 0; i < split.expressions.length; ++i) {
            var expressionText = split.expressions[i];

            var sourceToLex = this._stripComments(expressionText);

            var tokens = this._lexer.tokenize(sourceToLex);

            var ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length)).parseChain();
            expressions.push(ast);
          }

          return new ASTWithSource(new Interpolation(new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions), input, location, absoluteOffset, this.errors);
        }
      }, {
        key: "splitInterpolation",
        value: function splitInterpolation(input, location) {
          var interpolationConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_INTERPOLATION_CONFIG;

          var regexp = _createInterpolateRegExp(interpolationConfig);

          var parts = input.split(regexp);

          if (parts.length <= 1) {
            return null;
          }

          var strings = [];
          var expressions = [];
          var offsets = [];
          var offset = 0;

          for (var i = 0; i < parts.length; i++) {
            var part = parts[i];

            if (i % 2 === 0) {
              // fixed string
              strings.push(part);
              offset += part.length;
            } else if (part.trim().length > 0) {
              offset += interpolationConfig.start.length;
              expressions.push(part);
              offsets.push(offset);
              offset += part.length + interpolationConfig.end.length;
            } else {
              this._reportError('Blank expressions are not allowed in interpolated strings', input, "at column ".concat(this._findInterpolationErrorColumn(parts, i, interpolationConfig), " in"), location);

              expressions.push('$implict');
              offsets.push(offset);
            }
          }

          return new SplitInterpolation(strings, expressions, offsets);
        }
      }, {
        key: "wrapLiteralPrimitive",
        value: function wrapLiteralPrimitive(input, location, absoluteOffset) {
          return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), 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 _char6 = input.charCodeAt(i);

            var nextChar = input.charCodeAt(i + 1);
            if (_char6 === $SLASH && nextChar == $SLASH && outerQuote == null) return i;

            if (outerQuote === _char6) {
              outerQuote = null;
            } else if (outerQuote == null && isQuote(_char6)) {
              outerQuote = _char6;
            }
          }

          return null;
        }
      }, {
        key: "_checkNoInterpolation",
        value: function _checkNoInterpolation(input, location, interpolationConfig) {
          var regexp = _createInterpolateRegExp(interpolationConfig);

          var parts = input.split(regexp);

          if (parts.length > 1) {
            this._reportError("Got interpolation (".concat(interpolationConfig.start).concat(interpolationConfig.end, ") where expression was expected"), input, "at column ".concat(this._findInterpolationErrorColumn(parts, 1, interpolationConfig), " in"), location);
          }
        }
      }, {
        key: "_findInterpolationErrorColumn",
        value: function _findInterpolationErrorColumn(parts, partInErrIdx, interpolationConfig) {
          var errLocation = '';

          for (var j = 0; j < partInErrIdx; j++) {
            errLocation += j % 2 === 0 ? parts[j] : "".concat(interpolationConfig.start).concat(parts[j]).concat(interpolationConfig.end);
          }

          return errLocation.length;
        }
      }]);

      return Parser$1;
    }();

    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.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: "span",
        value: function span(start) {
          return new ParseSpan(start, this.inputIndex);
        }
      }, {
        key: "advance",
        value: function advance() {
          this.index++;
        }
      }, {
        key: "optionalCharacter",
        value: function optionalCharacter(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();
        }
      }, {
        key: "expectCharacter",
        value: function expectCharacter(code) {
          if (this.optionalCharacter(code)) return;
          this.error("Missing expected ".concat(String.fromCharCode(code)));
        }
      }, {
        key: "optionalOperator",
        value: function optionalOperator(op) {
          if (this.next.isOperator(op)) {
            this.advance();
            return true;
          } else {
            return false;
          }
        }
      }, {
        key: "expectOperator",
        value: function expectOperator(operator) {
          if (this.optionalOperator(operator)) return;
          this.error("Missing expected operator ".concat(operator));
        }
      }, {
        key: "expectIdentifierOrKeyword",
        value: function expectIdentifierOrKeyword() {
          var n = this.next;

          if (!n.isIdentifier() && !n.isKeyword()) {
            this.error("Unexpected token ".concat(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 token ".concat(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.optionalCharacter($SEMICOLON)) {
              if (!this.parseAction) {
                this.error('Binding expression cannot contain chained expression');
              }

              while (this.optionalCharacter($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));
          if (exprs.length == 1) return exprs[0];
          return new Chain(this.span(start), exprs);
        }
      }, {
        key: "parsePipe",
        value: function parsePipe() {
          var result = this.parseExpression();

          if (this.optionalOperator('|')) {
            if (this.parseAction) {
              this.error('Cannot have a pipe in an action expression');
            }

            do {
              var name = this.expectIdentifierOrKeyword();
              var args = [];

              while (this.optionalCharacter($COLON)) {
                args.push(this.parseExpression());
              }

              result = new BindingPipe(this.span(result.span.start), result, name, args);
            } while (this.optionalOperator('|'));
          }

          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.optionalOperator('?')) {
            var yes = this.parsePipe();
            var no;

            if (!this.optionalCharacter($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));
            } else {
              no = this.parsePipe();
            }

            return new Conditional(this.span(start), result, yes, no);
          } else {
            return result;
          }
        }
      }, {
        key: "parseLogicalOr",
        value: function parseLogicalOr() {
          // '||'
          var result = this.parseLogicalAnd();

          while (this.optionalOperator('||')) {
            var right = this.parseLogicalAnd();
            result = new Binary(this.span(result.span.start), '||', result, right);
          }

          return result;
        }
      }, {
        key: "parseLogicalAnd",
        value: function parseLogicalAnd() {
          // '&&'
          var result = this.parseEquality();

          while (this.optionalOperator('&&')) {
            var right = this.parseEquality();
            result = new Binary(this.span(result.span.start), '&&', 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();
                result = new Binary(this.span(result.span.start), 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();
                result = new Binary(this.span(result.span.start), 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();
                result = new Binary(this.span(result.span.start), 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();
                result = new Binary(this.span(result.span.start), operator, result, right);
                continue;
            }

            break;
          }

          return result;
        }
      }, {
        key: "parsePrefix",
        value: function parsePrefix() {
          if (this.next.type == TokenType$1.Operator) {
            var start = this.inputIndex;
            var operator = this.next.strValue;
            var result;

            switch (operator) {
              case '+':
                this.advance();
                result = this.parsePrefix();
                return new Binary(this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));

              case '-':
                this.advance();
                result = this.parsePrefix();
                return new Binary(this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0), result);

              case '!':
                this.advance();
                result = this.parsePrefix();
                return new PrefixNot(this.span(start), result);
            }
          }

          return this.parseCallChain();
        }
      }, {
        key: "parseCallChain",
        value: function parseCallChain() {
          var result = this.parsePrimary();

          while (true) {
            if (this.optionalCharacter($PERIOD)) {
              result = this.parseAccessMemberOrMethodCall(result, false);
            } else if (this.optionalOperator('?.')) {
              result = this.parseAccessMemberOrMethodCall(result, true);
            } else if (this.optionalCharacter($LBRACKET)) {
              this.rbracketsExpected++;
              var key = this.parsePipe();
              this.rbracketsExpected--;
              this.expectCharacter($RBRACKET);

              if (this.optionalOperator('=')) {
                var value = this.parseConditional();
                result = new KeyedWrite(this.span(result.span.start), result, key, value);
              } else {
                result = new KeyedRead(this.span(result.span.start), result, key);
              }
            } else if (this.optionalCharacter($LPAREN)) {
              this.rparensExpected++;
              var args = this.parseCallArguments();
              this.rparensExpected--;
              this.expectCharacter($RPAREN);
              result = new FunctionCall(this.span(result.span.start), result, args);
            } else if (this.optionalOperator('!')) {
              result = new NonNullAssert(this.span(result.span.start), result);
            } else {
              return result;
            }
          }
        }
      }, {
        key: "parsePrimary",
        value: function parsePrimary() {
          var start = this.inputIndex;

          if (this.optionalCharacter($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), null);
          } else if (this.next.isKeywordUndefined()) {
            this.advance();
            return new LiteralPrimitive(this.span(start), void 0);
          } else if (this.next.isKeywordTrue()) {
            this.advance();
            return new LiteralPrimitive(this.span(start), true);
          } else if (this.next.isKeywordFalse()) {
            this.advance();
            return new LiteralPrimitive(this.span(start), false);
          } else if (this.next.isKeywordThis()) {
            this.advance();
            return new ImplicitReceiver(this.span(start));
          } else if (this.optionalCharacter($LBRACKET)) {
            this.rbracketsExpected++;
            var elements = this.parseExpressionList($RBRACKET);
            this.rbracketsExpected--;
            this.expectCharacter($RBRACKET);
            return new LiteralArray(this.span(start), elements);
          } else if (this.next.isCharacter($LBRACE)) {
            return this.parseLiteralMap();
          } else if (this.next.isIdentifier()) {
            return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);
          } else if (this.next.isNumber()) {
            var value = this.next.toNumber();
            this.advance();
            return new LiteralPrimitive(this.span(start), value);
          } else if (this.next.isString()) {
            var literalValue = this.next.toString();
            this.advance();
            return new LiteralPrimitive(this.span(start), literalValue);
          } else if (this.index >= this.tokens.length) {
            this.error("Unexpected end of expression: ".concat(this.input));
            return new EmptyExpr(this.span(start));
          } else {
            this.error("Unexpected token ".concat(this.next));
            return new EmptyExpr(this.span(start));
          }
        }
      }, {
        key: "parseExpressionList",
        value: function parseExpressionList(terminator) {
          var result = [];

          if (!this.next.isCharacter(terminator)) {
            do {
              result.push(this.parsePipe());
            } while (this.optionalCharacter($COMMA));
          }

          return result;
        }
      }, {
        key: "parseLiteralMap",
        value: function parseLiteralMap() {
          var keys = [];
          var values = [];
          var start = this.inputIndex;
          this.expectCharacter($LBRACE);

          if (!this.optionalCharacter($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.optionalCharacter($COMMA));

            this.rbracesExpected--;
            this.expectCharacter($RBRACE);
          }

          return new LiteralMap(this.span(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 id = this.expectIdentifierOrKeyword();

          if (this.optionalCharacter($LPAREN)) {
            this.rparensExpected++;
            var args = this.parseCallArguments();
            this.expectCharacter($RPAREN);
            this.rparensExpected--;
            var span = this.span(start);
            return isSafe ? new SafeMethodCall(span, receiver, id, args) : new MethodCall(span, receiver, id, args);
          } else {
            if (isSafe) {
              if (this.optionalOperator('=')) {
                this.error('The \'?.\' operator cannot be used in the assignment');
                return new EmptyExpr(this.span(start));
              } else {
                return new SafePropertyRead(this.span(start), receiver, id);
              }
            } else {
              if (this.optionalOperator('=')) {
                if (!this.parseAction) {
                  this.error('Bindings cannot contain assignments');
                  return new EmptyExpr(this.span(start));
                }

                var value = this.parseConditional();
                return new PropertyWrite(this.span(start), receiver, id, value);
              } else {
                return new PropertyRead(this.span(start), receiver, id);
              }
            }
          }
        }
      }, {
        key: "parseCallArguments",
        value: function parseCallArguments() {
          if (this.next.isCharacter($RPAREN)) return [];
          var positionals = [];

          do {
            positionals.push(this.parsePipe());
          } while (this.optionalCharacter($COMMA));

          return positionals;
        }
        /**
         * An identifier, a keyword, a string with an optional `-` in between.
         */

      }, {
        key: "expectTemplateBindingKey",
        value: function expectTemplateBindingKey() {
          var result = '';
          var operatorFound = false;

          do {
            result += this.expectIdentifierOrKeywordOrString();
            operatorFound = this.optionalOperator('-');

            if (operatorFound) {
              result += '-';
            }
          } while (operatorFound);

          return result.toString();
        } // Parses the AST for `<some-tag *tplKey=AST>`

      }, {
        key: "parseTemplateBindings",
        value: function parseTemplateBindings(tplKey) {
          var firstBinding = true;
          var bindings = [];
          var warnings = [];

          do {
            var start = this.inputIndex;
            var rawKey = void 0;
            var key = void 0;
            var isVar = false;

            if (firstBinding) {
              rawKey = key = tplKey;
              firstBinding = false;
            } else {
              isVar = this.peekKeywordLet();
              if (isVar) this.advance();
              rawKey = this.expectTemplateBindingKey();
              key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);
              this.optionalCharacter($COLON);
            }

            var name = null;
            var expression = null;

            if (isVar) {
              if (this.optionalOperator('=')) {
                name = this.expectTemplateBindingKey();
              } else {
                name = '\$implicit';
              }
            } else if (this.peekKeywordAs()) {
              this.advance(); // consume `as`

              name = rawKey;
              key = this.expectTemplateBindingKey(); // read local var name

              isVar = true;
            } else if (this.next !== EOF && !this.peekKeywordLet()) {
              var _start = this.inputIndex;
              var ast = this.parsePipe();
              var source = this.input.substring(_start - this.offset, this.inputIndex - this.offset);
              expression = new ASTWithSource(ast, source, this.location, this.absoluteOffset, this.errors);
            }

            bindings.push(new TemplateBinding(this.span(start), key, isVar, name, expression));

            if (this.peekKeywordAs() && !isVar) {
              var letStart = this.inputIndex;
              this.advance(); // consume `as`

              var letName = this.expectTemplateBindingKey(); // read local var name

              bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));
            }

            if (!this.optionalCharacter($SEMICOLON)) {
              this.optionalCharacter($COMMA);
            }
          } while (this.index < this.tokens.length);

          return new TemplateBindingParseResult(bindings, warnings, this.errors);
        }
      }, {
        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 ';'.
        // 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))) {
            if (this.next.isError()) {
              this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
            }

            this.advance();
            n = this.next;
          }
        }
      }, {
        key: "next",
        get: function get() {
          return this.peek(0);
        }
      }, {
        key: "inputIndex",
        get: function get() {
          return this.index < this.tokens.length ? this.next.index + this.offset : this.inputLength + this.offset;
        }
      }]);

      return _ParseAST;
    }();

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

        this.errors = [];
      }

      _createClass2(SimpleExpressionChecker, [{
        key: "visitImplicitReceiver",
        value: function visitImplicitReceiver(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);
        }
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(ast, context) {
          this.visitAll(ast.values);
        }
      }, {
        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) {
          var _this163 = this;

          return asts.map(function (node) {
            return node.visit(_this163);
          });
        }
      }, {
        key: "visitChain",
        value: function visitChain(ast, context) {}
      }, {
        key: "visitQuote",
        value: function visitQuote(ast, context) {}
      }], [{
        key: "check",
        value: function check(ast) {
          var s = new SimpleExpressionChecker();
          ast.visit(s);
          return s.errors;
        }
      }]);

      return SimpleExpressionChecker;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _iterator9 = _createForOfIteratorHelper(specs),
          _step9;

      try {
        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
          var spec = _step9.value;
          _SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
        }
      } catch (err) {
        _iterator9.e(err);
      } finally {
        _iterator9.f();
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _super89 = _createSuper(DomElementSchemaRegistry);

      function DomElementSchemaRegistry() {
        var _this164;

        _classCallCheck(this, DomElementSchemaRegistry);

        _this164 = _super89.call(this);
        _this164._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 _this164._schema[tag.toLowerCase()] = type;
          });

          var superType = superName && _this164._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 _this164;
      }

      _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 Inc. All Rights Reserved.
     *
     * Use 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$1 = '*';

    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);
      var errors = allErrors.filter(function (e) {
        return e.level === ParseErrorLevel.ERROR;
      });

      if (errors.length > 0) {
        var errorString = errors.join('\n');
        throw syntaxError("Template parse errors:\n".concat(errorString), errors);
      }

      return {
        nodes: ivyNodes,
        errors: allErrors,
        styleUrls: transformer.styleUrls,
        styles: transformer.styles
      };
    }

    var HtmlAstToIvyAst = /*#__PURE__*/function () {
      function HtmlAstToIvyAst(bindingParser) {
        _classCallCheck(this, HtmlAstToIvyAst);

        this.bindingParser = bindingParser;
        this.errors = [];
        this.styles = [];
        this.styleUrls = [];
      } // HTML visitor


      _createClass2(HtmlAstToIvyAst, [{
        key: "visitElement",
        value: function visitElement(element) {
          var _this165 = this;

          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 _iterator10 = _createForOfIteratorHelper(element.attrs),
              _step10;

          try {
            for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
              var attribute = _step10.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$1)) {
                // *-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$1.length);
                var parsedVariables = [];
                var absoluteOffset = attribute.valueSpan ? attribute.valueSpan.start.offset : attribute.sourceSpan.start.offset;
                this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, absoluteOffset, [], templateParsedProperties, parsedVariables);
                templateVariables.push.apply(templateVariables, _toConsumableArray(parsedVariables.map(function (v) {
                  return new Variable(v.name, v.value, v.sourceSpan);
                })));
              } 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) {
            _iterator10.e(err);
          } finally {
            _iterator10.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 _this165.visitAttribute(attr);
            });
            parsedElement = new Content(selector, attrs, element.sourceSpan, element.i18n);
          } 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: []
            }; // 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, element.i18n);
          }

          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 _this166 = this;

          var meta = expansion.i18n; // do not generate Icu in case it was created
          // outside of i18n block in a template

          if (!meta) {
            return null;
          }

          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(meta.placeholders).forEach(function (key) {
            var value = meta.placeholders[key];

            if (key.startsWith(I18N_ICU_VAR_PREFIX)) {
              var config = _this166.bindingParser.interpolationConfig; // ICU expression is a plain string, not wrapped into start
              // and end tags, so we wrap it before passing to binding parser

              var wrapped = "".concat(config.start).concat(value).concat(config.end);
              vars[key] = _this166._visitTextWithInterpolation(wrapped, expansion.sourceSpan);
            } else {
              placeholders[key] = _this166._visitTextWithInterpolation(value, expansion.sourceSpan);
            }
          });
          return new Icu(vars, placeholders, expansion.sourceSpan, meta);
        }
      }, {
        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 _this167 = 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 = _this167.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;
          var bindParts = name.match(BIND_NAME_REGEXP$1);
          var hasBinding = false;

          if (bindParts) {
            hasBinding = true;

            if (bindParts[KW_BIND_IDX$1] != null) {
              this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties);
            } else if (bindParts[KW_LET_IDX$1]) {
              if (isTemplateElement) {
                var identifier = bindParts[IDENT_KW_IDX$1];
                this.parseVariable(identifier, value, srcSpan, attribute.valueSpan, variables);
              } else {
                this.reportError("\"let-\" is only supported on ng-template elements.", srcSpan);
              }
            } else if (bindParts[KW_REF_IDX$1]) {
              var _identifier2 = bindParts[IDENT_KW_IDX$1];
              this.parseReference(_identifier2, value, srcSpan, attribute.valueSpan, references);
            } else if (bindParts[KW_ON_IDX$1]) {
              var events = [];
              this.bindingParser.parseEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events);
              addEvents(events, boundEvents);
            } else if (bindParts[KW_BINDON_IDX$1]) {
              this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties);
              this.parseAssignmentEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents);
            } else if (bindParts[KW_AT_IDX$1]) {
              this.bindingParser.parseLiteralAttr(name, value, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties);
            } else if (bindParts[IDENT_BANANA_BOX_IDX$1]) {
              this.bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties);
              this.parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX$1], value, srcSpan, attribute.valueSpan, matchableAttributes, boundEvents);
            } else if (bindParts[IDENT_PROPERTY_IDX$1]) {
              this.bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX$1], value, false, srcSpan, absoluteOffset, attribute.valueSpan, matchableAttributes, parsedProperties);
            } 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 {
            hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties);
          }

          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, valueSpan, variables) {
          if (identifier.indexOf('-') > -1) {
            this.reportError("\"-\" is not allowed in variable names", sourceSpan);
          }

          variables.push(new Variable(identifier, value, sourceSpan, valueSpan));
        }
      }, {
        key: "parseReference",
        value: function parseReference(identifier, value, sourceSpan, valueSpan, references) {
          if (identifier.indexOf('-') > -1) {
            this.reportError("\"-\" is not allowed in reference names", 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 Inc. All Rights Reserved.
     *
     * Use 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["PROJECTION"] = 2] = "PROJECTION";
    })(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: "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 _this168 = this;

          var phs = assembleBoundTextPlaceholders(node, this.bindings.size, this.id);
          phs.forEach(function (values, key) {
            return updatePlaceholderMap.apply(void 0, [_this168.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 we process projected content separately
          this.appendTag(TagType.PROJECTION, node, index, false);
          this.appendTag(TagType.PROJECTION, 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 _this169 = 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 = _this169.placeholders.get(key) || [];
            var tag = phs.find(findTemplateFn(_this169.id, context.templateIndex));

            if (tag) {
              tag.ctx = context.id;
            }
          }); // reconcile placeholders

          var childPhs = context.placeholders;
          childPhs.forEach(function (values, key) {
            var phs = _this169.placeholders.get(key);

            if (!phs) {
              _this169.placeholders.set(key, values);

              return;
            } // try to find matching template...


            var tmplIdx = findIndex(phs, 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));
            }

            _this169.placeholders.set(key, phs);
          });
          this._unresolvedCtxCount--;
        }
      }, {
        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;
        }
      }]);

      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, _ref30, closed) {
      var index = _ref30.index,
          ctx = _ref30.ctx,
          isVoid = _ref30.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);

        case TagType.PROJECTION:
          return projection(value, value.closed);

        default:
          return value;
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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, id, visitNodeFn) {
        return visitor.toI18nMessage(nodes, meaning, description, id, visitNodeFn);
      };
    }

    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, meaning, description, id, visitNodeFn) {
          this._isIcu = nodes.length == 1 && nodes[0] instanceof Expansion;
          this._icuDepth = 0;
          this._placeholderRegistry = new PlaceholderRegistry();
          this._placeholderToContent = {};
          this._placeholderToMessage = {};
          this._visitNodeFn = visitNodeFn;
          var i18nodes = visitAll$1(this, nodes, {});
          return new Message(i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);
        }
      }, {
        key: "_visitNode",
        value: function _visitNode(html, i18n) {
          if (this._visitNodeFn) {
            this._visitNodeFn(html, i18n);
          }

          return i18n;
        }
      }, {
        key: "visitElement",
        value: function visitElement(el, context) {
          var children = visitAll$1(this, el.children);
          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 = this._placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);

          this._placeholderToContent[startPhName] = el.sourceSpan.toString();
          var closePhName = '';

          if (!isVoid) {
            closePhName = this._placeholderRegistry.getCloseTagPlaceholderName(el.name);
            this._placeholderToContent[closePhName] = "</".concat(el.name, ">");
          }

          var node = new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan);
          return this._visitNode(el, node);
        }
      }, {
        key: "visitAttribute",
        value: function visitAttribute(attribute, context) {
          var node = this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);

          return this._visitNode(attribute, node);
        }
      }, {
        key: "visitText",
        value: function visitText(text, context) {
          var node = this._visitTextWithInterpolation(text.value, text.sourceSpan);

          return this._visitNode(text, node);
        }
      }, {
        key: "visitComment",
        value: function visitComment(comment, context) {
          return null;
        }
      }, {
        key: "visitExpansion",
        value: function visitExpansion(icu, context) {
          var _this170 = this;

          this._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(_this170, {});
            }), caze.expSourceSpan);
          });
          this._icuDepth--;

          if (this._isIcu || this._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 = this._placeholderRegistry.getUniquePlaceholder("VAR_".concat(icu.type));

            i18nIcu.expressionPlaceholder = expPh;
            this._placeholderToContent[expPh] = icu.switchValue;
            return this._visitNode(icu, i18nIcu);
          } // Else returns a placeholder
          // ICU placeholders should not be replaced with their original content but with the their
          // translations. We need to create a new visitor (they are not re-entrant) to compute the
          // message id.
          // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg


          var phName = this._placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());

          var visitor = new _I18nVisitor(this._expressionParser, this._interpolationConfig);
          this._placeholderToMessage[phName] = visitor.toI18nMessage([icu], '', '', '');
          var node = new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);
          return this._visitNode(icu, node);
        }
      }, {
        key: "visitExpansionCase",
        value: function visitExpansionCase(icuCase, context) {
          throw new Error('Unreachable code');
        }
      }, {
        key: "_visitTextWithInterpolation",
        value: function _visitTextWithInterpolation(text, sourceSpan) {
          var splitInterpolation = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig);

          if (!splitInterpolation) {
            // No expression, return a single text
            return new Text$1(text, sourceSpan);
          } // Return a group of text + expressions


          var nodes = [];
          var container = new Container(nodes, sourceSpan);
          var _this$_interpolationC = this._interpolationConfig,
              sDelimiter = _this$_interpolationC.start,
              eDelimiter = _this$_interpolationC.end;

          for (var i = 0; i < splitInterpolation.strings.length - 1; i++) {
            var expression = splitInterpolation.expressions[i];
            var baseName = _extractPlaceholderName(expression) || 'INTERPOLATION';

            var phName = this._placeholderRegistry.getPlaceholderName(baseName, expression);

            if (splitInterpolation.strings[i].length) {
              // No need to add empty strings
              nodes.push(new Text$1(splitInterpolation.strings[i], sourceSpan));
            }

            nodes.push(new Placeholder(expression, phName, sourceSpan));
            this._placeholderToContent[phName] = sDelimiter + expression + eDelimiter;
          } // The last index contains no expression


          var lastStringIdx = splitInterpolation.strings.length - 1;

          if (splitInterpolation.strings[lastStringIdx].length) {
            nodes.push(new Text$1(splitInterpolation.strings[lastStringIdx], sourceSpan));
          }

          return container;
        }
      }]);

      return _I18nVisitor;
    }();

    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 Inc. All Rights Reserved.
     *
     * Use 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 setI18nRefs(html, i18n) {
      html.i18n = i18n;
    }
    /**
     * 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;

        _classCallCheck(this, I18nMetaVisitor);

        this.interpolationConfig = interpolationConfig;
        this.keepI18nAttrs = keepI18nAttrs; // i18n message generation factory

        this._createI18nMessage = createI18nMessageFactory(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 parsed = typeof meta === 'string' ? parseI18nMeta(meta) : metaFromI18nMessage(meta);

          var message = this._createI18nMessage(nodes, parsed.meaning || '', parsed.description || '', parsed.id || '', visitNodeFn);

          if (!message.id) {
            // generate (or restore) message id if not specified in template
            message.id = typeof meta !== 'string' && meta.id || decimalDigest(message);
          }

          return message;
        }
      }, {
        key: "visitElement",
        value: function visitElement(element, context) {
          if (hasI18nAttrs(element)) {
            var attrs = [];
            var attrsMeta = {};

            var _iterator11 = _createForOfIteratorHelper(element.attrs),
                _step11;

            try {
              for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
                var _attr = _step11.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) {
              _iterator11.e(err);
            } finally {
              _iterator11.f();
            }

            if (Object.keys(attrsMeta).length) {
              var _iterator12 = _createForOfIteratorHelper(attrs),
                  _step12;

              try {
                for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
                  var attr = _step12.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) {
                _iterator12.e(err);
              } finally {
                _iterator12.f();
              }
            }

            if (!this.keepI18nAttrs) {
              // update element's attributes,
              // keeping only non-i18n related ones
              element.attrs = attrs;
            }
          }

          visitAll$1(this, element.children);
          return element;
        }
      }, {
        key: "visitExpansion",
        value: function visitExpansion(expansion, context) {
          var message;
          var meta = expansion.i18n;

          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 {
            // when ICU is a root level translation
            message = this._generateI18nMessage([expansion], meta);
          }

          expansion.i18n = message;
          return expansion;
        }
      }, {
        key: "visitText",
        value: function visitText(text, context) {
          return text;
        }
      }, {
        key: "visitAttribute",
        value: function visitAttribute(attribute, context) {
          return attribute;
        }
      }, {
        key: "visitComment",
        value: function visitComment(comment, context) {
          return comment;
        }
      }, {
        key: "visitExpansionCase",
        value: function visitExpansionCase(expansionCase, context) {
          return expansionCase;
        }
      }]);

      return I18nMetaVisitor;
    }();

    function processI18nMeta(htmlAstWithErrors) {
      var interpolationConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_INTERPOLATION_CONFIG;
      return new ParseTreeResult(visitAll$1(new I18nMetaVisitor(interpolationConfig,
      /* keepI18nAttrs */
      false), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 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 SerializerVisitor = /*#__PURE__*/function () {
      function SerializerVisitor() {
        _classCallCheck(this, SerializerVisitor);

        /**
         * Keeps track of ICU nesting level, allowing to detect that we are processing elements of an ICU.
         *
         * This is needed due to the fact that placeholders in ICUs and in other messages are represented
         * differently in Closure:
         * - {$placeholder} in non-ICU case
         * - {PLACEHOLDER} inside ICU
         */
        this.icuNestingLevel = 0;
      }

      _createClass2(SerializerVisitor, [{
        key: "formatPh",
        value: function formatPh(value) {
          var isInsideIcu = this.icuNestingLevel > 0;
          var formatted = formatI18nPlaceholderName(value,
          /* useCamelCase */
          !isInsideIcu);
          return isInsideIcu ? "{".concat(formatted, "}") : "{$".concat(formatted, "}");
        }
      }, {
        key: "visitText",
        value: function visitText(text, context) {
          return text.value;
        }
      }, {
        key: "visitContainer",
        value: function visitContainer(container, context) {
          var _this171 = this;

          return container.children.map(function (child) {
            return child.visit(_this171);
          }).join('');
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this172 = this;

          this.icuNestingLevel++;
          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(' '), "}");
          this.icuNestingLevel--;
          return result;
        }
      }, {
        key: "visitTagPlaceholder",
        value: function visitTagPlaceholder(ph, context) {
          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, context) {
          return this.formatPh(ph.name);
        }
      }, {
        key: "visitIcuPlaceholder",
        value: function visitIcuPlaceholder(ph, context) {
          return this.formatPh(ph.name);
        }
      }]);

      return SerializerVisitor;
    }();

    var serializerVisitor$1 = new SerializerVisitor();

    function getSerializedI18nContent(message) {
      return message.nodes.map(function (node) {
        return node.visit(serializerVisitor$1, null);
      }).join('');
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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'; // 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 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);
      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 = [new FnParam('$event', 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;
    }

    var TemplateDefinitionBuilder = /*#__PURE__*/function () {
      function TemplateDefinitionBuilder(constantPool, parentBindingScope) {
        var _this174 = 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;

        _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.relativeContextFilePath = relativeContextFilePath;
        this.i18nUseExternalIds = i18nUseExternalIds;
        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 = [];
        /**
         * Memorizes the last node index for which a select instruction has been generated.
         * We're initializing this to -1 to ensure the `select(0)` instruction is generated before any
         * relevant update instructions.
         */

        this._lastNodeIndexWithFlush = -1;
        /** 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 _this174.allocateDataSlot();
        }, function (numSlots) {
          return _this174.allocatePureFunctionSlots(numSlots);
        }, function (name, localName, slot, value) {
          var pipeType = pipeTypeByName.get(name);

          if (pipeType) {
            _this174.pipes.add(pipeType);
          }

          _this174._bindingScope.set(_this174.level, localName, value);

          _this174.creationInstruction(null, Identifiers$1.pipe, [literal(slot), literal(name)]);
        });
      }

      _createClass2(TemplateDefinitionBuilder, [{
        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: "buildTemplateFunction",
        value: function buildTemplateFunction(nodes, variables) {
          var _this175 = 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 _this175.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$constantPool$st;

          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 || variable(this.constantPool.uniqueName(TRANSLATION_PREFIX)); // 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 formattedParams = this.i18nFormatPlaceholderNames(params,
          /* useCamelCase */
          true);
          var meta = metaFromI18nMessage(message);
          var content = getSerializedI18nContent(message);
          var statements = getTranslationDeclStmts(_ref, closureVar, content, meta, formattedParams, transformFn);

          (_this$constantPool$st = this.constantPool.statements).push.apply(_this$constantPool$st, _toConsumableArray(statements));

          return _ref;
        }
      }, {
        key: "i18nFormatPlaceholderNames",
        value: 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;
        }
      }, {
        key: "i18nAppendBindings",
        value: function i18nAppendBindings(expressions) {
          var _this176 = this;

          if (expressions.length > 0) {
            expressions.forEach(function (expression) {
              return _this176.i18n.appendBinding(expression);
            });
          }
        }
      }, {
        key: "i18nBindProps",
        value: function i18nBindProps(props) {
          var _this177 = 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(_this177._valueConverter);

              _this177.allocateBindingSlots(value);

              if (value instanceof Interpolation) {
                var strings = value.strings,
                    expressions = value.expressions;
                var _this177$i18n = _this177.i18n,
                    id = _this177$i18n.id,
                    bindings = _this177$i18n.bindings;
                var label = assembleI18nBoundString(strings, bindings.size, id);

                _this177.i18nAppendBindings(expressions);

                bound[key] = literal(label);
              }
            }
          });
          return bound;
        }
      }, {
        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();

          if (this.i18nContext) {
            this.i18n = this.i18nContext.forkChildContext(index, this.templateIndex, meta);
          } else {
            var _ref31 = variable(this.constantPool.uniqueName(TRANSLATION_PREFIX));

            this.i18n = new I18nContext(index, _ref31, 0, this.templateIndex, meta);
          } // generate i18nStart instruction


          var _this$i18n = this.i18n,
              id = _this$i18n.id,
              ref = _this$i18n.ref;
          var params = [literal(index), 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 _this178 = 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 _this178.convertPropertyBinding(binding);
                }
              });
            });
            this.updateInstructionChain(index, Identifiers$1.i18nExp, chainBindings);
            this.updateInstruction(index, span, Identifiers$1.i18nApply, [literal(index)]);
          }

          if (!selfClosing) {
            this.creationInstruction(span, Identifiers$1.i18nEnd);
          }

          this.i18n = null; // reset local i18n context
        }
      }, {
        key: "visitContent",
        value: function visitContent(ngContent) {
          var slot = this.allocateDataSlot();
          var projectionSlotIdx = this._ngContentSelectorsOffset + this._ngContentReservedSlots.length;
          var parameters = [literal(slot)];
          var attributes = [];

          this._ngContentReservedSlots.push(ngContent.selector);

          ngContent.attributes.forEach(function (attribute) {
            var name = attribute.name,
                value = attribute.value;

            if (name === NG_PROJECT_AS_ATTR_NAME) {
              attributes.push.apply(attributes, _toConsumableArray(getNgProjectAsLiteral(attribute)));
            } else if (name.toLowerCase() !== NG_CONTENT_SELECT_ATTR$1) {
              attributes.push(literal(name), literal(value));
            }
          });

          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: "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.sourceSpan, nsInstruction);
        }
      }, {
        key: "visitElement",
        value: function visitElement(element) {
          var _this179 = this;

          var elementIndex = this.allocateDataSlot();
          var stylingBuilder = new StylingBuilder(literal(elementIndex), null);
          var isNonBindableMode = false;
          var isI18nRootElement = isI18nRootNode(element.i18n) && !isSingleI18nIcu(element.i18n);

          if (isI18nRootElement && this.i18n) {
            throw new Error("Could not mark an element as translatable inside of a translatable section");
          }

          var i18nAttrs = [];
          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 _iterator13 = _createForOfIteratorHelper(element.attributes),
              _step13;

          try {
            for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
              var attr = _step13.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 {
                if (attr.i18n) {
                  // Place attributes into a separate array for i18n processing, but also keep such
                  // attributes in the main list to make them available for directive matching at runtime.
                  // TODO(FW-1248): prevent attributes duplication in `i18nAttributes` and `elementStart`
                  // arguments
                  i18nAttrs.push(attr);
                } else {
                  outputAttrs.push(attr);
                }
              }
            } // Match directives on non i18n attributes

          } catch (err) {
            _iterator13.e(err);
          } finally {
            _iterator13.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 attributes = [];
          var allOtherInputs = [];
          element.inputs.forEach(function (input) {
            var stylingInputWasSet = stylingBuilder.registerBoundInput(input);

            if (!stylingInputWasSet) {
              if (input.type === 0
              /* Property */
              && input.i18n) {
                // Place attributes into a separate array for i18n processing, but also keep such
                // attributes in the main list to make them available for directive matching at runtime.
                // TODO(FW-1248): prevent attributes duplication in `i18nAttributes` and `elementStart`
                // arguments
                i18nAttrs.push(input);
              } else {
                allOtherInputs.push(input);
              }
            }
          });
          outputAttrs.forEach(function (attr) {
            if (attr.name === NG_PROJECT_AS_ATTR_NAME) {
              attributes.push.apply(attributes, _toConsumableArray(getNgProjectAsLiteral(attr)));
            } else {
              attributes.push.apply(attributes, _toConsumableArray(getAttributeNameLiterals(attr.name)).concat([literal(attr.value)]));
            }
          }); // add attributes for directive and projection matching purposes

          attributes.push.apply(attributes, _toConsumableArray(this.prepareNonRenderAttrs(allOtherInputs, element.outputs, stylingBuilder, [], i18nAttrs)));
          parameters.push(this.toAttrsParam(attributes)); // local refs (ex.: <div #foo #bar="baz">)

          parameters.push(this.prepareRefsParameter(element.references));
          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.hasBindings && element.outputs.length === 0 && i18nAttrs.length === 0 && !hasChildren;
          var createSelfClosingI18nInstruction = !createSelfClosingInstruction && !stylingBuilder.hasBindings && hasTextChildrenOnly(element.children);

          if (createSelfClosingInstruction) {
            this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers$1.elementContainer : Identifiers$1.element, trimTrailingNulls(parameters));
          } else {
            this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers$1.elementContainerStart : Identifiers$1.elementStart, trimTrailingNulls(parameters));

            if (isNonBindableMode) {
              this.creationInstruction(element.sourceSpan, Identifiers$1.disableBindings);
            } // process i18n element attributes


            if (i18nAttrs.length) {
              var hasBindings = false;
              var i18nAttrArgs = [];
              var bindings = [];
              i18nAttrs.forEach(function (attr) {
                var message = attr.i18n;

                if (attr instanceof TextAttribute) {
                  i18nAttrArgs.push(literal(attr.name), _this179.i18nTranslate(message));
                } else {
                  var converted = attr.value.visit(_this179._valueConverter);

                  _this179.allocateBindingSlots(converted);

                  if (converted instanceof Interpolation) {
                    var placeholders = assembleBoundTextPlaceholders(message);
                    var params = placeholdersToParams(placeholders);
                    i18nAttrArgs.push(literal(attr.name), _this179.i18nTranslate(message, params));
                    converted.expressions.forEach(function (expression) {
                      hasBindings = true;
                      bindings.push({
                        sourceSpan: element.sourceSpan,
                        value: function value() {
                          return _this179.convertExpressionBinding(expression);
                        }
                      });
                    });
                  }
                }
              });

              if (bindings.length) {
                this.updateInstructionChain(elementIndex, Identifiers$1.i18nExp, bindings);
              }

              if (i18nAttrArgs.length) {
                var index = literal(this.allocateDataSlot());
                var args = this.constantPool.getConstLiteral(literalArr(i18nAttrArgs), true);
                this.creationInstruction(element.sourceSpan, Identifiers$1.i18nAttributes, [index, args]);

                if (hasBindings) {
                  this.updateInstruction(elementIndex, element.sourceSpan, Identifiers$1.i18nApply, [index]);
                }
              }
            } // The style bindings code is placed into two distinct blocks within the template function AOT
            // code: creation and update. The creation code contains the `styling` instructions
            // which will apply the collected binding values to the element. `styling` is
            // designed to run inside of `elementStart` and `elementEnd`. The update instructions
            // (things like `styleProp`, `classProp`, etc..) are applied later on in this
            // file


            this.processStylingInstruction(elementIndex, stylingBuilder.buildStylingInstruction(element.sourceSpan, this.constantPool), true); // Generate Listeners (outputs)

            element.outputs.forEach(function (outputAst) {
              _this179.creationInstruction(outputAst.sourceSpan, Identifiers$1.listener, _this179.prepareListenerParameter(element.name, outputAst, elementIndex));
            }); // 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.sourceSpan, 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` and `stylingApply`
          // 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 += _instruction.allocateBindingSlots;
            this.processStylingInstruction(elementIndex, _instruction, false);
          } // 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 _value4 = input.value.visit(_this179._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 = _value4 instanceof LiteralPrimitive ? !!_value4.value : true;

                _this179.allocateBindingSlots(_value4);

                propertyBindings.push({
                  name: prepareSyntheticPropertyName(input.name),
                  sourceSpan: input.sourceSpan,
                  value: function value() {
                    return hasValue ? _this179.convertPropertyBinding(_value4) : 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 _value5 = input.value.visit(_this179._valueConverter);

              if (_value5 !== 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);
                  }
                }

                _this179.allocateBindingSlots(_value5);

                if (inputType === 0
                /* Property */
                ) {
                    if (_value5 instanceof Interpolation) {
                      // prop="{{value}}" and friends
                      _this179.interpolatedUpdateInstruction(getPropertyInterpolationExpression(_value5), elementIndex, attrName, input, _value5, 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 _this179.convertPropertyBinding(_value5);
                        },
                        params: params
                      });
                    }
                  } else if (inputType === 1
                /* Attribute */
                ) {
                    if (_value5 instanceof Interpolation && getInterpolationArgsLength(_value5) > 1) {
                      // attr.name="text{{value}}" and friends
                      _this179.interpolatedUpdateInstruction(getAttributeInterpolationExpression(_value5), elementIndex, attrName, input, _value5, params);
                    } else {
                      var boundValue = _value5 instanceof Interpolation ? _value5.expressions[0] : _value5; // [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 _this179.convertPropertyBinding(boundValue);
                        },
                        params: params
                      });
                    }
                  } else {
                  // class prop
                  _this179.updateInstruction(elementIndex, input.sourceSpan, Identifiers$1.classProp, function () {
                    return [literal(elementIndex), literal(attrName), _this179.convertPropertyBinding(_value5)].concat(params);
                  });
                }
              }
            }
          });

          if (propertyBindings.length > 0) {
            this.updateInstructionChain(elementIndex, Identifiers$1.property, propertyBindings);
          }

          if (attributeBindings.length > 0) {
            this.updateInstructionChain(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 = element.endSourceSpan || 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);
          }
        }
        /**
         * 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 _this180 = this;

          this.updateInstruction(elementIndex, input.sourceSpan, instruction, function () {
            return [literal(attrName)].concat(_toConsumableArray(_this180.getUpdateInstructionArguments(value)), _toConsumableArray(params));
          });
        }
      }, {
        key: "visitTemplate",
        value: function visitTemplate(template) {
          var _this181 = this;

          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 = [];
          template.attributes.forEach(function (a) {
            attrsExprs.push(asLiteral(a.name), asLiteral(a.value));
          });
          attrsExprs.push.apply(attrsExprs, _toConsumableArray(this.prepareNonRenderAttrs(template.inputs, template.outputs, undefined, template.templateAttrs)));
          parameters.push(this.toAttrsParam(attrsExprs)); // local refs (ex.: <ng-template #foo>)

          if (template.references && template.references.length) {
            parameters.push(this.prepareRefsParameter(template.references));
            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); // 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, _this181._ngContentReservedSlots.length + _this181._ngContentSelectorsOffset, template.i18n);

            _this181.constantPool.statements.push(templateFunctionExpr.toDeclStmt(templateName, null));

            if (templateVisitor._ngContentReservedSlots.length) {
              var _this181$_ngContentRe;

              (_this181$_ngContentRe = _this181._ngContentReservedSlots).push.apply(_this181$_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) {
            // Add the input bindings
            this.templatePropertyBindings(templateIndex, template.inputs); // Generate listeners for directive output

            template.outputs.forEach(function (outputAst) {
              _this181.creationInstruction(outputAst.sourceSpan, Identifiers$1.listener, _this181.prepareListenerParameter('ng_template', outputAst, templateIndex));
            });
          }
        }
      }, {
        key: "visitBoundText",
        value: function visitBoundText(text) {
          var _this182 = this;

          if (this.i18n) {
            var _value6 = text.value.visit(this._valueConverter);

            this.allocateBindingSlots(_value6);

            if (_value6 instanceof Interpolation) {
              this.i18n.appendBoundText(text.i18n);
              this.i18nAppendBindings(_value6.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.updateInstruction(nodeIndex, text.sourceSpan, getTextInterpolationExpression(value), function () {
              return _this182.getUpdateInstructionArguments(value);
            });
          } else {
            this.updateInstruction(nodeIndex, text.sourceSpan, Identifiers$1.textBinding, function () {
              return [_this182.convertPropertyBinding(value)];
            });
          }
        }
      }, {
        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 _this183 = this;

          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({}, vars, placeholders);

            var formatted = _this183.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: "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 _this184 = this;

          var propertyBindings = [];
          attrs.forEach(function (input) {
            if (input instanceof BoundAttribute) {
              var _value7 = input.value.visit(_this184._valueConverter);

              if (_value7 !== undefined) {
                _this184.allocateBindingSlots(_value7);

                propertyBindings.push({
                  name: input.name,
                  sourceSpan: input.sourceSpan,
                  value: function value() {
                    return _this184.convertPropertyBinding(_value7);
                  }
                });
              }
            }
          });

          if (propertyBindings.length > 0) {
            this.updateInstructionChain(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: "processStylingInstruction",
        value: function processStylingInstruction(elementIndex, instruction, createMode) {
          var _this185 = this;

          if (instruction) {
            if (createMode) {
              this.creationInstruction(instruction.sourceSpan, instruction.reference, function () {
                return instruction.params(function (value) {
                  return _this185.convertPropertyBinding(value);
                });
              });
            } else {
              this.updateInstruction(elementIndex, instruction.sourceSpan, instruction.reference, function () {
                return instruction.params(function (value) {
                  return instruction.supportsInterpolation && value instanceof Interpolation ? _this185.getUpdateInstructionArguments(value) : _this185.convertPropertyBinding(value);
                });
              });
            }
          }
        }
      }, {
        key: "creationInstruction",
        value: function creationInstruction(span, reference, paramsOrFn, prepend) {
          this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);
        }
      }, {
        key: "updateInstruction",
        value: function updateInstruction(nodeIndex, span, reference, paramsOrFn) {
          this.addSelectInstructionIfNecessary(nodeIndex, span);
          this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);
        }
      }, {
        key: "updateInstructionChain",
        value: function updateInstructionChain(nodeIndex, reference, bindings) {
          var span = bindings.length ? bindings[0].sourceSpan : null;
          this.addSelectInstructionIfNecessary(nodeIndex, span);

          this._updateCodeFns.push(function () {
            var calls = bindings.map(function (property) {
              var fnParams = [property.value()].concat(_toConsumableArray(property.params || []));

              if (property.name) {
                fnParams.unshift(literal(property.name));
              }

              return fnParams;
            });
            return chainedInstruction(reference, calls, span).toStmt();
          });
        }
      }, {
        key: "addSelectInstructionIfNecessary",
        value: function addSelectInstructionIfNecessary(nodeIndex, span) {
          if (this._lastNodeIndexWithFlush < nodeIndex) {
            if (nodeIndex > 0) {
              this.instructionFn(this._updateCodeFns, span, Identifiers$1.select, [literal(nodeIndex)]);
            }

            this._lastNodeIndexWithFlush = 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: "convertExpressionBinding",
        value: function convertExpressionBinding(value) {
          var convertedPropertyBinding = _convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.TrySimple);

          return convertedPropertyBinding.currValExpr;
        }
      }, {
        key: "convertPropertyBinding",
        value: function convertPropertyBinding(value) {
          var _this$_tempVariables;

          var convertedPropertyBinding = _convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext(), BindingForm.TrySimple, 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(tagName, elOrTpl) {
          var _this186 = this;

          if (this.directiveMatcher) {
            var selector = createCssSelector(tagName, getAttrsForDirectiveMatching(elOrTpl));
            this.directiveMatcher.match(selector, function (cssSelector, staticType) {
              _this186.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,
         *   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: "prepareNonRenderAttrs",
        value: function prepareNonRenderAttrs(inputs, outputs, styles) {
          var templateAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
          var i18nAttrs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
          var alreadySeen = new Set();
          var attrExprs = [];

          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 _i11 = 0; _i11 < outputs.length; _i11++) {
              var output = outputs[_i11];

              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 (i18nAttrs.length) {
            attrExprs.push(literal(6
            /* I18n */
            ));
            i18nAttrs.forEach(function (attr) {
              return addAttrExpr(attr.name);
            });
          }

          return attrExprs;
        }
      }, {
        key: "toAttrsParam",
        value: function toAttrsParam(attrsExprs) {
          return attrsExprs.length > 0 ? this.constantPool.getConstLiteral(literalArr(attrsExprs), true) : TYPED_NULL_EXPR;
        }
      }, {
        key: "prepareRefsParameter",
        value: function prepareRefsParameter(references) {
          var _this187 = this;

          if (!references || references.length === 0) {
            return TYPED_NULL_EXPR;
          }

          var refsParam = flatten(references.map(function (reference) {
            var slot = _this187.allocateDataSlot(); // Generate the update temporary.


            var variableName = _this187._bindingScope.freshReferenceName();

            var retrievalLevel = _this187.level;
            var lhs = variable(variableName);

            _this187._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 this.constantPool.getConstLiteral(asLiteral(refsParam), true);
        }
      }, {
        key: "prepareListenerParameter",
        value: function prepareListenerParameter(tagName, outputAst, index) {
          var _this188 = 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(_this188.templateName, "_").concat(tagName, "_").concat(bindingFnName, "_").concat(index, "_listener");

            var scope = _this188._bindingScope.nestedScope(_this188._bindingScope.bindingLevel);

            return prepareEventListenerParameters(outputAst, handlerName, scope);
          };
        }
      }]);

      return TemplateDefinitionBuilder;
    }();

    var ValueConverter = /*#__PURE__*/function (_AstMemoryEfficientTr) {
      _inherits(ValueConverter, _AstMemoryEfficientTr);

      var _super90 = _createSuper(ValueConverter);

      function ValueConverter(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {
        var _this189;

        _classCallCheck(this, ValueConverter);

        _this189 = _super90.call(this);
        _this189.constantPool = constantPool;
        _this189.allocateSlot = allocateSlot;
        _this189.allocatePureFunctionSlots = allocatePureFunctionSlots;
        _this189.definePipe = definePipe;
        _this189._pipeBindExprs = [];
        return _this189;
      } // 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, new ImplicitReceiver(pipe.span), 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, args)]) : this.visitAll(args);
          var pipeBindExpr = new FunctionCall(pipe.span, target, [new LiteralPrimitive(pipe.span, slot), new LiteralPrimitive(pipe.span, 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 _this190 = this;

          return new BuiltinFunctionCall(array.span, 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. Otherwise, just return an literal array that contains the values.
            var literal = literalArr(values);
            return values.every(function (a) {
              return a.isConstant();
            }) ? _this190.constantPool.getConstLiteral(literal, true) : getLiteralFactory(_this190.constantPool, literal, _this190.allocatePureFunctionSlots);
          });
        }
      }, {
        key: "visitLiteralMap",
        value: function visitLiteralMap(map, context) {
          var _this191 = this;

          return new BuiltinFunctionCall(map.span, 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. Otherwise, just return an literal array that contains the values.
            var literal = literalMap(values.map(function (value, index) {
              return {
                key: map.keys[index].key,
                value: value,
                quoted: map.keys[index].quoted
              };
            }));
            return values.every(function (a) {
              return a.isConstant();
            }) ? _this191.constantPool.getConstLiteral(literal, true) : getLiteralFactory(_this191.constantPool, literal, _this191.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);
      literalFactoryArguments.length > 0 || error("Expected arguments to a literal factory function");

      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;

        _classCallCheck(this, BindingScope);

        this.bindingLevel = bindingLevel;
        this.parent = parent;
        /** Keeps a map from local variables to their BindingData. */

        this.map = new Map();
        this.referenceNameIndex = 0;
        this.restoreViewVariable = null;
      }

      _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
          /* DEFAULT */
          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) {
          var newScope = new BindingScope(level, this);
          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 _this192 = 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 = _this192.bindingLevel - value.retrievalLevel;
            var currStmts = value.declareLocalCallback(_this192, 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: "ROOT_SCOPE",
        get: function get() {
          if (!BindingScope._ROOT_SCOPE) {
            BindingScope._ROOT_SCOPE = new BindingScope().set(0, '$event', variable('$event'));
          }

          return BindingScope._ROOT_SCOPE;
        }
      }]);

      return BindingScope;
    }();
    /**
     * Creates a `CssSelector` given a tag name and a map of attributes
     */


    function createCssSelector(tag, attributes) {
      var cssSelector = new CssSelector();
      cssSelector.setElement(tag);
      Object.getOwnPropertyNames(attributes).forEach(function (name) {
        var value = attributes[name];
        cssSelector.addAttribute(name, 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;
      var bindingParser = makeBindingParser(interpolationConfig);
      var htmlParser = new HtmlParser();
      var parseResult = htmlParser.parse(template, templateUrl, Object.assign({
        leadingTriviaChars: LEADING_TRIVIA_CHARS
      }, options, {
        tokenizeExpansionForms: true
      }));

      if (parseResult.errors && parseResult.errors.length > 0) {
        return {
          errors: parseResult.errors,
          nodes: [],
          styleUrls: [],
          styles: []
        };
      }

      var rootNodes = parseResult.rootNodes; // process i18n meta information (scan attributes, generate ids)
      // before we run whitespace removal process, because existing i18n
      // extraction process (ng xi18n) relies on a raw content to generate
      // message ids

      rootNodes = visitAll$1(new I18nMetaVisitor(interpolationConfig, !preserveWhitespaces), rootNodes);

      if (!preserveWhitespaces) {
        rootNodes = visitAll$1(new WhitespaceVisitor(), rootNodes); // run i18n meta visitor again in case we remove whitespaces, because
        // that might affect generated i18n message content. During this pass
        // i18n IDs generated at the first pass will be preserved, so we can mimic
        // existing extraction process (ng xi18n)

        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;

      if (errors && errors.length > 0) {
        return {
          errors: errors,
          nodes: [],
          styleUrls: [],
          styles: []
        };
      }

      return {
        nodes: nodes,
        styleUrls: styleUrls,
        styles: styles
      };
    }
    /**
     * 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 Parser$1(new Lexer()), interpolationConfig, new DomElementSchemaRegistry(), 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 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);
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 getStylingPrefix(name) {
      return name.substring(0, 5); // style or class
    }

    function baseDirectiveFields(meta, constantPool, bindingParser) {
      var definitionMap = new DefinitionMap(); // e.g. `type: MyDirective`

      definitionMap.set('type', meta.type); // e.g. `selectors: [['', 'someDir', '']]`

      definitionMap.set('selectors', createDirectiveSelector(meta.selector)); // e.g. `factory: () => new MyApp(directiveInject(ElementRef))`

      var result = compileFactoryFunction({
        name: meta.name,
        type: meta.type,
        deps: meta.deps,
        injectFn: Identifiers$1.directiveInject
      });
      definitionMap.set('factory', result.factory);

      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, elIndex) => { ... }


      definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.selector || '', meta.name)); // 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: definitionMap,
        statements: result.statements
      };
    }
    /**
     * 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.lifecycle.usesOnChanges) {
        features.push(importExpr(Identifiers$1.NgOnChangesFeature).callFn(EMPTY_ARRAY));
      }

      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 _baseDirectiveFields = baseDirectiveFields(meta, constantPool, bindingParser),
          definitionMap = _baseDirectiveFields.definitionMap,
          statements = _baseDirectiveFields.statements;

      addFeatures(definitionMap, meta);
      var expression = importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()]);

      if (!meta.selector) {
        throw new Error("Directive ".concat(meta.name, " has no selector, please add it!"));
      }

      var type = createTypeForDef(meta, Identifiers$1.DirectiveDefWithMeta);
      return {
        expression: expression,
        type: type,
        statements: statements
      };
    }
    /**
     * Compile a base definition for the render3 runtime as defined by {@link R3BaseRefMetadata}
     * @param meta the metadata used for compilation.
     */


    function compileBaseDefFromMetadata(meta, constantPool, bindingParser) {
      var definitionMap = new DefinitionMap();

      if (meta.inputs) {
        var inputs = meta.inputs;
        var inputsMap = Object.keys(inputs).map(function (key) {
          var v = inputs[key];
          var value = Array.isArray(v) ? literalArr(v.map(function (vx) {
            return literal(vx);
          })) : literal(v);
          return {
            key: key,
            value: value,
            quoted: false
          };
        });
        definitionMap.set('inputs', literalMap(inputsMap));
      }

      if (meta.outputs) {
        var outputs = meta.outputs;
        var outputsMap = Object.keys(outputs).map(function (key) {
          var value = literal(outputs[key]);
          return {
            key: key,
            value: value,
            quoted: false
          };
        });
        definitionMap.set('outputs', literalMap(outputsMap));
      }

      if (meta.viewQueries && meta.viewQueries.length > 0) {
        definitionMap.set('viewQuery', createViewQueriesFunction(meta.viewQueries, constantPool));
      }

      if (meta.queries && meta.queries.length > 0) {
        definitionMap.set('contentQueries', createContentQueriesFunction(meta.queries, constantPool));
      }

      if (meta.host) {
        definitionMap.set('hostBindings', createHostBindingsFunction(meta.host, meta.typeSourceSpan, bindingParser, constantPool, meta.name));
      }

      var expression = importExpr(Identifiers$1.defineBase).callFn([definitionMap.toLiteralMap()]);
      var type = new ExpressionType(importExpr(Identifiers$1.BaseDef),
      /* modifiers */
      null, [expressionType(meta.type)]);
      return {
        expression: expression,
        type: type
      };
    }
    /**
     * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.
     */


    function compileComponentFromMetadata(meta, constantPool, bindingParser) {
      var _baseDirectiveFields2 = baseDirectiveFields(meta, constantPool, bindingParser),
          definitionMap = _baseDirectiveFields2.definitionMap,
          statements = _baseDirectiveFields2.statements;

      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 _iterator14 = _createForOfIteratorHelper(meta.directives),
            _step14;

        try {
          for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
            var _step14$value = _step14.value,
                _selector = _step14$value.selector,
                _expression = _step14$value.expression;
            matcher.addSelectables(CssSelector.parse(_selector), _expression);
          }
        } catch (err) {
          _iterator14.e(err);
        } finally {
          _iterator14.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.ROOT_SCOPE, 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. `consts: 2`


      definitionMap.set('consts', literal(templateBuilder.getConstCount())); // e.g. `vars: 2`

      definitionMap.set('vars', literal(templateBuilder.getVarCount()));
      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 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));
      } // 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 || '').replace(/\n/g, '');
      var expression = importExpr(Identifiers$1.defineComponent).callFn([definitionMap.toLiteralMap()]);
      var type = createTypeForDef(meta, Identifiers$1.ComponentDefWithMeta);
      return {
        expression: expression,
        type: type,
        statements: statements
      };
    }
    /**
     * 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); // Create the partial class to be merged with the actual class.

      outputCtx.statements.push(new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []));
    }
    /**
     * 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({}, directiveMetadataFromGlobalMetadata(component, outputCtx, reflector), {
        selector: component.selector,
        template: {
          nodes: render3Ast.nodes
        },
        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); // Create the partial class to be merged with the actual class.

      outputCtx.statements.push(new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []));
    }
    /**
     * 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;
    } // Turn a directive selector into an R3-compatible selector for directive def


    function createDirectiveSelector(selector) {
      return asLiteral(parseSelectorToR3Selector(selector));
    }

    function convertAttributesToExpressions(attributes) {
      var values = [];

      var _iterator15 = _createForOfIteratorHelper(Object.getOwnPropertyNames(attributes)),
          _step15;

      try {
        for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
          var key = _step15.value;
          var value = attributes[key];
          values.push(literal(key), value);
        }
      } catch (err) {
        _iterator15.e(err);
      } finally {
        _iterator15.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 _iterator16 = _createForOfIteratorHelper(queries),
          _step16;

      try {
        for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
          var query = _step16.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.loadContentQuery()) && (ctx.someDir = tmp));

          var temporary = tempAllocator();
          var getQueryList = importExpr(Identifiers$1.loadContentQuery).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) {
        _iterator16.e(err);
      } finally {
        _iterator16.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 createTypeForDef(meta, typeBase) {
      // 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 || '').replace(/\n/g, '');
      return expressionType(importExpr(typeBase, [typeWithParameters(meta.type, meta.typeArgumentCount), stringAsType(selectorForType), 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.loadViewQuery()) && (ctx.someDir = tmp));

        var temporary = tempAllocator();
        var getQueryList = importExpr(Identifiers$1.loadViewQuery).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) {
      // Initialize hostVarsCount to number of bound host properties (interpolations illegal)
      var hostVarsCount = Object.keys(hostBindingsMetadata.properties).length;
      var elVarExp = variable('elIndex');
      var bindingContext = variable(CONTEXT_NAME);
      var styleBuilder = new StylingBuilder(elVarExp, 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 totalHostVarsCount = hostVarsCount;
      var hostBindingSourceSpan = typeSourceSpan;
      var directiveSummary = metadataAsSummary(hostBindingsMetadata);
      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;
      }; // 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 propertyBindings = [];
      var attributeBindings = [];
      var syntheticHostBindings = [];
      bindings && bindings.forEach(function (binding) {
        var name = binding.name;
        var stylingInputWasSet = styleBuilder.registerInputBasedOnName(name, binding.expression, binding.sourceSpan);

        if (!stylingInputWasSet) {
          // resolve literal arrays and literal objects
          var value = binding.expression.visit(getValueConverter());
          var bindingExpr = bindingFn(bindingContext, value);

          var _getBindingNameAndIns = getBindingNameAndInstruction(binding),
              bindingName = _getBindingNameAndIns.bindingName,
              _instruction2 = _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 (_instruction2 === Identifiers$1.hostProperty) {
            propertyBindings.push(instructionParams);
          } else if (_instruction2 === Identifiers$1.attribute) {
            attributeBindings.push(instructionParams);
          } else if (_instruction2 === Identifiers$1.updateSyntheticHostBinding) {
            syntheticHostBindings.push(instructionParams);
          } else {
            updateStatements.push(importExpr(_instruction2).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.updateSyntheticHostBinding, 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);
      var hostInstruction = styleBuilder.buildHostAttrsInstruction(null, hostAttrs, constantPool);

      if (hostInstruction) {
        createStatements.push(createStylingStmt(hostInstruction, bindingContext, bindingFn));
      }

      if (styleBuilder.hasBindings) {
        // singular style/class bindings (things like `[style.prop]` and `[class.name]`)
        // MUST be registered on a given element within the component/directive
        // templateFn/hostBindingsFn functions. The instruction below will figure out
        // what all the bindings are and then generate the statements required to register
        // those bindings to the element via `styling`.
        var stylingInstruction = styleBuilder.buildStylingInstruction(null, constantPool);

        if (stylingInstruction) {
          createStatements.push(createStylingStmt(stylingInstruction, bindingContext, bindingFn));
        } // 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) {
          // 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(instruction.allocateBindingSlots - 1, 0);
          updateStatements.push(createStylingStmt(instruction, bindingContext, bindingFn));
        });
      }

      if (totalHostVarsCount) {
        createStatements.unshift(importExpr(Identifiers$1.allocHostVars).callFn([literal(totalHostVarsCount)]).toStmt());
      }

      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), new FnParam(elVarExp.name, NUMBER_TYPE)], statements, INFERRED_TYPE, null, hostBindingsFnName);
      }

      return null;
    }

    function bindingFn(implicit, value) {
      return _convertPropertyBinding(null, implicit, value, 'b', BindingForm.TrySimple, function () {
        return error('Unexpected interpolation');
      });
    }

    function createStylingStmt(instruction, bindingContext, bindingFn) {
      var params = instruction.params(function (value) {
        return bindingFn(bindingContext, value).currValExpr;
      });
      return importExpr(instruction.reference, null, instruction.sourceSpan).callFn(params, instruction.sourceSpan).toStmt();
    }

    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.updateSyntheticHostBinding;
        } else {
          instruction = Identifiers$1.hostProperty;
        }
      }

      return {
        bindingName: bindingName,
        instruction: instruction,
        isAttribute: !!attrMatches
      };
    }

    function createHostListeners(eventBindings, name) {
      return eventBindings.map(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);
        var instruction = binding.type == 1
        /* Animation */
        ? Identifiers$1.componentHostSyntheticListener : Identifiers$1.listener;
        return importExpr(instruction).callFn(params).toStmt();
      });
    }

    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 (_ref32) {
        var _ref33 = _slicedToArray(_ref32, 2),
            key = _ref33[0],
            type = _ref33[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 _i12 = 0, _Object$keys3 = Object.keys(host); _i12 < _Object$keys3.length; _i12++) {
        var key = _Object$keys3[_i12];
        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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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.ResourceLoader = ResourceLoader;
        this.elementSchemaRegistry = new DomElementSchemaRegistry();
      }

      _createClass2(CompilerFacadeImpl, [{
        key: "compilePipe",
        value: function compilePipe(angularCoreEnv, sourceMapUrl, facade) {
          var res = compilePipeFromMetadata({
            name: facade.name,
            type: new WrappedNodeExpr(facade.type),
            typeArgumentCount: facade.typeArgumentCount,
            deps: convertR3DependencyMetadataArray(facade.deps),
            pipeName: facade.pipeName,
            pure: facade.pure
          });
          return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, res.statements);
        }
      }, {
        key: "compileInjectable",
        value: function compileInjectable(angularCoreEnv, sourceMapUrl, facade) {
          var _compileInjectable2 = _compileInjectable({
            name: facade.name,
            type: 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),
            ctorDeps: convertR3DependencyMetadataArray(facade.ctorDeps),
            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: 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: new WrappedNodeExpr(facade.type),
            bootstrap: facade.bootstrap.map(wrapReference),
            declarations: facade.declarations.map(wrapReference),
            imports: facade.imports.map(wrapReference),
            exports: facade.exports.map(wrapReference),
            emitInline: true,
            containsForwardDecls: false,
            schemas: facade.schemas ? facade.schemas.map(wrapReference) : 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);
          var preStatements = [].concat(_toConsumableArray(constantPool.statements), _toConsumableArray(res.statements));
          return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, preStatements);
        }
      }, {
        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 !== undefined) {
            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 res = compileComponentFromMetadata(Object.assign({}, facade, convertDirectiveFacadeToMetadata(facade), {
            selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(),
            template: template,
            wrapDirectivesAndPipesInClosure: false,
            styles: facade.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
          }), constantPool, makeBindingParser(interpolationConfig));
          var preStatements = [].concat(_toConsumableArray(constantPool.statements), _toConsumableArray(res.statements));
          return this.jitExpression(res.expression, angularCoreEnv, "ng:///".concat(facade.name, ".js"), preStatements);
        }
      }, {
        key: "compileBase",
        value: function compileBase(angularCoreEnv, sourceMapUrl, facade) {
          var constantPool = new ConstantPool();
          var typeSourceSpan = this.createParseSourceSpan('Base', facade.name, "ng:///".concat(facade.name, ".js"));
          var meta = Object.assign({}, facade, {
            typeSourceSpan: typeSourceSpan,
            viewQueries: facade.viewQueries ? facade.viewQueries.map(convertToR3QueryMetadata) : facade.viewQueries,
            queries: facade.queries ? facade.queries.map(convertToR3QueryMetadata) : facade.queries,
            host: extractHostBindings(facade.propMetadata, typeSourceSpan)
          });
          var res = compileBaseDefFromMetadata(meta, constantPool, makeBindingParser());
          return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.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 = function wrapReference(value) {
      var wrapped = new WrappedNodeExpr(value);
      return {
        value: wrapped,
        type: wrapped
      };
    };

    function convertToR3QueryMetadata(facade) {
      return 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({}, facade, {
        typeSourceSpan: facade.typeSourceSpan,
        type: new WrappedNodeExpr(facade.type),
        deps: convertR3DependencyMetadataArray(facade.deps),
        host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host),
        inputs: Object.assign({}, inputsFromMetadata, inputsFromType),
        outputs: Object.assign({}, outputsFromMetadata, outputsFromType),
        queries: facade.queries.map(convertToR3QueryMetadata),
        providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
        viewQueries: facade.viewQueries.map(convertToR3QueryMetadata)
      });
    }

    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,
        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$map5 = value.split(',').map(function (piece) {
          return piece.trim();
        }),
            _value$split$map6 = _slicedToArray(_value$split$map5, 2),
            field = _value$split$map6[0],
            property = _value$split$map6[1];

        map[field] = property || field;
        return map;
      }, {});
    }

    function publishFacade(global) {
      var ng = global.ng || (global.ng = {});
      ng.ɵcompilerFacade = new CompilerFacadeImpl();
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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('8.2.14');
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref34$defaultEncapsu = _ref34.defaultEncapsulation,
          defaultEncapsulation = _ref34$defaultEncapsu === void 0 ? ViewEncapsulation.Emulated : _ref34$defaultEncapsu,
          _ref34$useJit = _ref34.useJit,
          useJit = _ref34$useJit === void 0 ? true : _ref34$useJit,
          _ref34$jitDevMode = _ref34.jitDevMode,
          jitDevMode = _ref34$jitDevMode === void 0 ? false : _ref34$jitDevMode,
          _ref34$missingTransla = _ref34.missingTranslation,
          missingTranslation = _ref34$missingTransla === void 0 ? null : _ref34$missingTransla,
          preserveWhitespaces = _ref34.preserveWhitespaces,
          strictInjectionParameters = _ref34.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 Inc. All Rights Reserved.
     *
     * Use 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 _this193 = this;

          if (!normalizedDirective.isComponent) {
            return;
          }

          var template = normalizedDirective.template;

          this._resourceLoaderCache["delete"](template.templateUrl);

          template.externalStylesheets.forEach(function (stylesheet) {
            _this193._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 _this194 = 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 _this194._normalizeTemplateMetadata(prenormData, preparsedTemplate);
          });
        }
      }, {
        key: "_preParseTemplate",
        value: function _preParseTemplate(prenomData) {
          var _this195 = 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 _this195._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 _this196 = this;

          return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) {
            return _this196._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets);
          });
        }
      }, {
        key: "_normalizeLoadedTemplateMetadata",
        value: function _normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, stylesheets) {
          var _this197 = 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);

            _this197._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 _this198 = this;

          styleUrls.forEach(function (styleUrl) {
            var stylesheet = stylesheets.get(styleUrl);
            stylesheet.styles.forEach(function (style) {
              return targetStyles.push(style);
            });

            _this198._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);
          });
        }
      }, {
        key: "_loadMissingExternalStylesheets",
        value: function _loadMissingExternalStylesheets(styleUrls) {
          var _this199 = 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(_this199._fetch(styleUrl), function (loadedStyle) {
              var stylesheet = _this199._normalizeStylesheet(new CompileStylesheetMetadata({
                styles: [loadedStyle],
                moduleUrl: styleUrl
              }));

              loadedStylesheets.set(styleUrl, stylesheet);
              return _this199._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);
            });
          })), function (_) {
            return loadedStylesheets;
          });
        }
      }, {
        key: "_normalizeStylesheet",
        value: function _normalizeStylesheet(stylesheet) {
          var _this200 = this;

          var moduleUrl = stylesheet.moduleUrl;
          var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable).map(function (url) {
            return _this200._urlResolver.resolve(moduleUrl, url);
          });
          var allStyles = stylesheet.styles.map(function (style) {
            var styleWithImports = extractStyleUrls(_this200._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 Inc. All Rights Reserved.
     *
     * Use 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({}, directive.host, host) : host;
          var mergedQueries = directive.queries ? 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 Inc. All Rights Reserved.
     *
     * Use 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 _super91 = _createSuper(I18nError);

      function I18nError(span, msg) {
        _classCallCheck(this, I18nError);

        return _super91.call(this, span, msg);
      }

      return I18nError;
    }(ParseError);
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _this201 = this;

          this._init(_VisitorMode.Extract, interpolationConfig);

          nodes.forEach(function (node) {
            return node.visit(_this201, 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 _this202 = 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(_this202, context);

              if (visited && !_this202._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 _this203 = 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) {
              _this203._addMessage([attr], explicitAttrNameToValue[attr.name]);
            } else if (implicitAttrNames.some(function (name) {
              return attr.name === name;
            })) {
              _this203._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 _this204 = 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 = _this204._createI18nMessage([attr], meaning, description, id);

              var nodes = _this204._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 {
                  _this204._reportError(el, "Unexpected translation for attribute \"".concat(attr.name, "\" (id=\"").concat(id || _this204._translations.digest(message), "\")"));
                }
              } else {
                _this204._reportError(el, "Translation unavailable for attribute \"".concat(attr.name, "\" (id=\"").concat(id || _this204._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: "_closeTranslatableSection",

        /**
         * 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)
         */
        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));
        }
      }, {
        key: "_isInTranslatableSection",
        get: function get() {
          return this._msgCountAtSectionStart !== void 0;
        }
      }]);

      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 _ref35 = idIndex > -1 ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''],
          _ref36 = _slicedToArray(_ref35, 2),
          meaningAndDesc = _ref36[0],
          id = _ref36[1];

      var _ref37 = descIndex > -1 ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] : ['', meaningAndDesc],
          _ref38 = _slicedToArray(_ref37, 2),
          meaning = _ref38[0],
          description = _ref38[1];

      return {
        meaning: meaning,
        description: description,
        id: id
      };
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.contentType = TagContentType.PARSABLE_DATA;
        this.isVoid = false;
        this.ignoreFirstLf = false;
        this.canSelfClose = true;
      }

      _createClass2(XmlTagDefinition, [{
        key: "requireExtraParent",
        value: function requireExtraParent(currentParent) {
          return false;
        }
      }, {
        key: "isClosedByChild",
        value: function isClosedByChild(name) {
          return false;
        }
      }]);

      return XmlTagDefinition;
    }();

    var _TAG_DEFINITION = new XmlTagDefinition();

    function getXmlTagDefinition(tagName) {
      return _TAG_DEFINITION;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _super92 = _createSuper(XmlParser);

      function XmlParser() {
        _classCallCheck(this, XmlParser);

        return _super92.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 Inc. All Rights Reserved.
     *
     * Use 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'; // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html
    // http://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 _super93 = _createSuper(Xliff);

      function Xliff() {
        _classCallCheck(this, Xliff);

        return _super93.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 _this205 = this;

          var nodes = [];
          container.children.forEach(function (node) {
            return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this205)));
          });
          return nodes;
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this206 = 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(_this206)), [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 _ref39,
              _this207 = this;

          return (_ref39 = []).concat.apply(_ref39, _toConsumableArray(nodes.map(function (node) {
            return node.visit(_this207);
          })));
        }
      }]);

      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 _ref40;

          var xmlIcu = new XmlParser().parse(message, url, {
            tokenizeExpansionForms: true
          });
          this._errors = xmlIcu.errors;
          var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref40 = []).concat.apply(_ref40, _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 _ref41;

            return (_ref41 = []).concat.apply(_ref41, _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 Inc. All Rights Reserved.
     *
     * Use 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'; // http://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 _super94 = _createSuper(Xliff2);

      function Xliff2() {
        _classCallCheck(this, Xliff2);

        return _super94.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 _this208 = this;

          var nodes = [];
          container.children.forEach(function (node) {
            return nodes.push.apply(nodes, _toConsumableArray(node.visit(_this208)));
          });
          return nodes;
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this209 = 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(_this209)), [new Text$2("} ")]));
          });
          nodes.push(new Text$2("}"));
          return nodes;
        }
      }, {
        key: "visitTagPlaceholder",
        value: function visitTagPlaceholder(ph, context) {
          var _ref42,
              _this210 = 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 = (_ref42 = []).concat.apply(_ref42, _toConsumableArray(ph.children.map(function (node) {
            return node.visit(_this210);
          })));

          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 _ref43,
              _this211 = this;

          this._nextPlaceholderId = 0;
          return (_ref43 = []).concat.apply(_ref43, _toConsumableArray(nodes.map(function (node) {
            return node.visit(_this211);
          })));
        }
      }]);

      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 _ref44;

          var xmlIcu = new XmlParser().parse(message, url, {
            tokenizeExpansionForms: true
          });
          this._errors = xmlIcu.errors;
          var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ? [] : (_ref44 = []).concat.apply(_ref44, _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 _this212 = this,
              _ref45;

          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(_this212, null);
                })), [new Placeholder('', endId, el.sourceSpan)]));
              }

              break;

            case _MARKER_TAG$1:
              return (_ref45 = []).concat.apply(_ref45, _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 _ref46;

          return {
            value: icuCase.value,
            nodes: (_ref46 = []).concat.apply(_ref46, _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 Inc. All Rights Reserved.
     *
     * Use 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 _super95 = _createSuper(Xtb);

      function Xtb() {
        _classCallCheck(this, Xtb);

        return _super95.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 Inc. All Rights Reserved.
     *
     * Use 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",
        // Returns the translation as HTML nodes from the given source message.
        value: 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 _this213 = this;

          return container.children.map(function (n) {
            return n.visit(_this213);
          }).join('');
        }
      }, {
        key: "visitIcu",
        value: function visitIcu(icu, context) {
          var _this214 = this;

          var cases = Object.keys(icu.cases).map(function (k) {
            return "".concat(k, " {").concat(icu.cases[k].visit(_this214), "}");
          }); // 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] : 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];
          }

          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 _this215 = 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(_this215);
          }).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 _this216 = 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(_this216);
          }).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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _this217 = this;

          return literalArr(arr.map(function (value) {
            return visitValue(value, _this217, null);
          }), type);
        }
      }, {
        key: "visitStringMap",
        value: function visitStringMap(map, type) {
          var _this218 = 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], _this218, 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 Inc. All Rights Reserved.
     *
     * Use 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 _this219 = 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 === _this219.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('ngInjectableDef', INFERRED_TYPE, [StmtModifier.Static], this.injectableDef(injectable, ctx))], [], new ClassMethod(null, [], []), []);
            ctx.statements.push(clazz);
          }
        }
      }]);

      return InjectableCompiler;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _this220 = 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) {
              _this220.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);
            }

            _this220._directiveCache.set(directiveType, normalizedDirMeta);

            _this220._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 _this221 = 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 _this221._getEntryComponentMetadata(type);
              }).concat(entryComponentMetadata);
            }

            if (!selector) {
              selector = this._schemaRegistry.getDefaultComponentElementName();
            }
          } else {
            // Directive
            if (!selector) {
              this._reportError(syntaxError("Directive ".concat(stringifyType(directiveType), " has no selector, please add it!")), directiveType);

              selector = 'error';
            }
          }

          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: "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 _this222 = 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 = _this222.loadDirectiveMetadata(moduleType, id.reference, isSync);

              if (promise) {
                loading.push(promise);
              }
            });
            ngModule.declaredPipes.forEach(function (id) {
              return _this222._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 _this223 = 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(_this223._getProvidersMetadata(moduleWithProviders.providers, entryComponents, "provider for the NgModule '".concat(stringifyType(importedModuleType), "'"), [], importedType)));
                }
              }

              if (importedModuleType) {
                if (_this223._checkSelfImport(moduleType, importedModuleType)) return;
                if (!alreadyCollecting) alreadyCollecting = new Set();

                if (alreadyCollecting.has(importedModuleType)) {
                  _this223._reportError(syntaxError("".concat(_this223._getTypeDescriptor(importedModuleType), " '").concat(stringifyType(importedType), "' is imported recursively by the module '").concat(stringifyType(moduleType), "'.")), moduleType);

                  return;
                }

                alreadyCollecting.add(importedModuleType);

                var importedModuleSummary = _this223.getNgModuleSummary(importedModuleType, alreadyCollecting);

                alreadyCollecting["delete"](importedModuleType);

                if (!importedModuleSummary) {
                  _this223._reportError(syntaxError("Unexpected ".concat(_this223._getTypeDescriptor(importedType), " '").concat(stringifyType(importedType), "' imported by the module '").concat(stringifyType(moduleType), "'. Please add a @NgModule annotation.")), moduleType);

                  return;
                }

                importedModules.push(importedModuleSummary);
              } else {
                _this223._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)) {
                _this223._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)) {
                _this223._reportError(syntaxError("".concat(_this223._getTypeDescriptor(exportedType), " '").concat(stringify(exportedType), "' is exported recursively by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                return;
              }

              alreadyCollecting.add(exportedType);

              var exportedModuleSummary = _this223.getNgModuleSummary(exportedType, alreadyCollecting);

              alreadyCollecting["delete"](exportedType);

              if (exportedModuleSummary) {
                exportedModules.push(exportedModuleSummary);
              } else {
                exportedNonModuleIdentifiers.push(_this223._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)) {
                _this223._reportError(syntaxError("Unexpected value '".concat(stringifyType(declaredType), "' declared by the module '").concat(stringifyType(moduleType), "'")), moduleType);

                return;
              }

              var declaredIdentifier = _this223._getIdentifierMetadata(declaredType);

              if (_this223.isDirective(declaredType)) {
                transitiveModule.addDirective(declaredIdentifier);
                declaredDirectives.push(declaredIdentifier);

                _this223._addTypeToModule(declaredType, moduleType);
              } else if (_this223.isPipe(declaredType)) {
                transitiveModule.addPipe(declaredIdentifier);
                transitiveModule.pipes.push(declaredIdentifier);
                declaredPipes.push(declaredIdentifier);

                _this223._addTypeToModule(declaredType, moduleType);
              } else {
                _this223._reportError(syntaxError("Unexpected ".concat(_this223._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 {
              _this223._reportError(syntaxError("Can't export ".concat(_this223._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 _this223._getEntryComponentMetadata(type);
            })));
          }

          if (meta.bootstrap) {
            flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {
              if (!isValidType(type)) {
                _this223._reportError(syntaxError("Unexpected value '".concat(stringifyType(type), "' used in the bootstrap property of module '").concat(stringifyType(moduleType), "'")), moduleType);

                return;
              }

              bootstrapComponents.push(_this223._getIdentifierMetadata(type));
            });
          }

          entryComponents.push.apply(entryComponents, _toConsumableArray(bootstrapComponents.map(function (type) {
            return _this223._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 _this224 = 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: _this224._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);
            } else {
              this._console.warn("Warning: ".concat(message, " This will become an error in Angular v6.x"));
            }
          }

          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 _this225 = 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)) {
              _this225._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);
            } else {
              provider = resolveForwardRef(provider);
              var providerMeta = undefined;

              if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {
                _this225._validateProvider(provider);

                providerMeta = new ProviderMeta(provider.provide, provider);
              } else if (isValidType(provider)) {
                providerMeta = new ProviderMeta(provider, {
                  useClass: provider
                });
              } else if (provider === void 0) {
                _this225._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(', ');

                _this225._reportError(syntaxError("Invalid ".concat(debugInfo ? debugInfo : 'provider', " - only instances of Provider and Type are allowed, got: [").concat(providersInfo, "]")), type);

                return;
              }

              if (providerMeta.token === _this225._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {
                targetEntryComponents.push.apply(targetEntryComponents, _toConsumableArray(_this225._getEntryComponentsFromProvider(providerMeta, type)));
              } else {
                compileProviders.push(_this225.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 _this226 = 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 = _this226._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 _this227 = this;

          var res = [];
          Object.keys(queries).forEach(function (propertyName) {
            var query = queries[propertyName];

            if (query.isViewQuery === isViewQuery) {
              res.push(_this227._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 _this228 = this;

          var selectors;

          if (typeof q.selector === 'string') {
            selectors = this._queryVarBindings(q.selector).map(function (varName) {
              return _this228._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 _super96 = _createSuper(_CompileValueConverter);

      function _CompileValueConverter() {
        _classCallCheck(this, _CompileValueConverter);

        return _super96.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 Inc. All Rights Reserved.
     *
     * Use 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 _ref47 = providerAst.multiProvider ? multiProviderDef(ctx, flags, providerAst.providers) : singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]),
          providerExpr = _ref47.providerExpr,
          providerFlags = _ref47.flags,
          depsExpr = _ref47.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 Inc. All Rights Reserved.
     *
     * Use 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 (_ref48) {
            var providerExpr = _ref48.providerExpr,
                depsExpr = _ref48.depsExpr,
                flags = _ref48.flags,
                tokenExpr = _ref48.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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _debugFilePath = '/debug/lib';

    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 _super97 = _createSuper(_TsEmitterVisitor);

      function _TsEmitterVisitor(referenceFilter, importFilter) {
        var _this229;

        _classCallCheck(this, _TsEmitterVisitor);

        _this229 = _super97.call(this, false);
        _this229.referenceFilter = referenceFilter;
        _this229.importFilter = importFilter;
        _this229.typeExpression = 0;
        _this229.importsWithPrefixes = new Map();
        _this229.reexports = new Map();
        return _this229;
      }

      _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 _this230 = 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 _this230._visitClassField(field, ctx);
          });

          if (stmt.constructorMethod != null) {
            this._visitClassConstructor(stmt, ctx);
          }

          stmt.getters.forEach(function (getter) {
            return _this230._visitClassGetter(getter, ctx);
          });
          stmt.methods.forEach(function (method) {
            return _this230._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 _this231 = this;

          ast.value.visitExpression(this, ctx);

          if (ast.typeParams !== null) {
            ctx.print(null, '<');
            this.visitAllObjects(function (type) {
              return _this231.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 _this232 = this;

          this.visitAllObjects(function (param) {
            ctx.print(null, param.name);

            _this232._printColonType(param.type, ctx);
          }, params, ctx, ',');
        }
      }, {
        key: "_visitIdentifier",
        value: function _visitIdentifier(value, typeParams, ctx) {
          var _this233 = 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(_this233, 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _this234 = 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(_this234.options, _this234.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 _iterator17 = _createForOfIteratorHelper(ast.directives),
              _step17;

          try {
            for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {
              var directive = _step17.value;

              var _iterator18 = _createForOfIteratorHelper(directive.inputs),
                  _step18;

              try {
                for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {
                  var input = _step18.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
                      }
                    });
                  }
                }
              } catch (err) {
                _iterator18.e(err);
              } finally {
                _iterator18.f();
              }
            }
          } catch (err) {
            _iterator17.e(err);
          } finally {
            _iterator17.f();
          }

          return result;
        }
      }, {
        key: "visitAll",
        value: function visitAll(variables, astNodes) {
          this.variables = variables;
          templateVisitAll(this, astNodes);
        }
      }, {
        key: "build",
        value: function build(componentId) {
          var _this235 = 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 _this235$preprocessUp = _this235.preprocessUpdateExpression(expression),
                sourceSpan = _this235$preprocessUp.sourceSpan,
                context = _this235$preprocessUp.context,
                value = _this235$preprocessUp.value;

            var bindingId = "".concat(bindingCount++);
            var nameResolver = context === _this235.component ? _this235 : defaultResolver;

            var _convertPropertyBindi = _convertPropertyBinding(nameResolver, variable(_this235.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 (_ref49) {
            var _viewStmts2;

            var sourceSpan = _ref49.sourceSpan,
                context = _ref49.context,
                value = _ref49.value;
            var bindingId = "".concat(bindingCount++);
            var nameResolver = context === _this235.component ? _this235 : defaultResolver;

            var _convertActionBinding = convertActionBinding(nameResolver, variable(_this235.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 _iterator19 = _createForOfIteratorHelper(this.guards),
                _step19;

            try {
              for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {
                var guard = _step19.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) {
              _iterator19.e(err);
            } finally {
              _iterator19.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 _this236 = this;

          var astWithSource = ast.value;
          var inter = astWithSource.ast;
          inter.expressions.forEach(function (expr) {
            return _this236.updates.push({
              context: _this236.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 _this237 = this;

          this.visitElementOrTemplate(ast);
          var inputDefs = [];
          var updateRendererExpressions = [];
          var outputDefs = [];
          ast.inputs.forEach(function (inputAst) {
            _this237.updates.push({
              context: _this237.component,
              value: inputAst.value,
              sourceSpan: inputAst.sourceSpan
            });
          });
          templateVisitAll(this, ast.children);
        }
      }, {
        key: "visitElementOrTemplate",
        value: function visitElementOrTemplate(ast) {
          var _this238 = this;

          ast.directives.forEach(function (dirAst) {
            _this238.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 && _this238.options.fullTemplateTypeCheck) {
              outputVarType = ref.value.identifier.reference;
            } else {
              outputVarType = BuiltinTypeName.Dynamic;
            }

            _this238.refOutputVars.set(ref.name, outputVarType);
          });
          ast.outputs.forEach(function (outputAst) {
            _this238.actions.push({
              context: _this238.component,
              value: outputAst.handler,
              sourceSpan: outputAst.sourceSpan
            });
          });
        }
      }, {
        key: "visitDirective",
        value: function visitDirective(dirAst) {
          var _this239 = this;

          var dirType = dirAst.directive.type.reference;
          dirAst.inputs.forEach(function (input) {
            return _this239.updates.push({
              context: _this239.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 _this239.updates.push({
                context: dirType,
                value: inputAst.value,
                sourceSpan: inputAst.sourceSpan
              });
            });
            dirAst.hostEvents.forEach(function (hostEventAst) {
              return _this239.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 _this240 = 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 _this240.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 _this240.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 = _this240.options.fullTemplateTypeCheck ? variable(_this240.pipeOutputVar(name)) : variable(_this240.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 Inc. All Rights Reserved.
     *
     * Use 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 _this241 = this,
              _outputCtx$statements;

          var embeddedViewCount = 0;
          var staticQueryIds = findStaticQueryIds(template);
          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(_this241._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, 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, staticQueryIds, viewBuilderFactory) {
        _classCallCheck(this, ViewBuilder$1);

        this.reflector = reflector;
        this.outputCtx = outputCtx;
        this.parent = parent;
        this.component = component;
        this.embeddedViewIndex = embeddedViewIndex;
        this.usedPipes = usedPipes;
        this.staticQueryIds = staticQueryIds;
        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 _this242 = 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) {
                _this242.purePipeNodeIndices[pipe.name] = _this242._createPipe(null, pipe);
              }
            });
          }

          if (!this.parent) {
            var queryIds = staticViewQueryIds(this.staticQueryIds);
            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(queryIds, queryId, query);

              _this242.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 _this243 = 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 _this243._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 _this244 = 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), _this244._createElementHandleEventFn(nodeIndex, hostEvents), variable(childVisitor.viewName)])
            };
          };
        }
      }, {
        key: "visitElement",
        value: function visitElement(ast, context) {
          var _this245 = 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 _this245._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 (_ref50) {
              var _ref51 = _slicedToArray(_ref50, 2),
                  target = _ref51[0],
                  eventName = _ref51[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, _this245._createElementHandleEventFn(nodeIndex, hostEvents), compView, compRendererType]),
              updateRenderer: updateRendererExpressions
            };
          };
        }
      }, {
        key: "_visitElementOrTemplate",
        value: function _visitElementOrTemplate(nodeIndex, ast) {
          var _this246 = 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, providerIndex) {
            var dirAst = undefined;
            var dirIndex = undefined;
            ast.directives.forEach(function (localDirAst, i) {
              if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {
                dirAst = localDirAst;
                dirIndex = i;
              }
            });

            if (dirAst) {
              var _this246$_visitDirect = _this246._visitDirective(providerAst, dirAst, dirIndex, nodeIndex, ast.references, ast.queryMatches, usedEvents, _this246.staticQueryIds.get(ast)),
                  dirHostBindings = _this246$_visitDirect.hostBindings,
                  dirHostEvents = _this246$_visitDirect.hostEvents;

              hostBindings.push.apply(hostBindings, _toConsumableArray(dirHostBindings));
              hostEvents.push.apply(hostEvents, _toConsumableArray(dirHostEvents));
            } else {
              _this246._visitProvider(providerAst, ast.queryMatches);
            }
          });
          var queryMatchExprs = [];
          ast.queryMatches.forEach(function (match) {
            var valueType = undefined;

            if (tokenReference(match.value) === _this246.reflector.resolveExternalReference(Identifiers.ElementRef)) {
              valueType = 0
              /* ElementRef */
              ;
            } else if (tokenReference(match.value) === _this246.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {
              valueType = 3
              /* ViewContainerRef */
              ;
            } else if (tokenReference(match.value) === _this246.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) === _this246.reflector.resolveExternalReference(Identifiers.TemplateRef)) {
              valueType = 2
              /* TemplateRef */
              ;
            }

            if (valueType != null) {
              _this246.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, directiveIndex, elementNodeIndex, refs, queryMatches, usedEvents, queryIds) {
          var _this247 = 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(queryIds, queryId, query);
            var bindingType = query.first ? 0
            /* First */
            : 1
            /* All */
            ;

            _this247.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)) {
              _this247.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 _this247._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) {
          var nodeIndex = this.nodes.length; // 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({}, 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 _this248 = 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(_this248.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), _this248.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 _this249 = this;

          return {
            nodeIndex: expression.nodeIndex,
            bindingIndex: expression.bindingIndex,
            sourceSpan: expression.sourceSpan,
            context: expression.context,
            value: convertPropertyBindingBuiltins({
              createLiteralArrayConverter: function createLiteralArrayConverter(argCount) {
                return _this249._createLiteralArrayConverter(expression.sourceSpan, argCount);
              },
              createLiteralMapConverter: function createLiteralMapConverter(keys) {
                return _this249._createLiteralMapConverter(expression.sourceSpan, keys);
              },
              createPipeConverter: function createPipeConverter(name, argCount) {
                return _this249._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 (_ref52) {
              var sourceSpan = _ref52.sourceSpan,
                  context = _ref52.context,
                  value = _ref52.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 _this250 = this;

          var handleEventStmts = [];
          var handleEventBindingCount = 0;
          handlers.forEach(function (_ref53) {
            var context = _ref53.context,
                eventAst = _ref53.eventAst,
                dirAst = _ref53.dirAst;
            var bindingId = "".concat(handleEventBindingCount++);
            var nameResolver = context === COMP_VAR ? _this250 : 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 findStaticQueryIds(nodes) {
      var result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map();
      nodes.forEach(function (node) {
        var staticQueryIds = new Set();
        var dynamicQueryIds = new Set();
        var queryMatches = undefined;

        if (node instanceof ElementAst) {
          findStaticQueryIds(node.children, result);
          node.children.forEach(function (child) {
            var childData = result.get(child);
            childData.staticQueryIds.forEach(function (queryId) {
              return staticQueryIds.add(queryId);
            });
            childData.dynamicQueryIds.forEach(function (queryId) {
              return dynamicQueryIds.add(queryId);
            });
          });
          queryMatches = node.queryMatches;
        } else if (node instanceof EmbeddedTemplateAst) {
          findStaticQueryIds(node.children, result);
          node.children.forEach(function (child) {
            var childData = result.get(child);
            childData.staticQueryIds.forEach(function (queryId) {
              return dynamicQueryIds.add(queryId);
            });
            childData.dynamicQueryIds.forEach(function (queryId) {
              return dynamicQueryIds.add(queryId);
            });
          });
          queryMatches = node.queryMatches;
        }

        if (queryMatches) {
          queryMatches.forEach(function (match) {
            return staticQueryIds.add(match.queryId);
          });
        }

        dynamicQueryIds.forEach(function (queryId) {
          return staticQueryIds["delete"](queryId);
        });
        result.set(node, {
          staticQueryIds: staticQueryIds,
          dynamicQueryIds: dynamicQueryIds
        });
      });
      return result;
    }

    function staticViewQueryIds(nodeStaticQueryIds) {
      var staticQueryIds = new Set();
      var dynamicQueryIds = new Set();
      Array.from(nodeStaticQueryIds.values()).forEach(function (entry) {
        entry.staticQueryIds.forEach(function (queryId) {
          return staticQueryIds.add(queryId);
        });
        entry.dynamicQueryIds.forEach(function (queryId) {
          return dynamicQueryIds.add(queryId);
        });
      });
      dynamicQueryIds.forEach(function (queryId) {
        return staticQueryIds["delete"](queryId);
      });
      return {
        staticQueryIds: staticQueryIds,
        dynamicQueryIds: dynamicQueryIds
      };
    }

    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(queryIds, queryId, query) {
      var flags = 0
      /* None */
      ; // Note: We only make queries static that query for a single item.
      // This is because of backwards compatibility with the old view compiler...

      if (query.first && shouldResolveAsStaticQuery(queryIds, queryId, query)) {
        flags |= 268435456
        /* StaticQuery */
        ;
      } else {
        flags |= 536870912
        /* DynamicQuery */
        ;
      }

      return flags;
    }

    function shouldResolveAsStaticQuery(queryIds, queryId, query) {
      // If query.static has been set by the user, use that value to determine whether
      // the query is static. If none has been set, sort the query into static/dynamic
      // based on query results (i.e. dynamic if CD needs to run to get all results).
      return query["static"] || query["static"] == null && (queryIds.staticQueryIds.has(queryId) || !queryIds.dynamicQueryIds.has(queryId));
    }

    function elementEventFullName(target, name) {
      return target ? "".concat(target, ":").concat(name) : name;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 _super98 = _createSuper(MapPlaceholderNames);

      function MapPlaceholderNames() {
        _classCallCheck(this, MapPlaceholderNames);

        return _super98.apply(this, arguments);
      }

      _createClass2(MapPlaceholderNames, [{
        key: "convert",
        value: function convert(nodes, mapper) {
          var _this251 = this;

          return mapper ? nodes.map(function (n) {
            return n.visit(_this251, mapper);
          }) : nodes;
        }
      }, {
        key: "visitTagPlaceholder",
        value: function visitTagPlaceholder(ph, mapper) {
          var _this252 = 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(_this252, mapper);
          });
          return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan);
        }
      }, {
        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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 _iterator20 = _createForOfIteratorHelper(moduleMeta.transitiveModule.providers),
          _step20;

      try {
        for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {
          var _step20$value = _step20.value,
              provider = _step20$value.provider,
              _module = _step20$value.module;

          if (tokenReference(provider.token) === reflector.ROUTES) {
            var loadChildren = _collectLoadChildren(provider.useValue);

            var _iterator21 = _createForOfIteratorHelper(loadChildren),
                _step21;

            try {
              for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {
                var route = _step21.value;
                allLazyRoutes.push(parseLazyRoute(route, reflector, _module.reference));
              }
            } catch (err) {
              _iterator21.e(err);
            } finally {
              _iterator21.f();
            }
          }
        }
      } catch (err) {
        _iterator20.e(err);
      } finally {
        _iterator20.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 _iterator22 = _createForOfIteratorHelper(routes),
            _step22;

        try {
          for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {
            var route = _step22.value;

            _collectLoadChildren(route, target);
          }
        } catch (err) {
          _iterator22.e(err);
        } finally {
          _iterator22.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 Inc. All Rights Reserved.
     *
     * Use 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();
        this.resolvedFilePaths = new Set(); // 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.
         *
         * @param fileName the file to invalidate
         */

      }, {
        key: "invalidateFile",
        value: function invalidateFile(fileName) {
          this.metadataCache["delete"](fileName);
          this.resolvedFilePaths["delete"](fileName);
          var symbols = this.symbolFromFile.get(fileName);

          if (symbols) {
            this.symbolFromFile["delete"](fileName);

            var _iterator23 = _createForOfIteratorHelper(symbols),
                _step23;

            try {
              for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {
                var symbol = _step23.value;
                this.resolvedSymbols["delete"](symbol);
                this.importAs["delete"](symbol);
                this.symbolResourcePaths["delete"](symbol);
              }
            } catch (err) {
              _iterator23.e(err);
            } finally {
              _iterator23.f();
            }
          }
        }
        /** @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);

          var metadataSymbols = [];
          this.resolvedSymbols.forEach(function (resolvedSymbol) {
            if (resolvedSymbol.symbol.filePath === filePath) {
              metadataSymbols.push(resolvedSymbol.symbol);
            }
          });
          return metadataSymbols;
        }
      }, {
        key: "_createSymbolsOf",
        value: function _createSymbolsOf(filePath) {
          var _this253 = this;

          if (this.resolvedFilePaths.has(filePath)) {
            return;
          }

          this.resolvedFilePaths.add(filePath);
          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 _iterator24 = _createForOfIteratorHelper(metadata['exports']),
                _step24;

            try {
              var _loop3 = function _loop3() {
                var moduleExport = _step24.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 = _this253.resolveModule(moduleExport.from, filePath);

                    if (resolvedModule) {
                      var targetSymbol = _this253.getStaticSymbol(resolvedModule, symName);

                      var sourceSymbol = _this253.getStaticSymbol(filePath, symbolName);

                      resolvedSymbols.push(_this253.createExport(sourceSymbol, targetSymbol));
                    }
                  });
                } else {
                  // handle the symbols via export * directives.
                  var resolvedModule = _this253.resolveModule(moduleExport.from, filePath);

                  if (resolvedModule) {
                    var nestedExports = _this253.getSymbolsOf(resolvedModule);

                    nestedExports.forEach(function (targetSymbol) {
                      var sourceSymbol = _this253.getStaticSymbol(filePath, targetSymbol.name);

                      resolvedSymbols.push(_this253.createExport(sourceSymbol, targetSymbol));
                    });
                  }
                }
              };

              for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {
                _loop3();
              }
            } catch (err) {
              _iterator24.e(err);
            } finally {
              _iterator24.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 = _this253.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 = _this253.resolveModule(origin, filePath);

                if (!originFilePath) {
                  _this253.reportError(new Error("Couldn't resolve original symbol for ".concat(origin, " from ").concat(_this253.host.getOutputName(filePath))));
                } else {
                  _this253.symbolResourcePaths.set(symbol, originFilePath);
                }
              }

              resolvedSymbols.push(_this253.createResolvedSymbol(symbol, filePath, topLevelSymbolNames, symbolMeta));
            });
          }

          resolvedSymbols.forEach(function (resolvedSymbol) {
            return _this253.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol);
          });
          this.symbolFromFile.set(filePath, resolvedSymbols.map(function (resolvedSymbol) {
            return resolvedSymbol.symbol;
          }));
        }
      }, {
        key: "createResolvedSymbol",
        value: function createResolvedSymbol(sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {
          var _this254 = 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 = _this254.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 _super99 = _createSuper(ReferenceTransformer);

            function ReferenceTransformer() {
              _classCallCheck(this, ReferenceTransformer);

              return _super99.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({}, 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 Inc. All Rights Reserved.
     *
     * Use 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 (_ref54) {
        var summary = _ref54.summary,
            metadata = _ref54.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 (_ref55) {
          var summary = _ref55.summary,
              metadata = _ref55.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 _super100 = _createSuper(ToJsonSerializer);

      function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {
        var _this255;

        _classCallCheck(this, ToJsonSerializer);

        _this255 = _super100.call(this);
        _this255.symbolResolver = symbolResolver;
        _this255.summaryResolver = summaryResolver;
        _this255.srcFileName = srcFileName; // Note: This only contains symbols without members.

        _this255.symbols = [];
        _this255.indexBySymbol = new Map();
        _this255.reexportedBy = new Map(); // This now contains a `__symbol: number` in the place of
        // StaticSymbols, but otherwise has the same shape as the original objects.

        _this255.processedSummaryBySymbol = new Map();
        _this255.processedSummaries = [];
        _this255.unprocessedSymbolSummariesBySymbol = new Map();
        _this255.moduleName = symbolResolver.getKnownModuleName(srcFileName);
        return _this255;
      }

      _createClass2(ToJsonSerializer, [{
        key: "addSummary",
        value: function addSummary(summary) {
          var _this256 = 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 (_this256.summaryResolver.isLibraryFile(symbol.filePath) && !_this256.unprocessedSymbolSummariesBySymbol.has(symbol)) {
                  var _summary = _this256.summaryResolver.resolveSummary(symbol);

                  if (_summary) {
                    _this256.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 _this257 = 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 (_this257.summaryResolver.isLibraryFile(symbol.filePath)) {
                var reexportSymbol = _this257.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 = _this257.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 = _this257.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: _this257.summaryResolver.toSummaryFileName(symbol.filePath, _this257.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 _this258 = this;

          var exportAsBySymbol = new Map();

          var _iterator25 = _createForOfIteratorHelper(exportAsArr),
              _step25;

          try {
            for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {
              var _step25$value = _step25.value,
                  symbol = _step25$value.symbol,
                  exportAs = _step25$value.exportAs;
              exportAsBySymbol.set(symbol, exportAs);
            }
          } catch (err) {
            _iterator25.e(err);
          } finally {
            _iterator25.f();
          }

          var ngModuleSymbols = new Set();

          var _iterator26 = _createForOfIteratorHelper(this.data),
              _step26;

          try {
            for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {
              var _step26$value = _step26.value,
                  summary = _step26$value.summary,
                  metadata = _step26$value.metadata,
                  isLibrary = _step26$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 _iterator27 = _createForOfIteratorHelper(modSummary.modules),
                    _step27;

                try {
                  for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {
                    var mod = _step27.value;
                    ngModuleSymbols.add(mod.reference);
                  }
                } catch (err) {
                  _iterator27.e(err);
                } finally {
                  _iterator27.f();
                }
              }

              if (!isLibrary) {
                var fnName = summaryForJitName(summary.type.reference.name);
                createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));
              }
            }
          } catch (err) {
            _iterator26.e(err);
          } finally {
            _iterator26.f();
          }

          ngModuleSymbols.forEach(function (ngModuleSymbol) {
            if (_this258.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {
              var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;
              var jitExportAsName = summaryForJitName(exportAs);

              _this258.outputCtx.statements.push(variable(jitExportAsName).set(_this258.serializeSummaryRef(ngModuleSymbol)).toDeclStmt(null, [StmtModifier.Exported]));
            }
          });
        }
      }, {
        key: "serializeSummaryWithDeps",
        value: function serializeSummaryWithDeps(summary, metadata) {
          var _this259 = 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 _this259.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 _this259.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 _this260 = this;

                return literalArr(arr.map(function (entry) {
                  return visitValue(entry, _this260, context);
                }));
              }
            }, {
              key: "visitStringMap",
              value: function visitStringMap(map, context) {
                var _this261 = this;

                return new LiteralMapExpr(Object.keys(map).map(function (key) {
                  return new LiteralMapEntry(key, visitValue(map[key], _this261, 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 _super101 = _createSuper(FromJsonDeserializer);

      function FromJsonDeserializer(symbolCache, summaryResolver) {
        var _this262;

        _classCallCheck(this, FromJsonDeserializer);

        _this262 = _super101.call(this);
        _this262.symbolCache = symbolCache;
        _this262.summaryResolver = summaryResolver;
        return _this262;
      }

      _createClass2(FromJsonDeserializer, [{
        key: "deserialize",
        value: function deserialize(libraryFileName, json) {
          var _this263 = this;

          var data = JSON.parse(json);
          var allImportAs = [];
          this.symbols = data.symbols.map(function (serializedSymbol) {
            return _this263.symbolCache.get(_this263.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name);
          });
          data.symbols.forEach(function (serializedSymbol, index) {
            var symbol = _this263.symbols[index];
            var importAs = serializedSymbol.importAs;

            if (typeof importAs === 'number') {
              allImportAs.push({
                symbol: symbol,
                importAs: _this263.symbols[importAs]
              });
            } else if (typeof importAs === 'string') {
              allImportAs.push({
                symbol: symbol,
                importAs: _this263.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 Inc. All Rights Reserved.
     *
     * Use 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 _this264 = this;

          var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
          analyzeResult.ngModules.forEach(function (ngModule) {
            return _this264._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);
          });
          return analyzeResult;
        }
      }, {
        key: "analyzeModulesAsync",
        value: function analyzeModulesAsync(rootFiles) {
          var _this265 = this;

          var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);
          return Promise.all(analyzeResult.ngModules.map(function (ngModule) {
            return _this265._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 _this266 = 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 = _this266._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 = _this266._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 || _this266._config.defaultEncapsulation) === ViewEncapsulation.Emulated;
              genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));

              if (_this266._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 _this267 = this;

          var files = fileNames.map(function (fileName) {
            return _this267._analyzeFile(fileName);
          });
          var loadingPromises = [];
          files.forEach(function (file) {
            return file.ngModules.forEach(function (ngModule) {
              return loadingPromises.push(_this267._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));
            });
          });
          var analyzedInjectables = tsFiles.map(function (tsFile) {
            return _this267._analyzeFileForInjectables(tsFile);
          });
          return Promise.all(loadingPromises).then(function (_) {
            return {
              analyzedModules: mergeAndValidateNgFiles(files),
              analyzedInjectables: analyzedInjectables
            };
          });
        }
      }, {
        key: "loadFilesSync",
        value: function loadFilesSync(fileNames, tsFiles) {
          var _this268 = this;

          var files = fileNames.map(function (fileName) {
            return _this268._analyzeFile(fileName);
          });
          files.forEach(function (file) {
            return file.ngModules.forEach(function (ngModule) {
              return _this268._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true);
            });
          });
          var analyzedInjectables = tsFiles.map(function (tsFile) {
            return _this268._analyzeFileForInjectables(tsFile);
          });
          return {
            analyzedModules: mergeAndValidateNgFiles(files),
            analyzedInjectables: analyzedInjectables
          };
        }
      }, {
        key: "_createNgFactoryStub",
        value: function _createNgFactoryStub(outputCtx, file, emitFlags) {
          var _this269 = 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
            _this269._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(_this269._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 = _this269._metadataResolver.getDirectiveMetadata(dirId.reference);

                  if (!compMeta.isComponent) {
                    return;
                  }

                  componentId++;

                  _this269._createTypeCheckBlock(outputCtx, "".concat(compMeta.type.reference.name, "_Host_").concat(componentId), ngModuleMeta, _this269._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);

                  _this269._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 _iterator28 = _createForOfIteratorHelper(references),
              _step28;

          try {
            for (_iterator28.s(); !(_step28 = _iterator28.n()).done;) {
              var reference = _step28.value;
              var token = createTokenForExternalReference(this.reflector, reference);

              if (token.identifier) {
                result.push(token.identifier.reference);
              }
            }
          } catch (err) {
            _iterator28.e(err);
          } finally {
            _iterator28.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 _this270 = 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 = _this270._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(_ref56, r3Files) {
          var _this271 = this;

          var ngModuleByPipeOrDirective = _ref56.ngModuleByPipeOrDirective,
              files = _ref56.files;
          var contextMap = new Map();

          var getContext = function getContext(fileName) {
            if (!contextMap.has(fileName)) {
              contextMap.set(fileName, _this271._createOutputContext(fileName));
            }

            return contextMap.get(fileName);
          };

          files.forEach(function (file) {
            return _this271._compilePartialModule(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables, getContext(file.fileName));
          });
          r3Files.forEach(function (file) {
            return _this271._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 _this272 = this;

          shallowModules.forEach(function (module) {
            return compileNgModuleFromRender2(context, module, _this272._injectableCompiler);
          });
        }
      }, {
        key: "_compilePartialModule",
        value: function _compilePartialModule(fileName, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables, context) {
          var _this273 = 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 = _this273._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 _this273._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 _this273._metadataResolver.getPipeSummary(pipe.reference);
              });

              _pipes.forEach(function (pipe) {
                pipeTypeByName.set(pipe.name, pipe.type.reference);
              });

              compileComponentFromRender2(context, directiveMetadata, render3Ast, _this273.reflector, hostBindingParser, directiveTypeBySel, pipeTypeByName);
            } else {
              compileDirectiveFromRender2(context, directiveMetadata, _this273.reflector, hostBindingParser);
            }
          });
          pipes.forEach(function (pipeType) {
            var pipeMetadata = _this273._metadataResolver.getPipeMetadata(pipeType);

            if (pipeMetadata) {
              compilePipeFromRender2(context, pipeMetadata, _this273.reflector);
            }
          });
          injectables.forEach(function (injectable) {
            return _this273._injectableCompiler.compile(injectable, context);
          });
        }
      }, {
        key: "emitAllPartialModules2",
        value: function emitAllPartialModules2(files) {
          var _this274 = 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(_this274._emitPartialModule2(file.fileName, file.injectables)));
            return r;
          }, []);
        }
      }, {
        key: "_emitPartialModule2",
        value: function _emitPartialModule2(fileName, injectables) {
          var _this275 = this;

          var context = this._createOutputContext(fileName);

          injectables.forEach(function (injectable) {
            return _this275._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 _this276 = this;

          var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective,
              files = analyzeResult.files;
          var sourceModules = files.map(function (file) {
            return _this276._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 _this277 = 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 _this277._compileModule(outputCtx, ngModuleMeta);
          }); // compile components

          directives.forEach(function (dirType) {
            var compMeta = _this277._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 = _this277._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 = _this277._styleCompiler.needsStyleShim(compMeta);

              generatedFiles.push(_this277._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));

              if (_this277._options.allowEmptyCodegenFiles) {
                generatedFiles.push(_this277._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));
              }
            }); // compile components

            var compViewVars = _this277._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);

            _this277._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 _this278 = this;

          var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName).map(function (symbol) {
            return _this278._symbolResolver.resolveSymbol(symbol);
          });

          var typeData = [].concat(_toConsumableArray(ngModules.map(function (meta) {
            return {
              summary: _this278._metadataResolver.getNgModuleSummary(meta.type.reference),
              metadata: _this278._metadataResolver.getNgModuleMetadata(meta.type.reference)
            };
          })), _toConsumableArray(directives.map(function (ref) {
            return {
              summary: _this278._metadataResolver.getDirectiveSummary(ref),
              metadata: _this278._metadataResolver.getDirectiveMetadata(ref)
            };
          })), _toConsumableArray(pipes.map(function (ref) {
            return {
              summary: _this278._metadataResolver.getPipeSummary(ref),
              metadata: _this278._metadataResolver.getPipeMetadata(ref)
            };
          })), _toConsumableArray(injectables.map(function (ref) {
            return {
              summary: _this278._metadataResolver.getInjectableSummary(ref.symbol),
              metadata: _this278._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 _this279 = 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 _this279._metadataResolver.getDirectiveSummary(dir.reference);
          });
          var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {
            return _this279._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 _this280 = 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 = _this280._symbolResolver.getTypeArity(symbol) || 0;

            var _ref57 = _this280._symbolResolver.getImportAs(symbol, useSummaries) || symbol,
                filePath = _ref57.filePath,
                name = _ref57.name,
                members = _ref57.members;

            var importModule = _this280._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 = _this280._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(new Array(missingTypeParamsCount).fill(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 _iterator29 = _createForOfIteratorHelper(analyzedModules.ngModules),
                _step29;

            try {
              for (_iterator29.s(); !(_step29 = _iterator29.n()).done;) {
                var ngModule = _step29.value;

                var lazyRoutes = _listLazyRoutes(ngModule, this.reflector);

                var _iterator30 = _createForOfIteratorHelper(lazyRoutes),
                    _step30;

                try {
                  for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {
                    var lazyRoute = _step30.value;
                    allLazyRoutes.push(lazyRoute);
                  }
                } catch (err) {
                  _iterator30.e(err);
                } finally {
                  _iterator30.f();
                }
              }
            } catch (err) {
              _iterator29.e(err);
            } finally {
              _iterator29.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 _iterator31 = _createForOfIteratorHelper(lazyRoutes),
                _step31;

            try {
              for (_iterator31.s(); !(_step31 = _iterator31.n()).done;) {
                var _lazyRoute = _step31.value;
                allLazyRoutes.push(_lazyRoute);
                visitLazyRoute(_lazyRoute.referencedModule, seenRoutes, allLazyRoutes);
              }
            } catch (err) {
              _iterator31.e(err);
            } finally {
              _iterator31.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 directives = [];
      var pipes = [];
      var injectables = [];
      var ngModules = [];
      var hasDecorators = staticSymbolResolver.hasDecorators(fileName);
      var exportsNonSourceFiles = false; // 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 (!fileName.endsWith('.d.ts') || 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;
              directives.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,
        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 _this281 = this;

            arr.forEach(function (v) {
              return visitValue(v, _this281, context);
            });
          }
        }, {
          key: "visitStringMap",
          value: function visitStringMap(map, context) {
            var _this282 = this;

            Object.keys(map).forEach(function (key) {
              return visitValue(map[key], _this282, 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 Inc. All Rights Reserved.
     *
     * Use 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);
      return "".concat(indentStr(indent)).concat(message).concat(chain.next && '\n' + formatChain(chain.next, indent + 2) || '');
    }

    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 Inc. All Rights Reserved.
     *
     * Use 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 _this283 = 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 _this283._registerDecoratorOrConstructor(_this283.getStaticSymbol(kc.filePath, kc.name), kc.ctor);
        });
        knownMetadataFunctions.forEach(function (kf) {
          return _this283._registerFunction(_this283.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);
        }
      }, {
        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 _this284 = this;

          return this.symbolResolver.ignoreErrorsFor(function () {
            return _this284.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 _this285 = this;

          return this._annotations(type, function (type, decorators) {
            return _this285.simplify(type, decorators);
          }, this.annotationCache);
        }
      }, {
        key: "shallowAnnotations",
        value: function shallowAnnotations(type) {
          var _this286 = this;

          return this._annotations(type, function (type, decorators) {
            return _this286.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 _this287 = 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 = [];

              if (propMetadata[propName]) {
                decorators.push.apply(decorators, _toConsumableArray(propMetadata[propName]));
              }

              propMetadata[propName] = decorators;

              if (prop && prop['decorators']) {
                decorators.push.apply(decorators, _toConsumableArray(_this287.simplify(type, prop['decorators'])));
              }
            });
            this.propertyCache.set(type, propMetadata);
          }

          return propMetadata;
        }
      }, {
        key: "parameters",
        value: function parameters(type) {
          var _this288 = 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 = _this288.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 _iterator32 = _createForOfIteratorHelper(staticMembers),
              _step32;

          try {
            for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {
              var name = _step32.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) {
            _iterator32.e(err);
          } finally {
            _iterator32.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 _value8 = targetFunction['value'];

                  if (_value8 && (depth != 0 || _value8.__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 _args2;

                      (_args2 = args).push.apply(_args2, _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, _value8);
                    } 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 (expression instanceof Array) {
                var _result2 = [];

                var _iterator33 = _createForOfIteratorHelper(expression),
                    _step33;

                try {
                  for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {
                    var item = _step33.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 _iterator34 = _createForOfIteratorHelper(spreadArray),
                            _step34;

                        try {
                          for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {
                            var spreadItem = _step34.value;

                            _result2.push(spreadItem);
                          }
                        } catch (err) {
                          _iterator34.e(err);
                        } finally {
                          _iterator34.f();
                        }

                        continue;
                      }
                    }

                    var _value9 = simplify(item);

                    if (shouldIgnore(_value9)) {
                      continue;
                    }

                    _result2.push(_value9);
                  }
                } catch (err) {
                  _iterator33.e(err);
                } finally {
                  _iterator33.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(_ref58, reportingContext) {
          var message = _ref58.message,
              summary = _ref58.summary,
              advise = _ref58.advise,
              position = _ref58.position,
              context = _ref58.context,
              value = _ref58.value,
              symbol = _ref58.symbol,
              chain = _ref58.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 _super102 = _createSuper(PopulatedScope);

      function PopulatedScope(bindings) {
        var _this289;

        _classCallCheck(this, PopulatedScope);

        _this289 = _super102.call(this);
        _this289.bindings = bindings;
        return _this289;
      }

      _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
      };
    }

    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 Inc. All Rights Reserved.
     *
     * Use 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 _this290 = 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 _this290.summaryCache.set(summary.symbol, summary);
            });

            if (moduleName) {
              this.knownFileNameToModuleNames.set(filePath, moduleName);
            }

            importAs.forEach(function (importAs) {
              _this290.importAs.set(importAs.symbol, importAs.importAs);
            });
          }

          return hasSummary;
        }
      }]);

      return AotSummaryResolver;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
      };
    }

    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;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 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 _len5 = arguments.length, args = new Array(_len5), _key6 = 0; _key6 < _len5; _key6++) {
              args[_key6] = arguments[_key6];
            }

            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 _this291 = this;

        var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);

        _classStmt.fields.forEach(function (field) {
          _this291[field.name] = undefined;
        });

        for (var _len6 = arguments.length, args = new Array(_len6), _key7 = 0; _key7 < _len6; _key7++) {
          args[_key7] = arguments[_key7];
        }

        _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: "visitCommentStmt",
        value: function visitCommentStmt(stmt, context) {
          return null;
        }
      }, {
        key: "visitJSDocCommentStmt",
        value: function visitJSDocCommentStmt(stmt, context) {
          return null;
        }
      }, {
        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: "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: "visitBinaryOperatorExpr",
        value: function visitBinaryOperatorExpr(ast, ctx) {
          var _this292 = this;

          var lhs = function lhs() {
            return ast.lhs.visitExpression(_this292, ctx);
          };

          var rhs = function rhs() {
            return ast.rhs.visitExpression(_this292, 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 _this293 = this;

          var result = {};
          ast.entries.forEach(function (entry) {
            return result[entry.key] = entry.value.visitExpression(_this293, 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 _this294 = this;

          return expressions.map(function (expr) {
            return expr.visitExpression(_this294, 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 _len7 = arguments.length, args = new Array(_len7), _key8 = 0; _key8 < _len7; _key8++) {
          args[_key8] = arguments[_key8];
        }

        return _executeFunctionStatements(varNames, args, statements, ctx, visitor);
      };
    }

    var CATCH_ERROR_VAR$2 = 'error';
    var CATCH_STACK_VAR$2 = 'stack';
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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](http://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 _this295 = this;

          return ids.map(function (mod) {
            return mod.reference;
          }).filter(function (ref) {
            return !_this295.hasAotSummary(ref);
          });
        }
      }, {
        key: "_compileModuleAndComponents",
        value: function _compileModuleAndComponents(moduleType, isSync) {
          var _this296 = this;

          return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
            _this296._compileComponents(moduleType, null);

            return _this296._compileModule(moduleType);
          });
        }
      }, {
        key: "_compileModuleAndAllComponents",
        value: function _compileModuleAndAllComponents(moduleType, isSync) {
          var _this297 = this;

          return SyncAsync.then(this._loadModules(moduleType, isSync), function () {
            var componentFactories = [];

            _this297._compileComponents(moduleType, componentFactories);

            return {
              ngModuleFactory: _this297._compileModule(moduleType),
              componentFactories: componentFactories
            };
          });
        }
      }, {
        key: "_loadModules",
        value: function _loadModules(mainModule, isSync) {
          var _this298 = 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 = _this298._metadataResolver.getNgModuleMetadata(nestedNgModule);

            _this298._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {
              var promise = _this298._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);

              if (promise) {
                loading.push(promise);
              }
            });

            _this298._filterJitIdentifiers(moduleMeta.declaredPipes).forEach(function (ref) {
              return _this298._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 _this299 = 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 = _this299._metadataResolver.getNgModuleMetadata(localMod);

            _this299._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
              moduleByJitDirective.set(dirRef, localModuleMeta);

              var dirMeta = _this299._metadataResolver.getDirectiveMetadata(dirRef);

              if (dirMeta.isComponent) {
                templates.add(_this299._createCompiledTemplate(dirMeta, localModuleMeta));

                if (allComponentFactories) {
                  var template = _this299._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);

                  templates.add(template);
                  allComponentFactories.push(dirMeta.componentFactory);
                }
              }
            });
          });
          transJitModules.forEach(function (localMod) {
            var localModuleMeta = _this299._metadataResolver.getNgModuleMetadata(localMod);

            _this299._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {
              var dirMeta = _this299._metadataResolver.getDirectiveMetadata(dirRef);

              if (dirMeta.isComponent) {
                dirMeta.entryComponents.forEach(function (entryComponentType) {
                  var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                  templates.add(_this299._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
                });
              }
            });

            localModuleMeta.entryComponents.forEach(function (entryComponentType) {
              if (!_this299.hasAotSummary(entryComponentType.componentType)) {
                var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);
                templates.add(_this299._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));
              }
            });
          });
          templates.forEach(function (template) {
            return _this299._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 _this300 = 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 = _this300._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);

            externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);
          });

          this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);

          var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) {
            return _this300._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 _this301 = this;

          // Note: ! is ok here as components always have a template.
          var preserveWhitespaces = compMeta.template.preserveWhitespaces;
          var directives = directiveIdentifiers.map(function (dir) {
            return _this301._metadataResolver.getDirectiveSummary(dir.reference);
          });
          var pipes = ngModule.transitiveModule.pipes.map(function (pipe) {
            return _this301._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 _this302 = this;

          result.dependencies.forEach(function (dep, i) {
            var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);

            var nestedStylesArr = _this302._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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234} 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 Inc. All Rights Reserved.
     *
     * Use 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 _this303 = 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 _this303.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false);
          })).then(function () {
            var errors = [];
            files.forEach(function (file) {
              var compMetas = [];
              file.directives.forEach(function (directiveType) {
                var dirMeta = _this303.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(_this303.messageBundle.updateFromTemplate(html, templateUrl, interpolationConfig)));
              });
            });

            if (errors.length) {
              throw new Error(errors.map(function (e) {
                return e.toString();
              }).join('\n'));
            }

            return _this303.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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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); // 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, 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) {
        _classCallCheck(this, Scope);

        this.parentScope = parentScope;
        /**
         * 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();
      }
      /**
       * Process a template (either as a `Template` sub-template with variables, or a plain array of
       * template `Node`s) and construct its `Scope`.
       */


      _createClass2(Scope, [{
        key: "ingest",

        /**
         * Internal method to process the template and populate the `Scope`.
         */
        value: function ingest(template) {
          var _this304 = this;

          if (template instanceof Template) {
            // Variables on an <ng-template> are defined in the inner scope.
            template.variables.forEach(function (node) {
              return _this304.visitVariable(node);
            }); // Process the nodes of the template.

            template.children.forEach(function (node) {
              return node.visit(_this304);
            });
          } else {
            // No overarching `Template` instance, so process the nodes directly.
            template.forEach(function (node) {
              return node.visit(_this304);
            });
          }
        }
      }, {
        key: "visitElement",
        value: function visitElement(element) {
          var _this305 = this;

          // `Element`s in the template may have `Reference`s which are captured in the scope.
          element.references.forEach(function (node) {
            return _this305.visitReference(node);
          }); // Recurse into the `Element`'s children.

          element.children.forEach(function (node) {
            return node.visit(_this305);
          });
        }
      }, {
        key: "visitTemplate",
        value: function visitTemplate(template) {
          var _this306 = 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 _this306.visitReference(node);
          }); // Next, create an inner scope and process the template within it.

          var scope = new Scope(this);
          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 !== undefined) {
            // 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: "apply",
        value: function apply(template) {
          var scope = new Scope();
          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 _this307 = this;

          template.forEach(function (node) {
            return node.visit(_this307);
          });
        }
      }, {
        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(tag, node) {
          var _this308 = 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 = new CssSelector();
          cssSelector.setElement(tag); // Add attributes to the CSS selector.

          var attrs = getAttrsForDirectiveMatching(node);
          Object.getOwnPropertyNames(attrs).forEach(function (name) {
            var value = attrs[name];
            cssSelector.addAttribute(name, value); // Treat the 'class' attribute specially.

            if (name.toLowerCase() === 'class') {
              var classes = value.trim().split(/\s+/g);
              classes.forEach(function (className) {
                return cssSelector.addClassName(className);
              });
            }
          }); // 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 is a reference to a directive exported via exportAs. One should exist.
              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, and error if it wasn't.

              if (dirTarget === null) {
                // TODO(alxhub): Return an error value here that can be used for template validation.
                throw new Error("Assertion error: failed to find directive with exportAs: ".concat(ref.value));
              }
            }

            if (dirTarget !== null) {
              // This reference points to a directive.
              _this308.references.set(ref, {
                directive: dirTarget,
                node: node
              });
            } else {
              // This reference points to the node itself.
              _this308.references.set(ref, node);
            }
          }); // Associate attributes/bindings on the node with directives or with the node itself.

          var processAttribute = function processAttribute(attribute) {
            var dir = directives.find(function (dir) {
              return dir.inputs.hasOwnProperty(attribute.name);
            });

            if (dir !== undefined) {
              _this308.bindings.set(attribute, dir);
            } else {
              _this308.bindings.set(attribute, node);
            }
          };

          node.attributes.forEach(processAttribute);
          node.inputs.forEach(processAttribute);
          node.outputs.forEach(processAttribute);

          if (node instanceof Template) {
            node.templateAttrs.forEach(processAttribute);
          } // Recurse into the node's children.


          node.children.forEach(function (child) {
            return child.visit(_this308);
          });
        } // 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$2) {
      _inherits(TemplateBinder, _RecursiveAstVisitor$2);

      var _super103 = _createSuper(TemplateBinder);

      function TemplateBinder(bindings, symbols, usedPipes, nestingLevel, scope, template, level) {
        var _this309;

        _classCallCheck(this, TemplateBinder);

        _this309 = _super103.call(this);
        _this309.bindings = bindings;
        _this309.symbols = symbols;
        _this309.usedPipes = usedPipes;
        _this309.nestingLevel = nestingLevel;
        _this309.scope = scope;
        _this309.template = template;
        _this309.level = level;
        _this309.pipesUsed = []; // Save a bit of processing time by constructing this closure in advance.

        _this309.visitNode = function (node) {
          return node.visit(_assertThisInitialized(_this309));
        };

        return _this309;
      }
      /**
       * 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.
       */


      _createClass2(TemplateBinder, [{
        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) {} // 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, 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.usedPipes = usedPipes;
      }

      _createClass2(R3BoundTarget, [{
        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;
    }();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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

    /***/
  },

  /***/
  "./node_modules/@angular/core/fesm2015/core.js":
  /*!*****************************************************!*\
    !*** ./node_modules/@angular/core/fesm2015/core.js ***!
    \*****************************************************/

  /*! exports provided: ɵangular_packages_core_core_q, ɵangular_packages_core_core_n, ɵangular_packages_core_core_o, ɵangular_packages_core_core_p, ɵangular_packages_core_core_r, ɵangular_packages_core_core_f, ɵangular_packages_core_core_l, ɵangular_packages_core_core_m, ɵangular_packages_core_core_k, ɵangular_packages_core_core_j, ɵangular_packages_core_core_b, ɵangular_packages_core_core_a, ɵangular_packages_core_core_c, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_i, ɵangular_packages_core_core_s, ɵangular_packages_core_core_u, ɵangular_packages_core_core_t, ɵangular_packages_core_core_x, ɵangular_packages_core_core_v, ɵangular_packages_core_core_w, ɵ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_bm, ɵangular_packages_core_core_bl, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_bk, ɵangular_packages_core_core_bh, ɵangular_packages_core_core_bi, ɵangular_packages_core_core_bn, ɵangular_packages_core_core_y, ɵangular_packages_core_core_z, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, createPlatformFactory, NgProbeToken, enableProdMode, isDevMode, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugEventListener, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, Attribute, ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, ViewEncapsulation, Version, VERSION, InjectFlags, ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, forwardRef, resolveForwardRef, Injectable, Injector, ɵɵinject, inject, INJECTOR, ReflectiveInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, ɵNoopNgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ɵComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵdefaultIterableDiffers, ɵdefaultKeyValueDiffers, ɵdevModeEqual, ɵisListLikeIterable, ɵChangeDetectorStatus, ɵisDefaultChangeDetectionStrategy, ɵConsole, ɵsetCurrentInjector, ɵgetInjectableDef, ɵAPP_ROOT, ɵDEFAULT_LOCALE_ID, ɵivyEnabled, ɵCodegenComponentFactoryResolver, ɵclearResolutionOfComponentResourcesQueue, ɵresolveComponentResources, ɵReflectionCapabilities, ɵRenderDebugInfo, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ɵglobal, ɵlooseIdentical, ɵstringify, ɵmakeDecorator, ɵisObservable, ɵisPromise, ɵclearOverrides, ɵinitServicesIfNeeded, ɵoverrideComponentView, ɵoverrideProvider, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵgetLocalePluralCase, ɵfindLocaleData, ɵLOCALE_DATA, ɵLocaleDataIndex, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵdefineBase, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefinePipe, ɵɵdefineNgModule, ɵdetectChanges, ɵrenderComponent, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵɵdirectiveInject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵtemplateRefExtractor, ɵɵProvidersFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵLifecycleHooksFeature, ɵRender3NgModuleRef, ɵmarkDirty, ɵNgModuleFactory, ɵNO_CHANGE, ɵɵcontainer, ɵɵnextContext, ɵɵelementStart, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵelement, ɵɵlistener, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵembeddedViewStart, ɵɵprojection, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵgetCurrentView, ɵgetDirectives, ɵgetHostElement, ɵɵrestoreView, ɵɵcontainerRefreshStart, ɵɵcontainerRefreshEnd, ɵɵqueryRefresh, ɵɵviewQuery, ɵɵstaticViewQuery, ɵɵstaticContentQuery, ɵɵloadViewQuery, ɵɵcontentQuery, ɵɵloadContentQuery, ɵɵelementEnd, ɵɵhostProperty, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵupdateSyntheticHostBinding, ɵɵcomponentHostSyntheticListener, ɵɵprojectionDef, ɵɵreference, ɵɵenableBindings, ɵɵdisableBindings, ɵɵallocHostVars, ɵɵelementContainerStart, ɵɵelementContainerEnd, ɵɵelementContainer, ɵɵstyling, ɵɵstyleMap, ɵɵstyleSanitizer, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵstylingApply, ɵɵclassProp, ɵɵelementHostAttrs, ɵɵselect, ɵɵtextBinding, ɵɵtemplate, ɵɵembeddedViewEnd, ɵstore, ɵɵload, ɵɵpipe, ɵwhenRendered, ɵɵi18n, ɵɵi18nAttributes, ɵɵi18nExp, ɵɵi18nStart, ɵɵi18nEnd, ɵɵi18nApply, ɵɵi18nPostprocess, ɵi18nConfigureLocalize, ɵɵi18nLocalize, ɵsetLocaleId, ɵsetClassMetadata, ɵɵresolveWindow, ɵɵresolveDocument, ɵɵresolveBody, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModule, ɵcompileNgModuleDefs, ɵpatchComponentDefWithScope, ɵresetCompiledComponents, ɵflushModuleScopingQueueAsMuchAsPossible, ɵtransitiveScopesFor, ɵcompilePipe, ɵɵsanitizeHtml, ɵɵsanitizeStyle, ɵɵdefaultStyleSanitizer, ɵɵsanitizeScript, ɵɵsanitizeUrl, ɵɵsanitizeResourceUrl, ɵɵsanitizeUrlOrResourceUrl, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵgetLContext, ɵNG_ELEMENT_ID, ɵNG_COMPONENT_DEF, ɵNG_DIRECTIVE_DEF, ɵNG_PIPE_DEF, ɵNG_MODULE_DEF, ɵNG_BASE_DEF, ɵNG_INJECTABLE_DEF, ɵNG_INJECTOR_DEF, ɵcompileNgModuleFactory__POST_R3__, ɵisBoundToModule__POST_R3__, ɵSWITCH_COMPILE_COMPONENT__POST_R3__, ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, ɵSWITCH_COMPILE_PIPE__POST_R3__, ɵSWITCH_COMPILE_NGMODULE__POST_R3__, ɵgetDebugNode__POST_R3__, ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, ɵSWITCH_IVY_ENABLED__POST_R3__, ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, ɵCompiler_compileModuleSync__POST_R3__, ɵCompiler_compileModuleAsync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, ɵSWITCH_RENDERER2_FACTORY__POST_R3__, ɵgetModuleFactory__POST_R3__, ɵregisterNgModuleType, ɵpublishGlobalUtil, ɵpublishDefaultGlobalUtils, ɵcreateInjector, ɵINJECTOR_IMPL__POST_R3__, ɵregisterModuleFactory, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵand, ɵccf, ɵcmf, ɵcrt, ɵdid, ɵeld, ɵgetComponentViewDefinitionFactory, ɵinlineInterpolate, ɵinterpolate, ɵmod, ɵmpd, ɵncd, ɵnov, ɵpid, ɵprd, ɵpad, ɵpod, ɵppd, ɵqud, ɵted, ɵunv, ɵvid */

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

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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function () {
      return zoneSchedulerFactory;
    });
    /* 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_l", function () {
      return DefaultIterableDifferFactory;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function () {
      return injectInjectorOnly;
    });
    /* 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_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_i", function () {
      return getModuleFactory__PRE_R3__;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "APP_ID", function () {
      return APP_ID;
    });
    /* 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_INITIALIZER", function () {
      return PLATFORM_INITIALIZER;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function () {
      return PLATFORM_ID;
    });
    /* 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_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__, "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$1;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "getDebugNode", function () {
      return getDebugNode;
    });
    /* 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__, "setTestabilityGetter", function () {
      return setTestabilityGetter;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function () {
      return TRANSLATIONS_FORMAT;
    });
    /* 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__, "ApplicationModule", function () {
      return ApplicationModule;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ErrorHandler", function () {
      return ErrorHandler;
    });
    /* 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__, "Attribute", function () {
      return Attribute;
    });
    /* 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__, "ContentChild", function () {
      return ContentChild;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "Query", function () {
      return Query;
    });
    /* 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__, "Component", function () {
      return Component;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Directive", function () {
      return Directive;
    });
    /* 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__, "Input", function () {
      return Input;
    });
    /* harmony export (binding) */


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function () {
      return ViewEncapsulation;
    });
    /* 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__, "InjectFlags", function () {
      return InjectFlags;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjectable", function () {
      return ɵɵdefineInjectable;
    });
    /* 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__, "forwardRef", function () {
      return forwardRef;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Renderer", function () {
      return Renderer;
    });
    /* 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__, "RootRenderer", function () {
      return RootRenderer;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function () {
      return COMPILER_OPTIONS;
    });
    /* 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__, "ModuleWithComponentFactories", function () {
      return ModuleWithComponentFactories;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "QueryList", function () {
      return QueryList;
    });
    /* 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__, "TemplateRef", function () {
      return TemplateRef;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "ViewRef", function () {
      return ViewRef$1;
    });
    /* 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__, "DefaultIterableDiffer", function () {
      return DefaultIterableDiffer;
    });
    /* 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__, "SimpleChange", function () {
      return SimpleChange;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "platformCore", function () {
      return platformCore;
    });
    /* 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__, "ɵdefaultIterableDiffers", function () {
      return defaultIterableDiffers;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function () {
      return _sanitizeHtml;
    });
    /* 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__, "ɵglobal", function () {
      return _global;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function () {
      return makeDecorator;
    });
    /* 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__, "ɵclearOverrides", function () {
      return clearOverrides;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵinitServicesIfNeeded", function () {
      return initServicesIfNeeded;
    });
    /* 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__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function () {
      return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;
    });
    /* harmony export (binding) */


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵLocaleDataIndex", function () {
      return LocaleDataIndex;
    });
    /* 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__, "ɵɵdefineBase", function () {
      return ɵɵdefineBase;
    });
    /* 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__, "ɵɵdefinePipe", function () {
      return ɵɵdefinePipe;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function () {
      return renderComponent;
    });
    /* 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__, "ɵɵdirectiveInject", function () {
      return ɵɵdirectiveInject;
    });
    /* 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__, "ɵɵgetFactoryOf", function () {
      return ɵɵgetFactoryOf;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵɵgetInheritedFactory", function () {
      return ɵɵgetInheritedFactory;
    });
    /* 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__, "ɵɵtemplateRefExtractor", function () {
      return ɵɵtemplateRefExtractor;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵɵProvidersFeature", function () {
      return ɵɵProvidersFeature;
    });
    /* 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__, "ɵLifecycleHooksFeature", function () {
      return LifecycleHooksFeature;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵɵelementStart", function () {
      return ɵɵelementStart;
    });
    /* 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__, "ɵɵelement", function () {
      return ɵɵelement;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵɵlistener", function () {
      return ɵɵlistener;
    });
    /* 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__, "ɵɵembeddedViewStart", function () {
      return ɵɵembeddedViewStart;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵɵprojection", function () {
      return ɵɵprojection;
    });
    /* 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__, "ɵɵ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__, "ɵɵgetCurrentView", function () {
      return ɵɵgetCurrentView;
    });
    /* 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__, "ɵɵrestoreView", function () {
      return ɵɵrestoreView;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵɵhostProperty", function () {
      return ɵɵhostProperty;
    });
    /* 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__, "ɵɵupdateSyntheticHostBinding", function () {
      return ɵɵupdateSyntheticHostBinding;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵɵstyleSanitizer", function () {
      return ɵɵstyleSanitizer;
    });
    /* 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__, "ɵɵ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__, "ɵɵstylingApply", function () {
      return ɵɵstylingApply;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵɵresolveBody", function () {
      return ɵɵresolveBody;
    });
    /* 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__, "ɵpatchComponentDefWithScope", function () {
      return patchComponentDefWithScope;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵgetLContext", function () {
      return getLContext;
    });
    /* 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_COMPONENT_DEF", function () {
      return NG_COMPONENT_DEF;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵNG_DIRECTIVE_DEF", function () {
      return NG_DIRECTIVE_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_MODULE_DEF", function () {
      return NG_MODULE_DEF;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵisBoundToModule__POST_R3__", function () {
      return isBoundToModule__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_PIPE__POST_R3__", function () {
      return SWITCH_COMPILE_PIPE__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__, "ɵgetDebugNode__POST_R3__", function () {
      return getDebugNode__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_IVY_ENABLED__POST_R3__", function () {
      return SWITCH_IVY_ENABLED__POST_R3__;
    });
    /* 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__, "ɵCompiler_compileModuleSync__POST_R3__", function () {
      return Compiler_compileModuleSync__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_compileModuleAndAllComponentsSync__POST_R3__", function () {
      return Compiler_compileModuleAndAllComponentsSync__POST_R3__;
    });
    /* 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__, "ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__", function () {
      return SWITCH_ELEMENT_REF_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__, "ɵSWITCH_RENDERER2_FACTORY__POST_R3__", function () {
      return SWITCH_RENDERER2_FACTORY__POST_R3__;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵcreateInjector", function () {
      return createInjector;
    });
    /* 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__, "ɵregisterModuleFactory", function () {
      return registerModuleFactory;
    });
    /* harmony export (binding) */


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵcrt", function () {
      return createRendererType2;
    });
    /* 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__, "ɵgetComponentViewDefinitionFactory", function () {
      return getComponentViewDefinitionFactory;
    });
    /* 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__, "ɵ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__, "ɵnov", function () {
      return nodeValue;
    });
    /* harmony export (binding) */


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


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


    __webpack_require__.d(__webpack_exports__, "ɵpad", function () {
      return pureArrayDef;
    });
    /* 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__, "ɵqud", function () {
      return queryDef;
    });
    /* harmony export (binding) */


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


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


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


    var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! rxjs */
    "./node_modules/rxjs/_esm2015/index.js");
    /* harmony import */


    var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! rxjs/operators */
    "./node_modules/rxjs/_esm2015/operators/index.js");
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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) {
      var metaCtor = makeMetadataCtor(props);

      function DecoratorFactory() {
        for (var _len8 = arguments.length, args = new Array(_len8), _key9 = 0; _key9 < _len8; _key9++) {
          args[_key9] = arguments[_key9];
        }

        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) {
      var metaCtor = makeMetadataCtor(props);

      function ParamDecoratorFactory() {
        for (var _len9 = arguments.length, args = new Array(_len9), _key10 = 0; _key10 < _len9; _key10++) {
          args[_key10] = arguments[_key10];
        }

        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) {
      var metaCtor = makeMetadataCtor(props);

      function PropDecoratorFactory() {
        for (var _len10 = arguments.length, args = new Array(_len10), _key11 = 0; _key11 < _len10; _key11++) {
          args[_key11] = arguments[_key11];
        }

        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 since it creates non-enumerable property which
          // prevents the property is 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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Type of the Inject decorator / constructor function.
     *
     * \@publicApi
     * @record
     */


    function InjectDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ0 =
    /**
    * @param {?} token
    * @return {?}
    */
    function ɵ0(token) {
      return {
        token: token
      };
    };
    /**
     * Inject decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Inject = makeParamDecorator('Inject', ɵ0);
    /**
     * Type of the Optional decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function OptionalDecorator() {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * Optional decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Optional = makeParamDecorator('Optional');
    /**
     * Type of the Self decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function SelfDecorator() {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * Self decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Self = makeParamDecorator('Self');
    /**
     * Type of the SkipSelf decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function SkipSelfDecorator() {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * SkipSelf decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var SkipSelf = makeParamDecorator('SkipSelf');
    /**
     * Type of the Host decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function HostDecorator() {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * Host decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Host = makeParamDecorator('Host');
    /**
     * Type of the Attribute decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function AttributeDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ1 =
    /**
    * @param {?=} attributeName
    * @return {?}
    */
    function ɵ1(attributeName) {
      return {
        attributeName: attributeName
      };
    };
    /**
     * Attribute decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Attribute = makeParamDecorator('Attribute', ɵ1);
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 `ngInjectableDef` 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
     */


    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 be 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 `ngInjectorDef` 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 an `ngInjectableDef` 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.
     *
     * @publicApi
     */

    function ɵɵdefineInjector(options) {
      return {
        factory: options.factory,
        providers: options.providers || [],
        imports: options.imports || []
      };
    }
    /**
     * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited
     * value.
     *
     * @param type A type which may have its own (non-inherited) `ngInjectableDef`.
     */


    function getInjectableDef(type) {
      var def = type[NG_INJECTABLE_DEF]; // The definition read above may come from a base class. `hasOwnProperty` is not sufficient to
      // distinguish this case, as in older browsers (e.g. IE10) static property inheritance is
      // implemented by copying the properties.
      //
      // Instead, the ngInjectableDef's token is compared to the type, and if they don't match then the
      // property was not defined directly on the type itself, and was likely inherited. The definition
      // is only returned if the type matches the def.token.

      return def && def.token === type ? def : null;
    }
    /**
     * Read the `ngInjectableDef` for `type` or read the `ngInjectableDef` from one of its ancestors.
     *
     * @param type A type which may have `ngInjectableDef`, via inheritance.
     *
     * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the
     * `ngInjectableDef` on an ancestor only.
     */


    function getInheritedInjectableDef(type) {
      if (type && type[NG_INJECTABLE_DEF]) {
        // TODO(FW-1307): Re-add ngDevMode when closure can handle it
        // ngDevMode &&
        console.warn("DEPRECATED: DI is instantiating a token \"".concat(type.name, "\" that inherits its @Injectable decorator but does not provide one itself.\n") + "This will become an error in v10. Please add @Injectable() to the \"".concat(type.name, "\" class."));
        return type[NG_INJECTABLE_DEF];
      } else {
        return null;
      }
    }
    /**
     * Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.
     *
     * @param type type which may have `ngInjectorDef`
     */


    function getInjectorDef(type) {
      return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;
    }

    var NG_INJECTABLE_DEF = getClosureSafeProperty({
      ngInjectableDef: getClosureSafeProperty
    });
    var NG_INJECTOR_DEF = getClosureSafeProperty({
      ngInjectorDef: getClosureSafeProperty
    });
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 (token instanceof Array) {
        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);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * An interface that a function passed into {\@link forwardRef} has to implement.
     *
     * \@usageNotes
     * ### Example
     *
     * {\@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
     * \@publicApi
     * @record
     */


    function ForwardRefFn() {}
    /** @type {?} */


    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
     * @param {?} forwardRefFn
     * @return {?}
     */


    function forwardRef(forwardRefFn) {
      /** @type {?} */
      forwardRefFn.__forward_ref__ = forwardRef;

      /** @type {?} */
      forwardRefFn.toString =
      /**
      * @return {?}
      */
      function () {
        return stringify(this());
      };

      return (
        /** @type {?} */

        /** @type {?} */
        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
     * @template T
     * @param {?} type
     * @return {?}
     */


    function resolveForwardRef(type) {
      /** @type {?} */
      var fn = type;

      if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef) {
        return fn();
      } else {
        return type;
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 = {}));
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @template T
     */


    var InjectionToken = /*#__PURE__*/function () {
      /**
       * @param {?} _desc
       * @param {?=} options
       */
      function InjectionToken(_desc, options) {
        _classCallCheck(this, InjectionToken);

        this._desc = _desc;
        /**
         * \@internal
         */

        this.ngMetadataName = 'InjectionToken';
        /** @nocollapse */

        this.ngInjectableDef = undefined;

        if (typeof options == 'number') {
          // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.
          // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.
          // We are using it to assign `-1` which is used to identify `Injector`.

          /** @type {?} */
          this.__NG_ELEMENT_ID__ = options;
        } else if (options !== undefined) {
          /** @nocollapse */
          this.ngInjectableDef = ɵɵdefineInjectable({
            token: this,
            providedIn: options.providedIn || 'root',
            factory: options.factory
          });
        }
      }
      /**
       * @return {?}
       */


      _createClass2(InjectionToken, [{
        key: "toString",
        value: function toString() {
          return "InjectionToken ".concat(this._desc);
        }
      }]);

      return InjectionToken;
    }();

    if (false) {}
    /**
     * @record
     * @template T
     */


    function InjectableDefToken() {}

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @type {?}
     */


    var INJECTOR = new InjectionToken('INJECTOR',
    /** @type {?} */
    -1);
    /** @type {?} */

    var _THROW_IF_NOT_FOUND = new Object();
    /** @type {?} */


    var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
    /** @type {?} */

    var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';
    /** @type {?} */

    var NG_TOKEN_PATH = 'ngTokenPath';
    /** @type {?} */

    var NEW_LINE = /\n/gm;
    /** @type {?} */

    var NO_NEW_LINE = 'ɵ';
    /** @type {?} */

    var SOURCE = '__source';
    var ɵ0$1 = getClosureSafeProperty;
    /** @type {?} */

    var USE_VALUE = getClosureSafeProperty({
      provide: String,
      useValue: ɵ0$1
    });
    /**
     * 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.
     * @type {?}
     */

    var _currentInjector = undefined;
    /**
     * @param {?} injector
     * @return {?}
     */

    function setCurrentInjector(injector) {
      /** @type {?} */
      var former = _currentInjector;
      _currentInjector = injector;
      return former;
    }
    /**
     * 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.
     * @type {?}
     */


    var _injectImplementation;
    /**
     * Sets the current inject implementation.
     * @param {?} impl
     * @return {?}
     */


    function setInjectImplementation(impl) {
      /** @type {?} */
      var previous = _injectImplementation;
      _injectImplementation = impl;
      return previous;
    }
    /**
     * @template T
     * @param {?} token
     * @param {?=} flags
     * @return {?}
     */


    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);
      }
    }
    /**
     * @template T
     * @param {?} token
     * @param {?=} flags
     * @return {?}
     */


    function ɵɵinject(token) {
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;
      return (_injectImplementation || injectInjectorOnly)(token, flags);
    }
    /**
     * 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`.
     * \@return True if injection is successful, null otherwise.
     *
     * \@usageNotes
     *
     * ### Example
     *
     * {\@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
     *
     * \@publicApi
     * @type {?}
     */


    var inject = ɵɵinject;
    /**
     * 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`.
     * @template T
     * @param {?} token
     * @param {?} notFoundValue
     * @param {?} flags
     * @return {?}
     */

    function injectRootLimpMode(token, notFoundValue, flags) {
      /** @type {?} */
      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), "]"));
    }
    /**
     * @param {?} types
     * @return {?}
     */


    function injectArgs(types) {
      /** @type {?} */
      var args = [];

      for (var i = 0; i < types.length; i++) {
        /** @type {?} */
        var arg = resolveForwardRef(types[i]);

        if (Array.isArray(arg)) {
          if (arg.length === 0) {
            throw new Error('Arguments array must have arguments.');
          }
          /** @type {?} */


          var type = undefined;
          /** @type {?} */

          var flags = InjectFlags.Default;

          for (var j = 0; j < arg.length; j++) {
            /** @type {?} */
            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 Inject || meta === Inject) {
              type = meta.token;
            } else {
              type = meta;
            }
          }

          args.push(ɵɵinject(
          /** @type {?} */
          type, flags));
        } else {
          args.push(ɵɵinject(arg));
        }
      }

      return args;
    }

    var NullInjector = /*#__PURE__*/function () {
      function NullInjector() {
        _classCallCheck(this, NullInjector);
      }

      _createClass2(NullInjector, [{
        key: "get",

        /**
         * @param {?} token
         * @param {?=} notFoundValue
         * @return {?}
         */
        value: function get(token) {
          var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROW_IF_NOT_FOUND;

          if (notFoundValue === THROW_IF_NOT_FOUND) {
            // Intentionally left behind: With dev tools open the debugger will stop here. There is no
            // reason why correctly written application should cause this exception.
            // TODO(misko): uncomment the next line once `ngDevMode` works with closure.
            // if(ngDevMode) debugger;

            /** @type {?} */
            var error = new Error("NullInjectorError: No provider for ".concat(stringify(token), "!"));
            error.name = 'NullInjectorError';
            throw error;
          }

          return notFoundValue;
        }
      }]);

      return NullInjector;
    }();
    /**
     * @param {?} e
     * @param {?} token
     * @param {?} injectorErrorName
     * @param {?} source
     * @return {?}
     */


    function catchInjectorError(e, token, injectorErrorName, source) {
      /** @type {?} */
      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;
    }
    /**
     * @param {?} text
     * @param {?} obj
     * @param {?} injectorErrorName
     * @param {?=} source
     * @return {?}
     */


    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;
      /** @type {?} */

      var context = stringify(obj);

      if (obj instanceof Array) {
        context = obj.map(stringify).join(' -> ');
      } else if (typeof obj === 'object') {
        /** @type {?} */
        var parts =
        /** @type {?} */
        [];

        for (var key in obj) {
          if (obj.hasOwnProperty(key)) {
            /** @type {?} */
            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  '));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @type {?}
     */


    var angularCoreDiEnv = {
      'ɵɵdefineInjectable': ɵɵdefineInjectable,
      'ɵɵdefineInjector': ɵɵdefineInjector,
      'ɵɵinject': ɵɵinject,
      'ɵɵgetFactoryOf': getFactoryOf
    };
    /**
     * @template T
     * @param {?} type
     * @return {?}
     */

    function getFactoryOf(type) {
      /** @type {?} */
      var typeAny =
      /** @type {?} */
      type;
      /** @type {?} */

      var def = getInjectableDef(typeAny) || getInjectorDef(typeAny);

      if (!def || def.factory === undefined) {
        return null;
      }

      return def.factory;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 via a {\@link NgModuleFactory}.
     *
     * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this
     * NgModule Instance.
     *
     * \@publicApi
     * @abstract
     * @template T
     */


    var NgModuleRef = function NgModuleRef() {
      _classCallCheck(this, NgModuleRef);
    };

    if (false) {}
    /**
     * @record
     * @template T
     */


    function InternalNgModuleRef() {}

    if (false) {}
    /**
     * \@publicApi
     * @abstract
     * @template T
     */


    var NgModuleFactory = function NgModuleFactory() {
      _classCallCheck(this, NgModuleFactory);
    };

    if (false) {}
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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];
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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);
      }
    }

    function assertEqual(actual, expected, msg) {
      if (actual != expected) {
        throwError(msg);
      }
    }

    function assertNotEqual(actual, expected, msg) {
      if (actual == expected) {
        throwError(msg);
      }
    }

    function assertSame(actual, expected, msg) {
      if (actual !== expected) {
        throwError(msg);
      }
    }

    function assertNotSame(actual, expected, msg) {
      if (actual === expected) {
        throwError(msg);
      }
    }

    function assertLessThan(actual, expected, msg) {
      if (actual >= expected) {
        throwError(msg);
      }
    }

    function assertGreaterThan(actual, expected, msg) {
      if (actual <= expected) {
        throwError(msg);
      }
    }

    function assertNotDefined(actual, msg) {
      if (actual != null) {
        throwError(msg);
      }
    }

    function assertDefined(actual, msg) {
      if (actual == null) {
        throwError(msg);
      }
    }

    function throwError(msg) {
      // tslint:disable-next-line
      debugger; // Left intentionally for better debugger experience.

      throw new Error("ASSERTION ERROR: ".concat(msg));
    }

    function assertDomNode(node) {
      // If we're in a worker, `Node` will not be defined.
      assertEqual(typeof Node !== 'undefined' && node instanceof Node || typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode', true, "The provided value must be an instance of a DOM Node but got ".concat(stringify(node)));
    }

    function assertDataInRange(arr, index) {
      var maxLen = arr ? arr.length : 0;
      assertLessThan(index, maxLen, "Index expected to be less than ".concat(maxLen, " but got ").concat(index));
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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,
        firstTemplatePass: 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,
        styleMap: 0,
        styleMapCacheMiss: 0,
        classMap: 0,
        classMapCacheMiss: 0,
        styleProp: 0,
        stylePropCacheMiss: 0,
        classProp: 0,
        classPropCacheMiss: 0,
        flushStyling: 0,
        classesApplied: 0,
        stylesApplied: 0,
        stylingWritePersistedState: 0,
        stylingReadPersistedState: 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 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.
     *
     * NOTE: changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.
     */


    if (typeof ngDevMode === 'undefined' || ngDevMode) {
      ngDevModeResetPerfCounters();
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */


    var 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.
       */
      OnPush: 0,

      /**
       * Use the default `CheckAlways` strategy, in which change detection is automatic until
       * explicitly deactivated.
       */
      Default: 1
    };
    ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = 'OnPush';
    ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = 'Default';
    /** @enum {number} */

    var ChangeDetectorStatus = {
      /**
       * A state in which, after calling `detectChanges()`, the change detector
       * state becomes `Checked`, and must be explicitly invoked or reactivated.
       */
      CheckOnce: 0,

      /**
       * A state in which change detection is skipped until the change detector mode
       * becomes `CheckOnce`.
       */
      Checked: 1,

      /**
       * A state in which change detection continues automatically until explicitly
       * deactivated.
       */
      CheckAlways: 2,

      /**
       * A state in which a change detector sub tree is not a part of the main tree and
       * should be skipped.
       */
      Detached: 3,

      /**
       * 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.
       */
      Errored: 4,

      /**
       * Indicates that the change detector has been destroyed.
       */
      Destroyed: 5
    };
    ChangeDetectorStatus[ChangeDetectorStatus.CheckOnce] = 'CheckOnce';
    ChangeDetectorStatus[ChangeDetectorStatus.Checked] = 'Checked';
    ChangeDetectorStatus[ChangeDetectorStatus.CheckAlways] = 'CheckAlways';
    ChangeDetectorStatus[ChangeDetectorStatus.Detached] = 'Detached';
    ChangeDetectorStatus[ChangeDetectorStatus.Errored] = 'Errored';
    ChangeDetectorStatus[ChangeDetectorStatus.Destroyed] = 'Destroyed';
    /**
     * Reports whether a given strategy is currently the default for change detection.
     * @see `ChangeDetectorStatus` / `ChangeDetectorRef`
     * @param {?} changeDetectionStrategy The strategy to check.
     * @return {?} True if the given strategy is the current default, false otherwise.
     */

    function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
      return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */


    var 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.
       */
      Emulated: 0,

      /**
       * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.
       * Use the native encapsulation mechanism of the renderer.
       *
       * For the DOM this means using the deprecated [Shadow DOM
       * v0](https://w3c.github.io/webcomponents/spec/shadow/) and
       * creating a ShadowRoot for Component's Host Element.
       */
      Native: 1,

      /**
       * Don't provide any template or style encapsulation.
       */
      None: 2,

      /**
       * 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.
       */
      ShadowDom: 3
    };
    ViewEncapsulation[ViewEncapsulation.Emulated] = 'Emulated';
    ViewEncapsulation[ViewEncapsulation.Native] = 'Native';
    ViewEncapsulation[ViewEncapsulation.None] = 'None';
    ViewEncapsulation[ViewEncapsulation.ShadowDom] = 'ShadowDom';
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
      };
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @type {?}
     */


    var EMPTY_OBJ = {};
    /** @type {?} */

    var EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in

    if (typeof ngDevMode !== 'undefined' && ngDevMode) {
      // 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);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var NG_COMPONENT_DEF = getClosureSafeProperty({
      ngComponentDef: getClosureSafeProperty
    });
    /** @type {?} */

    var NG_DIRECTIVE_DEF = getClosureSafeProperty({
      ngDirectiveDef: getClosureSafeProperty
    });
    /** @type {?} */

    var NG_PIPE_DEF = getClosureSafeProperty({
      ngPipeDef: getClosureSafeProperty
    });
    /** @type {?} */

    var NG_MODULE_DEF = getClosureSafeProperty({
      ngModuleDef: getClosureSafeProperty
    });
    /** @type {?} */

    var NG_LOCALE_ID_DEF = getClosureSafeProperty({
      ngLocaleIdDef: getClosureSafeProperty
    });
    /** @type {?} */

    var NG_BASE_DEF = getClosureSafeProperty({
      ngBaseDef: getClosureSafeProperty
    }); // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.

    /**
     * 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.
     * @type {?}
     */

    var NG_ELEMENT_ID = getClosureSafeProperty({
      __NG_ELEMENT_ID__: getClosureSafeProperty
    });
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    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 ngComponentDef = defineComponent({
     *     ...
     *   });
     * }
     * ```
     * \@codeGenApi
     * @template T
     * @param {?} componentDefinition
     * @return {?}
     */

    function ɵɵdefineComponent(componentDefinition) {
      /** @type {?} */
      var type = componentDefinition.type;
      /** @type {?} */

      var typePrototype = type.prototype;
      /** @type {?} */

      var declaredInputs =
      /** @type {?} */
      {};
      /** @type {?} */

      var def = {
        type: type,
        providersResolver: null,
        consts: componentDefinition.consts,
        vars: componentDefinition.vars,
        factory: componentDefinition.factory,
        template: componentDefinition.template ||
        /** @type {?} */
        null,
        ngContentSelectors: componentDefinition.ngContentSelectors,
        hostBindings: componentDefinition.hostBindings || null,
        contentQueries: componentDefinition.contentQueries || null,
        declaredInputs: declaredInputs,
        inputs:
        /** @type {?} */
        null,
        // assigned in noSideEffects
        outputs:
        /** @type {?} */
        null,
        // assigned in noSideEffects
        exportAs: componentDefinition.exportAs || null,
        onChanges: null,
        onInit: typePrototype.ngOnInit || null,
        doCheck: typePrototype.ngDoCheck || null,
        afterContentInit: typePrototype.ngAfterContentInit || null,
        afterContentChecked: typePrototype.ngAfterContentChecked || null,
        afterViewInit: typePrototype.ngAfterViewInit || null,
        afterViewChecked: typePrototype.ngAfterViewChecked || null,
        onDestroy: typePrototype.ngOnDestroy || null,
        onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
        directiveDefs:
        /** @type {?} */
        null,
        // assigned in noSideEffects
        pipeDefs:
        /** @type {?} */
        null,
        // assigned in noSideEffects
        selectors: componentDefinition.selectors,
        viewQuery: componentDefinition.viewQuery || null,
        features:
        /** @type {?} */
        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,
        _:
        /** @type {?} */
        null,
        setInput: null,
        schemas: componentDefinition.schemas || null,
        tView: null
      };
      def._ =
      /** @type {?} */
      noSideEffects(
      /**
      * @return {?}
      */
      function () {
        /** @type {?} */
        var directiveTypes =
        /** @type {?} */
        componentDefinition.directives;
        /** @type {?} */

        var feature = componentDefinition.features;
        /** @type {?} */

        var pipeTypes =
        /** @type {?} */
        componentDefinition.pipes;
        def.id += _renderCompCount++;
        def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach(
        /**
        * @param {?} fn
        * @return {?}
        */
        function (fn) {
          return fn(def);
        });
        def.directiveDefs = directiveTypes ?
        /**
        * @return {?}
        */
        function () {
          return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes).map(extractDirectiveDef);
        } : null;
        def.pipeDefs = pipeTypes ?
        /**
        * @return {?}
        */
        function () {
          return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef);
        } : null; // Add ngInjectableDef so components are reachable through the module injector by default
        // (unless it has already been set by the @Injectable decorator). This is mostly to
        // support injecting components in tests. In real application code, components should
        // be retrieved through the node injector, so this isn't a problem.

        if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {
          /** @type {?} */
          type[NG_INJECTABLE_DEF] = ɵɵdefineInjectable({
            token: type,
            factory:
            /** @type {?} */
            componentDefinition.factory
          });
        }
      });
      return (
        /** @type {?} */
        def
      );
    }
    /**
     * \@codeGenApi
     * @param {?} type
     * @param {?} directives
     * @param {?} pipes
     * @return {?}
     */


    function ɵɵsetComponentScope(type, directives, pipes) {
      /** @type {?} */
      var def =
      /** @type {?} */
      type.ngComponentDef;

      def.directiveDefs =
      /**
      * @return {?}
      */
      function () {
        return directives.map(extractDirectiveDef);
      };

      def.pipeDefs =
      /**
      * @return {?}
      */
      function () {
        return pipes.map(extractPipeDef);
      };
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function extractDirectiveDef(type) {
      /** @type {?} */
      var def = getComponentDef(type) || getDirectiveDef(type);

      if (ngDevMode && !def) {
        throw new Error("'".concat(type.name, "' is neither 'ComponentType' or 'DirectiveType'."));
      }

      return (
        /** @type {?} */
        def
      );
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function extractPipeDef(type) {
      /** @type {?} */
      var def = getPipeDef(type);

      if (ngDevMode && !def) {
        throw new Error("'".concat(type.name, "' is not a 'PipeType'."));
      }

      return (
        /** @type {?} */
        def
      );
    }
    /**
     * \@codeGenApi
     * @template T
     * @param {?} def
     * @return {?}
     */


    function ɵɵdefineNgModule(def) {
      /** @type {?} */
      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
      };
      return (
        /** @type {?} */
        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
     * @param {?} type
     * @param {?} scope
     * @return {?}
     */


    function ɵɵsetNgModuleScope(type, scope) {
      return (
        /** @type {?} */
        noSideEffects(
        /**
        * @return {?}
        */
        function () {
          /** @type {?} */

          /** @nocollapse */
          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',
     * }
     * ```
     *
     * @template T
     * @param {?=} obj
     * @param {?=} secondary
     * @return {?}
     */


    function invertObject(obj, secondary) {
      if (obj == null) return (
        /** @type {?} */
        EMPTY_OBJ
      );
      /** @type {?} */

      var newLookup = {};

      for (var minifiedKey in obj) {
        if (obj.hasOwnProperty(minifiedKey)) {
          /** @type {?} */
          var publicName =
          /** @type {?} */
          obj[minifiedKey];
          /** @type {?} */

          var declaredName = publicName;

          if (Array.isArray(publicName)) {
            declaredName = publicName[1];
            publicName = publicName[0];
          }

          newLookup[publicName] = minifiedKey;

          if (secondary) {
            secondary[publicName] =
            /** @type {?} */
            declaredName;
          }
        }
      }

      return newLookup;
    }
    /**
     * Create a base definition
     *
     * # Example
     * ```ts
     * class ShouldBeInherited {
     *   static ngBaseDef = ɵɵdefineBase({
     *      ...
     *   })
     * }
     * ```
     *
     * \@codeGenApi
     * @template T
     * @param {?} baseDefinition The base definition parameters
     *
     * @return {?}
     */


    function ɵɵdefineBase(baseDefinition) {
      /** @type {?} */
      var declaredInputs =
      /** @type {?} */
      {};
      return {
        inputs: invertObject(
        /** @type {?} */
        baseDefinition.inputs, declaredInputs),
        declaredInputs: declaredInputs,
        outputs: invertObject(
        /** @type {?} */
        baseDefinition.outputs),
        viewQuery: baseDefinition.viewQuery || null,
        contentQueries: baseDefinition.contentQueries || null,
        hostBindings: baseDefinition.hostBindings || null
      };
    }
    /**
     * 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 ngDirectiveDef = ɵɵdefineDirective({
     *     ...
     *   });
     * }
     * ```
     *
     * \@codeGenApi
     * @type {?}
     */


    var ɵɵdefineDirective =
    /** @type {?} */

    /** @type {?} */
    ɵɵdefineComponent;
    /**
     * Create a pipe definition object.
     *
     * # Example
     * ```
     * class MyPipe implements PipeTransform {
     *   // Generated by Angular Template Compiler
     *   static ngPipeDef = definePipe({
     *     ...
     *   });
     * }
     * ```
     * \@codeGenApi
     * @template T
     * @param {?} pipeDef Pipe definition generated by the compiler
     *
     * @return {?}
     */

    function ɵɵdefinePipe(pipeDef) {
      return (
        /** @type {?} */

        /** @type {?} */
        {
          name: pipeDef.name,
          factory: pipeDef.factory,
          pure: pipeDef.pure !== false,
          onDestroy: pipeDef.type.prototype.ngOnDestroy || null
        }
      );
    }
    /**
     * The following getter methods retrieve the definition form 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.
     * @template T
     * @param {?} type
     * @return {?}
     */


    function getComponentDef(type) {
      return (
        /** @type {?} */
        type[NG_COMPONENT_DEF] || null
      );
    }
    /**
     * @template T
     * @param {?} type
     * @return {?}
     */


    function getDirectiveDef(type) {
      return (
        /** @type {?} */
        type[NG_DIRECTIVE_DEF] || null
      );
    }
    /**
     * @template T
     * @param {?} type
     * @return {?}
     */


    function getPipeDef(type) {
      return (
        /** @type {?} */
        type[NG_PIPE_DEF] || null
      );
    }
    /**
     * @template T
     * @param {?} type
     * @return {?}
     */


    function getBaseDef(type) {
      return (
        /** @type {?} */
        type[NG_BASE_DEF] || null
      );
    }
    /**
     * @template T
     * @param {?} type
     * @param {?=} throwNotFound
     * @return {?}
     */


    function getNgModuleDef(type, throwNotFound) {
      /** @type {?} */

      /** @nocollapse */
      var ngModuleDef =
      /** @type {?} */
      type[NG_MODULE_DEF] || null;

      if (!ngModuleDef && throwNotFound === true) {
        throw new Error("Type ".concat(stringify(type), " does not have 'ngModuleDef' property."));
      }

      return ngModuleDef;
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function getNgLocaleIdDef(type) {
      return (
        /** @type {?} */
        type[NG_LOCALE_ID_DEF] || null
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.

    /** @type {?} */


    var HOST = 0;
    /** @type {?} */

    var TVIEW = 1;
    /** @type {?} */

    var FLAGS = 2;
    /** @type {?} */

    var PARENT = 3;
    /** @type {?} */

    var NEXT = 4;
    /** @type {?} */

    var QUERIES = 5;
    /** @type {?} */

    var T_HOST = 6;
    /** @type {?} */

    var BINDING_INDEX = 7;
    /** @type {?} */

    var CLEANUP = 8;
    /** @type {?} */

    var CONTEXT = 9;
    /** @type {?} */

    var INJECTOR$1 = 10;
    /** @type {?} */

    var RENDERER_FACTORY = 11;
    /** @type {?} */

    var RENDERER = 12;
    /** @type {?} */

    var SANITIZER = 13;
    /** @type {?} */

    var CHILD_HEAD = 14;
    /** @type {?} */

    var CHILD_TAIL = 15;
    /** @type {?} */

    var DECLARATION_VIEW = 16;
    /** @type {?} */

    var DECLARATION_LCONTAINER = 17;
    /** @type {?} */

    var PREORDER_HOOK_FLAGS = 18;
    /**
     * Size of LView's header. Necessary to adjust for it when setting slots.
     * @type {?}
     */

    var HEADER_OFFSET = 19;
    /**
     * @record
     */

    function OpaqueViewState() {}

    if (false) {}
    /**
     * `LView` stores all of the information needed to process the instructions as
     * they are invoked from the template. Each embedded view and component view has its
     * own `LView`. When processing a particular view, we set the `viewData` to that
     * `LView`. When that view is done processing, the `viewData` is set back to
     * whatever the original `viewData` was before (the parent `LView`).
     *
     * Keeping separate state for each view facilities view insertion / deletion, so we
     * don't have to edit the data array based on which views are present.
     * @record
     */


    function LView() {}

    if (false) {}
    /** @enum {number} */


    var LViewFlags = {
      /** The state of the init phase on the first 2 bits */
      InitPhaseStateIncrementer: 1,
      InitPhaseStateMask: 3,

      /**
       * Whether or not the view is in creationMode.
       *
       * This must be stored in the view rather than using `data` as a marker so that
       * we can properly support embedded views. Otherwise, when exiting a child view
       * back into the parent view, `data` will be defined and `creationMode` will be
       * improperly reported as false.
       */
      CreationMode: 4,

      /**
       * Whether or not this LView instance is on its first processing pass.
       *
       * An LView instance is considered to be on its "first pass" until it
       * has completed one creation mode run and one update mode run. At this
       * time, the flag is turned off.
       */
      FirstLViewPass: 8,

      /** Whether this view has default change detection strategy (checks always) or onPush */
      CheckAlways: 16,

      /**
       * Whether or not manual change detection is turned on for onPush components.
       *
       * This is a special mode that only marks components dirty in two cases:
       * 1) There has been a change to an @Input property
       * 2) `markDirty()` has been called manually by the user
       *
       * Note that in this mode, the firing of events does NOT mark components
       * dirty automatically.
       *
       * Manual mode is turned off by default for backwards compatibility, as events
       * automatically mark OnPush components dirty in View Engine.
       *
       * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on
       */
      ManualOnPush: 32,

      /** Whether or not this view is currently dirty (needing check) */
      Dirty: 64,

      /** Whether or not this view is currently attached to change detection tree. */
      Attached: 128,

      /** Whether or not this view is destroyed. */
      Destroyed: 256,

      /** Whether or not this view is the root view */
      IsRoot: 512,

      /**
       * Index of the current init phase on last 22 bits
       */
      IndexWithinInitPhaseIncrementer: 1024,
      IndexWithinInitPhaseShift: 10,
      IndexWithinInitPhaseReset: 1023
    };
    /** @enum {number} */

    var InitPhaseState = {
      OnInitHooksToBeRun: 0,
      AfterContentInitHooksToBeRun: 1,
      AfterViewInitHooksToBeRun: 2,
      InitPhaseCompleted: 3
    };
    /** @enum {number} */

    var PreOrderHookFlags = {
      /** The index of the next pre-order hook to be called in the hooks array, on the first 16
         bits */
      IndexOfTheNextPreOrderHookMaskMask: 65535,

      /**
       * The number of init hooks that have already been called, on the last 16 bits
       */
      NumberOfInitHooksCalledIncrementer: 65536,
      NumberOfInitHooksCalledShift: 16,
      NumberOfInitHooksCalledMask: 4294901760
    };
    /**
     * Set of instructions used to process host bindings efficiently.
     *
     * See VIEW_DATA.md for more information.
     * @record
     */

    function ExpandoInstructions() {}
    /**
     * The static data for an LView (shared between all templates of a
     * given type).
     *
     * Stored on the `ComponentDef.tView`.
     * @record
     */


    function TView() {}

    if (false) {}
    /** @enum {number} */


    var RootContextFlags = {
      Empty: 0,
      DetectChanges: 1,
      FlushPlayers: 2
    };
    /**
     * RootContext contains information which is shared for all components which
     * were bootstrapped with {\@link renderComponent}.
     * @record
     */

    function RootContext() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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`.
     * @type {?}
     */

    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.
     * @type {?}
     */

    var ACTIVE_INDEX = 2; // PARENT and NEXT are indices 3 and 4
    // As we already have these constants in LView, we don't need to re-create them.

    /** @type {?} */

    var MOVED_VIEWS = 5; // T_HOST is index 6
    // We already have this constants in LView, we don't need to re-create it.

    /** @type {?} */

    var NATIVE = 7;
    /** @type {?} */

    var VIEW_REFS = 8;
    /**
     * 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.
     * @type {?}
     */

    var CONTAINER_HEADER_OFFSET = 9;
    /**
     * The state associated with a container.
     *
     * This is an array so that its structure is closer to LView. This helps
     * when traversing the view tree (which is a mix of containers and component
     * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
     * of type.
     * @record
     */

    function LContainer() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$1 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * True if `value` is `LView`.
     * @param {?} value wrapped value of `RNode`, `LView`, `LContainer`
     * @return {?}
     */

    function isLView(value) {
      return Array.isArray(value) && typeof value[TYPE] === 'object';
    }
    /**
     * True if `value` is `LContainer`.
     * @param {?} value wrapped value of `RNode`, `LView`, `LContainer`
     * @return {?}
     */


    function isLContainer(value) {
      return Array.isArray(value) && value[TYPE] === true;
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function isContentQueryHost(tNode) {
      return (tNode.flags & 4
      /* hasContentQuery */
      ) !== 0;
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function isComponent(tNode) {
      return (tNode.flags & 1
      /* isComponent */
      ) === 1
      /* isComponent */
      ;
    }
    /**
     * @template T
     * @param {?} def
     * @return {?}
     */


    function isComponentDef(def) {
      return (
        /** @type {?} */
        def.template !== null
      );
    }
    /**
     * @param {?} target
     * @return {?}
     */


    function isRootView(target) {
      return (target[FLAGS] & 512
      /* IsRoot */
      ) !== 0;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} tNode
     * @param {?} lView
     * @return {?}
     */


    function assertTNodeForLView(tNode, lView) {
      tNode.hasOwnProperty('tView_') && assertEqual(
      /** @type {?} */

      /** @type {?} */
      tNode.tView_, lView[TVIEW], 'This TNode does not belong to this LView.');
    }
    /**
     * @param {?} actual
     * @param {?=} msg
     * @return {?}
     */


    function assertComponentType(actual) {
      var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not ComponentType, it does not have \'ngComponentDef\' property.';

      if (!getComponentDef(actual)) {
        throwError(msg);
      }
    }
    /**
     * @param {?} actual
     * @param {?=} msg
     * @return {?}
     */


    function assertNgModuleType(actual) {
      var msg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Type passed in is not NgModuleType, it does not have \'ngModuleDef\' property.';

      if (!getNgModuleDef(actual)) {
        throwError(msg);
      }
    }
    /**
     * @param {?} isParent
     * @return {?}
     */


    function assertPreviousIsParent(isParent) {
      assertEqual(isParent, true, 'previousOrParentTNode should be a parent');
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function assertHasParent(tNode) {
      assertDefined(tNode, 'previousOrParentTNode should exist!');
      assertDefined(
      /** @type {?} */
      tNode.parent, 'previousOrParentTNode should have a parent');
    }
    /**
     * @param {?} lView
     * @param {?} index
     * @param {?=} arr
     * @return {?}
     */


    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, ")"));
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function assertLContainerOrUndefined(value) {
      value && assertEqual(isLContainer(value), true, 'Expecting LContainer or undefined or null');
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function assertLContainer(value) {
      assertDefined(value, 'LContainer must be defined');
      assertEqual(isLContainer(value), true, 'Expecting LContainer');
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function assertLViewOrUndefined(value) {
      value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function assertLView(value) {
      assertDefined(value, 'LView must be defined');
      assertEqual(isLView(value), true, 'Expecting LView');
    }
    /**
     * @param {?} tView
     * @param {?} errMessage
     * @return {?}
     */


    function assertFirstTemplatePass(tView, errMessage) {
      assertEqual(tView.firstTemplatePass, true, errMessage);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */


    var TNODE = 8;
    /** @type {?} */

    var PARENT_INJECTOR = 8;
    /** @type {?} */

    var INJECTOR_BLOOM_PARENT_SIZE = 9;
    /**
     * Represents a relative location of parent injector.
     *
     * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`
     * pointing to the parent injector.
     * @record
     */

    function RelativeInjectorLocation() {}

    if (false) {}
    /** @enum {number} */


    var RelativeInjectorLocationFlags = {
      InjectorIndexMask: 32767,
      ViewOffsetShift: 16,
      NO_PARENT: -1
    };
    /** @type {?} */

    var NO_PARENT_INJECTOR =
    /** @type {?} */
    -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 =
    /**
     * @param {?} factory
     * @param {?} isViewProvider
     * @param {?} injectImplementation
     */
    function NodeInjectorFactory(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;
      this.canSeeViewProviders = isViewProvider;
      this.injectImpl = injectImplementation;
    };

    if (false) {}
    /**
     * @param {?} obj
     * @return {?}
     */


    function isFactory(obj) {
      // See: https://jsperf.com/instanceof-vs-getprototypeof
      return obj !== null && typeof obj == 'object' && Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;
    } // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$2 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} tNode
     * @param {?} type
     * @return {?}
     */

    function assertNodeType(tNode, type) {
      assertDefined(tNode, 'should be called with a TNode');
      assertEqual(tNode.type, type, "should be a ".concat(typeName(type)));
    }
    /**
     * @param {?} tNode
     * @param {...?} types
     * @return {?}
     */


    function assertNodeOfPossibleTypes(tNode) {
      assertDefined(tNode, 'should be called with a TNode');
      /** @type {?} */

      for (var _len11 = arguments.length, types = new Array(_len11 > 1 ? _len11 - 1 : 0), _key12 = 1; _key12 < _len11; _key12++) {
        types[_key12 - 1] = arguments[_key12];
      }

      var found = types.some(
      /**
      * @param {?} type
      * @return {?}
      */
      function (type) {
        return tNode.type === type;
      });
      assertEqual(found, true, "Should be one of ".concat(types.map(typeName).join(', '), " but got ").concat(typeName(tNode.type)));
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function typeName(type) {
      if (type == 1
      /* Projection */
      ) return 'Projection';
      if (type == 0
      /* Container */
      ) return 'Container';
      if (type == 2
      /* View */
      ) return 'View';
      if (type == 3
      /* Element */
      ) return 'Element';
      if (type == 4
      /* ElementContainer */
      ) return 'ElementContainer';
      return '<unknown>';
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @param {?} nodeIndex The index of the node to which the directive is attached
     * @param {?} initialPreOrderHooksLength the number of pre-order hooks already registered before the
     * current process, used to know if the node index has to be added to the array. If it is -1,
     * the node index is never added.
     * @param {?} initialPreOrderCheckHooksLength same as previous for pre-order check hooks
     * @return {?}
     */


    function registerPreOrderHooks(directiveIndex, directiveDef, tView, nodeIndex, initialPreOrderHooksLength, initialPreOrderCheckHooksLength) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');
      var onChanges = directiveDef.onChanges,
          onInit = directiveDef.onInit,
          doCheck = directiveDef.doCheck;

      if (initialPreOrderHooksLength >= 0 && (!tView.preOrderHooks || initialPreOrderHooksLength === tView.preOrderHooks.length) && (onChanges || onInit || doCheck)) {
        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(nodeIndex);
      }

      if (initialPreOrderCheckHooksLength >= 0 && (!tView.preOrderCheckHooks || initialPreOrderCheckHooksLength === tView.preOrderCheckHooks.length) && (onChanges || doCheck)) {
        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(nodeIndex);
      }

      if (onChanges) {
        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges);
        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges);
      }

      if (onInit) {
        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit);
      }

      if (doCheck) {
        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck);
        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck);
      }
    }
    /**
     *
     * 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
     * @return {?}
     */


    function registerPostOrderHooks(tView, tNode) {
      if (tView.firstTemplatePass) {
        // 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++) {
          /** @type {?} */
          var _directiveDef =
          /** @type {?} */
          tView.data[i];

          if (_directiveDef.afterContentInit) {
            (tView.contentHooks || (tView.contentHooks = [])).push(-i, _directiveDef.afterContentInit);
          }

          if (_directiveDef.afterContentChecked) {
            (tView.contentHooks || (tView.contentHooks = [])).push(i, _directiveDef.afterContentChecked);
            (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, _directiveDef.afterContentChecked);
          }

          if (_directiveDef.afterViewInit) {
            (tView.viewHooks || (tView.viewHooks = [])).push(-i, _directiveDef.afterViewInit);
          }

          if (_directiveDef.afterViewChecked) {
            (tView.viewHooks || (tView.viewHooks = [])).push(i, _directiveDef.afterViewChecked);
            (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, _directiveDef.afterViewChecked);
          }

          if (_directiveDef.onDestroy != null) {
            (tView.destroyHooks || (tView.destroyHooks = [])).push(i, _directiveDef.onDestroy);
          }
        }
      }
    }
    /**
     * 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 necessary hooks at the start of executing a template.
     *
     * Executes hooks that are to be run during the initialization of a directive such
     * as `onChanges`, `onInit`, and `doCheck`.
     *
     * @param {?} currentView
     * @param {?} tView Static data for the view containing the hooks to be executed
     * @param {?} checkNoChangesMode Whether or not we're in checkNoChanges mode.
     * @param {?} currentNodeIndex
     * @return {?}
     */


    function executePreOrderHooks(currentView, tView, checkNoChangesMode, currentNodeIndex) {
      if (!checkNoChangesMode) {
        executeHooks(currentView, tView.preOrderHooks, tView.preOrderCheckHooks, checkNoChangesMode, 0
        /* OnInitHooksToBeRun */
        , currentNodeIndex !== undefined ? currentNodeIndex : null);
      }
    }
    /**
     * Executes hooks against the given `LView` based off of whether or not
     * This is the first pass.
     *
     * @param {?} currentView The view instance data to run the hooks against
     * @param {?} firstPassHooks An array of hooks to run if we're in the first view pass
     * @param {?} checkHooks An Array of hooks to run if we're not in the first view pass.
     * @param {?} checkNoChangesMode Whether or not we're in no changes mode.
     * @param {?} initPhaseState the current state of the init phase
     * @param {?} currentNodeIndex 3 cases depending the 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))
     * @return {?}
     */


    function executeHooks(currentView, firstPassHooks, checkHooks, checkNoChangesMode, initPhaseState, currentNodeIndex) {
      if (checkNoChangesMode) return;
      /** @type {?} */

      var hooksToCall = (currentView[FLAGS] & 3
      /* InitPhaseStateMask */
      ) === initPhaseState ? firstPassHooks : checkHooks;

      if (hooksToCall) {
        callHooks(currentView, hooksToCall, initPhaseState, currentNodeIndex);
      } // The init phase state must be always checked here as it may have been recursively updated


      if (currentNodeIndex == null && (currentView[FLAGS] & 3
      /* InitPhaseStateMask */
      ) === initPhaseState && initPhaseState !== 3
      /* InitPhaseCompleted */
      ) {
          currentView[FLAGS] &= 1023
          /* IndexWithinInitPhaseReset */
          ;
          currentView[FLAGS] += 1
          /* InitPhaseStateIncrementer */
          ;
        }
    }
    /**
     * 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 {?} initPhase
     * @param {?} currentNodeIndex 3 cases depending the 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))
     * @return {?}
     */


    function callHooks(currentView, arr, initPhase, currentNodeIndex) {
      /** @type {?} */
      var startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535
      /* IndexOfTheNextPreOrderHookMaskMask */
      : 0;
      /** @type {?} */

      var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;
      /** @type {?} */

      var lastNodeIndexFound = 0;

      for (var i = startIndex; i < arr.length; i++) {
        /** @type {?} */
        var hook =
        /** @type {?} */
        arr[i + 1];

        if (typeof hook === 'number') {
          lastNodeIndexFound =
          /** @type {?} */
          arr[i];

          if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {
            break;
          }
        } else {
          /** @type {?} */
          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 {?} initPhase
     * @param {?} arr The array in which the hooks are found
     * @param {?} i The current index within the hook data array
     * @return {?}
     */


    function callHook(currentView, initPhase, arr, i) {
      /** @type {?} */
      var isInitHook = arr[i] < 0;
      /** @type {?} */

      var hook =
      /** @type {?} */
      arr[i + 1];
      /** @type {?} */

      var directiveIndex = isInitHook ? -arr[i] :
      /** @type {?} */
      arr[i];
      /** @type {?} */

      var directive = currentView[directiveIndex];

      if (isInitHook) {
        /** @type {?} */
        var indexWithintInitPhase = currentView[FLAGS] >> 10
        /* 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] += 1024
          /* IndexWithinInitPhaseIncrementer */
          ;
          hook.call(directive);
        }
      } else {
        hook.call(directive);
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
    * @license
    * Copyright Google Inc. All Rights Reserved.
    *
    * Use 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(matsko): add updateMask info
     *
     * This file contains all state-based logic for styling in Angular.
     *
     * Styling in Angular is evaluated with a series of styling-specific
     * template instructions which are called one after another each time
     * change detection occurs in Angular.
     *
     * Styling makes use of various temporary, state-based variables between
     * instructions so that it can better cache and optimize its values.
     * These values are usually populated and cleared when an element is
     * exited in change detection (once all the instructions are run for
     * that element).
     *
     * There are, however, situations where the state-based values
     * need to be stored and used at a later point. This ONLY occurs when
     * there are template-level as well as host-binding-level styling
     * instructions on the same element. The example below shows exactly
     * what could be:
     *
     * ```html
     * <!-- two sources of styling: the template and the directive -->
     * <div [style.width]="width" dir-that-sets-height></div>
     * ```
     *
     * If and when this situation occurs, the current styling state is
     * stored in a storage map value and then later accessed once the
     * host bindings are evaluated. Once styling for the current element
     * is over then the map entry will be cleared.
     *
     * To learn more about the algorithm see `TStylingContext`.
     *
     * --------
     */

    /** @type {?} */


    var _stylingState = null;
    /** @type {?} */

    var _stateStorage = new Map(); // this value is not used outside this file and is only here
    // as a caching check for when the element changes.

    /** @type {?} */


    var _stylingElement = null;
    /**
     * Used as a state reference for update values between style/class binding instructions.
     * @record
     */

    function StylingState() {}

    if (false) {}
    /** @type {?} */


    var STYLING_INDEX_START_VALUE = 1;
    /** @type {?} */

    var BIT_MASK_START_VALUE = 0;
    /**
     * @param {?} element
     * @param {?=} readFromMap
     * @return {?}
     */

    function getStylingState(element, readFromMap) {
      if (!_stylingElement || element !== _stylingElement) {
        _stylingElement = element;

        if (readFromMap) {
          _stylingState = _stateStorage.get(element) || null;
          ngDevMode && ngDevMode.stylingReadPersistedState++;
        }

        _stylingState = _stylingState || {
          classesBitMask: BIT_MASK_START_VALUE,
          classesIndex: STYLING_INDEX_START_VALUE,
          stylesBitMask: BIT_MASK_START_VALUE,
          stylesIndex: STYLING_INDEX_START_VALUE
        };
      }

      return (
        /** @type {?} */
        _stylingState
      );
    }
    /**
     * @return {?}
     */


    function resetStylingState() {
      _stylingState = null;
      _stylingElement = null;
    }
    /**
     * @param {?} element
     * @param {?} state
     * @return {?}
     */


    function storeStylingState(element, state) {
      ngDevMode && ngDevMode.stylingWritePersistedState++;

      _stateStorage.set(element, state);
    }
    /**
     * @param {?} element
     * @return {?}
     */


    function deleteStylingStateFromStorage(element) {
      _stateStorage["delete"](element);
    }
    /**
     * @return {?}
     */


    function resetAllStylingState() {
      resetStylingState();

      _stateStorage.clear();
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
     * @type {?}
     */


    var MONKEY_PATCH_KEY_NAME = '__ngContext__';
    /**
     * The internal view context which is specific to a given DOM element, directive or
     * component instance. Each value in here (besides the LView and element node details)
     * can be present, null or undefined. If undefined then it implies the value has not been
     * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
     *
     * Each value will get filled when the respective value is examined within the getContext
     * function. The component, element and each directive instance will share the same instance
     * of the context.
     * @record
     */

    function LContext() {}

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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`
     * @return {?}
     */


    function unwrapRNode(value) {
      while (Array.isArray(value)) {
        value =
        /** @type {?} */
        value[HOST];
      }

      return (
        /** @type {?} */
        value
      );
    }
    /**
     * Returns `LView` or `null` if not found.
     * @param {?} value wrapped value of `RNode`, `LView`, `LContainer`
     * @return {?}
     */


    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 (
          /** @type {?} */
          value
        );
        value =
        /** @type {?} */
        value[HOST];
      }

      return null;
    }
    /**
     * Returns `LContainer` or `null` if not found.
     * @param {?} value wrapped value of `RNode`, `LView`, `LContainer`
     * @return {?}
     */


    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 (
          /** @type {?} */
          value
        );
        value =
        /** @type {?} */
        value[HOST];
      }

      return null;
    }
    /**
     * Retrieves an element value from the provided `viewData`, by unwrapping
     * from any containers, component views, or style contexts.
     * @param {?} index
     * @param {?} lView
     * @return {?}
     */


    function getNativeByIndex(index, lView) {
      return unwrapRNode(lView[index + HEADER_OFFSET]);
    }
    /**
     * 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
     * @return {?}
     */


    function getNativeByTNode(tNode, lView) {
      ngDevMode && assertTNodeForLView(tNode, lView);
      ngDevMode && assertDataInRange(lView, tNode.index);
      /** @type {?} */

      var node = unwrapRNode(lView[tNode.index]);
      ngDevMode && 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
     * @return {?}
     */


    function getNativeByTNodeOrNull(tNode, lView) {
      ngDevMode && assertTNodeForLView(tNode, lView);
      /** @type {?} */

      var index = tNode.index;
      /** @type {?} */

      var node = index == -1 ? null : unwrapRNode(lView[index]);
      ngDevMode && node !== null && assertDomNode(node);
      return node;
    }
    /**
     * A helper function that returns `true` if a given `TNode` has any matching directives.
     * @param {?} tNode
     * @return {?}
     */


    function hasDirectives(tNode) {
      return tNode.directiveEnd > tNode.directiveStart;
    }
    /**
     * @param {?} index
     * @param {?} view
     * @return {?}
     */


    function getTNode(index, view) {
      ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');
      ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');
      return (
        /** @type {?} */
        view[TVIEW].data[index + HEADER_OFFSET]
      );
    }
    /**
     * Retrieves a value from any `LView` or `TData`.
     * @template T
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function loadInternal(view, index) {
      ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);
      return view[index + HEADER_OFFSET];
    }
    /**
     * @param {?} nodeIndex
     * @param {?} hostView
     * @return {?}
     */


    function getComponentViewByIndex(nodeIndex, hostView) {
      // Could be an LView or an LContainer. If LContainer, unwrap to find LView.

      /** @type {?} */
      var slotValue = hostView[nodeIndex];
      /** @type {?} */

      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).
     * @param {?} target
     * @return {?}
     */


    function readPatchedData(target) {
      ngDevMode && assertDefined(target, 'Target expected');
      return target[MONKEY_PATCH_KEY_NAME];
    }
    /**
     * @param {?} target
     * @return {?}
     */


    function readPatchedLView(target) {
      /** @type {?} */
      var value = readPatchedData(target);

      if (value) {
        return Array.isArray(value) ? value :
        /** @type {?} */
        value.lView;
      }

      return null;
    }
    /**
     * 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.
     * @param {?} view
     * @return {?}
     */


    function viewAttachedToChangeDetector(view) {
      return (view[FLAGS] & 128
      /* Attached */
      ) === 128
      /* Attached */
      ;
    }
    /**
     * Returns a boolean for whether the view is attached to a container.
     * @param {?} view
     * @return {?}
     */


    function viewAttachedToContainer(view) {
      return isLContainer(view[PARENT]);
    }
    /**
     * Resets the pre-order hook flags of the view.
     * @param {?} lView the LView on which the flags are reset
     * @return {?}
     */


    function resetPreOrderHookFlags(lView) {
      lView[PREORDER_HOOK_FLAGS] = 0;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Store the element depth count. This is used to identify the root elements of the template
     * so that we can than attach `LView` to only those elements.
     * @type {?}
     */


    var elementDepthCount;
    /**
     * @return {?}
     */

    function getElementDepthCount() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return elementDepthCount;
    }
    /**
     * @return {?}
     */


    function increaseElementDepthCount() {
      elementDepthCount++;
    }
    /**
     * @return {?}
     */


    function decreaseElementDepthCount() {
      elementDepthCount--;
    }
    /** @type {?} */


    var currentDirectiveDef = null;
    /**
     * @return {?}
     */

    function getCurrentDirectiveDef() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return currentDirectiveDef;
    }
    /**
     * @param {?} def
     * @return {?}
     */


    function setCurrentDirectiveDef(def) {
      currentDirectiveDef = def;
    }
    /**
     * Stores whether directives should be matched to elements.
     *
     * When template contains `ngNonBindable` than we need to prevent the runtime form matching
     * directives on children of that element.
     *
     * Example:
     * ```
     * <my-comp my-directive>
     *   Should match component / directive.
     * </my-comp>
     * <div ngNonBindable>
     *   <my-comp my-directive>
     *     Should not match component / directive because we are in ngNonBindable.
     *   </my-comp>
     * </div>
     * ```
     * @type {?}
     */


    var bindingsEnabled;
    /**
     * @return {?}
     */

    function getBindingsEnabled() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return 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
     * @return {?}
     */


    function ɵɵenableBindings() {
      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
     * @return {?}
     */


    function ɵɵdisableBindings() {
      bindingsEnabled = false;
    }
    /**
     * @return {?}
     */


    function getLView() {
      return lView;
    }
    /**
     * Used as the starting directive id value.
     *
     * All subsequent directives are incremented from this value onwards.
     * The reason why this value is `1` instead of `0` is because the `0`
     * value is reserved for the template.
     * @type {?}
     */


    var MIN_DIRECTIVE_ID = 1;
    /** @type {?} */

    var activeDirectiveId = MIN_DIRECTIVE_ID;
    /**
     * Position depth (with respect from leaf to root) in a directive sub-class inheritance chain.
     * @type {?}
     */

    var activeDirectiveSuperClassDepthPosition = 0;
    /**
     * Total count of how many directives are a part of an inheritance chain.
     *
     * When directives are sub-classed (extended) from one to another, Angular
     * needs to keep track of exactly how many were encountered so it can accurately
     * generate the next directive id (once the next directive id is visited).
     * Normally the next directive id just a single incremented value from the
     * previous one, however, if the previous directive is a part of an inheritance
     * chain (a series of sub-classed directives) then the incremented value must
     * also take into account the total amount of sub-classed values.
     *
     * Note that this value resets back to zero once the next directive is
     * visited (when `incrementActiveDirectiveId` or `setActiveHostElement`
     * is called).
     * @type {?}
     */

    var activeDirectiveSuperClassHeight = 0;
    /**
     * Sets the active directive host element and resets the directive id value
     * (when the provided elementIndex value has changed).
     *
     * @param {?=} elementIndex the element index value for the host element where
     *                     the directive/component instance lives
     * @return {?}
     */

    function setActiveHostElement() {
      var elementIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

      if (_selectedIndex !== elementIndex) {
        setSelectedIndex(elementIndex == null ? -1 : elementIndex);
        activeDirectiveId = elementIndex == null ? 0 : MIN_DIRECTIVE_ID;
        activeDirectiveSuperClassDepthPosition = 0;
        activeDirectiveSuperClassHeight = 0;
      }
    }
    /**
     * Returns the current id value of the current directive.
     *
     * For example we have an element that has two directives on it:
     * <div dir-one dir-two></div>
     *
     * dirOne->hostBindings() (id == 1)
     * dirTwo->hostBindings() (id == 2)
     *
     * Note that this is only active when `hostBinding` functions are being processed.
     *
     * Note that directive id values are specific to an element (this means that
     * the same id value could be present on another element with a completely
     * different set of directives).
     * @return {?}
     */


    function getActiveDirectiveId() {
      return activeDirectiveId;
    }
    /**
     * Increments the current directive id value.
     *
     * For example we have an element that has two directives on it:
     * <div dir-one dir-two></div>
     *
     * dirOne->hostBindings() (index = 1)
     * // increment
     * dirTwo->hostBindings() (index = 2)
     *
     * Depending on whether or not a previous directive had any inherited
     * directives present, that value will be incremented in addition
     * to the id jumping up by one.
     *
     * Note that this is only active when `hostBinding` functions are being processed.
     *
     * Note that directive id values are specific to an element (this means that
     * the same id value could be present on another element with a completely
     * different set of directives).
     * @return {?}
     */


    function incrementActiveDirectiveId() {
      activeDirectiveId += 1 + activeDirectiveSuperClassHeight; // because we are dealing with a new directive this
      // means we have exited out of the inheritance chain

      activeDirectiveSuperClassDepthPosition = 0;
      activeDirectiveSuperClassHeight = 0;
    }
    /**
     * Set the current super class (reverse inheritance) position depth for a directive.
     *
     * For example we have two directives: Child and Other (but Child is a sub-class of Parent)
     * <div child-dir other-dir></div>
     *
     * // increment
     * parentInstance->hostBindings() (depth = 1)
     * // decrement
     * childInstance->hostBindings() (depth = 0)
     * otherInstance->hostBindings() (depth = 0 b/c it's a different directive)
     *
     * Note that this is only active when `hostBinding` functions are being processed.
     * @param {?} delta
     * @return {?}
     */


    function adjustActiveDirectiveSuperClassDepthPosition(delta) {
      activeDirectiveSuperClassDepthPosition += delta; // we keep track of the height value so that when the next directive is visited
      // then Angular knows to generate a new directive id value which has taken into
      // account how many sub-class directives were a part of the previous directive.

      activeDirectiveSuperClassHeight = Math.max(activeDirectiveSuperClassHeight, activeDirectiveSuperClassDepthPosition);
    }
    /**
     * Returns he current depth of the super/sub class inheritance chain.
     *
     * This will return how many inherited directive/component classes
     * exist in the current chain.
     *
     * ```typescript
     * \@Directive({ selector: '[super-dir]' })
     * class SuperDir {}
     *  / selector: '[sub-dir]' })
     * class SubDir extends SuperDir {}
     *
     * // if `<div sub-dir>` is used then the super class height is `1`
     * // if `<div super-dir>` is used then the super class height is `0`
     * ```
     * @return {?}
     */


    function getActiveDirectiveSuperClassHeight() {
      return activeDirectiveSuperClassHeight;
    }
    /**
     * Returns the current super class (reverse inheritance) depth for a directive.
     *
     * This is designed to help instruction code distinguish different hostBindings
     * calls from each other when a directive has extended from another directive.
     * Normally using the directive id value is enough, but with the case
     * of parent/sub-class directive inheritance more information is required.
     *
     * Note that this is only active when `hostBinding` functions are being processed.
     * @return {?}
     */


    function getActiveDirectiveSuperClassDepth() {
      return activeDirectiveSuperClassDepthPosition;
    }
    /**
     * 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.
     *
     * \@codeGenApi
     * @param {?} viewToRestore The OpaqueViewState instance to restore.
     *
     * @return {?}
     */


    function ɵɵrestoreView(viewToRestore) {
      contextLView =
      /** @type {?} */

      /** @type {?} */
      viewToRestore;
    }
    /**
     * Used to set the parent property when nodes are created and track query results.
     * @type {?}
     */


    var previousOrParentTNode;
    /**
     * @return {?}
     */

    function getPreviousOrParentTNode() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return previousOrParentTNode;
    }
    /**
     * @param {?} tNode
     * @param {?} _isParent
     * @return {?}
     */


    function setPreviousOrParentTNode(tNode, _isParent) {
      previousOrParentTNode = tNode;
      isParent = _isParent;
    }
    /**
     * @param {?} tNode
     * @param {?} view
     * @return {?}
     */


    function setTNodeAndViewData(tNode, view) {
      ngDevMode && assertLViewOrUndefined(view);
      previousOrParentTNode = tNode;
      lView = view;
    }
    /**
     * If `isParent` is:
     *  - `true`: then `previousOrParentTNode` points to a parent node.
     *  - `false`: then `previousOrParentTNode` points to previous node (sibling).
     * @type {?}
     */


    var isParent;
    /**
     * @return {?}
     */

    function getIsParent() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return isParent;
    }
    /**
     * @return {?}
     */


    function setIsNotParent() {
      isParent = false;
    }
    /**
     * @return {?}
     */


    function setIsParent() {
      isParent = true;
    }
    /**
     * Checks whether a given view is in creation mode
     * @param {?=} view
     * @return {?}
     */


    function isCreationMode() {
      var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : lView;
      return (view[FLAGS] & 4
      /* CreationMode */
      ) === 4
      /* CreationMode */
      ;
    }
    /**
     * State of the current view being processed.
     *
     * An array of nodes (text, element, container, etc), pipes, their bindings, and
     * any local variables that need to be stored between invocations.
     * @type {?}
     */


    var lView;
    /**
     * The last viewData retrieved by nextContext().
     * Allows building nextContext() and reference() calls.
     *
     * e.g. const inner = x().$implicit; const outer = x().$implicit;
     * @type {?}
     */

    var contextLView =
    /** @type {?} */
    null;
    /**
     * @return {?}
     */

    function getContextLView() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return contextLView;
    }
    /**
     * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.
     *
     * Necessary to support ChangeDetectorRef.checkNoChanges().
     * @type {?}
     */


    var checkNoChangesMode = false;
    /**
     * @return {?}
     */

    function getCheckNoChangesMode() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return checkNoChangesMode;
    }
    /**
     * @param {?} mode
     * @return {?}
     */


    function setCheckNoChangesMode(mode) {
      checkNoChangesMode = mode;
    }
    /**
     * The root index from which pure function instructions should calculate their binding
     * indices. In component views, this is TView.bindingStartIndex. In a host binding
     * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.
     * @type {?}
     */


    var bindingRootIndex = -1; // top level variables should not be exported for performance reasons (PERF_NOTES.md)

    /**
     * @return {?}
     */

    function getBindingRoot() {
      return bindingRootIndex;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function setBindingRoot(value) {
      bindingRootIndex = value;
    }
    /**
     * Current index of a View or Content Query which needs to be processed next.
     * We iterate over the list of Queries and increment current query index at every step.
     * @type {?}
     */


    var currentQueryIndex = 0;
    /**
     * @return {?}
     */

    function getCurrentQueryIndex() {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return currentQueryIndex;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function setCurrentQueryIndex(value) {
      currentQueryIndex = value;
    }
    /**
     * Swap the current state with a new state.
     *
     * For performance reasons we store the state 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 state for later, and when the view is
     * exited the state has to be restored
     *
     * @param {?} newView New state to become active
     * @param {?} hostTNode
     * @return {?} the previous state;
     */


    function enterView(newView, hostTNode) {
      ngDevMode && assertLViewOrUndefined(newView);
      /** @type {?} */

      var oldView = lView;

      if (newView) {
        /** @type {?} */
        var tView = newView[TVIEW];
        bindingRootIndex = tView.bindingStartIndex;
      }

      previousOrParentTNode =
      /** @type {?} */
      hostTNode;
      isParent = true;
      lView = contextLView = newView;
      return oldView;
    }
    /**
     * @template T
     * @param {?=} level
     * @return {?}
     */


    function nextContextImpl() {
      var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
      contextLView = walkUpViews(level,
      /** @type {?} */
      contextLView);
      return (
        /** @type {?} */
        contextLView[CONTEXT]
      );
    }
    /**
     * @param {?} nestingLevel
     * @param {?} currentView
     * @return {?}
     */


    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 =
        /** @type {?} */
        currentView[DECLARATION_VIEW];
        nestingLevel--;
      }

      return currentView;
    }
    /**
     * Resets the application state.
     * @return {?}
     */


    function resetComponentState() {
      isParent = false;
      previousOrParentTNode =
      /** @type {?} */
      null;
      elementDepthCount = 0;
      bindingsEnabled = true;
      setCurrentStyleSanitizer(null);
      resetAllStylingState();
    }
    /**
     * Used in lieu of enterView to make it clear when we are exiting a child view. This makes
     * the direction of traversal (up or down the view tree) a bit clearer.
     *
     * @param {?} newView New state to become active
     * @param {?} safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.
     * This is not always the case (for example, the application may have crashed and `leaveView` is
     * being executed while unwinding the call stack).
     * @return {?}
     */


    function leaveView(newView, safeToRunHooks) {
      /** @type {?} */
      var tView = lView[TVIEW];

      if (isCreationMode(lView)) {
        lView[FLAGS] &= ~4
        /* CreationMode */
        ;
      } else {
        try {
          resetPreOrderHookFlags(lView);
          safeToRunHooks && executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2
          /* AfterViewInitHooksToBeRun */
          , undefined);
        } finally {
          // Views are clean and in update mode after being checked, so these bits are cleared
          lView[FLAGS] &= ~(64
          /* Dirty */
          | 8
          /* FirstLViewPass */
          );
          lView[BINDING_INDEX] = tView.bindingStartIndex;
        }
      }

      enterView(newView, null);
    }
    /** @type {?} */


    var _selectedIndex = -1;
    /**
     * Gets 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.
     * @return {?}
     */


    function getSelectedIndex() {
      return _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.
     * @param {?} index
     * @return {?}
     */


    function setSelectedIndex(index) {
      _selectedIndex = index; // we have now jumped to another element
      // therefore the state is stale

      resetStylingState();
    }
    /** @type {?} */


    var _currentNamespace = null;
    /**
     * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
     *
     * \@codeGenApi
     * @return {?}
     */

    function ɵɵnamespaceSVG() {
      _currentNamespace = 'http://www.w3.org/2000/svg';
    }
    /**
     * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵnamespaceMathML() {
      _currentNamespace = 'http://www.w3.org/1998/MathML/';
    }
    /**
     * Sets the namespace used to create elements to `null`, which forces element creation to use
     * `createElement` rather than `createElementNS`.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵnamespaceHTML() {
      namespaceHTMLInternal();
    }
    /**
     * Sets the namespace used to create elements to `null`, which forces element creation to use
     * `createElement` rather than `createElementNS`.
     * @return {?}
     */


    function namespaceHTMLInternal() {
      _currentNamespace = null;
    }
    /**
     * @return {?}
     */


    function getNamespace() {
      return _currentNamespace;
    }
    /** @type {?} */


    var _currentSanitizer;
    /**
     * @param {?} sanitizer
     * @return {?}
     */


    function setCurrentStyleSanitizer(sanitizer) {
      _currentSanitizer = sanitizer;
    }
    /**
     * @return {?}
     */


    function getCurrentStyleSanitizer() {
      return _currentSanitizer;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Returns whether the values are different from a change detection stand point.
     *
     * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    function isDifferent(a, b) {
      // NaN is the only value that is not equal to itself so the first
      // test checks if both a and b are not NaN
      return !(a !== a && b !== b) && a !== b;
    }
    /**
     * 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.
     * @param {?} value
     * @return {?}
     */


    function renderStringify(value) {
      if (typeof value === 'string') return value;
      if (value == null) return '';
      return '' + 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.
     * @param {?} value
     * @return {?}
     */


    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);
    }

    var ɵ0$2 =
    /**
    * @return {?}
    */
    function ɵ0$2() {
      return (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only
      setTimeout // everything else
      ).bind(_global);
    };
    /** @type {?} */


    var defaultScheduler = ɵ0$2();
    /**
     *
     * \@codeGenApi
     * @param {?} element
     * @return {?}
     */

    function ɵɵresolveWindow(element) {
      return {
        name: 'window',
        target: element.ownerDocument.defaultView
      };
    }
    /**
     *
     * \@codeGenApi
     * @param {?} element
     * @return {?}
     */


    function ɵɵresolveDocument(element) {
      return {
        name: 'document',
        target: element.ownerDocument
      };
    }
    /**
     *
     * \@codeGenApi
     * @param {?} element
     * @return {?}
     */


    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)
     *
     * @type {?}
     */


    var INTERPOLATION_DELIMITER = "\uFFFD";
    /**
     * Determines whether or not the given string is a property metadata string.
     * See storeBindingMetadata().
     * @param {?} str
     * @return {?}
     */

    function isPropMetadataString(str) {
      return str.indexOf(INTERPOLATION_DELIMITER) >= 0;
    }
    /**
     * Unwrap a value which might be behind a closure (for forward declaration reasons).
     * @template T
     * @param {?} value
     * @return {?}
     */


    function maybeUnwrapFn(value) {
      if (value instanceof Function) {
        return value();
      } else {
        return value;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var MAP_BASED_ENTRY_PROP_NAME = '--MAP--';
    /** @type {?} */

    var TEMPLATE_DIRECTIVE_INDEX = 0;
    /**
     * Creates a new instance of the `TStylingContext`.
     *
     * The `TStylingContext` is used as a manifest of all style or all class bindings on
     * an element. Because it is a T-level data-structure, it is only created once per
     * tNode for styles and for classes. This function allocates a new instance of a
     * `TStylingContext` with the initial values (see `interfaces.ts` for more info).
     * @param {?=} initialStyling
     * @return {?}
     */

    function allocTStylingContext(initialStyling) {
      // because map-based bindings deal with a dynamic set of values, there
      // is no way to know ahead of time whether or not sanitization is required.
      // For this reason the configuration will always mark sanitization as active
      // (this means that when map-based values are applied then sanitization will
      // be checked against each property).

      /** @type {?} */
      var mapBasedConfig = 1
      /* SanitizationRequired */
      ;
      return [initialStyling || [''], 0
      /* Initial */
      , TEMPLATE_DIRECTIVE_INDEX, mapBasedConfig, 0, MAP_BASED_ENTRY_PROP_NAME];
    }
    /**
     * Sets the provided directive as the last directive index in the provided `TStylingContext`.
     *
     * Styling in Angular can be applied from the template as well as multiple sources of
     * host bindings. This means that each binding function (the template function or the
     * hostBindings functions) will generate styling instructions as well as a styling
     * apply function (i.e. `stylingApply()`). Because host bindings functions and the
     * template function are independent from one another this means that the styling apply
     * function will be called multiple times. By tracking the last directive index (which
     * is what happens in this function) the styling algorithm knows exactly when to flush
     * styling (which is when the last styling apply function is executed).
     * @param {?} context
     * @param {?} lastDirectiveIndex
     * @return {?}
     */


    function updateLastDirectiveIndex(context, lastDirectiveIndex) {
      if (lastDirectiveIndex === TEMPLATE_DIRECTIVE_INDEX) {
        /** @type {?} */
        var currentValue = context[2
        /* LastDirectiveIndexPosition */
        ];

        if (currentValue > TEMPLATE_DIRECTIVE_INDEX) {
          // This means that a directive or two contained a host bindings function, but
          // now the template function also contains styling. When this combination of sources
          // comes up then we need to tell the context to store the state between updates
          // (because host bindings evaluation happens after template binding evaluation).
          markContextToPersistState(context);
        }
      } else {
        context[2
        /* LastDirectiveIndexPosition */
        ] = lastDirectiveIndex;
      }
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function getConfig(context) {
      return context[1
      /* ConfigPosition */
      ];
    }
    /**
     * @param {?} context
     * @param {?} value
     * @return {?}
     */


    function setConfig(context, value) {
      context[1
      /* ConfigPosition */
      ] = value;
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function getProp(context, index) {
      return (
        /** @type {?} */
        context[index + 2
        /* PropOffset */
        ]
      );
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function getPropConfig(context, index) {
      return (
        /** @type {?} */
        context[index + 0
        /* ConfigAndGuardOffset */
        ] & 1
        /* Mask */

      );
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function isSanitizationRequired(context, index) {
      return (getPropConfig(context, index) & 1
      /* SanitizationRequired */
      ) > 0;
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function getGuardMask(context, index) {
      /** @type {?} */
      var configGuardValue =
      /** @type {?} */
      context[index + 0
      /* ConfigAndGuardOffset */
      ];
      return configGuardValue >> 1
      /* TotalBits */
      ;
    }
    /**
     * @param {?} context
     * @param {?} index
     * @param {?} maskValue
     * @return {?}
     */


    function setGuardMask(context, index, maskValue) {
      /** @type {?} */
      var config = getPropConfig(context, index);
      /** @type {?} */

      var guardMask = maskValue << 1
      /* TotalBits */
      ;
      context[index + 0
      /* ConfigAndGuardOffset */
      ] = config | guardMask;
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function getValuesCount(context, index) {
      return (
        /** @type {?} */
        context[index + 1
        /* ValuesCountOffset */
        ]
      );
    }
    /**
     * @param {?} context
     * @param {?} index
     * @param {?} offset
     * @return {?}
     */


    function getBindingValue(context, index, offset) {
      return (
        /** @type {?} */
        context[index + 3
        /* BindingsStartOffset */
        + offset]
      );
    }
    /**
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function getDefaultValue(context, index) {
      /** @type {?} */
      var valuesCount = getValuesCount(context, index);
      return (
        /** @type {?} */
        context[index + 3
        /* BindingsStartOffset */
        + valuesCount - 1]
      );
    }
    /**
     * Temporary function which determines whether or not a context is
     * allowed to be flushed based on the provided directive index.
     * @param {?} context
     * @param {?} index
     * @return {?}
     */


    function allowStylingFlush(context, index) {
      return context && index === context[2
      /* LastDirectiveIndexPosition */
      ] ? true : false;
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function lockContext(context) {
      setConfig(context, getConfig(context) | 1
      /* Locked */
      );
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function isContextLocked(context) {
      return (getConfig(context) & 1
      /* Locked */
      ) > 0;
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function stateIsPersisted(context) {
      return (getConfig(context) & 2
      /* PersistStateValues */
      ) > 0;
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function markContextToPersistState(context) {
      setConfig(context, getConfig(context) | 2
      /* PersistStateValues */
      );
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function getPropValuesStartPosition(context) {
      return 6
      /* MapBindingsBindingsStartPosition */
      + context[4
      /* MapBindingsValuesCountPosition */
      ];
    }
    /**
     * @param {?} prop
     * @return {?}
     */


    function isMapBased(prop) {
      return prop === MAP_BASED_ENTRY_PROP_NAME;
    }
    /**
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    function hasValueChanged(a, b) {
      /** @type {?} */
      var compareValueA = Array.isArray(a) ? a[0
      /* RawValuePosition */
      ] : a;
      /** @type {?} */

      var compareValueB = Array.isArray(b) ? b[0
      /* RawValuePosition */
      ] : b; // these are special cases for String based values (which are created as artifacts
      // when sanitization is bypassed on a particular value)

      if (compareValueA instanceof String) {
        compareValueA = compareValueA.toString();
      }

      if (compareValueB instanceof String) {
        compareValueB = compareValueB.toString();
      }

      return isDifferent(compareValueA, compareValueB);
    }
    /**
     * Determines whether the provided styling value is truthy or falsy.
     * @param {?} value
     * @return {?}
     */


    function isStylingValueDefined(value) {
      // the reason why null is compared against is because
      // a CSS class value that is set to `false` must be
      // respected (otherwise it would be treated as falsy).
      // Empty string values are because developers usually
      // set a value to an empty string to remove it.
      return value != null && value !== '';
    }
    /**
     * @param {?} a
     * @param {?} b
     * @param {?=} separator
     * @return {?}
     */


    function concatString(a, b) {
      var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
      return a + (b.length && a.length ? separator : '') + b;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function hyphenate(value) {
      return value.replace(/[a-z][A-Z]/g,
      /**
      * @param {?} v
      * @return {?}
      */
      function (v) {
        return v.charAt(0) + '-' + v.charAt(1);
      }).toLowerCase();
    }
    /**
     * Returns an instance of `StylingMapArray`.
     *
     * This function is designed to find an instance of `StylingMapArray` in case it is stored
     * inside of an instance of `TStylingContext`. When a styling context is created it
     * will copy over an initial styling values from the tNode (which are stored as a
     * `StylingMapArray` on the `tNode.classes` or `tNode.styles` values).
     * @param {?} value
     * @return {?}
     */


    function getStylingMapArray(value) {
      return isStylingContext(value) ?
      /** @type {?} */
      value[0
      /* InitialStylingValuePosition */
      ] : value;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isStylingContext(value) {
      // the StylingMapArray is in the format of [initial, prop, string, prop, string]
      // and this is the defining value to distinguish between arrays
      return Array.isArray(value) && value.length >= 6
      /* MapBindingsBindingsStartPosition */
      && typeof value[1] !== 'string';
    }
    /**
     * @param {?} context
     * @return {?}
     */


    function getInitialStylingValue(context) {
      /** @type {?} */
      var map = getStylingMapArray(context);
      return map &&
      /** @type {?} */
      map[0
      /* RawValuePosition */
      ] || '';
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function hasClassInput(tNode) {
      return (tNode.flags & 8
      /* hasClassInput */
      ) !== 0;
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function hasStyleInput(tNode) {
      return (tNode.flags & 16
      /* hasStyleInput */
      ) !== 0;
    }
    /**
     * @param {?} map
     * @param {?} index
     * @return {?}
     */


    function getMapProp(map, index) {
      return (
        /** @type {?} */
        map[index + 0
        /* PropOffset */
        ]
      );
    }
    /**
     * @param {?} map
     * @param {?} index
     * @param {?} value
     * @return {?}
     */


    function setMapValue(map, index, value) {
      map[index + 1
      /* ValueOffset */
      ] = value;
    }
    /**
     * @param {?} map
     * @param {?} index
     * @return {?}
     */


    function getMapValue(map, index) {
      return (
        /** @type {?} */
        map[index + 1
        /* ValueOffset */
        ]
      );
    }
    /**
     * @param {?} classes
     * @return {?}
     */


    function forceClassesAsString(classes) {
      if (classes && typeof classes !== 'string') {
        classes = Object.keys(classes).join(' ');
      }

      return (
        /** @type {?} */
        classes || ''
      );
    }
    /**
     * @param {?} styles
     * @return {?}
     */


    function forceStylesAsString(styles) {
      /** @type {?} */
      var str = '';

      if (styles) {
        /** @type {?} */
        var props = Object.keys(styles);

        for (var i = 0; i < props.length; i++) {
          /** @type {?} */
          var prop = props[i];
          str = concatString(str, "".concat(prop, ":").concat(styles[prop]), ';');
        }
      }

      return str;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 goal here is to make sure that the browser DOM API is the Renderer.
     * We do this by defining a subset of DOM API to be the renderer and than
     * use that time for rendering.
     *
     * At runtime we can then use the DOM api directly, in server or web-worker
     * it will be easy to implement such API.
     */

    /** @enum {number} */


    var RendererStyleFlags3 = {
      Important: 1,
      DashCase: 2
    };
    RendererStyleFlags3[RendererStyleFlags3.Important] = 'Important';
    RendererStyleFlags3[RendererStyleFlags3.DashCase] = 'DashCase';
    /**
     * Object Oriented style of API needed to create elements and text nodes.
     *
     * This is the native browser API style, e.g. operations are methods on individual objects
     * like HTMLElement. With this style, no additional code is needed as a facade
     * (reducing payload size).
     *
     * @record
     */

    function ObjectOrientedRenderer3() {}

    if (false) {}
    /**
     * Returns whether the `renderer` is a `ProceduralRenderer3`
     * @param {?} renderer
     * @return {?}
     */


    function isProceduralRenderer(renderer) {
      return !!
      /** @type {?} */
      renderer.listen;
    }
    /**
     * Procedural style of API needed to create elements and text nodes.
     *
     * In non-native browser environments (e.g. platforms such as web-workers), this is the
     * facade that enables element manipulation. This also facilitates backwards compatibility
     * with Renderer2.
     * @record
     */


    function ProceduralRenderer3() {}

    if (false) {}
    /**
     * @record
     */


    function RendererFactory3() {}

    if (false) {}

    var ɵ0$3 =
    /**
    * @param {?} hostElement
    * @param {?} rendererType
    * @return {?}
    */
    function ɵ0$3(hostElement, rendererType) {
      return document;
    };
    /** @type {?} */


    var domRendererFactory3 = {
      createRenderer: ɵ0$3
    };
    /**
     * Subset of API needed for appending elements and text nodes.
     * @record
     */

    function RNode() {}

    if (false) {}
    /**
     * Subset of API needed for writing attributes, properties, and setting up
     * listeners on Element.
     * @record
     */


    function RElement() {}

    if (false) {}
    /**
     * @record
     */


    function RCssStyleDeclaration() {}

    if (false) {}
    /**
     * @record
     */


    function RDomTokenList() {}

    if (false) {}
    /**
     * @record
     */


    function RText() {}

    if (false) {}
    /**
     * @record
     */


    function RComment() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$3 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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 {?} native The element that the attributes will be assigned to
     * @param {?} attrs The attribute array of values that will be assigned to the element
     * @return {?} the index value that was last accessed in the attributes array
     */

    function setUpAttributes(_native, attrs) {
      /** @type {?} */
      var renderer = getLView()[RENDERER];
      /** @type {?} */

      var isProc = isProceduralRenderer(renderer);
      /** @type {?} */

      var i = 0;

      while (i < attrs.length) {
        /** @type {?} */
        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++;
          /** @type {?} */

          var namespaceURI =
          /** @type {?} */
          attrs[i++];
          /** @type {?} */

          var attrName =
          /** @type {?} */
          attrs[i++];
          /** @type {?} */

          var attrVal =
          /** @type {?} */
          attrs[i++];
          ngDevMode && ngDevMode.rendererSetAttribute++;
          isProc ?
          /** @type {?} */
          renderer.setAttribute(_native, attrName, attrVal, namespaceURI) : _native.setAttributeNS(namespaceURI, attrName, attrVal);
        } else {
          // attrName is string;

          /** @type {?} */
          var _attrName =
          /** @type {?} */
          value;
          /** @type {?} */

          var _attrVal = attrs[++i]; // Standard attributes

          ngDevMode && ngDevMode.rendererSetAttribute++;

          if (isAnimationProp(_attrName)) {
            if (isProc) {
              /** @type {?} */
              renderer.setProperty(_native, _attrName, _attrVal);
            }
          } else {
            isProc ?
            /** @type {?} */
            renderer.setAttribute(_native,
            /** @type {?} */
            _attrName,
            /** @type {?} */
            _attrVal) : _native.setAttribute(
            /** @type {?} */
            _attrName,
            /** @type {?} */
            _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;
    }
    /**
     * @param {?} attrs
     * @param {?} startIndex
     * @return {?}
     */


    function attrsStylingIndexOf(attrs, startIndex) {
      for (var i = startIndex; i < attrs.length; i++) {
        /** @type {?} */
        var val = attrs[i];

        if (val === 1
        /* Classes */
        || val === 2
        /* Styles */
        ) {
            return i;
          }
      }

      return -1;
    }
    /**
     * 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.
     * @return {?} 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 */
      ;
    }
    /** @type {?} */


    var ANIMATION_PROP_PREFIX = '@';
    /**
     * @param {?} name
     * @return {?}
     */

    function isAnimationProp(name) {
      return name[0] === ANIMATION_PROP_PREFIX;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /// Parent Injector Utils ///////////////////////////////////////////////////////////////

    /**
     * @param {?} parentLocation
     * @return {?}
     */


    function hasParentInjector(parentLocation) {
      return parentLocation !== NO_PARENT_INJECTOR;
    }
    /**
     * @param {?} parentLocation
     * @return {?}
     */


    function getParentInjectorIndex(parentLocation) {
      return (
        /** @type {?} */

        /** @type {?} */
        parentLocation & 32767
        /* InjectorIndexMask */

      );
    }
    /**
     * @param {?} parentLocation
     * @return {?}
     */


    function getParentInjectorViewOffset(parentLocation) {
      return (
        /** @type {?} */

        /** @type {?} */
        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
     * @return {?} The LView instance that contains the parent injector
     */


    function getParentInjectorView(location, startView) {
      /** @type {?} */
      var viewOffset = getParentInjectorViewOffset(location);
      /** @type {?} */

      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 =
        /** @type {?} */
        parentView[DECLARATION_VIEW];
        viewOffset--;
      }

      return parentView;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @return {?}
     */


    function getLViewParent(lView) {
      ngDevMode && assertLView(lView);
      /** @type {?} */

      var parent = lView[PARENT];
      return isLContainer(parent) ?
      /** @type {?} */
      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`
     * @return {?}
     */


    function getRootView(componentOrLView) {
      ngDevMode && assertDefined(componentOrLView, 'component');
      /** @type {?} */

      var lView = isLView(componentOrLView) ? componentOrLView :
      /** @type {?} */
      readPatchedLView(componentOrLView);

      while (lView && !(lView[FLAGS] & 512
      /* IsRoot */
      )) {
        lView =
        /** @type {?} */
        getLViewParent(lView);
      }

      ngDevMode && assertLView(lView);
      return lView;
    }
    /**
     * Given an `LView`, find the closest declaration view which is not an embedded view.
     *
     * This method searches for the `LView` associated with the component which declared the `LView`.
     *
     * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise
     * it walks the declaration parents until it finds a component view (non-embedded-view.)
     *
     * @param {?} lView LView for which we want a host element node
     * @return {?} The host node
     */


    function findComponentView(lView) {
      /** @type {?} */
      var rootTNode = lView[T_HOST];

      while (rootTNode !== null && rootTNode.type === 2
      /* View */
      ) {
        ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');
        lView =
        /** @type {?} */
        lView[DECLARATION_VIEW];
        rootTNode = lView[T_HOST];
      }

      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.
     * @return {?}
     */


    function getRootContext(viewOrComponent) {
      /** @type {?} */
      var rootView = getRootView(viewOrComponent);
      ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');
      return (
        /** @type {?} */
        rootView[CONTEXT]
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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');
     *   }
     * }
     *
     * ```
     * @type {?}
     */


    var includeViewProviders = true;
    /**
     * @param {?} v
     * @return {?}
     */

    function setIncludeViewProviders(v) {
      /** @type {?} */
      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.
     * @type {?}
     */


    var BLOOM_SIZE = 256;
    /** @type {?} */

    var BLOOM_MASK = BLOOM_SIZE - 1;
    /**
     * Counter used to generate unique IDs for directives.
     * @type {?}
     */

    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
     * @return {?}
     */

    function bloomAdd(injectorIndex, tView, type) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'expected firstTemplatePass to be true');
      /** @type {?} */

      var id = typeof type !== 'string' ?
      /** @type {?} */
      type[NG_ELEMENT_ID] : type.charCodeAt(0) || 0; // 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 {?} */
        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.

      /** @type {?} */


      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.

      /** @type {?} */

      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

      /** @type {?} */

      var b7 = bloomBit & 0x80;
      /** @type {?} */

      var b6 = bloomBit & 0x40;
      /** @type {?} */

      var b5 = bloomBit & 0x20;
      /** @type {?} */

      var tData =
      /** @type {?} */
      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 {?} hostView View where the node is stored
     * @return {?} Node injector
     */


    function getOrCreateNodeInjectorForNode(tNode, hostView) {
      /** @type {?} */
      var existingInjectorIndex = getInjectorIndex(tNode, hostView);

      if (existingInjectorIndex !== -1) {
        return existingInjectorIndex;
      }
      /** @type {?} */


      var tView = hostView[TVIEW];

      if (tView.firstTemplatePass) {
        tNode.injectorIndex = hostView.length;
        insertBloom(tView.data, tNode); // foundation for node bloom

        insertBloom(hostView, null); // foundation for cumulative bloom

        insertBloom(tView.blueprint, null);
        ngDevMode && assertEqual(tNode.flags === 0 || tNode.flags === 1
        /* isComponent */
        , true, 'expected tNode.flags to not be initialized');
      }
      /** @type {?} */


      var parentLoc = getParentInjectorLocation(tNode, hostView);
      /** @type {?} */

      var parentIndex = getParentInjectorIndex(parentLoc);
      /** @type {?} */

      var parentLView = getParentInjectorView(parentLoc, hostView);
      /** @type {?} */

      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)) {
        /** @type {?} */
        var parentData =
        /** @type {?} */
        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; i++) {
          hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];
        }
      }

      hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;
      return injectorIndex;
    }
    /**
     * @param {?} arr
     * @param {?} footer
     * @return {?}
     */


    function insertBloom(arr, footer) {
      arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);
    }
    /**
     * @param {?} tNode
     * @param {?} hostView
     * @return {?}
     */


    function getInjectorIndex(tNode, hostView) {
      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
      hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {
        return -1;
      } else {
        return tNode.injectorIndex;
      }
    }
    /**
     * Finds the index of the parent injector, with a view offset if applicable. Used to set the
     * parent injector initially.
     *
     * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`
     * @param {?} tNode
     * @param {?} view
     * @return {?}
     */


    function getParentInjectorLocation(tNode, view) {
      if (tNode.parent && tNode.parent.injectorIndex !== -1) {
        return (
          /** @type {?} */
          tNode.parent.injectorIndex
        ); // ViewOffset is 0
      } // For most cases, the parent injector index can be found on the host node (e.g. for component
      // or container), so this loop will be skipped, but we must keep the loop here to support
      // the rarer case of deeply nested <ng-template> tags or inline views.

      /** @type {?} */


      var hostTNode = view[T_HOST];
      /** @type {?} */

      var viewOffset = 1;

      while (hostTNode && hostTNode.injectorIndex === -1) {
        view =
        /** @type {?} */
        view[DECLARATION_VIEW];
        hostTNode = view ? view[T_HOST] : null;
        viewOffset++;
      }

      return hostTNode ? hostTNode.injectorIndex | viewOffset << 16
      /* ViewOffsetShift */
      :
      /** @type {?} */
      -1;
    }
    /**
     * Makes a type or an injection token public to the DI system by adding it to an
     * injector's bloom filter.
     *
     * @param {?} injectorIndex
     * @param {?} tView
     * @param {?} token The type or the injection token to be made public
     * @return {?}
     */


    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.ngComponentDef = defineComponent({
     *   factory: () => new MyComponent(injectAttribute('title'))
     *   ...
     * })
     * ```
     *
     * \@publicApi
     * @param {?} tNode
     * @param {?} attrNameToInject
     * @return {?}
     */


    function injectAttributeImpl(tNode, attrNameToInject) {
      ngDevMode && assertNodeOfPossibleTypes(tNode, 0
      /* Container */
      , 3
      /* Element */
      , 4
      /* ElementContainer */
      );
      ngDevMode && assertDefined(tNode, 'expecting tNode');

      if (attrNameToInject === 'class') {
        return getInitialStylingValue(tNode.classes);
      }

      if (attrNameToInject === 'style') {
        return getInitialStylingValue(tNode.styles);
      }
      /** @type {?} */


      var attrs = tNode.attrs;

      if (attrs) {
        /** @type {?} */
        var attrsLength = attrs.length;
        /** @type {?} */

        var i = 0;

        while (i < attrsLength) {
          /** @type {?} */
          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 (
              /** @type {?} */
              attrs[i + 1]
            );
          } else {
            i = i + 2;
          }
        }
      }

      return null;
    }
    /**
     * 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. Negative values are reserved for special objects.
     *   - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)
     *
     * @template T
     * @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`
     * @return {?} 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) {
        /** @type {?} */
        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') {
          /** @type {?} */
          var savePreviousOrParentTNode = getPreviousOrParentTNode();
          /** @type {?} */

          var saveLView = getLView();
          setTNodeAndViewData(tNode, lView);

          try {
            /** @type {?} */
            var value = bloomHash();

            if (value == null && !(flags & InjectFlags.Optional)) {
              throw new Error("No provider for ".concat(stringifyForError(token), "!"));
            } else {
              return value;
            }
          } finally {
            setTNodeAndViewData(savePreviousOrParentTNode, saveLView);
          }
        } else if (typeof bloomHash == 'number') {
          if (bloomHash === -1) {
            // `-1` is a special value used to identify `Injector` types.
            return (
              /** @type {?} */
              new NodeInjector(tNode, lView)
            );
          } // If the token has a bloom hash, then it is a token which could be in NodeInjector.
          // 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.

          /** @type {?} */


          var previousTView = null;
          /** @type {?} */

          var injectorIndex = getInjectorIndex(tNode, lView);
          /** @type {?} */

          var parentLocation = NO_PARENT_INJECTOR;
          /** @type {?} */

          var hostTElementNode = flags & InjectFlags.Host ? findComponentView(lView)[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 + PARENT_INJECTOR];

            if (!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) {
            parentLocation = lView[injectorIndex + PARENT_INJECTOR]; // Check the current injector. If it matches, see if it contains token.

            /** @type {?} */

            var tView = lView[TVIEW];

            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.

              /** @type {?} */
              var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);

              if (instance !== NOT_FOUND) {
                return instance;
              }
            }

            if (shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 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;
            }
          }
        }
      }

      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) {
        /** @type {?} */
        var moduleInjector = lView[INJECTOR$1]; // 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)

        /** @type {?} */

        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);
        }
      }

      if (flags & InjectFlags.Optional) {
        return notFoundValue;
      } else {
        throw new Error("NodeInjector: NOT_FOUND [".concat(stringifyForError(token), "]"));
      }
    }
    /** @type {?} */


    var NOT_FOUND = {};
    /**
     * @template T
     * @param {?} injectorIndex
     * @param {?} lView
     * @param {?} token
     * @param {?} previousTView
     * @param {?} flags
     * @param {?} hostTElementNode
     * @return {?}
     */

    function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
      /** @type {?} */
      var currentTView = lView[TVIEW];
      /** @type {?} */

      var tNode =
      /** @type {?} */
      currentTView.data[injectorIndex + TNODE]; // First, we need to determine if view providers can be accessed by the starting element.
      // There are two possibities

      /** @type {?} */

      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)
      isComponent(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
      /* Element */
      ; // This special case happens when there is a @host on the inject and when we are searching
      // on the host element node.

      /** @type {?} */

      var isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;
      /** @type {?} */

      var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);

      if (injectableIdx !== null) {
        return getNodeInjectable(currentTView.data, lView, injectableIdx,
        /** @type {?} */
        tNode);
      } else {
        return NOT_FOUND;
      }
    }
    /**
     * Searches for the given token among the node's directives and providers.
     *
     * @template T
     * @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.
     * @return {?} Index of a found directive or provider, or null when none found.
     */


    function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {
      /** @type {?} */
      var nodeProviderIndexes = tNode.providerIndexes;
      /** @type {?} */

      var tInjectables = tView.data;
      /** @type {?} */

      var injectablesStart = nodeProviderIndexes & 65535
      /* ProvidersStartIndexMask */
      ;
      /** @type {?} */

      var directivesStart = tNode.directiveStart;
      /** @type {?} */

      var directiveEnd = tNode.directiveEnd;
      /** @type {?} */

      var cptViewProvidersCount = nodeProviderIndexes >> 16
      /* CptViewProvidersCountShift */
      ;
      /** @type {?} */

      var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible

      /** @type {?} */

      var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;

      for (var i = startingIndex; i < endIndex; i++) {
        /** @type {?} */
        var providerTokenOrDef =
        /** @type {?} */
        tInjectables[i];

        if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart &&
        /** @type {?} */
        providerTokenOrDef.type === token) {
          return i;
        }
      }

      if (isHostSpecialCase) {
        /** @type {?} */
        var dirDef =
        /** @type {?} */
        tInjectables[directivesStart];

        if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {
          return directivesStart;
        }
      }

      return null;
    }
    /**
     * Retrieve or instantiate the injectable from the `lData` 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.
     * @param {?} tData
     * @param {?} lData
     * @param {?} index
     * @param {?} tNode
     * @return {?}
     */


    function getNodeInjectable(tData, lData, index, tNode) {
      /** @type {?} */
      var value = lData[index];

      if (isFactory(value)) {
        /** @type {?} */
        var factory = value;

        if (factory.resolving) {
          throw new Error("Circular dep for ".concat(stringifyForError(tData[index])));
        }
        /** @type {?} */


        var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
        factory.resolving = true;
        /** @type {?} */

        var previousInjectImplementation;

        if (factory.injectImpl) {
          previousInjectImplementation = setInjectImplementation(factory.injectImpl);
        }
        /** @type {?} */


        var savePreviousOrParentTNode = getPreviousOrParentTNode();
        /** @type {?} */

        var saveLView = getLView();
        setTNodeAndViewData(tNode, lData);

        try {
          value = lData[index] = factory.factory(undefined, tData, lData, tNode);
        } finally {
          if (factory.injectImpl) setInjectImplementation(previousInjectImplementation);
          setIncludeViewProviders(previousIncludeViewProviders);
          factory.resolving = false;
          setTNodeAndViewData(savePreviousOrParentTNode, saveLView);
        }
      }

      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
     * @return {?} 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;
      }
      /** @type {?} */


      var tokenId =
      /** @type {?} */
      token[NG_ELEMENT_ID]; // Negative token IDs are used for special objects such as `Injector`

      return typeof tokenId === 'number' && tokenId > 0 ? tokenId & BLOOM_MASK : tokenId;
    }
    /**
     * @param {?} bloomHash
     * @param {?} injectorIndex
     * @param {?} injectorView
     * @return {?}
     */


    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.

      /** @type {?} */
      var mask = 1 << bloomHash;
      /** @type {?} */

      var b7 = bloomHash & 0x80;
      /** @type {?} */

      var b6 = bloomHash & 0x40;
      /** @type {?} */

      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.

      /** @type {?} */

      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
     * @param {?} flags
     * @param {?} isFirstHostTNode
     * @return {?}
     */


    function shouldSearchParent(flags, isFirstHostTNode) {
      return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);
    }

    var NodeInjector = /*#__PURE__*/function () {
      /**
       * @param {?} _tNode
       * @param {?} _lView
       */
      function NodeInjector(_tNode, _lView) {
        _classCallCheck(this, NodeInjector);

        this._tNode = _tNode;
        this._lView = _lView;
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @return {?}
       */


      _createClass2(NodeInjector, [{
        key: "get",
        value: function get(token, notFoundValue) {
          return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);
        }
      }]);

      return NodeInjector;
    }();

    if (false) {}
    /**
     * \@codeGenApi
     * @template T
     * @param {?} type
     * @return {?}
     */


    function ɵɵgetFactoryOf(type) {
      /** @type {?} */
      var typeAny =
      /** @type {?} */
      type;
      /** @type {?} */

      var def = getComponentDef(typeAny) || getDirectiveDef(typeAny) || getPipeDef(typeAny) || getInjectableDef(typeAny) || getInjectorDef(typeAny);

      if (!def || def.factory === undefined) {
        return null;
      }

      return def.factory;
    }
    /**
     * \@codeGenApi
     * @template T
     * @param {?} type
     * @return {?}
     */


    function ɵɵgetInheritedFactory(type) {
      /** @type {?} */
      var proto =
      /** @type {?} */
      Object.getPrototypeOf(type.prototype).constructor;
      /** @type {?} */

      var factory = ɵɵgetFactoryOf(proto);

      if (factory !== null) {
        return factory;
      } else {
        // 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 (
          /**
          * @param {?} t
          * @return {?}
          */
          function (t) {
            return new t();
          }
        );
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} error
     * @return {?}
     */


    function getType(error) {
      return (
        /** @type {?} */
        error[ERROR_TYPE]
      );
    }
    /**
     * @param {?} error
     * @return {?}
     */


    function getDebugContext(error) {
      return (
        /** @type {?} */
        error[ERROR_DEBUG_CONTEXT]
      );
    }
    /**
     * @param {?} error
     * @return {?}
     */


    function getOriginalError(error) {
      return (
        /** @type {?} */
        error[ERROR_ORIGINAL_ERROR]
      );
    }
    /**
     * @param {?} error
     * @return {?}
     */


    function getErrorLogger(error) {
      return (
        /** @type {?} */
        error[ERROR_LOGGER] || defaultErrorLogger
      );
    }
    /**
     * @param {?} console
     * @param {...?} values
     * @return {?}
     */


    function defaultErrorLogger(console) {
      for (var _len12 = arguments.length, values = new Array(_len12 > 1 ? _len12 - 1 : 0), _key13 = 1; _key13 < _len12; _key13++) {
        values[_key13 - 1] = arguments[_key13];
      }

      /** @type {?} */
      console.error.apply(console, values);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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;
      }
      /**
       * @param {?} error
       * @return {?}
       */


      _createClass2(ErrorHandler, [{
        key: "handleError",
        value: function handleError(error) {
          /** @type {?} */
          var originalError = this._findOriginalError(error);
          /** @type {?} */


          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.

          /** @type {?} */


          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
         * @param {?} error
         * @return {?}
         */

      }, {
        key: "_findContext",
        value: function _findContext(error) {
          if (error) {
            return getDebugContext(error) ? getDebugContext(error) : this._findContext(getOriginalError(error));
          }

          return null;
        }
        /**
         * \@internal
         * @param {?} error
         * @return {?}
         */

      }, {
        key: "_findOriginalError",
        value: function _findOriginalError(error) {
          /** @type {?} */
          var e = getOriginalError(error);

          while (e && getOriginalError(e)) {
            e = getOriginalError(e);
          }

          return e;
        }
      }]);

      return ErrorHandler;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 schema definition associated with an NgModule.
     *
     * @see `\@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
     *
     * @param name The name of a defined schema.
     *
     * \@publicApi
     * @record
     */


    function SchemaMetadata() {}

    if (false) {}
    /**
     * 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
     * @type {?}
     */


    var CUSTOM_ELEMENTS_SCHEMA = {
      name: 'custom-elements'
    };
    /**
     * Defines a schema that allows any property on any element.
     *
     * \@publicApi
     * @type {?}
     */

    var NO_ERRORS_SCHEMA = {
      name: 'no-errors-schema'
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */

    var BRAND = '__SANITIZER_TRUSTED_BRAND__';
    /** @enum {string} */

    var BypassType = {
      Url: 'Url',
      Html: 'Html',
      ResourceUrl: 'ResourceUrl',
      Script: 'Script',
      Style: 'Style'
    };
    /**
     * A branded trusted string used with sanitization.
     *
     * See: {\@link TrustedHtmlString}, {\@link TrustedResourceUrlString}, {\@link TrustedScriptString},
     * {\@link TrustedStyleString}, {\@link TrustedUrlString}
     * @record
     */

    function TrustedString() {}

    if (false) {}
    /**
     * A branded trusted string used with sanitization of `html` strings.
     *
     * See: {\@link bypassSanitizationTrustHtml} and {\@link htmlSanitizer}.
     * @record
     */


    function TrustedHtmlString() {}

    if (false) {}
    /**
     * A branded trusted string used with sanitization of `style` strings.
     *
     * See: {\@link bypassSanitizationTrustStyle} and {\@link styleSanitizer}.
     * @record
     */


    function TrustedStyleString() {}

    if (false) {}
    /**
     * A branded trusted string used with sanitization of `url` strings.
     *
     * See: {\@link bypassSanitizationTrustScript} and {\@link scriptSanitizer}.
     * @record
     */


    function TrustedScriptString() {}

    if (false) {}
    /**
     * A branded trusted string used with sanitization of `url` strings.
     *
     * See: {\@link bypassSanitizationTrustUrl} and {\@link urlSanitizer}.
     * @record
     */


    function TrustedUrlString() {}

    if (false) {}
    /**
     * A branded trusted string used with sanitization of `resourceUrl` strings.
     *
     * See: {\@link bypassSanitizationTrustResourceUrl} and {\@link resourceUrlSanitizer}.
     * @record
     */


    function TrustedResourceUrlString() {}

    if (false) {}
    /**
     * @param {?} value
     * @param {?} type
     * @return {?}
     */


    function allowSanitizationBypass(value, type) {
      return value instanceof String &&
      /** @type {?} */
      value[BRAND] === type;
    }
    /**
     * 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.
     * @return {?} a `html` `String` which has been branded to be implicitly trusted.
     */


    function bypassSanitizationTrustHtml(trustedHtml) {
      return bypassSanitizationTrustString(trustedHtml, "Html"
      /* Html */
      );
    }
    /**
     * 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.
     * @return {?} a `style` `String` which has been branded to be implicitly trusted.
     */


    function bypassSanitizationTrustStyle(trustedStyle) {
      return bypassSanitizationTrustString(trustedStyle, "Style"
      /* Style */
      );
    }
    /**
     * 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.
     * @return {?} a `script` `String` which has been branded to be implicitly trusted.
     */


    function bypassSanitizationTrustScript(trustedScript) {
      return bypassSanitizationTrustString(trustedScript, "Script"
      /* Script */
      );
    }
    /**
     * 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.
     * @return {?} a `url` `String` which has been branded to be implicitly trusted.
     */


    function bypassSanitizationTrustUrl(trustedUrl) {
      return bypassSanitizationTrustString(trustedUrl, "Url"
      /* Url */
      );
    }
    /**
     * 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.
     * @return {?} a `url` `String` which has been branded to be implicitly trusted.
     */


    function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {
      return bypassSanitizationTrustString(trustedResourceUrl, "ResourceUrl"
      /* ResourceUrl */
      );
    }
    /**
     * @param {?} trustedString
     * @param {?} mode
     * @return {?}
     */


    function bypassSanitizationTrustString(trustedString, mode) {
      // tslint:disable-next-line

      /** @type {?} */
      var trusted =
      /** @type {?} */
      new String(trustedString);
      trusted[BRAND] = mode;
      return trusted;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.');
      }

      _devMode = false;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 class is used to get hold of an inert tree of DOM elements containing dirty HTML
     * that needs sanitizing.
     * Depending upon browser support we must use one of three strategies for doing this.
     * Support: Safari 10.x -> XHR strategy
     * Support: Firefox -> DomParser strategy
     * Default: InertDocument strategy
     */


    var InertBodyHelper = /*#__PURE__*/function () {
      /**
       * @param {?} defaultDoc
       */
      function InertBodyHelper(defaultDoc) {
        _classCallCheck(this, InertBodyHelper);

        this.defaultDoc = defaultDoc;
        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');
        this.inertBodyElement = this.inertDocument.body;

        if (this.inertBodyElement == null) {
          // usually there should be only one body element in the document, but IE doesn't have any, so
          // we need to create one.

          /** @type {?} */
          var inertHtml = this.inertDocument.createElement('html');
          this.inertDocument.appendChild(inertHtml);
          this.inertBodyElement = this.inertDocument.createElement('body');
          inertHtml.appendChild(this.inertBodyElement);
        }

        this.inertBodyElement.innerHTML = '<svg><g onload="this.parentNode.remove()"></g></svg>';

        if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {
          // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element
          // so use the XHR strategy.
          this.getInertBodyElement = this.getInertBodyElement_XHR;
          return;
        }

        this.inertBodyElement.innerHTML = '<svg><p><style><img src="</style><img src=x onerror=alert(1)//">';

        if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {
          // We just hit the Firefox bug - which prevents the inner img JS from being sanitized
          // so use the DOMParser strategy, if it is available.
          // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we
          // fall through to the default strategy below.
          if (isDOMParserAvailable()) {
            this.getInertBodyElement = this.getInertBodyElement_DOMParser;
            return;
          }
        } // None of the bugs were hit so it is safe for us to use the default InertDocument strategy


        this.getInertBodyElement = this.getInertBodyElement_InertDocument;
      }
      /**
       * Use XHR to create and fill an inert body element (on Safari 10.1)
       * See
       * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
       * @private
       * @param {?} html
       * @return {?}
       */


      _createClass2(InertBodyHelper, [{
        key: "getInertBodyElement_XHR",
        value: function getInertBodyElement_XHR(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.
          html = '<body><remove></remove>' + html + '</body>';

          try {
            html = encodeURI(html);
          } catch (_a) {
            return null;
          }
          /** @type {?} */


          var xhr = new XMLHttpRequest();
          xhr.responseType = 'document';
          xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);
          xhr.send(undefined);
          /** @type {?} */

          var body = xhr.response.body;
          body.removeChild(
          /** @type {?} */
          body.firstChild);
          return body;
        }
        /**
         * Use DOMParser to create and fill an inert body element (on Firefox)
         * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
         *
         * @private
         * @param {?} html
         * @return {?}
         */

      }, {
        key: "getInertBodyElement_DOMParser",
        value: function getInertBodyElement_DOMParser(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.
          html = '<body><remove></remove>' + html + '</body>';

          try {
            /** @type {?} */
            var body =
            /** @type {?} */
            new
            /** @type {?} */
            window.DOMParser().parseFromString(html, 'text/html').body;
            body.removeChild(
            /** @type {?} */
            body.firstChild);
            return body;
          } catch (_a) {
            return null;
          }
        }
        /**
         * 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 default sane strategy to use if the browser does not require one of the specialised
         * strategies above.
         * @private
         * @param {?} html
         * @return {?}
         */

      }, {
        key: "getInertBodyElement_InertDocument",
        value: function getInertBodyElement_InertDocument(html) {
          // Prefer using <template> element if supported.

          /** @type {?} */
          var templateEl = this.inertDocument.createElement('template');

          if ('content' in templateEl) {
            templateEl.innerHTML = html;
            return templateEl;
          }

          this.inertBodyElement.innerHTML = html; // Support: IE 9-11 only
          // strip custom-namespaced attributes on IE<=11

          if (
          /** @type {?} */
          this.defaultDoc.documentMode) {
            this.stripCustomNsAttrs(this.inertBodyElement);
          }

          return this.inertBodyElement;
        }
        /**
         * When IE9-11 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.
         * @private
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "stripCustomNsAttrs",
        value: function stripCustomNsAttrs(el) {
          /** @type {?} */
          var elAttrs = el.attributes; // loop backwards so that we can support removals.

          for (var i = elAttrs.length - 1; 0 < i; i--) {
            /** @type {?} */
            var attrib = elAttrs.item(i);
            /** @type {?} */

            var attrName =
            /** @type {?} */
            attrib.name;

            if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
              el.removeAttribute(attrName);
            }
          }
          /** @type {?} */


          var childNode =
          /** @type {?} */
          el.firstChild;

          while (childNode) {
            if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(
            /** @type {?} */
            childNode);
            childNode = childNode.nextSibling;
          }
        }
      }]);

      return InertBodyHelper;
    }();

    if (false) {}
    /**
     * We need to determine whether the DOMParser exists in the global context.
     * The try-catch is because, on some browsers, trying to access this property
     * on window can actually throw an error.
     *
     * @suppress {uselessCode}
     * @return {?}
     */


    function isDOMParserAvailable() {
      try {
        return !!
        /** @type {?} */
        window.DOMParser;
      } catch (_a) {
        return false;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @type {?}
     */


    var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
    /* A pattern that matches safe srcset values */

    /** @type {?} */

    var SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;
    /**
     * A pattern that matches safe data URLs. Only matches image, video and audio types.
     * @type {?}
     */

    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;
    /**
     * @param {?} url
     * @return {?}
     */

    function _sanitizeUrl(url) {
      url = String(url);
      if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;

      if (isDevMode()) {
        console.warn("WARNING: sanitizing unsafe URL value ".concat(url, " (see http://g.co/ng/security#xss)"));
      }

      return 'unsafe:' + url;
    }
    /**
     * @param {?} srcset
     * @return {?}
     */


    function sanitizeSrcset(srcset) {
      srcset = String(srcset);
      return srcset.split(',').map(
      /**
      * @param {?} srcset
      * @return {?}
      */
      function (srcset) {
        return _sanitizeUrl(srcset.trim());
      }).join(', ');
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} tags
     * @return {?}
     */


    function tagSet(tags) {
      /** @type {?} */
      var res = {};

      var _iterator35 = _createForOfIteratorHelper(tags.split(',')),
          _step35;

      try {
        for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {
          var t = _step35.value;
          res[t] = true;
        }
      } catch (err) {
        _iterator35.e(err);
      } finally {
        _iterator35.f();
      }

      return res;
    }
    /**
     * @param {...?} sets
     * @return {?}
     */


    function merge() {
      /** @type {?} */
      var res = {};

      for (var _len13 = arguments.length, sets = new Array(_len13), _key14 = 0; _key14 < _len13; _key14++) {
        sets[_key14] = arguments[_key14];
      }

      for (var _i13 = 0, _sets = sets; _i13 < _sets.length; _i13++) {
        var s = _sets[_i13];

        for (var v in s) {
          if (s.hasOwnProperty(v)) res[v] = true;
        }
      }

      return res;
    } // Good source of info about elements and attributes
    // http://dev.w3.org/html5/spec/Overview.html#semantics
    // http://simon.html5.org/html-elements
    // Safe Void Elements - HTML5
    // http://dev.w3.org/html5/spec/Overview.html#void-elements

    /** @type {?} */


    var VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr'); // Elements that you can, intentionally, leave open (and which close themselves)
    // http://dev.w3.org/html5/spec/Overview.html#optional-tags

    /** @type {?} */

    var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');
    /** @type {?} */

    var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');
    /** @type {?} */

    var OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); // Safe Block Elements - HTML5

    /** @type {?} */

    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

    /** @type {?} */

    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'));
    /** @type {?} */

    var VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); // Attributes that have href and hence need to be sanitized

    /** @type {?} */

    var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href'); // Attributes that have special href set hence need to be sanitized

    /** @type {?} */

    var SRCSET_ATTRS = tagSet('srcset');
    /** @type {?} */

    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)

    /** @type {?} */

    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.

    /** @type {?} */

    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.

    /** @type {?} */

    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 = [];
      }
      /**
       * @param {?} el
       * @return {?}
       */


      _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.

          /** @type {?} */
          var current =
          /** @type {?} */
          el.firstChild;
          /** @type {?} */

          var traverseContent = true;

          while (current) {
            if (current.nodeType === Node.ELEMENT_NODE) {
              traverseContent = this.startElement(
              /** @type {?} */
              current);
            } else if (current.nodeType === Node.TEXT_NODE) {
              this.chars(
              /** @type {?} */
              current.nodeValue);
            } else {
              // Strip non-element, non-text nodes.
              this.sanitizedSomething = true;
            }

            if (traverseContent && current.firstChild) {
              current =
              /** @type {?} */
              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(
                /** @type {?} */
                current);
              }
              /** @type {?} */


              var next = this.checkClobberedElement(current,
              /** @type {?} */
              current.nextSibling);

              if (next) {
                current = next;
                break;
              }

              current = this.checkClobberedElement(current,
              /** @type {?} */
              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`.
         *
         * @private
         * @param {?} element The element to sanitize.
         * @return {?} True if the element's contents should be traversed.
         */

      }, {
        key: "startElement",
        value: function startElement(element) {
          /** @type {?} */
          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);
          /** @type {?} */

          var elAttrs = element.attributes;

          for (var i = 0; i < elAttrs.length; i++) {
            /** @type {?} */
            var elAttr = elAttrs.item(i);
            /** @type {?} */

            var attrName =
            /** @type {?} */
            elAttr.name;
            /** @type {?} */

            var lower = attrName.toLowerCase();

            if (!VALID_ATTRS.hasOwnProperty(lower)) {
              this.sanitizedSomething = true;
              continue;
            }
            /** @type {?} */


            var value =
            /** @type {?} */
            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;
        }
        /**
         * @private
         * @param {?} current
         * @return {?}
         */

      }, {
        key: "endElement",
        value: function endElement(current) {
          /** @type {?} */
          var tagName = current.nodeName.toLowerCase();

          if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {
            this.buf.push('</');
            this.buf.push(tagName);
            this.buf.push('>');
          }
        }
        /**
         * @private
         * @param {?} chars
         * @return {?}
         */

      }, {
        key: "chars",
        value: function chars(_chars) {
          this.buf.push(encodeEntities(_chars));
        }
        /**
         * @param {?} node
         * @param {?} nextNode
         * @return {?}
         */

      }, {
        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(
            /** @type {?} */
            node.outerHTML));
          }

          return nextNode;
        }
      }]);

      return SanitizingHtmlSerializer;
    }();

    if (false) {} // Regular Expressions for parsing tags and attributes

    /** @type {?} */


    var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; // ! to ~ is the ASCII range.

    /** @type {?} */

    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
     * @return {?}
     */

    function encodeEntities(value) {
      return value.replace(/&/g, '&amp;').replace(SURROGATE_PAIR_REGEXP,
      /**
      * @param {?} match
      * @return {?}
      */
      function (match) {
        /** @type {?} */
        var hi = match.charCodeAt(0);
        /** @type {?} */

        var low = match.charCodeAt(1);
        return '&#' + ((hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000) + ';';
      }).replace(NON_ALPHANUMERIC_REGEXP,
      /**
      * @param {?} match
      * @return {?}
      */
      function (match) {
        return '&#' + match.charCodeAt(0) + ';';
      }).replace(/</g, '&lt;').replace(/>/g, '&gt;');
    }
    /** @type {?} */


    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.
     * @param {?} defaultDoc
     * @param {?} unsafeHtmlInput
     * @return {?}
     */

    function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
      /** @type {?} */
      var inertBodyElement = null;

      try {
        inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc); // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).

        /** @type {?} */

        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.

        /** @type {?} */

        var mXSSAttempts = 5;
        /** @type {?} */

        var parsedHtml = unsafeHtml;

        do {
          if (mXSSAttempts === 0) {
            throw new Error('Failed to sanitize html because the input is unstable');
          }

          mXSSAttempts--;
          unsafeHtml = parsedHtml;
          parsedHtml =
          /** @type {?} */
          inertBodyElement.innerHTML;
          inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
        } while (unsafeHtml !== parsedHtml);
        /** @type {?} */


        var sanitizer = new SanitizingHtmlSerializer();
        /** @type {?} */

        var safeHtml = sanitizer.sanitizeChildren(
        /** @type {?} */
        getTemplateContent(
        /** @type {?} */
        inertBodyElement) || inertBodyElement);

        if (isDevMode() && sanitizer.sanitizedSomething) {
          console.warn('WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');
        }

        return safeHtml;
      } finally {
        // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.
        if (inertBodyElement) {
          /** @type {?} */
          var parent = getTemplateContent(inertBodyElement) || inertBodyElement;

          while (parent.firstChild) {
            parent.removeChild(parent.firstChild);
          }
        }
      }
    }
    /**
     * @param {?} el
     * @return {?}
     */


    function getTemplateContent(el) {
      return 'content' in
      /** @type {?} */
      el && isTemplateElement(el) ? el.content : null;
    }
    /**
     * @param {?} el
     * @return {?}
     */


    function isTemplateElement(el) {
      return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */


    var SecurityContext = {
      NONE: 0,
      HTML: 1,
      STYLE: 2,
      SCRIPT: 3,
      URL: 4,
      RESOURCE_URL: 5
    };
    SecurityContext[SecurityContext.NONE] = 'NONE';
    SecurityContext[SecurityContext.HTML] = 'HTML';
    SecurityContext[SecurityContext.STYLE] = 'STYLE';
    SecurityContext[SecurityContext.SCRIPT] = 'SCRIPT';
    SecurityContext[SecurityContext.URL] = 'URL';
    SecurityContext[SecurityContext.RESOURCE_URL] = 'RESOURCE_URL';
    /**
     * Sanitizer is used by the views to sanitize potentially dangerous values.
     *
     * \@publicApi
     * @abstract
     */

    var Sanitizer = function Sanitizer() {
      _classCallCheck(this, Sanitizer);
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Regular expression for safe style values.
     *
     * Quotes (" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.
     *
     * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or
     * font-family) and hence could allow multiple values to get injected, but that should pose no risk
     * of XSS.
     *
     * The function expression checks only for XSS safety, not for CSS validity.
     *
     * This regular expression was taken from the Closure sanitization library, and augmented for
     * transformation values.
     * @type {?}
     */


    var VALUES = '[-,."\'%_!# a-zA-Z0-9]+';
    /** @type {?} */

    var TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?';
    /** @type {?} */

    var COLOR_FNS = '(?:rgb|hsl)a?';
    /** @type {?} */

    var GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';
    /** @type {?} */

    var CSS3_FNS = '(?:calc|attr)';
    /** @type {?} */

    var FN_ARGS = '\\([-0-9.%, #a-zA-Z]+\\)';
    /** @type {?} */

    var SAFE_STYLE_VALUE = new RegExp("^(".concat(VALUES, "|") + "(?:".concat(TRANSFORMATION_FNS, "|").concat(COLOR_FNS, "|").concat(GRADIENTS, "|").concat(CSS3_FNS, ")") + "".concat(FN_ARGS, ")$"), 'g');
    /**
     * Matches a `url(...)` value with an arbitrary argument as long as it does
     * not contain parentheses.
     *
     * The URL value still needs to be sanitized separately.
     *
     * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted
     * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.
     * by observing whether scroll bars are displayed, or character ranges used by a font face
     * definition.
     *
     * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that
     * binding a URL value without further cooperation from the page will cause an information leak, and
     * if so, it is just a leak, not a full blown XSS vulnerability.
     *
     * Given the common use case, low likelihood of attack vector, and low impact of an attack, this
     * code is permissive and allows URLs that sanitize otherwise.
     * @type {?}
     */

    var URL_RE = /^url\(([^)]+)\)$/;
    /**
     * Checks that quotes (" and ') are properly balanced inside a string. Assumes
     * that neither escape (\) nor any other character that could result in
     * breaking out of a string parsing context are allowed;
     * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.
     *
     * This code was taken from the Closure sanitization library.
     * @param {?} value
     * @return {?}
     */

    function hasBalancedQuotes(value) {
      /** @type {?} */
      var outsideSingle = true;
      /** @type {?} */

      var outsideDouble = true;

      for (var i = 0; i < value.length; i++) {
        /** @type {?} */
        var c = value.charAt(i);

        if (c === '\'' && outsideDouble) {
          outsideSingle = !outsideSingle;
        } else if (c === '"' && outsideSingle) {
          outsideDouble = !outsideDouble;
        }
      }

      return outsideSingle && outsideDouble;
    }
    /**
     * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single
     * value) and returns a value that is safe to use in a browser environment.
     * @param {?} value
     * @return {?}
     */


    function _sanitizeStyle(value) {
      value = String(value).trim(); // Make sure it's actually a string.

      if (!value) return ''; // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for
      // reasoning behind this.

      /** @type {?} */

      var urlMatch = value.match(URL_RE);

      if (urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1] || value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {
        return value; // Safe style values.
      }

      if (isDevMode()) {
        console.warn("WARNING: sanitizing unsafe style value ".concat(value, " (see http://g.co/ng/security#xss)."));
      }

      return 'unsafe';
    }
    /** @enum {number} */


    var StyleSanitizeMode = {
      /** Just check to see if the property is required to be sanitized or not */
      ValidateProperty: 1,

      /** Skip checking the property; just sanitize the value */
      SanitizeOnly: 2,

      /** Check the property and (if true) then sanitize the value */
      ValidateAndSanitize: 3
    };
    /**
     * Used to intercept and sanitize style values before they are written to the renderer.
     *
     * This function is designed to be called in two modes. When a value is not provided
     * then the function will return a boolean whether a property will be sanitized later.
     * If a value is provided then the sanitized version of that will be returned.
     * @record
     */

    function StyleSanitizeFn() {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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}.
     *
     * \@publicApi
     * @param {?} unsafeHtml untrusted `html`, typically from the user.
     * @return {?} `html` string which is safe to display to user, because all of the dangerous javascript
     * and urls have been removed.
     *
     */


    function ɵɵsanitizeHtml(unsafeHtml) {
      /** @type {?} */
      var sanitizer = getSanitizer();

      if (sanitizer) {
        return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';
      }

      if (allowSanitizationBypass(unsafeHtml, "Html"
      /* Html */
      )) {
        return unsafeHtml.toString();
      }

      return _sanitizeHtml(document, renderStringify(unsafeHtml));
    }
    /**
     * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
     * dangerous content.
     *
     * This method parses the `style` 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 bypassSanitizationTrustStyle}.
     *
     * \@publicApi
     * @param {?} unsafeStyle untrusted `style`, typically from the user.
     * @return {?} `style` string which is safe to bind to the `style` properties, because all of the
     * dangerous javascript and urls have been removed.
     *
     */


    function ɵɵsanitizeStyle(unsafeStyle) {
      /** @type {?} */
      var sanitizer = getSanitizer();

      if (sanitizer) {
        return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';
      }

      if (allowSanitizationBypass(unsafeStyle, "Style"
      /* Style */
      )) {
        return unsafeStyle.toString();
      }

      return _sanitizeStyle(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}.
     *
     * \@publicApi
     * @param {?} unsafeUrl untrusted `url`, typically from the user.
     * @return {?} `url` string which is safe to bind to the `src` properties such as `<img src>`, because
     * all of the dangerous javascript has been removed.
     *
     */


    function ɵɵsanitizeUrl(unsafeUrl) {
      /** @type {?} */
      var sanitizer = getSanitizer();

      if (sanitizer) {
        return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';
      }

      if (allowSanitizationBypass(unsafeUrl, "Url"
      /* Url */
      )) {
        return unsafeUrl.toString();
      }

      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}.
     *
     * \@publicApi
     * @param {?} unsafeResourceUrl untrusted `url`, typically from the user.
     * @return {?} `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.
     *
     */


    function ɵɵsanitizeResourceUrl(unsafeResourceUrl) {
      /** @type {?} */
      var sanitizer = getSanitizer();

      if (sanitizer) {
        return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';
      }

      if (allowSanitizationBypass(unsafeResourceUrl, "ResourceUrl"
      /* ResourceUrl */
      )) {
        return unsafeResourceUrl.toString();
      }

      throw new Error('unsafe value used in a resource URL context (see http://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}.
     *
     * \@publicApi
     * @param {?} unsafeScript untrusted `script`, typically from the user.
     * @return {?} `url` string which is safe to bind to the `<script>` element such as `<img src>`,
     * because only trusted `scripts` have been allowed to pass.
     *
     */


    function ɵɵsanitizeScript(unsafeScript) {
      /** @type {?} */
      var sanitizer = getSanitizer();

      if (sanitizer) {
        return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';
      }

      if (allowSanitizationBypass(unsafeScript, "Script"
      /* Script */
      )) {
        return unsafeScript.toString();
      }

      throw new Error('unsafe value used in a script context');
    }
    /**
     * 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.
     * @param {?} tag
     * @param {?} prop
     * @return {?}
     */


    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.
     *
     * \@publicApi
     * @param {?} unsafeUrl untrusted `url`, typically from the user.
     * @param {?} tag target element tag name.
     * @param {?} prop name of the property that contains the value.
     * @return {?} `url` string which is safe to bind.
     *
     */


    function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {
      return getUrlSanitizer(tag, prop)(unsafeUrl);
    }
    /**
     * The default style sanitizer will handle sanitization for style properties by
     * sanitizing any CSS property that can include a `url` value (usually image-based properties)
     *
     * \@publicApi
     * @type {?}
     */


    var ɵɵdefaultStyleSanitizer =
    /** @type {?} */

    /**
    * @param {?} prop
    * @param {?} value
    * @param {?=} mode
    * @return {?}
    */
    function ɵɵdefaultStyleSanitizer(prop, value, mode) {
      mode = mode || 3
      /* ValidateAndSanitize */
      ;
      /** @type {?} */

      var doSanitizeValue = true;

      if (mode & 1
      /* ValidateProperty */
      ) {
          doSanitizeValue = prop === 'background-image' || prop === 'background' || prop === 'border-image' || prop === 'filter' || prop === 'list-style' || prop === 'list-style-image' || prop === 'clip-path';
        }

      if (mode & 2
      /* SanitizeOnly */
      ) {
          return doSanitizeValue ? ɵɵsanitizeStyle(value) : value;
        } else {
        return doSanitizeValue;
      }
    };
    /**
     * @param {?} name
     * @return {?}
     */


    function validateAgainstEventProperties(name) {
      if (name.toLowerCase().startsWith('on')) {
        /** @type {?} */
        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);
      }
    }
    /**
     * @param {?} name
     * @return {?}
     */


    function validateAgainstEventAttributes(name) {
      if (name.toLowerCase().startsWith('on')) {
        /** @type {?} */
        var msg = "Binding to event attribute '".concat(name, "' is disallowed for security reasons, ") + "please use (".concat(name.slice(2), ")=...");
        throw new Error(msg);
      }
    }
    /**
     * @return {?}
     */


    function getSanitizer() {
      /** @type {?} */
      var lView = getLView();
      return lView && lView[SANITIZER];
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {
          // We need to do it this way so that TypeScript does not down-level the below code.
          var FunctionConstructor = createNamedArrayType.constructor;
          return new FunctionConstructor('Array', "return class ABC 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 Inc. All Rights Reserved.
     *
     * Use 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 _len14 = arguments.length, m = new Array(_len14), _key15 = 0; _key15 < _len14; _key15++) {
          m[_key15] = arguments[_key15];
        }

        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';
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @return {?}
     */


    function getLContext(target) {
      /** @type {?} */
      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)) {
          /** @type {?} */
          var _lView2 =
          /** @type {?} */
          mpValue;
          /** @type {?} */

          var nodeIndex;
          /** @type {?} */

          var component = undefined;
          /** @type {?} */

          var directives = undefined;

          if (isComponentInstance(target)) {
            nodeIndex = findViaComponent(_lView2, target);

            if (nodeIndex == -1) {
              throw new Error('The provided component was not found in the application');
            }

            component = target;
          } else if (isDirectiveInstance(target)) {
            nodeIndex = findViaDirective(_lView2, target);

            if (nodeIndex == -1) {
              throw new Error('The provided directive was not found in the application');
            }

            directives = getDirectivesAtNodeIndex(nodeIndex, _lView2, false);
          } else {
            nodeIndex = findViaNativeElement(_lView2,
            /** @type {?} */
            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.

          /** @type {?} */


          var _native2 = unwrapRNode(_lView2[nodeIndex]);
          /** @type {?} */


          var existingCtx = readPatchedData(_native2);
          /** @type {?} */

          var context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(_lView2, 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 {
        /** @type {?} */
        var rElement =
        /** @type {?} */
        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

        /** @type {?} */

        var parent =
        /** @type {?} */
        rElement;

        while (parent = parent.parentNode) {
          /** @type {?} */
          var parentContext = readPatchedData(parent);

          if (parentContext) {
            /** @type {?} */
            var _lView3 = void 0;

            if (Array.isArray(parentContext)) {
              _lView3 =
              /** @type {?} */
              parentContext;
            } else {
              _lView3 = parentContext.lView;
            } // the edge of the app was also reached here through another means
            // (maybe because the DOM was changed manually).


            if (!_lView3) {
              return null;
            }
            /** @type {?} */


            var index = findViaNativeElement(_lView3, rElement);

            if (index >= 0) {
              /** @type {?} */
              var _native3 = unwrapRNode(_lView3[index]);
              /** @type {?} */


              var _context2 = createLContext(_lView3, index, _native3);

              attachPatchData(_native3, _context2);
              mpValue = _context2;
              break;
            }
          }
        }
      }

      return (
        /** @type {?} */
        mpValue || null
      );
    }
    /**
     * Creates an empty instance of a `LContext` context
     * @param {?} lView
     * @param {?} nodeIndex
     * @param {?} native
     * @return {?}
     */


    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
     * @return {?} The component's view
     */


    function getComponentViewByInstance(componentInstance) {
      /** @type {?} */
      var lView = readPatchedData(componentInstance);
      /** @type {?} */

      var view;

      if (Array.isArray(lView)) {
        /** @type {?} */
        var nodeIndex = findViaComponent(lView, componentInstance);
        view = getComponentViewByIndex(nodeIndex, lView);
        /** @type {?} */

        var context = createLContext(lView, nodeIndex,
        /** @type {?} */
        view[HOST]);
        context.component = componentInstance;
        attachPatchData(componentInstance, context);
        attachPatchData(context["native"], context);
      } else {
        /** @type {?} */
        var _context3 =
        /** @type {?} */

        /** @type {?} */
        lView;
        view = getComponentViewByIndex(_context3.nodeIndex, _context3.lView);
      }

      return view;
    }
    /**
     * Assigns the given data to the given target (which could be a component,
     * directive or DOM node instance) using monkey-patching.
     * @param {?} target
     * @param {?} data
     * @return {?}
     */


    function attachPatchData(target, data) {
      target[MONKEY_PATCH_KEY_NAME] = data;
    }
    /**
     * @param {?} instance
     * @return {?}
     */


    function isComponentInstance(instance) {
      return instance && instance.constructor && instance.constructor.ngComponentDef;
    }
    /**
     * @param {?} instance
     * @return {?}
     */


    function isDirectiveInstance(instance) {
      return instance && instance.constructor && instance.constructor.ngDirectiveDef;
    }
    /**
     * Locates the element within the given LView and returns the matching index
     * @param {?} lView
     * @param {?} target
     * @return {?}
     */


    function findViaNativeElement(lView, target) {
      /** @type {?} */
      var tNode = lView[TVIEW].firstChild;

      while (tNode) {
        /** @type {?} */
        var _native5 =
        /** @type {?} */
        getNativeByTNodeOrNull(tNode, lView);

        if (_native5 === target) {
          return tNode.index;
        }

        tNode = traverseNextElement(tNode);
      }

      return -1;
    }
    /**
     * Locates the next tNode (child, sibling or parent).
     * @param {?} tNode
     * @return {?}
     */


    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
     * @param {?} lView
     * @param {?} componentInstance
     * @return {?}
     */


    function findViaComponent(lView, componentInstance) {
      /** @type {?} */
      var componentIndices = lView[TVIEW].components;

      if (componentIndices) {
        for (var i = 0; i < componentIndices.length; i++) {
          /** @type {?} */
          var elementComponentIndex = componentIndices[i];
          /** @type {?} */

          var componentView = getComponentViewByIndex(elementComponentIndex, lView);

          if (componentView[CONTEXT] === componentInstance) {
            return elementComponentIndex;
          }
        }
      } else {
        /** @type {?} */
        var rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lView);
        /** @type {?} */

        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
     * @param {?} lView
     * @param {?} directiveInstance
     * @return {?}
     */


    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.

      /** @type {?} */
      var tNode = lView[TVIEW].firstChild;

      while (tNode) {
        /** @type {?} */
        var directiveIndexStart = tNode.directiveStart;
        /** @type {?} */

        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
     * @return {?}
     */


    function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {
      /** @type {?} */
      var tNode =
      /** @type {?} */
      lView[TVIEW].data[nodeIndex];
      /** @type {?} */

      var directiveStartIndex = tNode.directiveStart;
      if (directiveStartIndex == 0) return EMPTY_ARRAY;
      /** @type {?} */

      var directiveEndIndex = tNode.directiveEnd;
      if (!includeComponents && tNode.flags & 1
      /* isComponent */
      ) directiveStartIndex++;
      return lView.slice(directiveStartIndex, directiveEndIndex);
    }
    /**
     * @param {?} nodeIndex
     * @param {?} lView
     * @return {?}
     */


    function getComponentAtNodeIndex(nodeIndex, lView) {
      /** @type {?} */
      var tNode =
      /** @type {?} */
      lView[TVIEW].data[nodeIndex];
      /** @type {?} */

      var directiveStartIndex = tNode.directiveStart;
      return tNode.flags & 1
      /* isComponent */
      ? lView[directiveStartIndex] : null;
    }
    /**
     * Returns a map of local references (local reference name => element or directive instance) that
     * exist on a given element.
     * @param {?} lView
     * @param {?} nodeIndex
     * @return {?}
     */


    function discoverLocalRefs(lView, nodeIndex) {
      /** @type {?} */
      var tNode =
      /** @type {?} */
      lView[TVIEW].data[nodeIndex];

      if (tNode && tNode.localNames) {
        /** @type {?} */
        var result = {};
        /** @type {?} */

        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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Called when directives inject each other (creating a circular dependency)
     * @param {?} token
     * @return {?}
     */


    function throwCyclicDependencyError(token) {
      throw new Error("Cannot instantiate cyclic dependency! ".concat(token));
    }
    /**
     * Called when there are multiple component selectors that match a given node
     * @param {?} tNode
     * @return {?}
     */


    function throwMultipleComponentError(tNode) {
      throw new Error("Multiple components match node with tagname ".concat(tNode.tagName));
    }
    /**
     * Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on.
     * @param {?} creationMode
     * @param {?} oldValue
     * @param {?} currValue
     * @return {?}
     */


    function throwErrorIfNoChangesMode(creationMode, oldValue, currValue) {
      /** @type {?} */
      var msg = "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '".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


      throw new Error(msg);
    }
    /**
     * @return {?}
     */


    function throwMixedMultiProviderError() {
      throw new Error("Cannot mix multi providers and regular providers");
    }
    /**
     * @param {?=} ngModuleType
     * @param {?=} providers
     * @param {?=} provider
     * @return {?}
     */


    function throwInvalidProviderError(ngModuleType, providers, provider) {
      /** @type {?} */
      var ngModuleDetail = '';

      if (ngModuleType && providers) {
        /** @type {?} */
        var providerDetail = providers.map(
        /**
        * @param {?} v
        * @return {?}
        */
        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);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @enum {number} */


    var TNodeType = {
      /**
       * The TNode contains information about an {@link LContainer} for embedded views.
       */
      Container: 0,

      /**
       * The TNode contains information about an `<ng-content>` projection
       */
      Projection: 1,

      /**
       * The TNode contains information about an {@link LView}
       */
      View: 2,

      /**
       * The TNode contains information about a DOM element aka {@link RNode}.
       */
      Element: 3,

      /**
       * The TNode contains information about an `<ng-container>` element {@link RNode}.
       */
      ElementContainer: 4,

      /**
       * The TNode contains information about an ICU comment used in `i18n`.
       */
      IcuContainer: 5
    };
    /** @enum {number} */

    var TNodeFlags = {
      /** This bit is set if the node is a component */
      isComponent: 1,

      /** This bit is set if the node has been projected */
      isProjected: 2,

      /** This bit is set if any directive on this node has content queries */
      hasContentQuery: 4,

      /** This bit is set if the node has any "class" inputs */
      hasClassInput: 8,

      /** This bit is set if the node has any "style" inputs */
      hasStyleInput: 16,

      /** This bit is set if the node has been detached by i18n */
      isDetached: 32
    };
    /** @enum {number} */

    var TNodeProviderIndexes = {
      /** The index of the first provider on this node is encoded on the least significant bits */
      ProvidersStartIndexMask: 65535,

      /** The count of view providers from the component on this node is encoded on the 16 most
         significant bits */
      CptViewProvidersCountShift: 16,
      CptViewProvidersCountShifter: 65536
    };
    /** @enum {number} */

    var AttributeMarker = {
      /**
       * Marker indicates that the following 3 values in the attributes array are:
       * namespaceUri, attributeName, attributeValue
       * in that order.
       */
      NamespaceURI: 0,

      /**
        * Signals class declaration.
        *
        * Each value following `Classes` designates a class name to include on the element.
        * ## Example:
        *
        * Given:
        * ```
        * <div class="foo bar baz">...<d/vi>
        * ```
        *
        * the generated code is:
        * ```
        * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
        * ```
        */
      Classes: 1,

      /**
       * Signals style declaration.
       *
       * Each pair of values following `Styles` designates a style name and value to include on the
       * element.
       * ## Example:
       *
       * Given:
       * ```
       * <div style="width:100px; height:200px; color:red">...</div>
       * ```
       *
       * the generated code is:
       * ```
       * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
       * ```
       */
      Styles: 2,

      /**
       * Signals that the following attribute names were extracted from input or output bindings.
       *
       * For example, given the following HTML:
       *
       * ```
       * <div moo="car" [foo]="exp" (bar)="doSth()">
       * ```
       *
       * the generated code is:
       *
       * ```
       * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
       * ```
       */
      Bindings: 3,

      /**
       * Signals that the following attribute names were hoisted from an inline-template declaration.
       *
       * For example, given the following HTML:
       *
       * ```
       * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
       * ```
       *
       * the generated code for the `template()` instruction would include:
       *
       * ```
       * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
       * 'ngForTrackBy', 'let-value']
       * ```
       *
       * while the generated code for the `element()` instruction inside the template function would
       * include:
       *
       * ```
       * ['dirA', '', AttributeMarker.Bindings, 'dirB']
       * ```
       */
      Template: 4,

      /**
       * Signals that the following attribute is `ngProjectAs` and its value is a parsed `CssSelector`.
       *
       * For example, given the following HTML:
       *
       * ```
       * <h1 attr="value" ngProjectAs="[title]">
       * ```
       *
       * the generated code for the `element()` instruction would include:
       *
       * ```
       * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
       * ```
       */
      ProjectAs: 5,

      /**
       * Signals that the following attribute will be translated by runtime i18n
       *
       * For example, given the following HTML:
       *
       * ```
       * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
       * ```
       *
       * the generated code is:
       *
       * ```
       * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
       */
      I18n: 6
    };
    /**
     * Binding data (flyweight) for a particular node that is shared between all templates
     * of a specific type.
     *
     * If a property is:
     *    - PropertyAliases: that property's data was generated and this is it
     *    - Null: that property's data was already generated and nothing was found.
     *    - Undefined: that property's data has not yet been generated
     *
     * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
     * @record
     */

    function TNode() {}

    if (false) {}
    /**
     * Static data for an element
     * @record
     */


    function TElementNode() {}

    if (false) {}
    /**
     * Static data for a text node
     * @record
     */


    function TTextNode() {}

    if (false) {}
    /**
     * Static data for an LContainer
     * @record
     */


    function TContainerNode() {}

    if (false) {}
    /**
     * Static data for an <ng-container>
     * @record
     */


    function TElementContainerNode() {}

    if (false) {}
    /**
     * Static data for an ICU expression
     * @record
     */


    function TIcuContainerNode() {}

    if (false) {}
    /**
     * Static data for a view
     * @record
     */


    function TViewNode() {}

    if (false) {}
    /**
     * Static data for an LProjectionNode
     * @record
     */


    function TProjectionNode() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$4 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */

    var SelectorFlags = {
      /** Indicates this is the beginning of a new negative selector */
      NOT: 1,

      /** Mode for matching attributes */
      ATTRIBUTE: 2,

      /** Mode for matching tag names */
      ELEMENT: 4,

      /** Mode for matching class names */
      CLASS: 8
    }; // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */

    var unusedValueExportToPlacateAjd$5 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;
    /** @type {?} */

    var NG_TEMPLATE_SELECTOR = 'ng-template';
    /**
     * @param {?} nodeClassAttrVal
     * @param {?} cssClassToMatch
     * @return {?}
     */

    function isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {
      /** @type {?} */
      var nodeClassesLen = nodeClassAttrVal.length;
      /** @type {?} */

      var matchIndex =
      /** @type {?} */
      nodeClassAttrVal.indexOf(cssClassToMatch);
      /** @type {?} */

      var matchEndIdx = matchIndex + cssClassToMatch.length;

      if (matchIndex === -1 // no match
      || matchIndex > 0 &&
      /** @type {?} */
      nodeClassAttrVal[matchIndex - 1] !== ' ' // no space before
      || matchEndIdx < nodeClassesLen &&
      /** @type {?} */
      nodeClassAttrVal[matchEndIdx] !== ' ') // no space after
        {
          return false;
        }

      return true;
    }
    /**
     * 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).
     * @param {?} tNode
     * @param {?} currentSelector
     * @param {?} isProjectionMode
     * @return {?}
     */


    function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {
      /** @type {?} */
      var tagNameToCompare = tNode.type === 0
      /* Container */
      && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.tagName;
      return currentSelector === tagNameToCompare;
    }
    /**
     * A utility function to match an Ivy node static data against a simple CSS selector
     *
     * @param {?} tNode
     * @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.
     * @return {?} true if node matches the selector.
     */


    function isNodeMatchingSelector(tNode, selector, isProjectionMode) {
      ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');
      /** @type {?} */

      var mode = 4
      /* ELEMENT */
      ;
      /** @type {?} */

      var nodeAttrs = tNode.attrs || []; // Find the index of first attribute that has no value, only a name.

      /** @type {?} */

      var nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs); // When processing ":not" selectors, we skip to the next ":not" if the
      // current one doesn't match

      /** @type {?} */

      var skipToNextSelector = false;

      for (var i = 0; i < selector.length; i++) {
        /** @type {?} */
        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(
          /** @type {?} */
          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 =
          /** @type {?} */
          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 {
          /** @type {?} */
          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.classes) {
            if (!isCssClassMatching(getInitialStylingValue(tNode.classes),
            /** @type {?} */
            selectorAttrValue)) {
              if (isPositive(mode)) return false;
              skipToNextSelector = true;
            }

            continue;
          }
          /** @type {?} */


          var isInlineTemplate = tNode.type == 0
          /* Container */
          && tNode.tagName !== NG_TEMPLATE_SELECTOR;
          /** @type {?} */

          var attrName = mode & 8
          /* CLASS */
          ? 'class' : current;
          /** @type {?} */

          var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate, isProjectionMode);

          if (attrIndexInNode === -1) {
            if (isPositive(mode)) return false;
            skipToNextSelector = true;
            continue;
          }

          if (selectorAttrValue !== '') {
            /** @type {?} */
            var nodeAttrValue = void 0;

            if (attrIndexInNode > nameOnlyMarkerIdx) {
              nodeAttrValue = '';
            } else {
              ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0
              /* NamespaceURI */
              , 'We do not match directives on namespaced attributes');
              nodeAttrValue =
              /** @type {?} */
              nodeAttrs[attrIndexInNode + 1];
            }
            /** @type {?} */


            var compareAgainstClassName = mode & 8
            /* CLASS */
            ? nodeAttrValue : null;

            if (compareAgainstClassName && !isCssClassMatching(compareAgainstClassName,
            /** @type {?} */
            selectorAttrValue) || mode & 2
            /* ATTRIBUTE */
            && selectorAttrValue !== nodeAttrValue) {
              if (isPositive(mode)) return false;
              skipToNextSelector = true;
            }
          }
        }
      }

      return isPositive(mode) || skipToNextSelector;
    }
    /**
     * @param {?} mode
     * @return {?}
     */


    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.
     * @return {?}
     */


    function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {
      if (attrs === null) return -1;
      /** @type {?} */

      var i = 0;

      if (isProjectionMode || !isInlineTemplate) {
        /** @type {?} */
        var bindingsMode = false;

        while (i < attrs.length) {
          /** @type {?} */
          var maybeAttrName = attrs[i];

          if (maybeAttrName === name) {
            return i;
          } else if (maybeAttrName === 3
          /* Bindings */
          || maybeAttrName === 6
          /* I18n */
          ) {
              bindingsMode = true;
            } else if (maybeAttrName === 1
          /* Classes */
          ) {
              /** @type {?} */
              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);
      }
    }
    /**
     * @param {?} tNode
     * @param {?} selector
     * @param {?=} isProjectionMode
     * @return {?}
     */


    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;
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function getProjectAsAttrValue(tNode) {
      /** @type {?} */
      var nodeAttrs = tNode.attrs;

      if (nodeAttrs != null) {
        /** @type {?} */
        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 (
            /** @type {?} */
            nodeAttrs[ngProjectAsAttrIdx + 1]
          );
        }
      }

      return null;
    }
    /**
     * @param {?} nodeAttrs
     * @return {?}
     */


    function getNameOnlyMarkerIndex(nodeAttrs) {
      for (var i = 0; i < nodeAttrs.length; i++) {
        /** @type {?} */
        var nodeAttr = nodeAttrs[i];

        if (isNameOnlyAttributeMarker(nodeAttr)) {
          return i;
        }
      }

      return nodeAttrs.length;
    }
    /**
     * @param {?} attrs
     * @param {?} name
     * @return {?}
     */


    function matchTemplateAttribute(attrs, name) {
      /** @type {?} */
      var i = attrs.indexOf(4
      /* Template */
      );

      if (i > -1) {
        i++;

        while (i < attrs.length) {
          if (attrs[i] === 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.
     * @return {?}
     */


    function isSelectorInSelectorList(selector, list) {
      selectorListLoop: for (var i = 0; i < list.length; i++) {
        /** @type {?} */
        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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // The first bit value reflects a map-based binding value's bit.
    // The reason why it's always activated for every entry in the map
    // is so that if any map-binding values update then all other prop
    // based bindings will pass the guard check automatically without
    // any extra code or flags.

    /**
     * --------
     *
     * This file contains the core logic for styling in Angular.
     *
     * All styling bindings (i.e. `[style]`, `[style.prop]`, `[class]` and `[class.name]`)
     * will have their values be applied through the logic in this file.
     *
     * When a binding is encountered (e.g. `<div [style.width]="w">`) then
     * the binding data will be populated into a `TStylingContext` data-structure.
     * There is only one `TStylingContext` per `TNode` and each element instance
     * will update its style/class binding values in concert with the styling
     * context.
     *
     * To learn more about the algorithm see `TStylingContext`.
     *
     * --------
     * @type {?}
     */


    var DEFAULT_GUARD_MASK_VALUE = 1;
    /**
     * The guard/update mask bit index location for map-based bindings.
     *
     * All map-based bindings (i.e. `[style]` and `[class]` )
     * @type {?}
     */

    var STYLING_INDEX_FOR_MAP_BINDING = 0;
    /**
     * Default fallback value for a styling binding.
     *
     * A value of `null` is used here which signals to the styling algorithm that
     * the styling value is not present. This way if there are no other values
     * detected then it will be removed once the style/class property is dirty and
     * diffed within the styling algorithm present in `flushStyling`.
     * @type {?}
     */

    var DEFAULT_BINDING_VALUE = null;
    /**
     * Default size count value for a new entry in a context.
     *
     * A value of `1` is used here because each entry in the context has a default
     * property.
     * @type {?}
     */

    var DEFAULT_SIZE_VALUE = 1;
    /** @type {?} */

    var deferredBindingQueue = [];
    /**
     * Visits a class-based binding and updates the new value (if changed).
     *
     * This function is called each time a class-based styling instruction
     * is executed. It's important that it's always called (even if the value
     * has not changed) so that the inner counter index value is incremented.
     * This way, each instruction is always guaranteed to get the same counter
     * state each time it's called (which then allows the `TStylingContext`
     * and the bit mask values to be in sync).
     * @param {?} context
     * @param {?} data
     * @param {?} element
     * @param {?} prop
     * @param {?} bindingIndex
     * @param {?} value
     * @param {?} deferRegistration
     * @param {?} forceUpdate
     * @return {?}
     */

    function updateClassBinding(context, data, element, prop, bindingIndex, value, deferRegistration, forceUpdate) {
      /** @type {?} */
      var isMapBased = !prop;
      /** @type {?} */

      var state = getStylingState(element, stateIsPersisted(context));
      /** @type {?} */

      var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.classesIndex++;
      /** @type {?} */

      var updated = updateBindingData(context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, false);

      if (updated || forceUpdate) {
        // We flip the bit in the bitMask to reflect that the binding
        // at the `index` slot has changed. This identifies to the flushing
        // phase that the bindings for this particular CSS class need to be
        // applied again because on or more of the bindings for the CSS
        // class have changed.
        state.classesBitMask |= 1 << index;
        return true;
      }

      return false;
    }
    /**
     * Visits a style-based binding and updates the new value (if changed).
     *
     * This function is called each time a style-based styling instruction
     * is executed. It's important that it's always called (even if the value
     * has not changed) so that the inner counter index value is incremented.
     * This way, each instruction is always guaranteed to get the same counter
     * state each time it's called (which then allows the `TStylingContext`
     * and the bit mask values to be in sync).
     * @param {?} context
     * @param {?} data
     * @param {?} element
     * @param {?} prop
     * @param {?} bindingIndex
     * @param {?} value
     * @param {?} sanitizer
     * @param {?} deferRegistration
     * @param {?} forceUpdate
     * @return {?}
     */


    function updateStyleBinding(context, data, element, prop, bindingIndex, value, sanitizer, deferRegistration, forceUpdate) {
      /** @type {?} */
      var isMapBased = !prop;
      /** @type {?} */

      var state = getStylingState(element, stateIsPersisted(context));
      /** @type {?} */

      var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.stylesIndex++;
      /** @type {?} */

      var sanitizationRequired = isMapBased ? true : sanitizer ? sanitizer(
      /** @type {?} */
      prop, null, 1
      /* ValidateProperty */
      ) : false;
      /** @type {?} */

      var updated = updateBindingData(context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, sanitizationRequired);

      if (updated || forceUpdate) {
        // We flip the bit in the bitMask to reflect that the binding
        // at the `index` slot has changed. This identifies to the flushing
        // phase that the bindings for this particular property need to be
        // applied again because on or more of the bindings for the CSS
        // property have changed.
        state.stylesBitMask |= 1 << index;
        return true;
      }

      return false;
    }
    /**
     * Called each time a binding value has changed within the provided `TStylingContext`.
     *
     * This function is designed to be called from `updateStyleBinding` and `updateClassBinding`.
     * If called during the first update pass, the binding will be registered in the context.
     * If the binding does get registered and the `deferRegistration` flag is true then the
     * binding data will be queued up until the context is later flushed in `applyStyling`.
     *
     * This function will also update binding slot in the provided `LStylingData` with the
     * new binding entry (if it has changed).
     *
     * @param {?} context
     * @param {?} data
     * @param {?} counterIndex
     * @param {?} prop
     * @param {?} bindingIndex
     * @param {?} value
     * @param {?} deferRegistration
     * @param {?} forceUpdate
     * @param {?} sanitizationRequired
     * @return {?} whether or not the binding value was updated in the `LStylingData`.
     */


    function updateBindingData(context, data, counterIndex, prop, bindingIndex, value, deferRegistration, forceUpdate, sanitizationRequired) {
      if (!isContextLocked(context)) {
        if (deferRegistration) {
          deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired);
        } else {
          deferredBindingQueue.length && flushDeferredBindings(); // this will only happen during the first update pass of the
          // context. The reason why we can't use `tNode.firstTemplatePass`
          // here is because its not guaranteed to be true when the first
          // update pass is executed (remember that all styling instructions
          // are run in the update phase, and, as a result, are no more
          // styling instructions that are run in the creation phase).

          registerBinding(context, counterIndex, prop, bindingIndex, sanitizationRequired);
        }
      }
      /** @type {?} */


      var changed = forceUpdate || hasValueChanged(data[bindingIndex], value);

      if (changed) {
        data[bindingIndex] = value;
      }

      return changed;
    }
    /**
     * Schedules a binding registration to be run at a later point.
     *
     * The reasoning for this feature is to ensure that styling
     * bindings are registered in the correct order for when
     * directives/components have a super/sub class inheritance
     * chains. Each directive's styling bindings must be
     * registered into the context in reverse order. Therefore all
     * bindings will be buffered in reverse order and then applied
     * after the inheritance chain exits.
     * @param {?} context
     * @param {?} counterIndex
     * @param {?} prop
     * @param {?} bindingIndex
     * @param {?} sanitizationRequired
     * @return {?}
     */


    function deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired) {
      deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);
    }
    /**
     * Flushes the collection of deferred bindings and causes each entry
     * to be registered into the context.
     * @return {?}
     */


    function flushDeferredBindings() {
      /** @type {?} */
      var i = 0;

      while (i < deferredBindingQueue.length) {
        /** @type {?} */
        var context =
        /** @type {?} */
        deferredBindingQueue[i++];
        /** @type {?} */

        var count =
        /** @type {?} */
        deferredBindingQueue[i++];
        /** @type {?} */

        var prop =
        /** @type {?} */
        deferredBindingQueue[i++];
        /** @type {?} */

        var bindingIndex =
        /** @type {?} */
        deferredBindingQueue[i++];
        /** @type {?} */

        var sanitizationRequired =
        /** @type {?} */
        deferredBindingQueue[i++];
        registerBinding(context, count, prop, bindingIndex, sanitizationRequired);
      }

      deferredBindingQueue.length = 0;
    }
    /**
     * Registers the provided binding (prop + bindingIndex) into the context.
     *
     * This function is shared between bindings that are assigned immediately
     * (via `updateBindingData`) and at a deferred stage. When called, it will
     * figure out exactly where to place the binding data in the context.
     *
     * It is needed because it will either update or insert a styling property
     * into the context at the correct spot.
     *
     * When called, one of two things will happen:
     *
     * 1) If the property already exists in the context then it will just add
     *    the provided `bindingValue` to the end of the binding sources region
     *    for that particular property.
     *
     *    - If the binding value is a number then it will be added as a new
     *      binding index source next to the other binding sources for the property.
     *
     *    - Otherwise, if the binding value is a string/boolean/null type then it will
     *      replace the default value for the property if the default value is `null`.
     *
     * 2) If the property does not exist then it will be inserted into the context.
     *    The styling context relies on all properties being stored in alphabetical
     *    order, so it knows exactly where to store it.
     *
     *    When inserted, a default `null` value is created for the property which exists
     *    as the default value for the binding. If the bindingValue property is inserted
     *    and it is either a string, number or null value then that will replace the default
     *    value.
     *
     * Note that this function is also used for map-based styling bindings. They are treated
     * much the same as prop-based bindings, but, because they do not have a property value
     * (since it's a map), all map-based entries are stored in an already populated area of
     * the context at the top (which is reserved for map-based entries).
     * @param {?} context
     * @param {?} countId
     * @param {?} prop
     * @param {?} bindingValue
     * @param {?=} sanitizationRequired
     * @return {?}
     */


    function registerBinding(context, countId, prop, bindingValue, sanitizationRequired) {
      /** @type {?} */
      var registered = false;

      if (prop) {
        // prop-based bindings (e.g `<div [style.width]="w" [class.foo]="f">`)

        /** @type {?} */
        var found = false;
        /** @type {?} */

        var i = getPropValuesStartPosition(context);

        while (i < context.length) {
          /** @type {?} */
          var valuesCount = getValuesCount(context, i);
          /** @type {?} */

          var p = getProp(context, i);
          found = prop <= p;

          if (found) {
            // all style/class bindings are sorted by property name
            if (prop < p) {
              allocateNewContextEntry(context, i, prop, sanitizationRequired);
            }

            addBindingIntoContext(context, false, i, bindingValue, countId);
            break;
          }

          i += 3
          /* BindingsStartOffset */
          + valuesCount;
        }

        if (!found) {
          allocateNewContextEntry(context, context.length, prop, sanitizationRequired);
          addBindingIntoContext(context, false, i, bindingValue, countId);
          registered = true;
        }
      } else {
        // map-based bindings (e.g `<div [style]="s" [class]="{className:true}">`)
        // there is no need to allocate the map-based binding region into the context
        // since it is already there when the context is first created.
        addBindingIntoContext(context, true, 3
        /* MapBindingsPosition */
        , bindingValue, countId);
        registered = true;
      }

      return registered;
    }
    /**
     * @param {?} context
     * @param {?} index
     * @param {?} prop
     * @param {?=} sanitizationRequired
     * @return {?}
     */


    function allocateNewContextEntry(context, index, prop, sanitizationRequired) {
      // 1,2: splice index locations
      // 3: each entry gets a config value (guard mask + flags)
      // 4. each entry gets a size value (which is always one because there is always a default binding
      // value)
      // 5. the property that is getting allocated into the context
      // 6. the default binding value (usually `null`)

      /** @type {?} */
      var config = sanitizationRequired ? 1
      /* SanitizationRequired */
      : 0
      /* Default */
      ;
      context.splice(index, 0, config, DEFAULT_SIZE_VALUE, prop, DEFAULT_BINDING_VALUE);
      setGuardMask(context, index, DEFAULT_GUARD_MASK_VALUE);
    }
    /**
     * Inserts a new binding value into a styling property tuple in the `TStylingContext`.
     *
     * A bindingValue is inserted into a context during the first update pass
     * of a template or host bindings function. When this occurs, two things
     * happen:
     *
     * - If the bindingValue value is a number then it is treated as a bindingIndex
     *   value (a index in the `LView`) and it will be inserted next to the other
     *   binding index entries.
     *
     * - Otherwise the binding value will update the default value for the property
     *   and this will only happen if the default value is `null`.
     *
     * Note that this function also handles map-based bindings and will insert them
     * at the top of the context.
     * @param {?} context
     * @param {?} isMapBased
     * @param {?} index
     * @param {?} bindingValue
     * @param {?} countId
     * @return {?}
     */


    function addBindingIntoContext(context, isMapBased, index, bindingValue, countId) {
      /** @type {?} */
      var valuesCount = getValuesCount(context, index);
      /** @type {?} */

      var firstValueIndex = index + 3
      /* BindingsStartOffset */
      ;
      /** @type {?} */

      var lastValueIndex = firstValueIndex + valuesCount;

      if (!isMapBased) {
        // prop-based values all have default values, but map-based entries do not.
        // we want to access the index for the default value in this case and not just
        // the bindings...
        lastValueIndex--;
      }

      if (typeof bindingValue === 'number') {
        // the loop here will check to see if the binding already exists
        // for the property in the context. Why? The reason for this is
        // because the styling context is not "locked" until the first
        // flush has occurred. This means that if a repeated element
        // registers its styling bindings then it will register each
        // binding more than once (since its duplicated). This check
        // will prevent that from happening. Note that this only happens
        // when a binding is first encountered and not each time it is
        // updated.
        for (var i = firstValueIndex; i <= lastValueIndex; i++) {
          /** @type {?} */
          var indexAtPosition = context[i];
          if (indexAtPosition === bindingValue) return;
        }

        context.splice(lastValueIndex, 0, bindingValue);
        /** @type {?} */context[index + 1 /* ValuesCountOffset */]++; // now that a new binding index has been added to the property
        // the guard mask bit value (at the `countId` position) needs
        // to be included into the existing mask value.

        /** @type {?} */

        var guardMask = getGuardMask(context, index) | 1 << countId;
        setGuardMask(context, index, guardMask);
      } else if (bindingValue !== null && context[lastValueIndex] == null) {
        context[lastValueIndex] = bindingValue;
      }
    }
    /**
     * Applies all pending style and class bindings to the provided element.
     *
     * This function will attempt to flush styling via the provided `classesContext`
     * and `stylesContext` context values. This function is designed to be run from
     * the `stylingApply()` instruction (which is run at the very end of styling
     * change detection) and will rely on any state values that are set from when
     * any styling bindings update.
     *
     * This function may be called multiple times on the same element because it can
     * be called from the template code as well as from host bindings. In order for
     * styling to be successfully flushed to the element (which will only happen once
     * despite this being called multiple times), the following criteria must be met:
     *
     * - `flushStyling` is called from the very last directive that has styling for
     *    the element (see `allowStylingFlush()`).
     * - one or more bindings for classes or styles has updated (this is checked by
     *   examining the classes or styles bit mask).
     *
     * If the style and class values are successfully applied to the element then
     * the temporary state values for the element will be cleared. Otherwise, if
     * this did not occur then the styling state is persisted (see `state.ts` for
     * more information on how this works).
     * @param {?} renderer
     * @param {?} data
     * @param {?} classesContext
     * @param {?} stylesContext
     * @param {?} element
     * @param {?} directiveIndex
     * @param {?} styleSanitizer
     * @return {?}
     */


    function flushStyling(renderer, data, classesContext, stylesContext, element, directiveIndex, styleSanitizer) {
      ngDevMode && ngDevMode.flushStyling++;
      /** @type {?} */

      var persistState = classesContext ? stateIsPersisted(classesContext) : stylesContext ? stateIsPersisted(stylesContext) : false;
      /** @type {?} */

      var allowFlushClasses = allowStylingFlush(classesContext, directiveIndex);
      /** @type {?} */

      var allowFlushStyles = allowStylingFlush(stylesContext, directiveIndex); // deferred bindings are bindings which are scheduled to register with
      // the context at a later point. These bindings can only registered when
      // the context will be 100% flushed to the element.

      if (deferredBindingQueue.length && (allowFlushClasses || allowFlushStyles)) {
        flushDeferredBindings();
      }
      /** @type {?} */


      var state = getStylingState(element, persistState);
      /** @type {?} */

      var classesFlushed = maybeApplyStyling(renderer, element, data, classesContext, allowFlushClasses, state.classesBitMask, setClass, null);
      /** @type {?} */

      var stylesFlushed = maybeApplyStyling(renderer, element, data, stylesContext, allowFlushStyles, state.stylesBitMask, setStyle, styleSanitizer);

      if (classesFlushed && stylesFlushed) {
        resetStylingState();

        if (persistState) {
          deleteStylingStateFromStorage(element);
        }
      } else if (persistState) {
        storeStylingState(element, state);
      }
    }
    /**
     * @param {?} renderer
     * @param {?} element
     * @param {?} data
     * @param {?} context
     * @param {?} allowFlush
     * @param {?} bitMask
     * @param {?} styleSetter
     * @param {?} styleSanitizer
     * @return {?}
     */


    function maybeApplyStyling(renderer, element, data, context, allowFlush, bitMask, styleSetter, styleSanitizer) {
      if (allowFlush && context) {
        lockAndFinalizeContext(context);

        if (contextHasUpdates(context, bitMask)) {
          ngDevMode && (styleSanitizer ? ngDevMode.stylesApplied++ : ngDevMode.classesApplied++);
          applyStyling(
          /** @type {?} */
          context, renderer, element, data, bitMask, styleSetter, styleSanitizer);
          return true;
        }
      }

      return allowFlush;
    }
    /**
     * @param {?} context
     * @param {?} bitMask
     * @return {?}
     */


    function contextHasUpdates(context, bitMask) {
      return context && bitMask > BIT_MASK_START_VALUE;
    }
    /**
     * Locks the context (so no more bindings can be added) and also copies over initial class/style
     * values into their binding areas.
     *
     * There are two main actions that take place in this function:
     *
     * - Locking the context:
     *   Locking the context is required so that the style/class instructions know NOT to
     *   register a binding again after the first update pass has run. If a locking bit was
     *   not used then it would need to scan over the context each time an instruction is run
     *   (which is expensive).
     *
     * - Patching initial values:
     *   Directives and component host bindings may include static class/style values which are
     *   bound to the host element. When this happens, the styling context will need to be informed
     *   so it can use these static styling values as defaults when a matching binding is falsy.
     *   These initial styling values are read from the initial styling values slot within the
     *   provided `TStylingContext` (which is an instance of a `StylingMapArray`). This inner map will
     *   be updated each time a host binding applies its static styling values (via `elementHostAttrs`)
     *   so these values are only read at this point because this is the very last point before the
     *   first style/class values are flushed to the element.
     * @param {?} context
     * @return {?}
     */


    function lockAndFinalizeContext(context) {
      if (!isContextLocked(context)) {
        /** @type {?} */
        var initialValues = getStylingMapArray(context);

        if (initialValues) {
          updateInitialStylingOnContext(context, initialValues);
        }

        lockContext(context);
      }
    }
    /**
     * Runs through the provided styling context and applies each value to
     * the provided element (via the renderer) if one or more values are present.
     *
     * This function will iterate over all entries present in the provided
     * `TStylingContext` array (both prop-based and map-based bindings).-
     *
     * Each entry, within the `TStylingContext` array, is stored alphabetically
     * and this means that each prop/value entry will be applied in order
     * (so long as it is marked dirty in the provided `bitMask` value).
     *
     * If there are any map-based entries present (which are applied to the
     * element via the `[style]` and `[class]` bindings) then those entries
     * will be applied as well. However, the code for that is not a part of
     * this function. Instead, each time a property is visited, then the
     * code below will call an external function called `stylingMapsSyncFn`
     * and, if present, it will keep the application of styling values in
     * map-based bindings up to sync with the application of prop-based
     * bindings.
     *
     * Visit `styling_next/map_based_bindings.ts` to learn more about how the
     * algorithm works for map-based styling bindings.
     *
     * Note that this function is not designed to be called in isolation (use
     * `applyClasses` and `applyStyles` to actually apply styling values).
     * @param {?} context
     * @param {?} renderer
     * @param {?} element
     * @param {?} bindingData
     * @param {?} bitMaskValue
     * @param {?} applyStylingFn
     * @param {?} sanitizer
     * @return {?}
     */


    function applyStyling(context, renderer, element, bindingData, bitMaskValue, applyStylingFn, sanitizer) {
      /** @type {?} */
      var bitMask = normalizeBitMaskValue(bitMaskValue);
      /** @type {?} */

      var stylingMapsSyncFn = getStylingMapsSyncFn();
      /** @type {?} */

      var mapsGuardMask = getGuardMask(context, 3
      /* MapBindingsPosition */
      );
      /** @type {?} */

      var applyAllValues = (bitMask & mapsGuardMask) > 0;
      /** @type {?} */

      var mapsMode = applyAllValues ? 1
      /* ApplyAllValues */
      : 0
      /* TraverseValues */
      ;
      /** @type {?} */

      var i = getPropValuesStartPosition(context);

      while (i < context.length) {
        /** @type {?} */
        var valuesCount = getValuesCount(context, i);
        /** @type {?} */

        var guardMask = getGuardMask(context, i);

        if (bitMask & guardMask) {
          /** @type {?} */
          var valueApplied = false;
          /** @type {?} */

          var prop = getProp(context, i);
          /** @type {?} */

          var valuesCountUpToDefault = valuesCount - 1;
          /** @type {?} */

          var defaultValue =
          /** @type {?} */
          getBindingValue(context, i, valuesCountUpToDefault); // case 1: apply prop-based values
          // try to apply the binding values and see if a non-null
          // value gets set for the styling binding

          for (var j = 0; j < valuesCountUpToDefault; j++) {
            /** @type {?} */
            var bindingIndex =
            /** @type {?} */
            getBindingValue(context, i, j);
            /** @type {?} */

            var value = bindingData[bindingIndex];

            if (isStylingValueDefined(value)) {
              /** @type {?} */
              var finalValue = sanitizer && isSanitizationRequired(context, i) ? sanitizer(prop, value, 2
              /* SanitizeOnly */
              ) : value;
              applyStylingFn(renderer, element, prop, finalValue, bindingIndex);
              valueApplied = true;
              break;
            }
          } // case 2: apply map-based values
          // traverse through each map-based styling binding and update all values up to
          // the provided `prop` value. If the property was not applied in the loop above
          // then it will be attempted to be applied in the maps sync code below.


          if (stylingMapsSyncFn) {
            // determine whether or not to apply the target property or to skip it

            /** @type {?} */
            var mode = mapsMode | (valueApplied ? 4
            /* SkipTargetProp */
            : 2
            /* ApplyTargetProp */
            );
            /** @type {?} */

            var valueAppliedWithinMap = stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mode, prop, defaultValue);
            valueApplied = valueApplied || valueAppliedWithinMap;
          } // case 3: apply the default value
          // if the value has not yet been applied then a truthy value does not exist in the
          // prop-based or map-based bindings code. If and when this happens, just apply the
          // default value (even if the default value is `null`).


          if (!valueApplied) {
            applyStylingFn(renderer, element, prop, defaultValue);
          }
        }

        i += 3
        /* BindingsStartOffset */
        + valuesCount;
      } // the map-based styling entries may have not applied all their
      // values. For this reason, one more call to the sync function
      // needs to be issued at the end.


      if (stylingMapsSyncFn) {
        stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mapsMode);
      }
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function normalizeBitMaskValue(value) {
      // if pass => apply all values (-1 implies that all bits are flipped to true)
      if (value === true) return -1; // if pass => skip all values

      if (value === false) return 0; // return the bit mask value as is

      return value;
    }
    /** @type {?} */


    var _activeStylingMapApplyFn = null;
    /**
     * @return {?}
     */

    function getStylingMapsSyncFn() {
      return _activeStylingMapApplyFn;
    }
    /**
     * @param {?} fn
     * @return {?}
     */


    function setStylingMapsSyncFn(fn) {
      _activeStylingMapApplyFn = fn;
    }
    /**
     * Assigns a style value to a style property for the given element.
     * @type {?}
     */


    var setStyle =
    /**
    * @param {?} renderer
    * @param {?} native
    * @param {?} prop
    * @param {?} value
    * @return {?}
    */
    function setStyle(renderer, _native6, prop, value) {
      // the reason why this may be `null` is either because
      // it's a container element or it's a part of a test
      // environment that doesn't have styling. In either
      // case it's safe not to apply styling to the element.

      /** @type {?} */
      var nativeStyle = _native6.style;

      if (value) {
        // opacity, z-index and flexbox all have number values
        // and these need to be converted into strings so that
        // they can be assigned properly.
        value = value.toString();
        ngDevMode && ngDevMode.rendererSetStyle++;
        renderer && isProceduralRenderer(renderer) ? renderer.setStyle(_native6, prop, value, RendererStyleFlags3.DashCase) : nativeStyle && nativeStyle.setProperty(prop, value);
      } else {
        ngDevMode && ngDevMode.rendererRemoveStyle++;
        renderer && isProceduralRenderer(renderer) ? renderer.removeStyle(_native6, prop, RendererStyleFlags3.DashCase) : nativeStyle && nativeStyle.removeProperty(prop);
      }
    };

    var ɵ0$4 = setStyle;
    /**
     * Adds/removes the provided className value to the provided element.
     * @type {?}
     */

    var setClass =
    /**
    * @param {?} renderer
    * @param {?} native
    * @param {?} className
    * @param {?} value
    * @return {?}
    */
    function setClass(renderer, _native7, className, value) {
      if (className !== '') {
        // the reason why this may be `null` is either because
        // it's a container element or it's a part of a test
        // environment that doesn't have styling. In either
        // case it's safe not to apply styling to the element.

        /** @type {?} */
        var classList = _native7.classList;

        if (value) {
          ngDevMode && ngDevMode.rendererAddClass++;
          renderer && isProceduralRenderer(renderer) ? renderer.addClass(_native7, className) : classList && classList.add(className);
        } else {
          ngDevMode && ngDevMode.rendererRemoveClass++;
          renderer && isProceduralRenderer(renderer) ? renderer.removeClass(_native7, className) : classList && classList.remove(className);
        }
      }
    };

    var ɵ1$1 = setClass;
    /**
     * Iterates over all provided styling entries and renders them on the element.
     *
     * This function is used alongside a `StylingMapArray` entry. This entry is not
     * the same as the `TStylingContext` and is only really used when an element contains
     * initial styling values (e.g. `<div style="width:200px">`), but no style/class bindings
     * are present. If and when that happens then this function will be called to render all
     * initial styling values on an element.
     * @param {?} renderer
     * @param {?} element
     * @param {?} stylingValues
     * @param {?} isClassBased
     * @return {?}
     */

    function renderStylingMap(renderer, element, stylingValues, isClassBased) {
      /** @type {?} */
      var stylingMapArr = getStylingMapArray(stylingValues);

      if (stylingMapArr) {
        for (var i = 1
        /* ValuesStartPosition */
        ; i < stylingMapArr.length; i += 2
        /* TupleSize */
        ) {
          /** @type {?} */
          var prop = getMapProp(stylingMapArr, i);
          /** @type {?} */

          var value = getMapValue(stylingMapArr, i);

          if (isClassBased) {
            setClass(renderer, element, prop, value, null);
          } else {
            setStyle(renderer, element, prop, value, null);
          }
        }
      }
    }
    /**
     * Registers all initial styling entries into the provided context.
     *
     * This function will iterate over all entries in the provided `initialStyling` ar}ray and register
     * them as default (initial) values in the provided context. Initial styling values in a context are
     * the default values that are to be applied unless overwritten by a binding.
     *
     * The reason why this function exists and isn't a part of the context construction is because
     * host binding is evaluated at a later stage after the element is created. This means that
     * if a directive or component contains any initial styling code (i.e. `<div class="foo">`)
     * then that initial styling data can only be applied once the styling for that element
     * is first applied (at the end of the update phase). Once that happens then the context will
     * update itself with the complete initial styling for the element.
     * @param {?} context
     * @param {?} initialStyling
     * @return {?}
     */


    function updateInitialStylingOnContext(context, initialStyling) {
      // `-1` is used here because all initial styling data is not a spart
      // of a binding (since it's static)

      /** @type {?} */
      var INITIAL_STYLING_COUNT_ID = -1;

      for (var i = 1
      /* ValuesStartPosition */
      ; i < initialStyling.length; i += 2
      /* TupleSize */
      ) {
        /** @type {?} */
        var value = getMapValue(initialStyling, i);

        if (value) {
          /** @type {?} */
          var prop = getMapProp(initialStyling, i);
          registerBinding(context, INITIAL_STYLING_COUNT_ID, prop, value, false);
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
    // WARNING: interface has both a type and a value, skipping emit

    /**
     * A special value which designates that a value has not changed.
     * @type {?}
     */


    var NO_CHANGE =
    /** @type {?} */
    {};
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */

    var I18nMutateOpCode = {
      /**
       * Stores shift amount for bits 17-3 that contain reference index.
       */
      SHIFT_REF: 3,

      /**
       * Stores shift amount for bits 31-17 that contain parent index.
       */
      SHIFT_PARENT: 17,

      /**
       * Mask for OpCode
       */
      MASK_OPCODE: 7,

      /**
       * OpCode to select a node. (next OpCode will contain the operation.)
       */
      Select: 0,

      /**
       * OpCode to append the current node to `PARENT`.
       */
      AppendChild: 1,

      /**
       * OpCode to remove the `REF` node from `PARENT`.
       */
      Remove: 3,

      /**
       * OpCode to set the attribute of a node.
       */
      Attr: 4,

      /**
       * OpCode to simulate elementEnd()
       */
      ElementEnd: 5,

      /**
       * OpCode to read the remove OpCodes for the nested ICU
       */
      RemoveNestedIcu: 6
    };
    /**
     * Marks that the next string is for element.
     *
     * See `I18nMutateOpCodes` documentation.
     * @type {?}
     */

    var ELEMENT_MARKER = {
      marker: 'element'
    }; // WARNING: interface has both a type and a value, skipping emit

    /**
     * Marks that the next string is for comment.
     *
     * See `I18nMutateOpCodes` documentation.
     * @type {?}
     */

    var COMMENT_MARKER = {
      marker: 'comment'
    }; // WARNING: interface has both a type and a value, skipping emit

    /**
     * Array storing OpCode for dynamically creating `i18n` blocks.
     *
     * Example:
     * ```ts
     * <I18nCreateOpCode>[
     *   // For adding text nodes
     *   // ---------------------
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createTextNode('abc');
     *   //   lView[1].insertBefore(node, lView[2]);
     *   'abc', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
     *
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createTextNode('xyz');
     *   //   lView[1].appendChild(node);
     *   'xyz', 1 << SHIFT_PARENT | AppendChild,
     *
     *   // For adding element nodes
     *   // ---------------------
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createElement('div');
     *   //   lView[1].insertBefore(node, lView[2]);
     *   ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
     *
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createElement('div');
     *   //   lView[1].appendChild(node);
     *   ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | AppendChild,
     *
     *   // For adding comment nodes
     *   // ---------------------
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createComment('');
     *   //   lView[1].insertBefore(node, lView[2]);
     *   COMMENT_MARKER, '', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
     *
     *   // Equivalent to:
     *   //   const node = lView[index++] = document.createComment('');
     *   //   lView[1].appendChild(node);
     *   COMMENT_MARKER, '', 1 << SHIFT_PARENT | AppendChild,
     *
     *   // For moving existing nodes to a different location
     *   // --------------------------------------------------
     *   // Equivalent to:
     *   //   const node = lView[1];
     *   //   lView[2].insertBefore(node, lView[3]);
     *   1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 3 << SHIFT_REF | InsertBefore,
     *
     *   // Equivalent to:
     *   //   const node = lView[1];
     *   //   lView[2].appendChild(node);
     *   1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | AppendChild,
     *
     *   // For removing existing nodes
     *   // --------------------------------------------------
     *   //   const node = lView[1];
     *   //   removeChild(tView.data(1), node, lView);
     *   1 << SHIFT_REF | Remove,
     *
     *   // For writing attributes
     *   // --------------------------------------------------
     *   //   const node = lView[1];
     *   //   node.setAttribute('attr', 'value');
     *   1 << SHIFT_REF | Select, 'attr', 'value'
     *            // NOTE: Select followed by two string (vs select followed by OpCode)
     * ];
     * ```
     * NOTE:
     *   - `index` is initial location where the extra nodes should be stored in the EXPANDO section of
     * `LVIewData`.
     *
     * See: `applyI18nCreateOpCodes`;
     * @record
     */

    function I18nMutateOpCodes() {}
    /** @enum {number} */


    var I18nUpdateOpCode = {
      /**
       * Stores shift amount for bits 17-2 that contain reference index.
       */
      SHIFT_REF: 2,

      /**
       * Mask for OpCode
       */
      MASK_OPCODE: 3,

      /**
       * OpCode to update a text node.
       */
      Text: 0,

      /**
       * OpCode to update a attribute of a node.
       */
      Attr: 1,

      /**
       * OpCode to switch the current ICU case.
       */
      IcuSwitch: 2,

      /**
       * OpCode to update the current ICU case.
       */
      IcuUpdate: 3
    };
    /**
     * Stores DOM operations which need to be applied to update DOM render tree due to changes in
     * expressions.
     *
     * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
     * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
     * higher.) The OpCodes then compare its own change mask against the expression change mask to
     * determine if the OpCodes should execute.
     *
     * These OpCodes can be used by both the i18n block as well as ICU sub-block.
     *
     * ## Example
     *
     * Assume
     * ```ts
     *   if (rf & RenderFlags.Update) {
     *    i18nExp(bind(ctx.exp1)); // If changed set mask bit 1
     *    i18nExp(bind(ctx.exp2)); // If changed set mask bit 2
     *    i18nExp(bind(ctx.exp3)); // If changed set mask bit 3
     *    i18nExp(bind(ctx.exp4)); // If changed set mask bit 4
     *    i18nApply(0);            // Apply all changes by executing the OpCodes.
     *  }
     * ```
     * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
     * index of `i18nExp`.
     *
     * ### OpCodes
     * ```ts
     * <I18nUpdateOpCodes>[
     *   // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
     *   // If `changeMask & 0b11`
     *   //        has changed then execute update OpCodes.
     *   //        has NOT changed then skip `7` values and start processing next OpCodes.
     *   0b11, 7,
     *   // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
     *   'pre', -4, 'in', -3, 'post',
     *   // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
     *   1 << SHIFT_REF | Attr, 'title', sanitizerFn,
     *
     *   // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
     *   // If `changeMask & 0b100`
     *   //        has changed then execute update OpCodes.
     *   //        has NOT changed then skip `4` values and start processing next OpCodes.
     *   0b100, 4,
     *   // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
     *   'Hello ', -2, '!',
     *   // Update text: `lView[1].textContent = newValue;`
     *   1 << SHIFT_REF | Text,
     *
     *   // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
     *   // If `changeMask & 0b1000`
     *   //        has changed then execute update OpCodes.
     *   //        has NOT changed then skip `4` values and start processing next OpCodes.
     *   0b1000, 4,
     *   // Concatenate `newValue = lView[bindIndex -1];`.
     *   -1,
     *   // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
     *   0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
     *
     *   // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
     *   -1, 1,
     *   // Update ICU: `icuUpdateCase(lView[1], 0);`
     *   0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
     *
     * ];
     * ```
     *
     * @record
     */

    function I18nUpdateOpCodes() {}
    /**
     * Store information for the i18n translation block.
     * @record
     */


    function TI18n() {}

    if (false) {}
    /** @enum {number} */


    var IcuType = {
      select: 0,
      plural: 1
    };
    /**
     * @record
     */

    function TIcu() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$6 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     * @param {?} obj
     * @param {?} debug
     * @return {?}
     */

    function attachDebugObject(obj, debug) {
      Object.defineProperty(obj, 'debug', {
        value: debug,
        enumerable: false
      });
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Used to apply styling values presently within any map-based bindings on an element.
     *
     * Angular supports map-based styling bindings which can be applied via the
     * `[style]` and `[class]` bindings which can be placed on any HTML element.
     * These bindings can work independently, together or alongside prop-based
     * styling bindings (e.g. `<div [style]="x" [style.width]="w">`).
     *
     * If a map-based styling binding is detected by the compiler, the following
     * AOT code is produced:
     *
     * ```typescript
     * styleMap(ctx.styles); // styles = {key:value}
     * classMap(ctx.classes); // classes = {key:value}|string
     * ```
     *
     * If and when either of the instructions above are evaluated, then the code
     * present in this file is included into the bundle. The mechanism used, to
     * activate support for map-based bindings at runtime is possible via the
     * `activeStylingMapFeature` function (which is also present in this file).
     *
     * # The Algorithm
     * Whenever a map-based binding updates (which is when the identity of the
     * map-value changes) then the map is iterated over and a `StylingMapArray` array
     * is produced. The `StylingMapArray` instance is stored in the binding location
     * where the `BINDING_INDEX` is situated when the `styleMap()` or `classMap()`
     * instruction were called. Once the binding changes, then the internal `bitMask`
     * value is marked as dirty.
     *
     * Styling values are applied once CD exits the element (which happens when
     * the `select(n)` instruction is called or the template function exits). When
     * this occurs, all prop-based bindings are applied. If a map-based binding is
     * present then a special flushing function (called a sync function) is made
     * available and it will be called each time a styling property is flushed.
     *
     * The flushing algorithm is designed to apply styling for a property (which is
     * a CSS property or a className value) one by one. If map-based bindings
     * are present, then the flushing algorithm will keep calling the maps styling
     * sync function each time a property is visited. This way, the flushing
     * behavior of map-based bindings will always be at the same property level
     * as the current prop-based property being iterated over (because everything
     * is alphabetically sorted).
     *
     * Let's imagine we have the following HTML template code:
     *
     * ```html
     * <div [style]="{width:'100px', height:'200px', 'z-index':'10'}"
     *      [style.width.px]="200">...</div>
     * ```
     *
     * When CD occurs, both the `[style]` and `[style.width]` bindings
     * are evaluated. Then when the styles are flushed on screen, the
     * following operations happen:
     *
     * 1. `[style.width]` is attempted to be written to the element.
     *
     * 2.  Once that happens, the algorithm instructs the map-based
     *     entries (`[style]` in this case) to "catch up" and apply
     *     all values up to the `width` value. When this happens the
     *     `height` value is applied to the element (since it is
     *     alphabetically situated before the `width` property).
     *
     * 3. Since there are no more prop-based entries anymore, the
     *    loop exits and then, just before the flushing ends, it
     *    instructs all map-based bindings to "finish up" applying
     *    their values.
     *
     * 4. The only remaining value within the map-based entries is
     *    the `z-index` value (`width` got skipped because it was
     *    successfully applied via the prop-based `[style.width]`
     *    binding). Since all map-based entries are told to "finish up",
     *    the `z-index` value is iterated over and it is then applied
     *    to the element.
     *
     * The most important thing to take note of here is that prop-based
     * bindings are evaluated in order alongside map-based bindings.
     * This allows all styling across an element to be applied in O(n)
     * time (a similar algorithm is that of the array merge algorithm
     * in merge sort).
     * @type {?}
     */


    var syncStylingMap =
    /**
    * @param {?} context
    * @param {?} renderer
    * @param {?} element
    * @param {?} data
    * @param {?} applyStylingFn
    * @param {?} sanitizer
    * @param {?} mode
    * @param {?=} targetProp
    * @param {?=} defaultValue
    * @return {?}
    */
    function syncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, defaultValue) {
      /** @type {?} */
      var targetPropValueWasApplied = false; // once the map-based styling code is activate it is never deactivated. For this reason a
      // check to see if the current styling context has any map based bindings is required.

      /** @type {?} */

      var totalMaps = getValuesCount(context, 3
      /* MapBindingsPosition */
      );

      if (totalMaps) {
        /** @type {?} */
        var runTheSyncAlgorithm = true;
        /** @type {?} */

        var loopUntilEnd = !targetProp; // If the code is told to finish up (run until the end), but the mode
        // hasn't been flagged to apply values (it only traverses values) then
        // there is no point in iterating over the array because nothing will
        // be applied to the element.

        if (loopUntilEnd && mode & ~1
        /* ApplyAllValues */
        ) {
          runTheSyncAlgorithm = false;
          targetPropValueWasApplied = true;
        }

        if (runTheSyncAlgorithm) {
          targetPropValueWasApplied = innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp || null, 0, defaultValue || null);
        }

        if (loopUntilEnd) {
          resetSyncCursors();
        }
      }

      return targetPropValueWasApplied;
    };
    /**
     * Recursive function designed to apply map-based styling to an element one map at a time.
     *
     * This function is designed to be called from the `syncStylingMap` function and will
     * apply map-based styling data one map at a time to the provided `element`.
     *
     * This function is recursive and it will call itself if a follow-up map value is to be
     * processed. To learn more about how the algorithm works, see `syncStylingMap`.
     * @param {?} context
     * @param {?} renderer
     * @param {?} element
     * @param {?} data
     * @param {?} applyStylingFn
     * @param {?} sanitizer
     * @param {?} mode
     * @param {?} targetProp
     * @param {?} currentMapIndex
     * @param {?} defaultValue
     * @return {?}
     */


    function innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex, defaultValue) {
      /** @type {?} */
      var targetPropValueWasApplied = false;
      /** @type {?} */

      var totalMaps = getValuesCount(context, 3
      /* MapBindingsPosition */
      );

      if (currentMapIndex < totalMaps) {
        /** @type {?} */
        var bindingIndex =
        /** @type {?} */
        getBindingValue(context, 3
        /* MapBindingsPosition */
        , currentMapIndex);
        /** @type {?} */

        var stylingMapArr =
        /** @type {?} */
        data[bindingIndex];
        /** @type {?} */

        var cursor = getCurrentSyncCursor(currentMapIndex);

        while (cursor < stylingMapArr.length) {
          /** @type {?} */
          var prop = getMapProp(stylingMapArr, cursor);
          /** @type {?} */

          var iteratedTooFar = targetProp && prop > targetProp;
          /** @type {?} */

          var isTargetPropMatched = !iteratedTooFar && prop === targetProp;
          /** @type {?} */

          var value = getMapValue(stylingMapArr, cursor);
          /** @type {?} */

          var valueIsDefined = isStylingValueDefined(value); // the recursive code is designed to keep applying until
          // it reaches or goes past the target prop. If and when
          // this happens then it will stop processing values, but
          // all other map values must also catch up to the same
          // point. This is why a recursive call is still issued
          // even if the code has iterated too far.

          /** @type {?} */

          var innerMode = iteratedTooFar ? mode : resolveInnerMapMode(mode, valueIsDefined, isTargetPropMatched);
          /** @type {?} */

          var innerProp = iteratedTooFar ? targetProp : prop;
          /** @type {?} */

          var valueApplied = innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, innerMode, innerProp, currentMapIndex + 1, defaultValue);

          if (iteratedTooFar) {
            if (!targetPropValueWasApplied) {
              targetPropValueWasApplied = valueApplied;
            }

            break;
          }

          if (!valueApplied && isValueAllowedToBeApplied(mode, isTargetPropMatched)) {
            /** @type {?} */
            var useDefault = isTargetPropMatched && !valueIsDefined;
            /** @type {?} */

            var valueToApply = useDefault ? defaultValue : value;
            /** @type {?} */

            var bindingIndexToApply = useDefault ? bindingIndex : null;
            /** @type {?} */

            var finalValue = sanitizer ? sanitizer(prop, valueToApply, 3
            /* ValidateAndSanitize */
            ) : valueToApply;
            applyStylingFn(renderer, element, prop, finalValue, bindingIndexToApply);
            valueApplied = true;
          }

          targetPropValueWasApplied = valueApplied && isTargetPropMatched;
          cursor += 2
          /* TupleSize */
          ;
        }

        setCurrentSyncCursor(currentMapIndex, cursor); // this is a fallback case in the event that the styling map is `null` for this
        // binding but there are other map-based bindings that need to be evaluated
        // afterwards. If the `prop` value is falsy then the intention is to cycle
        // through all of the properties in the remaining maps as well. If the current
        // styling map is too short then there are no values to iterate over. In either
        // case the follow-up maps need to be iterated over.

        if (stylingMapArr.length === 1
        /* ValuesStartPosition */
        || !targetProp) {
          return innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex + 1, defaultValue);
        }
      }

      return targetPropValueWasApplied;
    }
    /**
     * Enables support for map-based styling bindings (e.g. `[style]` and `[class]` bindings).
     * @return {?}
     */


    function activateStylingMapFeature() {
      setStylingMapsSyncFn(syncStylingMap);
    }
    /**
     * Used to determine the mode for the inner recursive call.
     *
     * If an inner map is iterated on then this is done so for one
     * of two reasons:
     *
     * - value is being applied:
     *   if the value is being applied from this current styling
     *   map then there is no need to apply it in a deeper map.
     *
     * - value is being not applied:
     *   apply the value if it is found in a deeper map.
     *
     * When these reasons are encountered the flags will for the
     * inner map mode will be configured.
     * @param {?} currentMode
     * @param {?} valueIsDefined
     * @param {?} isExactMatch
     * @return {?}
     */


    function resolveInnerMapMode(currentMode, valueIsDefined, isExactMatch) {
      /** @type {?} */
      var innerMode = currentMode;

      if (!valueIsDefined && !(currentMode & 4
      /* SkipTargetProp */
      ) && (isExactMatch || currentMode & 1
      /* ApplyAllValues */
      )) {
        // case 1: set the mode to apply the targeted prop value if it
        // ends up being encountered in another map value
        innerMode |= 2
        /* ApplyTargetProp */
        ;
        innerMode &= ~4
        /* SkipTargetProp */
        ;
      } else {
        // case 2: set the mode to skip the targeted prop value if it
        // ends up being encountered in another map value
        innerMode |= 4
        /* SkipTargetProp */
        ;
        innerMode &= ~2
        /* ApplyTargetProp */
        ;
      }

      return innerMode;
    }
    /**
     * Decides whether or not a prop/value entry will be applied to an element.
     *
     * To determine whether or not a value is to be applied,
     * the following procedure is evaluated:
     *
     * First check to see the current `mode` status:
     *  1. If the mode value permits all props to be applied then allow.
     *    - But do not allow if the current prop is set to be skipped.
     *  2. Otherwise if the current prop is permitted then allow.
     * @param {?} mode
     * @param {?} isTargetPropMatched
     * @return {?}
     */


    function isValueAllowedToBeApplied(mode, isTargetPropMatched) {
      /** @type {?} */
      var doApplyValue = (mode & 1
      /* ApplyAllValues */
      ) > 0;

      if (!doApplyValue) {
        if (mode & 2
        /* ApplyTargetProp */
        ) {
            doApplyValue = isTargetPropMatched;
          }
      } else if (mode & 4
      /* SkipTargetProp */
      && isTargetPropMatched) {
        doApplyValue = false;
      }

      return doApplyValue;
    }
    /**
     * Used to keep track of concurrent cursor values for multiple map-based styling bindings present on
     * an element.
     * @type {?}
     */


    var MAP_CURSORS = [];
    /**
     * Used to reset the state of each cursor value being used to iterate over map-based styling
     * bindings.
     * @return {?}
     */

    function resetSyncCursors() {
      for (var i = 0; i < MAP_CURSORS.length; i++) {
        MAP_CURSORS[i] = 1
        /* ValuesStartPosition */
        ;
      }
    }
    /**
     * Returns an active cursor value at a given mapIndex location.
     * @param {?} mapIndex
     * @return {?}
     */


    function getCurrentSyncCursor(mapIndex) {
      if (mapIndex >= MAP_CURSORS.length) {
        MAP_CURSORS.push(1
        /* ValuesStartPosition */
        );
      }

      return MAP_CURSORS[mapIndex];
    }
    /**
     * Sets a cursor value at a given mapIndex location.
     * @param {?} mapIndex
     * @param {?} indexValue
     * @return {?}
     */


    function setCurrentSyncCursor(mapIndex, indexValue) {
      MAP_CURSORS[mapIndex] = indexValue;
    }
    /**
     * Used to convert a {key:value} map into a `StylingMapArray` array.
     *
     * This function will either generate a new `StylingMapArray` instance
     * or it will patch the provided `newValues` map value into an
     * existing `StylingMapArray` value (this only happens if `bindingValue`
     * is an instance of `StylingMapArray`).
     *
     * If a new key/value map is provided with an old `StylingMapArray`
     * value then all properties will be overwritten with their new
     * values or with `null`. This means that the array will never
     * shrink in size (but it will also not be created and thrown
     * away whenever the {key:value} map entries change).
     * @param {?} bindingValue
     * @param {?} newValues
     * @param {?=} normalizeProps
     * @return {?}
     */


    function normalizeIntoStylingMap(bindingValue, newValues, normalizeProps) {
      /** @type {?} */
      var stylingMapArr = Array.isArray(bindingValue) ? bindingValue : [null];
      stylingMapArr[0
      /* RawValuePosition */
      ] = newValues || null; // because the new values may not include all the properties
      // that the old ones had, all values are set to `null` before
      // the new values are applied. This way, when flushed, the
      // styling algorithm knows exactly what style/class values
      // to remove from the element (since they are `null`).

      for (var j = 1
      /* ValuesStartPosition */
      ; j < stylingMapArr.length; j += 2
      /* TupleSize */
      ) {
        setMapValue(stylingMapArr, j, null);
      }
      /** @type {?} */


      var props = null;
      /** @type {?} */

      var map;
      /** @type {?} */

      var allValuesTrue = false;

      if (typeof newValues === 'string') {
        // [class] bindings allow string values
        if (newValues.length) {
          props = newValues.split(/\s+/);
          allValuesTrue = true;
        }
      } else {
        props = newValues ? Object.keys(newValues) : null;
        map = newValues;
      }

      if (props) {
        for (var i = 0; i < props.length; i++) {
          /** @type {?} */
          var prop =
          /** @type {?} */
          props[i];
          /** @type {?} */

          var newProp = normalizeProps ? hyphenate(prop) : prop;
          /** @type {?} */

          var value = allValuesTrue ? true :
          /** @type {?} */
          map[prop];
          addItemToStylingMap(stylingMapArr, newProp, value, true);
        }
      }

      return stylingMapArr;
    }
    /**
     * Inserts the provided item into the provided styling array at the right spot.
     *
     * The `StylingMapArray` type is a sorted key/value array of entries. This means
     * that when a new entry is inserted it must be placed at the right spot in the
     * array. This function figures out exactly where to place it.
     * @param {?} stylingMapArr
     * @param {?} prop
     * @param {?} value
     * @param {?=} allowOverwrite
     * @return {?}
     */


    function addItemToStylingMap(stylingMapArr, prop, value, allowOverwrite) {
      for (var j = 1
      /* ValuesStartPosition */
      ; j < stylingMapArr.length; j += 2
      /* TupleSize */
      ) {
        /** @type {?} */
        var propAtIndex = getMapProp(stylingMapArr, j);

        if (prop <= propAtIndex) {
          /** @type {?} */
          var applied = false;

          if (propAtIndex === prop) {
            /** @type {?} */
            var valueAtIndex = stylingMapArr[j];

            if (allowOverwrite || !isStylingValueDefined(valueAtIndex)) {
              applied = true;
              setMapValue(stylingMapArr, j, value);
            }
          } else {
            applied = true;
            stylingMapArr.splice(j, 0, prop, value);
          }

          return applied;
        }
      }

      stylingMapArr.push(prop, value);
      return true;
    }
    /**
     * Converts the provided styling map array into a string.
     *
     * Classes => `one two three`
     * Styles => `prop:value; prop2:value2`
     * @param {?} map
     * @param {?} isClassBased
     * @return {?}
     */


    function stylingMapToString(map, isClassBased) {
      /** @type {?} */
      var str = '';

      for (var i = 1
      /* ValuesStartPosition */
      ; i < map.length; i += 2
      /* TupleSize */
      ) {
        /** @type {?} */
        var prop = getMapProp(map, i);
        /** @type {?} */

        var value =
        /** @type {?} */
        getMapValue(map, i);
        /** @type {?} */

        var attrValue = concatString(prop, isClassBased ? '' : value, ':');
        str = concatString(str, attrValue, isClassBased ? ' ' : '; ');
      }

      return str;
    }
    /**
     * Converts the provided styling map array into a key value map.
     * @param {?} map
     * @return {?}
     */


    function stylingMapToStringMap(map) {
      /** @type {?} */
      var stringMap = {};

      if (map) {
        for (var i = 1
        /* ValuesStartPosition */
        ; i < map.length; i += 2
        /* TupleSize */
        ) {
          /** @type {?} */
          var prop = getMapProp(map, i);
          /** @type {?} */

          var value =
          /** @type {?} */
          getMapValue(map, i);
          stringMap[prop] = value;
        }
      }

      return stringMap;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A debug/testing-oriented summary of a styling entry.
     *
     * A value such as this is generated as an artifact of the `DebugStyling`
     * summary.
     * @record
     */


    function LStylingSummary() {}

    if (false) {}
    /**
     * A debug/testing-oriented summary of all styling entries for a `DebugNode` instance.
     * @record
     */


    function DebugStyling() {}

    if (false) {}
    /**
     * A debug/testing-oriented summary of all styling entries within a `TStylingContext`.
     * @record
     */


    function TStylingTupleSummary() {}

    if (false) {}
    /**
     * Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.
     * @param {?} context
     * @return {?}
     */


    function attachStylingDebugObject(context) {
      /** @type {?} */
      var debug = new TStylingContextDebug(context);
      attachDebugObject(context, debug);
      return debug;
    }
    /**
     * A human-readable debug summary of the styling data present within `TStylingContext`.
     *
     * This class is designed to be used within testing code or when an
     * application has `ngDevMode` activated.
     */


    var TStylingContextDebug = /*#__PURE__*/function () {
      /**
       * @param {?} context
       */
      function TStylingContextDebug(context) {
        _classCallCheck(this, TStylingContextDebug);

        this.context = context;
      }
      /**
       * @return {?}
       */


      _createClass2(TStylingContextDebug, [{
        key: "isLocked",
        get: function get() {
          return isContextLocked(this.context);
        }
        /**
         * Returns a detailed summary of each styling entry in the context.
         *
         * See `TStylingTupleSummary`.
         * @return {?}
         */

      }, {
        key: "entries",
        get: function get() {
          /** @type {?} */
          var context = this.context;
          /** @type {?} */

          var entries = {};
          /** @type {?} */

          var start = 3
          /* MapBindingsPosition */
          ;
          /** @type {?} */

          var i = start;

          while (i < context.length) {
            /** @type {?} */
            var valuesCount = getValuesCount(context, i); // the context may contain placeholder values which are populated ahead of time,
            // but contain no actual binding values. In this situation there is no point in
            // classifying this as an "entry" since no real data is stored here yet.

            if (valuesCount) {
              /** @type {?} */
              var prop = getProp(context, i);
              /** @type {?} */

              var guardMask = getGuardMask(context, i);
              /** @type {?} */

              var defaultValue = getDefaultValue(context, i);
              /** @type {?} */

              var sanitizationRequired = isSanitizationRequired(context, i);
              /** @type {?} */

              var bindingsStartPosition = i + 3
              /* BindingsStartOffset */
              ;
              /** @type {?} */

              var sources = [];

              for (var j = 0; j < valuesCount; j++) {
                sources.push(
                /** @type {?} */
                context[bindingsStartPosition + j]);
              }

              entries[prop] = {
                prop: prop,
                guardMask: guardMask,
                sanitizationRequired: sanitizationRequired,
                valuesCount: valuesCount,
                defaultValue: defaultValue,
                sources: sources
              };
            }

            i += 3
            /* BindingsStartOffset */
            + valuesCount;
          }

          return entries;
        }
      }]);

      return TStylingContextDebug;
    }();

    if (false) {}
    /**
     * A human-readable debug summary of the styling data present for a `DebugNode` instance.
     *
     * This class is designed to be used within testing code or when an
     * application has `ngDevMode` activated.
     */


    var NodeStylingDebug = /*#__PURE__*/function () {
      /**
       * @param {?} context
       * @param {?} _data
       * @param {?=} _isClassBased
       */
      function NodeStylingDebug(context, _data, _isClassBased) {
        _classCallCheck(this, NodeStylingDebug);

        this.context = context;
        this._data = _data;
        this._isClassBased = _isClassBased;
        this._sanitizer = null;
      }
      /**
       * Overrides the sanitizer used to process styles.
       * @param {?} sanitizer
       * @return {?}
       */


      _createClass2(NodeStylingDebug, [{
        key: "overrideSanitizer",
        value: function overrideSanitizer(sanitizer) {
          this._sanitizer = sanitizer;
        }
        /**
         * Returns a detailed summary of each styling entry in the context and
         * what their runtime representation is.
         *
         * See `LStylingSummary`.
         * @return {?}
         */

      }, {
        key: "_mapValues",

        /**
         * @private
         * @param {?} fn
         * @return {?}
         */
        value: function _mapValues(fn) {
          // there is no need to store/track an element instance. The
          // element is only used when the styling algorithm attempts to
          // style the value (and we mock out the stylingApplyFn anyway).

          /** @type {?} */
          var mockElement =
          /** @type {?} */
          {};
          /** @type {?} */

          var hasMaps = getValuesCount(this.context, 3
          /* MapBindingsPosition */
          ) > 0;

          if (hasMaps) {
            activateStylingMapFeature();
          }
          /** @type {?} */


          var mapFn =
          /**
          * @param {?} renderer
          * @param {?} element
          * @param {?} prop
          * @param {?} value
          * @param {?=} bindingIndex
          * @return {?}
          */
          function mapFn(renderer, element, prop, value, bindingIndex) {
            fn(prop, value, bindingIndex || null);
          };
          /** @type {?} */


          var sanitizer = this._isClassBased ? null : this._sanitizer || getCurrentStyleSanitizer();
          applyStyling(this.context, null, mockElement, this._data, true, mapFn, sanitizer);
        }
      }, {
        key: "summary",
        get: function get() {
          /** @type {?} */
          var entries = {};

          this._mapValues(
          /**
          * @param {?} prop
          * @param {?} value
          * @param {?} bindingIndex
          * @return {?}
          */
          function (prop, value, bindingIndex) {
            entries[prop] = {
              prop: prop,
              value: value,
              bindingIndex: bindingIndex
            };
          });

          return entries;
        }
        /**
         * Returns a key/value map of all the styles/classes that were last applied to the element.
         * @return {?}
         */

      }, {
        key: "values",
        get: function get() {
          /** @type {?} */
          var entries = {};

          this._mapValues(
          /**
          * @param {?} prop
          * @param {?} value
          * @return {?}
          */
          function (prop, value) {
            entries[prop] = value;
          });

          return entries;
        }
      }]);

      return NodeStylingDebug;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /*
     * 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}
     *     ]}
     *   ]
     * }
     * ```
     */

    /** @type {?} */


    var LViewArray = ngDevMode && createNamedArrayType('LView');
    /** @type {?} */

    var LVIEW_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 LView.
     *
     * Simple slice will keep the same type, and we need it to be LView
     * @param {?} list
     * @return {?}
     */

    function cloneToLView(list) {
      if (LVIEW_EMPTY === undefined) LVIEW_EMPTY = new
      /** @type {?} */
      LViewArray();
      return (
        /** @type {?} */
        LVIEW_EMPTY.concat(list)
      );
    }
    /**
     * This class is a debug version of Object literal so that we can have constructor name show up in
     * debug tools in ngDevMode.
     * @type {?}
     */


    var TViewConstructor =
    /**
     * @param {?} id
     * @param {?} blueprint
     * @param {?} template
     * @param {?} queries
     * @param {?} viewQuery
     * @param {?} node
     * @param {?} data
     * @param {?} bindingStartIndex
     * @param {?} expandoStartIndex
     * @param {?} expandoInstructions
     * @param {?} firstTemplatePass
     * @param {?} staticViewQueries
     * @param {?} staticContentQueries
     * @param {?} preOrderHooks
     * @param {?} preOrderCheckHooks
     * @param {?} contentHooks
     * @param {?} contentCheckHooks
     * @param {?} viewHooks
     * @param {?} viewCheckHooks
     * @param {?} destroyHooks
     * @param {?} cleanup
     * @param {?} contentQueries
     * @param {?} components
     * @param {?} directiveRegistry
     * @param {?} pipeRegistry
     * @param {?} firstChild
     * @param {?} schemas
     */
    function TView(id, //
    blueprint, //
    template, //
    queries, //
    viewQuery, //
    node, //
    data, //
    bindingStartIndex, //
    expandoStartIndex, //
    expandoInstructions, //
    firstTemplatePass, //
    staticViewQueries, //
    staticContentQueries, //
    preOrderHooks, //
    preOrderCheckHooks, //
    contentHooks, //
    contentCheckHooks, //
    viewHooks, //
    viewCheckHooks, //
    destroyHooks, //
    cleanup, //
    contentQueries, //
    components, //
    directiveRegistry, //
    pipeRegistry, //
    firstChild, //
    schemas) {
      _classCallCheck(this, TView);

      this.id = id;
      this.blueprint = blueprint;
      this.template = template;
      this.queries = queries;
      this.viewQuery = viewQuery;
      this.node = node;
      this.data = data;
      this.bindingStartIndex = bindingStartIndex;
      this.expandoStartIndex = expandoStartIndex;
      this.expandoInstructions = expandoInstructions;
      this.firstTemplatePass = firstTemplatePass;
      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;
    };
    /** @type {?} */


    var TNodeConstructor = /*#__PURE__*/function () {
      /**
       * @param {?} tView_
       * @param {?} type
       * @param {?} index
       * @param {?} injectorIndex
       * @param {?} directiveStart
       * @param {?} directiveEnd
       * @param {?} propertyMetadataStartIndex
       * @param {?} propertyMetadataEndIndex
       * @param {?} flags
       * @param {?} providerIndexes
       * @param {?} tagName
       * @param {?} attrs
       * @param {?} localNames
       * @param {?} initialInputs
       * @param {?} inputs
       * @param {?} outputs
       * @param {?} tViews
       * @param {?} next
       * @param {?} projectionNext
       * @param {?} child
       * @param {?} parent
       * @param {?} projection
       * @param {?} styles
       * @param {?} classes
       */
      function TNode(tView_, //
      type, //
      index, //
      injectorIndex, //
      directiveStart, //
      directiveEnd, //
      propertyMetadataStartIndex, //
      propertyMetadataEndIndex, //
      flags, //
      providerIndexes, //
      tagName, //
      attrs, //
      localNames, //
      initialInputs, //
      inputs, //
      outputs, //
      tViews, //
      next, //
      projectionNext, //
      child, //
      parent, //
      projection, //
      styles, //
      classes) {
        _classCallCheck(this, TNode);

        this.tView_ = tView_;
        this.type = type;
        this.index = index;
        this.injectorIndex = injectorIndex;
        this.directiveStart = directiveStart;
        this.directiveEnd = directiveEnd;
        this.propertyMetadataStartIndex = propertyMetadataStartIndex;
        this.propertyMetadataEndIndex = propertyMetadataEndIndex;
        this.flags = flags;
        this.providerIndexes = providerIndexes;
        this.tagName = tagName;
        this.attrs = attrs;
        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.classes = classes;
      }
      /**
       * @return {?}
       */


      _createClass2(TNode, [{
        key: "type_",
        get: function get() {
          switch (this.type) {
            case 0
            /* Container */
            :
              return 'TNodeType.Container';

            case 3
            /* Element */
            :
              return 'TNodeType.Element';

            case 4
            /* ElementContainer */
            :
              return 'TNodeType.ElementContainer';

            case 5
            /* IcuContainer */
            :
              return 'TNodeType.IcuContainer';

            case 1
            /* Projection */
            :
              return 'TNodeType.Projection';

            case 2
            /* View */
            :
              return 'TNodeType.View';

            default:
              return 'TNodeType.???';
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "flags_",
        get: function get() {
          /** @type {?} */
          var flags = [];
          if (this.flags & 8
          /* hasClassInput */
          ) flags.push('TNodeFlags.hasClassInput');
          if (this.flags & 4
          /* hasContentQuery */
          ) flags.push('TNodeFlags.hasContentQuery');
          if (this.flags & 16
          /* hasStyleInput */
          ) flags.push('TNodeFlags.hasStyleInput');
          if (this.flags & 1
          /* isComponent */
          ) flags.push('TNodeFlags.isComponent');
          if (this.flags & 32
          /* isDetached */
          ) flags.push('TNodeFlags.isDetached');
          if (this.flags & 2
          /* isProjected */
          ) flags.push('TNodeFlags.isProjected');
          return flags.join('|');
        }
      }]);

      return TNode;
    }();
    /** @type {?} */


    var TViewData = ngDevMode && createNamedArrayType('TViewData');
    /** @type {?} */

    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
     * @param {?} list
     * @return {?}
     */

    function cloneToTViewData(list) {
      if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new
      /** @type {?} */
      TViewData();
      return (
        /** @type {?} */
        TVIEWDATA_EMPTY.concat(list)
      );
    }
    /** @type {?} */


    var LViewBlueprint = ngDevMode && createNamedArrayType('LViewBlueprint');
    /** @type {?} */

    var MatchesArray = ngDevMode && createNamedArrayType('MatchesArray');
    /** @type {?} */

    var TViewComponents = ngDevMode && createNamedArrayType('TViewComponents');
    /** @type {?} */

    var TNodeLocalNames = ngDevMode && createNamedArrayType('TNodeLocalNames');
    /** @type {?} */

    var TNodeInitialInputs = ngDevMode && createNamedArrayType('TNodeInitialInputs');
    /** @type {?} */

    var TNodeInitialData = ngDevMode && createNamedArrayType('TNodeInitialData');
    /** @type {?} */

    var LCleanup = ngDevMode && createNamedArrayType('LCleanup');
    /** @type {?} */

    var TCleanup = ngDevMode && createNamedArrayType('TCleanup');
    /**
     * @param {?} lView
     * @return {?}
     */

    function attachLViewDebug(lView) {
      attachDebugObject(lView, new LViewDebug(lView));
    }
    /**
     * @param {?} lContainer
     * @return {?}
     */


    function attachLContainerDebug(lContainer) {
      attachDebugObject(lContainer, new LContainerDebug(lContainer));
    }
    /**
     * @param {?} obj
     * @return {?}
     */


    function toDebug(obj) {
      if (obj) {
        /** @type {?} */
        var debug =
        /** @type {?} */
        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).
     * @return {?}
     */


    function toHtml(value) {
      var includeChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

      /** @type {?} */
      var node =
      /** @type {?} */
      unwrapRNode(value);

      if (node) {
        /** @type {?} */
        var isTextNode = node.nodeType === Node.TEXT_NODE;
        /** @type {?} */

        var outerHTML = (isTextNode ? node.textContent : node.outerHTML) || '';

        if (includeChildren || isTextNode) {
          return outerHTML;
        } else {
          /** @type {?} */
          var innerHTML = node.innerHTML;
          return outerHTML.split(innerHTML)[0] || null;
        }
      } else {
        return null;
      }
    }

    var LViewDebug = /*#__PURE__*/function () {
      /**
       * @param {?} _raw_lView
       */
      function LViewDebug(_raw_lView) {
        _classCallCheck(this, LViewDebug);

        this._raw_lView = _raw_lView;
      }
      /**
       * Flags associated with the `LView` unpacked into a more readable state.
       * @return {?}
       */


      _createClass2(LViewDebug, [{
        key: "flags",
        get: function get() {
          /** @type {?} */
          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 >> 10
            /* IndexWithinInitPhaseShift */

          };
        }
        /**
         * @return {?}
         */

      }, {
        key: "parent",
        get: function get() {
          return toDebug(this._raw_lView[PARENT]);
        }
        /**
         * @return {?}
         */

      }, {
        key: "host",
        get: function get() {
          return toHtml(this._raw_lView[HOST], true);
        }
        /**
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "nodes",
        get: function get() {
          /** @type {?} */
          var lView = this._raw_lView;
          /** @type {?} */

          var tNode = lView[TVIEW].firstChild;
          return toDebugNodes(tNode, lView);
        }
        /**
         * Additional information which is hidden behind a property. The extra level of indirection is
         * done so that the debug view would not be cluttered with properties which are only rarely
         * relevant to the developer.
         * @return {?}
         */

      }, {
        key: "__other__",
        get: function get() {
          return {
            tView: this._raw_lView[TVIEW],
            cleanup: this._raw_lView[CLEANUP],
            injector: this._raw_lView[INJECTOR$1],
            rendererFactory: this._raw_lView[RENDERER_FACTORY],
            renderer: this._raw_lView[RENDERER],
            sanitizer: this._raw_lView[SANITIZER],
            childHead: toDebug(this._raw_lView[CHILD_HEAD]),
            next: toDebug(this._raw_lView[NEXT]),
            childTail: toDebug(this._raw_lView[CHILD_TAIL]),
            declarationView: toDebug(this._raw_lView[DECLARATION_VIEW]),
            queries: null,
            tHost: this._raw_lView[T_HOST],
            bindingIndex: this._raw_lView[BINDING_INDEX]
          };
        }
        /**
         * Normalized view of child views (and containers) attached at this location.
         * @return {?}
         */

      }, {
        key: "childViews",
        get: function get() {
          /** @type {?} */
          var childViews = [];
          /** @type {?} */

          var child = this.__other__.childHead;

          while (child) {
            childViews.push(child);
            child = child.__other__.next;
          }

          return childViews;
        }
      }]);

      return LViewDebug;
    }();

    if (false) {}
    /**
     * @record
     */


    function DebugNode() {}

    if (false) {}
    /**
     * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
     *
     * @param {?} tNode
     * @param {?} lView
     * @return {?}
     */


    function toDebugNodes(tNode, lView) {
      if (tNode) {
        /** @type {?} */
        var debugNodes = [];
        /** @type {?} */

        var tNodeCursor = tNode;

        while (tNodeCursor) {
          /** @type {?} */
          var rawValue = lView[tNode.index];
          /** @type {?} */

          var _native8 = unwrapRNode(rawValue);
          /** @type {?} */


          var componentLViewDebug = toDebug(readLViewValue(rawValue));
          /** @type {?} */

          var styles = isStylingContext(tNode.styles) ? new NodeStylingDebug(
          /** @type {?} */

          /** @type {?} */
          tNode.styles, lView) : null;
          /** @type {?} */

          var classes = isStylingContext(tNode.classes) ? new NodeStylingDebug(
          /** @type {?} */

          /** @type {?} */
          tNode.classes, lView, true) : null;
          debugNodes.push({
            html: toHtml(_native8),
            "native":
            /** @type {?} */
            _native8,
            styles: styles,
            classes: classes,
            nodes: toDebugNodes(tNode.child, lView),
            component: componentLViewDebug
          });
          tNodeCursor = tNodeCursor.next;
        }

        return debugNodes;
      } else {
        return null;
      }
    }

    var LContainerDebug = /*#__PURE__*/function () {
      /**
       * @param {?} _raw_lContainer
       */
      function LContainerDebug(_raw_lContainer) {
        _classCallCheck(this, LContainerDebug);

        this._raw_lContainer = _raw_lContainer;
      }
      /**
       * @return {?}
       */


      _createClass2(LContainerDebug, [{
        key: "activeIndex",
        get: function get() {
          return this._raw_lContainer[ACTIVE_INDEX];
        }
        /**
         * @return {?}
         */

      }, {
        key: "views",
        get: function get() {
          return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET).map(
          /** @type {?} */
          toDebug);
        }
        /**
         * @return {?}
         */

      }, {
        key: "parent",
        get: function get() {
          return toDebug(this._raw_lContainer[PARENT]);
        }
        /**
         * @return {?}
         */

      }, {
        key: "movedViews",
        get: function get() {
          return this._raw_lContainer[MOVED_VIEWS];
        }
        /**
         * @return {?}
         */

      }, {
        key: "host",
        get: function get() {
          return this._raw_lContainer[HOST];
        }
        /**
         * @return {?}
         */

      }, {
        key: "native",
        get: function get() {
          return this._raw_lContainer[NATIVE];
        }
        /**
         * @return {?}
         */

      }, {
        key: "__other__",
        get: function get() {
          return {
            next: toDebug(this._raw_lContainer[NEXT])
          };
        }
      }]);

      return LContainerDebug;
    }();

    if (false) {}
    /**
     * Return an `LView` value if found.
     *
     * @param {?} value `LView` if any
     * @return {?}
     */


    function readLViewValue(value) {
      while (Array.isArray(value)) {
        // This check is not quite right, as it does not take into account `StylingContext`
        // This is why it is in debug, not in util.ts
        if (value.length >= HEADER_OFFSET - 1) return (
          /** @type {?} */
          value
        );
        value = value[HOST];
      }

      return null;
    }

    var I18NDebugItem = /*#__PURE__*/function () {
      /**
       * @param {?} __raw_opCode
       * @param {?} _lView
       * @param {?} nodeIndex
       * @param {?} type
       */
      function I18NDebugItem(__raw_opCode, _lView, nodeIndex, type) {
        _classCallCheck(this, I18NDebugItem);

        this.__raw_opCode = __raw_opCode;
        this._lView = _lView;
        this.nodeIndex = nodeIndex;
        this.type = type;
      }
      /**
       * @return {?}
       */


      _createClass2(I18NDebugItem, [{
        key: "tNode",
        get: function get() {
          return getTNode(this.nodeIndex, this._lView);
        }
      }]);

      return I18NDebugItem;
    }();

    if (false) {}
    /**
     * Turns a list of "Create" & "Update" OpCodes into a human-readable list of operations for
     * debugging purposes.
     * @param {?} mutateOpCodes mutation opCodes to read
     * @param {?} updateOpCodes update opCodes to read
     * @param {?} icus list of ICU expressions
     * @param {?} lView The view the opCodes are acting on
     * @return {?}
     */


    function attachI18nOpCodesDebug(mutateOpCodes, updateOpCodes, icus, lView) {
      attachDebugObject(mutateOpCodes, new I18nMutateOpCodesDebug(mutateOpCodes, lView));
      attachDebugObject(updateOpCodes, new I18nUpdateOpCodesDebug(updateOpCodes, icus, lView));

      if (icus) {
        icus.forEach(
        /**
        * @param {?} icu
        * @return {?}
        */
        function (icu) {
          icu.create.forEach(
          /**
          * @param {?} icuCase
          * @return {?}
          */
          function (icuCase) {
            attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView));
          });
          icu.update.forEach(
          /**
          * @param {?} icuCase
          * @return {?}
          */
          function (icuCase) {
            attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));
          });
        });
      }
    }

    var I18nMutateOpCodesDebug = /*#__PURE__*/function () {
      /**
       * @param {?} __raw_opCodes
       * @param {?} __lView
       */
      function I18nMutateOpCodesDebug(__raw_opCodes, __lView) {
        _classCallCheck(this, I18nMutateOpCodesDebug);

        this.__raw_opCodes = __raw_opCodes;
        this.__lView = __lView;
      }
      /**
       * A list of operation information about how the OpCodes will act on the view.
       * @return {?}
       */


      _createClass2(I18nMutateOpCodesDebug, [{
        key: "operations",
        get: function get() {
          var __lView = this.__lView,
              __raw_opCodes = this.__raw_opCodes;
          /** @type {?} */

          var results = [];

          for (var i = 0; i < __raw_opCodes.length; i++) {
            /** @type {?} */
            var opCode = __raw_opCodes[i];
            /** @type {?} */

            var result = void 0;

            if (typeof opCode === 'string') {
              result = {
                __raw_opCode: opCode,
                type: 'Create Text Node',
                nodeIndex: __raw_opCodes[++i],
                text: opCode
              };
            }

            if (typeof opCode === 'number') {
              switch (opCode & 7
              /* MASK_OPCODE */
              ) {
                case 1
                /* AppendChild */
                :
                  /** @type {?} */
                  var destinationNodeIndex = opCode >>> 17
                  /* SHIFT_PARENT */
                  ;
                  result = new I18NDebugItem(opCode, __lView, destinationNodeIndex, 'AppendChild');
                  break;

                case 0
                /* Select */
                :
                  /** @type {?} */
                  var nodeIndex = opCode >>> 3
                  /* SHIFT_REF */
                  ;
                  result = new I18NDebugItem(opCode, __lView, nodeIndex, 'Select');
                  break;

                case 5
                /* ElementEnd */
                :
                  /** @type {?} */
                  var elementIndex = opCode >>> 3
                  /* SHIFT_REF */
                  ;
                  result = new I18NDebugItem(opCode, __lView, elementIndex, 'ElementEnd');
                  break;

                case 4
                /* Attr */
                :
                  elementIndex = opCode >>> 3
                  /* SHIFT_REF */
                  ;
                  result = new I18NDebugItem(opCode, __lView, elementIndex, 'Attr');
                  result['attrName'] = __raw_opCodes[++i];
                  result['attrValue'] = __raw_opCodes[++i];
                  break;
              }
            }

            if (!result) {
              switch (opCode) {
                case COMMENT_MARKER:
                  result = {
                    __raw_opCode: opCode,
                    type: 'COMMENT_MARKER',
                    commentValue: __raw_opCodes[++i],
                    nodeIndex: __raw_opCodes[++i]
                  };
                  break;

                case ELEMENT_MARKER:
                  result = {
                    __raw_opCode: opCode,
                    type: 'ELEMENT_MARKER'
                  };
                  break;
              }
            }

            if (!result) {
              result = {
                __raw_opCode: opCode,
                type: 'Unknown Op Code',
                code: opCode
              };
            }

            results.push(result);
          }

          return results;
        }
      }]);

      return I18nMutateOpCodesDebug;
    }();

    if (false) {}

    var I18nUpdateOpCodesDebug = /*#__PURE__*/function () {
      /**
       * @param {?} __raw_opCodes
       * @param {?} icus
       * @param {?} __lView
       */
      function I18nUpdateOpCodesDebug(__raw_opCodes, icus, __lView) {
        _classCallCheck(this, I18nUpdateOpCodesDebug);

        this.__raw_opCodes = __raw_opCodes;
        this.icus = icus;
        this.__lView = __lView;
      }
      /**
       * A list of operation information about how the OpCodes will act on the view.
       * @return {?}
       */


      _createClass2(I18nUpdateOpCodesDebug, [{
        key: "operations",
        get: function get() {
          var __lView = this.__lView,
              __raw_opCodes = this.__raw_opCodes,
              icus = this.icus;
          /** @type {?} */

          var results = [];

          for (var i = 0; i < __raw_opCodes.length; i++) {
            // bit code to check if we should apply the next update

            /** @type {?} */
            var checkBit =
            /** @type {?} */
            __raw_opCodes[i]; // Number of opCodes to skip until next set of update codes

            /** @type {?} */

            var skipCodes =
            /** @type {?} */
            __raw_opCodes[++i];
            /** @type {?} */

            var value = '';

            for (var j = i + 1; j <= i + skipCodes; j++) {
              /** @type {?} */
              var opCode = __raw_opCodes[j];

              if (typeof opCode === 'string') {
                value += opCode;
              } else if (typeof opCode == 'number') {
                if (opCode < 0) {
                  // It's a binding index whose value is negative
                  // We cannot know the value of the binding so we only show the index
                  value += "\uFFFD".concat(-opCode - 1, "\uFFFD");
                } else {
                  /** @type {?} */
                  var nodeIndex = opCode >>> 2
                  /* SHIFT_REF */
                  ;
                  /** @type {?} */

                  var tIcuIndex = void 0;
                  /** @type {?} */

                  var tIcu = void 0;

                  switch (opCode & 3
                  /* MASK_OPCODE */
                  ) {
                    case 1
                    /* Attr */
                    :
                      /** @type {?} */
                      var attrName =
                      /** @type {?} */
                      __raw_opCodes[++j];
                      /** @type {?} */

                      var sanitizeFn = __raw_opCodes[++j];
                      results.push({
                        __raw_opCode: opCode,
                        checkBit: checkBit,
                        type: 'Attr',
                        attrValue: value,
                        attrName: attrName,
                        sanitizeFn: sanitizeFn
                      });
                      break;

                    case 0
                    /* Text */
                    :
                      results.push({
                        __raw_opCode: opCode,
                        checkBit: checkBit,
                        type: 'Text',
                        nodeIndex: nodeIndex,
                        text: value
                      });
                      break;

                    case 2
                    /* IcuSwitch */
                    :
                      tIcuIndex =
                      /** @type {?} */
                      __raw_opCodes[++j];
                      tIcu =
                      /** @type {?} */
                      icus[tIcuIndex];
                      /** @type {?} */

                      var result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuSwitch');
                      result['tIcuIndex'] = tIcuIndex;
                      result['checkBit'] = checkBit;
                      result['mainBinding'] = value;
                      result['tIcu'] = tIcu;
                      results.push(result);
                      break;

                    case 3
                    /* IcuUpdate */
                    :
                      tIcuIndex =
                      /** @type {?} */
                      __raw_opCodes[++j];
                      tIcu =
                      /** @type {?} */
                      icus[tIcuIndex];
                      result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuUpdate');
                      result['tIcuIndex'] = tIcuIndex;
                      result['checkBit'] = checkBit;
                      result['tIcu'] = tIcu;
                      results.push(result);
                      break;
                  }
                }
              }
            }

            i += skipCodes;
          }

          return results;
        }
      }]);

      return I18nUpdateOpCodesDebug;
    }();

    if (false) {}
    /**
     * @record
     */


    function I18nOpCodesDebug() {}

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Selects 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) {
     *     element(0, 'div');
     *   }
     *   if (rf & 2) {
     *     select(0); // Select the <div/> created above.
     *     property('title', 'test');
     *   }
     *  }
     * ```
     * \@codeGenApi
     * @param {?} index the index of the item to act on with the following instructions
     *
     * @return {?}
     */


    function ɵɵselect(index) {
      ngDevMode && assertGreaterThan(index, -1, 'Invalid index');
      ngDevMode && assertLessThan(index, getLView().length - HEADER_OFFSET, 'Should be within range for the view data');
      /** @type {?} */

      var lView = getLView();
      selectInternal(lView, index);
    }
    /**
     * @param {?} lView
     * @param {?} index
     * @return {?}
     */


    function selectInternal(lView, index) {
      // Flush the initial hooks for elements in the view that have been added up to this point.
      executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), 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 `ɵɵselect` instruction.

      setSelectedIndex(index);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$5 =
    /**
    * @return {?}
    */
    function ɵ0$5() {
      return Promise.resolve(null);
    };
    /**
     * A permanent marker promise which signifies that the current CD tree is
     * clean.
     * @type {?}
     */


    var _CLEAN_PROMISE = ɵ0$5();
    /** @enum {number} */


    var BindingDirection = {
      Input: 0,
      Output: 1
    };
    /**
     * Refreshes the view, executing the following steps in that order:
     * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host
     * bindings, refreshes child components.
     * Note: view hooks are triggered later when leaving the view.
     * @param {?} lView
     * @return {?}
     */

    function refreshDescendantViews(lView) {
      /** @type {?} */
      var tView = lView[TVIEW];
      /** @type {?} */

      var creationMode = isCreationMode(lView); // This needs to be set before children are processed to support recursive components

      tView.firstTemplatePass = false; // Resetting the bindingIndex of the current LView as the next steps may trigger change detection.

      lView[BINDING_INDEX] = tView.bindingStartIndex; // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.
      // This will be done in the update pass.

      if (!creationMode) {
        /** @type {?} */
        var _checkNoChangesMode = getCheckNoChangesMode();

        executePreOrderHooks(lView, tView, _checkNoChangesMode, undefined);
        refreshDynamicEmbeddedViews(lView); // Content query results must be refreshed before content hooks are called.

        refreshContentQueries(tView, lView);
        resetPreOrderHookFlags(lView);
        executeHooks(lView, tView.contentHooks, tView.contentCheckHooks, _checkNoChangesMode, 1
        /* AfterContentInitHooksToBeRun */
        , undefined);
        setHostBindings(tView, lView);
      } // 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 (creationMode && 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 (!creationMode || tView.staticViewQueries) {
        executeViewQueryFn(2
        /* Update */
        , tView, lView[CONTEXT]);
      }

      refreshChildComponents(lView, tView.components);
    }
    /**
     * Sets the host bindings for the current view.
     * @param {?} tView
     * @param {?} viewData
     * @return {?}
     */


    function setHostBindings(tView, viewData) {
      /** @type {?} */
      var selectedIndex = getSelectedIndex();

      try {
        if (tView.expandoInstructions) {
          /** @type {?} */
          var _bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;

          setBindingRoot(_bindingRootIndex);
          /** @type {?} */

          var currentDirectiveIndex = -1;
          /** @type {?} */

          var currentElementIndex = -1;

          for (var i = 0; i < tView.expandoInstructions.length; i++) {
            /** @type {?} */
            var instruction = tView.expandoInstructions[i];

            if (typeof instruction === 'number') {
              if (instruction <= 0) {
                // Negative numbers mean that we are starting new EXPANDO block and need to update
                // the current element and directive index.
                currentElementIndex = -instruction;
                setActiveHostElement(currentElementIndex); // Injector block and providers are taken into account.

                /** @type {?} */

                var providerCount =
                /** @type {?} */
                tView.expandoInstructions[++i];
                _bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;
                currentDirectiveIndex = _bindingRootIndex;
              } else {
                // This is either the injector size (so the binding root can skip over directives
                // and get to the first set of host bindings on this node) or the host var count
                // (to get to the next set of host bindings on this node).
                _bindingRootIndex += instruction;
              }

              setBindingRoot(_bindingRootIndex);
            } else {
              // If it's not a number, it's a host binding function that needs to be executed.
              if (instruction !== null) {
                viewData[BINDING_INDEX] = _bindingRootIndex;
                /** @type {?} */

                var hostCtx = unwrapRNode(viewData[currentDirectiveIndex]);
                instruction(2
                /* Update */
                , hostCtx, currentElementIndex); // Each directive gets a uniqueId value that is the same for both
                // create and update calls when the hostBindings function is called. The
                // directive uniqueId is not set anywhere--it is just incremented between
                // each hostBindings call and is useful for helping instruction code
                // uniquely determine which directive is currently active when executed.

                incrementActiveDirectiveId();
              }

              currentDirectiveIndex++;
            }
          }
        }
      } finally {
        setActiveHostElement(selectedIndex);
      }
    }
    /**
     * Refreshes all content queries declared by directives in a given view
     * @param {?} tView
     * @param {?} lView
     * @return {?}
     */


    function refreshContentQueries(tView, lView) {
      /** @type {?} */
      var contentQueries = tView.contentQueries;

      if (contentQueries !== null) {
        for (var i = 0; i < contentQueries.length; i += 2) {
          /** @type {?} */
          var queryStartIdx = contentQueries[i];
          /** @type {?} */

          var directiveDefIdx = contentQueries[i + 1];

          if (directiveDefIdx !== -1) {
            /** @type {?} */
            var _directiveDef2 =
            /** @type {?} */
            tView.data[directiveDefIdx];
            ngDevMode && assertDefined(_directiveDef2.contentQueries, 'contentQueries function should be defined');
            setCurrentQueryIndex(queryStartIdx);

            /** @type {?} */
            _directiveDef2.contentQueries(2
            /* Update */
            , lView[directiveDefIdx], directiveDefIdx);
          }
        }
      }
    }
    /**
     * Refreshes child components in the current view.
     * @param {?} hostLView
     * @param {?} components
     * @return {?}
     */


    function refreshChildComponents(hostLView, components) {
      if (components != null) {
        for (var i = 0; i < components.length; i++) {
          componentRefresh(hostLView, components[i]);
        }
      }
    }
    /**
     * Creates a native element from a tag name, using a renderer.
     * @param {?} name the tag name
     * @param {?=} overriddenRenderer Optional A renderer to override the default one
     * @return {?} the element created
     */


    function elementCreate(name, overriddenRenderer) {
      /** @type {?} */
      var _native9;
      /** @type {?} */


      var rendererToUse = overriddenRenderer || getLView()[RENDERER];
      /** @type {?} */

      var namespace = getNamespace();

      if (isProceduralRenderer(rendererToUse)) {
        _native9 = rendererToUse.createElement(name, namespace);
      } else {
        if (namespace === null) {
          _native9 = rendererToUse.createElement(name);
        } else {
          _native9 = rendererToUse.createElementNS(namespace, name);
        }
      }

      return _native9;
    }
    /**
     * @template T
     * @param {?} parentLView
     * @param {?} tView
     * @param {?} context
     * @param {?} flags
     * @param {?} host
     * @param {?} tHostNode
     * @param {?=} rendererFactory
     * @param {?=} renderer
     * @param {?=} sanitizer
     * @param {?=} injector
     * @return {?}
     */


    function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
      /** @type {?} */
      var lView = ngDevMode ? cloneToLView(tView.blueprint) :
      /** @type {?} */
      tView.blueprint.slice();
      lView[HOST] = host;
      lView[FLAGS] = flags | 4
      /* CreationMode */
      | 128
      /* Attached */
      | 8
      /* FirstLViewPass */
      ;
      resetPreOrderHookFlags(lView);
      lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
      lView[CONTEXT] = context;
      lView[RENDERER_FACTORY] =
      /** @type {?} */
      rendererFactory || parentLView && parentLView[RENDERER_FACTORY];
      ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');
      lView[RENDERER] =
      /** @type {?} */
      renderer || parentLView && parentLView[RENDERER];
      ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');
      lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] ||
      /** @type {?} */
      null;
      lView[
      /** @type {?} */
      INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
      lView[T_HOST] = tHostNode;
      ngDevMode && attachLViewDebug(lView);
      return lView;
    }
    /**
     * @param {?} tView
     * @param {?} tHostNode
     * @param {?} index
     * @param {?} type
     * @param {?} name
     * @param {?} attrs
     * @return {?}
     */


    function getOrCreateTNode(tView, tHostNode, index, type, name, attrs) {
      // Keep this function short, so that the VM will inline it.

      /** @type {?} */
      var adjustedIndex = index + HEADER_OFFSET;
      /** @type {?} */

      var tNode =
      /** @type {?} */
      tView.data[adjustedIndex] || createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index);
      setPreviousOrParentTNode(tNode, true);
      return (
        /** @type {?} */
        tNode
      );
    }
    /**
     * @param {?} tView
     * @param {?} tHostNode
     * @param {?} adjustedIndex
     * @param {?} type
     * @param {?} name
     * @param {?} attrs
     * @param {?} index
     * @return {?}
     */


    function createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index) {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();
      /** @type {?} */

      var isParent = getIsParent();
      /** @type {?} */

      var parent = isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent; // Parents cannot cross component boundaries because components will be used in multiple places,
      // so it's only set if the view is the same.

      /** @type {?} */

      var parentInSameView = parent && parent !== tHostNode;
      /** @type {?} */

      var tParentNode = parentInSameView ?
      /** @type {?} */
      parent : null;
      /** @type {?} */

      var tNode = tView.data[adjustedIndex] = createTNode(tView, tParentNode, type, adjustedIndex, name, attrs); // 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

      if (index === 0 || !tView.firstChild) {
        tView.firstChild = tNode;
      } // Now link ourselves into the tree.


      if (previousOrParentTNode) {
        if (isParent && previousOrParentTNode.child == null && (tNode.parent !== null || previousOrParentTNode.type === 2
        /* View */
        )) {
          // We are in the same view, which means we are adding content node to the parent view.
          previousOrParentTNode.child = tNode;
        } else if (!isParent) {
          previousOrParentTNode.next = tNode;
        }
      }

      return tNode;
    }
    /**
     * @param {?} tView
     * @param {?} tParentNode
     * @param {?} index
     * @param {?} lView
     * @return {?}
     */


    function assignTViewNodeToLView(tView, tParentNode, index, lView) {
      // View nodes are not stored in data because they can be added / removed at runtime (which
      // would cause indices to change). Their TNodes are instead stored in tView.node.

      /** @type {?} */
      var tNode = tView.node;

      if (tNode == null) {
        ngDevMode && tParentNode && assertNodeOfPossibleTypes(tParentNode, 3
        /* Element */
        , 0
        /* Container */
        );
        tView.node = tNode =
        /** @type {?} */
        createTNode(tView,
        /** @type {?} */
        tParentNode, //
        2
        /* View */
        , index, null, null);
      }

      return lView[T_HOST] =
      /** @type {?} */
      tNode;
    }
    /**
     * When elements are created dynamically after a view blueprint is created (e.g. through
     * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future
     * template passes.
     *
     * @param {?} view The LView containing the blueprint to adjust
     * @param {?} numSlotsToAlloc The number of slots to alloc in the LView, should be >0
     * @return {?}
     */


    function allocExpando(view, numSlotsToAlloc) {
      ngDevMode && assertGreaterThan(numSlotsToAlloc, 0, 'The number of slots to alloc should be greater than 0');

      if (numSlotsToAlloc > 0) {
        /** @type {?} */
        var tView = view[TVIEW];

        if (tView.firstTemplatePass) {
          for (var i = 0; i < numSlotsToAlloc; i++) {
            tView.blueprint.push(null);
            tView.data.push(null);
            view.push(null);
          } // We should only increment the expando start index if there aren't already directives
          // and injectors saved in the "expando" section


          if (!tView.expandoInstructions) {
            tView.expandoStartIndex += numSlotsToAlloc;
          } else {
            // Since we're adding the dynamic nodes into the expando section, we need to let the host
            // bindings know that they should skip x slots
            tView.expandoInstructions.push(numSlotsToAlloc);
          }
        }
      }
    } //////////////////////////
    //// Render
    //////////////////////////

    /**
     * Used for creating the LViewNode of a dynamic embedded view,
     * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().
     * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).
     * @template T
     * @param {?} tView
     * @param {?} context
     * @param {?} declarationView
     * @param {?} injectorIndex
     * @return {?}
     */


    function createEmbeddedViewAndNode(tView, context, declarationView, injectorIndex) {
      /** @type {?} */
      var _isParent = getIsParent();
      /** @type {?} */


      var _previousOrParentTNode = getPreviousOrParentTNode();

      setPreviousOrParentTNode(
      /** @type {?} */
      null, true);
      /** @type {?} */

      var lView = createLView(declarationView, tView, context, 16
      /* CheckAlways */
      , null, null);
      lView[DECLARATION_VIEW] = declarationView;
      assignTViewNodeToLView(tView, null, -1, lView);

      if (tView.firstTemplatePass) {
        /** @type {?} */
        tView.node.injectorIndex = injectorIndex;
      }

      setPreviousOrParentTNode(_previousOrParentTNode, _isParent);
      return lView;
    }
    /**
     * Used for rendering embedded views (e.g. dynamically created views)
     *
     * Dynamically created views must store/retrieve their TViews differently from component views
     * because their template functions are nested in the template functions of their hosts, creating
     * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor
     * inside
     * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we
     * can't store TViews in the template function itself (as we do for comps). Instead, we store the
     * TView for dynamically created views on their host TNode, which only has one instance.
     * @template T
     * @param {?} viewToRender
     * @param {?} tView
     * @param {?} context
     * @return {?}
     */


    function renderEmbeddedTemplate(viewToRender, tView, context) {
      /** @type {?} */
      var _isParent = getIsParent();
      /** @type {?} */


      var _previousOrParentTNode = getPreviousOrParentTNode();
      /** @type {?} */


      var oldView;

      if (viewToRender[FLAGS] & 512
      /* IsRoot */
      ) {
          // This is a root view inside the view tree
          tickRootContext(getRootContext(viewToRender));
        } else {
        // Will become true if the `try` block executes with no errors.

        /** @type {?} */
        var safeToRunHooks = false;

        try {
          setPreviousOrParentTNode(
          /** @type {?} */
          null, true);
          oldView = enterView(viewToRender, viewToRender[T_HOST]);
          resetPreOrderHookFlags(viewToRender);
          executeTemplate(viewToRender,
          /** @type {?} */
          tView.template, getRenderFlags(viewToRender), context); // 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 firstTemplatePass. If we don't set it here, instances will perform directive
          // matching, etc again and again.

          tView.firstTemplatePass = false;
          refreshDescendantViews(viewToRender);
          safeToRunHooks = true;
        } finally {
          leaveView(
          /** @type {?} */
          oldView, safeToRunHooks);
          setPreviousOrParentTNode(_previousOrParentTNode, _isParent);
        }
      }
    }
    /**
     * @template T
     * @param {?} hostView
     * @param {?} context
     * @param {?=} templateFn
     * @return {?}
     */


    function renderComponentOrTemplate(hostView, context, templateFn) {
      /** @type {?} */
      var rendererFactory = hostView[RENDERER_FACTORY];
      /** @type {?} */

      var oldView = enterView(hostView, hostView[T_HOST]);
      /** @type {?} */

      var normalExecutionPath = !getCheckNoChangesMode();
      /** @type {?} */

      var creationModeIsActive = isCreationMode(hostView); // Will become true if the `try` block executes with no errors.

      /** @type {?} */

      var safeToRunHooks = false;

      try {
        if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
          rendererFactory.begin();
        }

        if (creationModeIsActive) {
          // creation mode pass
          templateFn && executeTemplate(hostView, templateFn, 1
          /* Create */
          , context);
          refreshDescendantViews(hostView);
          hostView[FLAGS] &= ~4
          /* CreationMode */
          ;
        } // update mode pass


        resetPreOrderHookFlags(hostView);
        templateFn && executeTemplate(hostView, templateFn, 2
        /* Update */
        , context);
        refreshDescendantViews(hostView);
        safeToRunHooks = true;
      } finally {
        if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {
          rendererFactory.end();
        }

        leaveView(oldView, safeToRunHooks);
      }
    }
    /**
     * @template T
     * @param {?} lView
     * @param {?} templateFn
     * @param {?} rf
     * @param {?} context
     * @return {?}
     */


    function executeTemplate(lView, templateFn, rf, context) {
      namespaceHTMLInternal();
      /** @type {?} */

      var prevSelectedIndex = getSelectedIndex();

      try {
        setActiveHostElement(null);

        if (rf & 2
        /* Update */
        ) {
            // When we're updating, have an inherent ɵɵselect(0) so we don't have to generate that
            // instruction for most update blocks
            selectInternal(lView, 0);
          }

        templateFn(rf, context);
      } finally {
        setSelectedIndex(prevSelectedIndex);
      }
    }
    /**
     * This function returns the default configuration of rendering flags depending on when the
     * template is in creation mode or update mode. Update block and create block are
     * always run separately.
     * @param {?} view
     * @return {?}
     */


    function getRenderFlags(view) {
      return isCreationMode(view) ? 1
      /* Create */
      : 2
      /* Update */
      ;
    } //////////////////////////
    //// Element
    //////////////////////////

    /**
     * @param {?} tView
     * @param {?} tNode
     * @param {?} lView
     * @return {?}
     */


    function executeContentQueries(tView, tNode, lView) {
      if (isContentQueryHost(tNode)) {
        /** @type {?} */
        var start = tNode.directiveStart;
        /** @type {?} */

        var end = tNode.directiveEnd;

        for (var directiveIndex = start; directiveIndex < end; directiveIndex++) {
          /** @type {?} */
          var def =
          /** @type {?} */
          tView.data[directiveIndex];

          if (def.contentQueries) {
            def.contentQueries(1
            /* Create */
            , lView[directiveIndex], directiveIndex);
          }
        }
      }
    }
    /**
     * Creates directive instances and populates local refs.
     *
     * @param {?} tView
     * @param {?} lView
     * @param {?} tNode
     * @param {?=} localRefExtractor mapping function that extracts local ref value from TNode
     * @return {?}
     */


    function createDirectivesAndLocals(tView, lView, tNode) {
      var localRefExtractor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : getNativeByTNode;
      if (!getBindingsEnabled()) return;
      instantiateAllDirectives(tView, lView, tNode);
      invokeDirectivesHostBindings(tView, lView, tNode);
      saveResolvedLocalsInData(lView, tNode, localRefExtractor);
      setActiveHostElement(null);
    }
    /**
     * 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().
     * @param {?} viewData
     * @param {?} tNode
     * @param {?} localRefExtractor
     * @return {?}
     */


    function saveResolvedLocalsInData(viewData, tNode, localRefExtractor) {
      /** @type {?} */
      var localNames = tNode.localNames;

      if (localNames) {
        /** @type {?} */
        var localIndex = tNode.index + 1;

        for (var i = 0; i < localNames.length; i += 2) {
          /** @type {?} */
          var index =
          /** @type {?} */
          localNames[i + 1];
          /** @type {?} */

          var value = index === -1 ? localRefExtractor(
          /** @type {?} */
          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
     * @return {?} TView
     */


    function getOrCreateTView(def) {
      return def.tView || (def.tView = createTView(-1, def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas));
    }
    /**
     * Creates a TView instance
     *
     * @param {?} viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic
     * @param {?} templateFn Template function
     * @param {?} consts The number of nodes, local refs, and pipes in this template
     * @param {?} vars
     * @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
     * @return {?}
     */


    function createTView(viewIndex, templateFn, consts, vars, directives, pipes, viewQuery, schemas) {
      ngDevMode && ngDevMode.tView++;
      /** @type {?} */

      var bindingStartIndex = HEADER_OFFSET + consts; // 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.

      /** @type {?} */

      var initialViewLength = bindingStartIndex + vars;
      /** @type {?} */

      var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
      return blueprint[
      /** @type {?} */
      TVIEW] = ngDevMode ? new TViewConstructor(viewIndex, // id: number,
      blueprint, // blueprint: LView,
      templateFn, // template: ComponentTemplate<{}>|null,
      null, // queries: TQueries|null
      viewQuery,
      /** @type {?} */
      null, // node: TViewNode|TElementNode|null,
      cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,
      bindingStartIndex, // bindingStartIndex: number,
      initialViewLength, // expandoStartIndex: number,
      null, // expandoInstructions: ExpandoInstructions|null,
      true, // firstTemplatePass: 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: HookData|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) : {
        id: viewIndex,
        blueprint: blueprint,
        template: templateFn,
        queries: null,
        viewQuery: viewQuery,
        node:
        /** @type {?} */
        null,
        data: blueprint.slice().fill(null, bindingStartIndex),
        bindingStartIndex: bindingStartIndex,
        expandoStartIndex: initialViewLength,
        expandoInstructions: null,
        firstTemplatePass: 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
      };
    }
    /**
     * @param {?} bindingStartIndex
     * @param {?} initialViewLength
     * @return {?}
     */


    function createViewBlueprint(bindingStartIndex, initialViewLength) {
      /** @type {?} */
      var blueprint =
      /** @type {?} */
      new (ngDevMode ?
      /** @type {?} */
      LViewBlueprint : Array)(initialViewLength).fill(null, 0, bindingStartIndex).fill(NO_CHANGE, bindingStartIndex);
      blueprint[BINDING_INDEX] = bindingStartIndex;
      return blueprint;
    }
    /**
     * @param {?} text
     * @param {?} token
     * @return {?}
     */


    function createError(text, token) {
      return new Error("Renderer: ".concat(text, " [").concat(stringifyForError(token), "]"));
    }
    /**
     * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
     *
     * @param {?} factory
     * @param {?} elementOrSelector Render element or CSS selector to locate the element.
     * @return {?}
     */


    function locateHostElement(factory, elementOrSelector) {
      /** @type {?} */
      var defaultRenderer = factory.createRenderer(null, null);
      /** @type {?} */

      var rNode = typeof elementOrSelector === 'string' ? isProceduralRenderer(defaultRenderer) ? defaultRenderer.selectRootElement(elementOrSelector) : defaultRenderer.querySelector(elementOrSelector) : elementOrSelector;

      if (ngDevMode && !rNode) {
        if (typeof elementOrSelector === 'string') {
          throw createError('Host node with selector not found:', elementOrSelector);
        } else {
          throw createError('Host node is required:', elementOrSelector);
        }
      }

      return rNode;
    }
    /**
     * 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
     * @param {?} lView
     * @param {?} context
     * @param {?} cleanupFn
     * @return {?}
     */


    function storeCleanupWithContext(lView, context, cleanupFn) {
      /** @type {?} */
      var lCleanup = getCleanup(lView);
      lCleanup.push(context);

      if (lView[TVIEW].firstTemplatePass) {
        getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);
      }
    }
    /**
     * Saves the cleanup function itself in LView.cleanupInstances.
     *
     * This is necessary for functions that are wrapped with their contexts, like in renderer2
     * listeners.
     *
     * On the first template pass, the index of the cleanup function is saved in TView.
     * @param {?} view
     * @param {?} cleanupFn
     * @return {?}
     */


    function storeCleanupFn(view, cleanupFn) {
      getCleanup(view).push(cleanupFn);

      if (view[TVIEW].firstTemplatePass) {
        getTViewCleanup(view).push(
        /** @type {?} */
        view[CLEANUP].length - 1, null);
      }
    }
    /**
     * Constructs a TNode object from the arguments.
     *
     * @param {?} tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)
     * @param {?} tParent
     * @param {?} type The type of the node
     * @param {?} adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET
     * @param {?} tagName The tag name of the node
     * @param {?} attrs The attributes defined on this node
     * @return {?} the TNode object
     */


    function createTNode(tView, tParent, type, adjustedIndex, tagName, attrs) {
      ngDevMode && ngDevMode.tNode++;
      /** @type {?} */

      var injectorIndex = tParent ? tParent.injectorIndex : -1;
      return ngDevMode ? new TNodeConstructor(tView, // tView_: TView
      type, // type: TNodeType
      adjustedIndex, // index: number
      injectorIndex, // injectorIndex: number
      -1, // directiveStart: number
      -1, // directiveEnd: number
      -1, // propertyMetadataStartIndex: number
      -1, // propertyMetadataEndIndex: number
      0, // flags: TNodeFlags
      0, // providerIndexes: TNodeProviderIndexes
      tagName, // tagName: string|null
      attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null
      null, // localNames: (string|number)[]|null
      undefined, // initialInputs: (string[]|null)[]|null|undefined
      undefined, // inputs: PropertyAliases|null|undefined
      undefined, // outputs: PropertyAliases|null|undefined
      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: TStylingContext|null
      null) : {
        type: type,
        index: adjustedIndex,
        injectorIndex: injectorIndex,
        directiveStart: -1,
        directiveEnd: -1,
        propertyMetadataStartIndex: -1,
        propertyMetadataEndIndex: -1,
        flags: 0,
        providerIndexes: 0,
        tagName: tagName,
        attrs: attrs,
        localNames: null,
        initialInputs: undefined,
        inputs: undefined,
        outputs: undefined,
        tViews: null,
        next: null,
        projectionNext: null,
        child: null,
        parent: tParent,
        projection: null,
        styles: null,
        classes: null
      };
    }
    /**
     * Consolidates all inputs or outputs of all directives on this logical node.
     *
     * @param {?} tNode
     * @param {?} direction whether to consider inputs or outputs
     * @return {?} PropertyAliases|null aggregate of all properties if any, `null` otherwise
     */


    function generatePropertyAliases(tNode, direction) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      /** @type {?} */

      var propStore = null;
      /** @type {?} */

      var start = tNode.directiveStart;
      /** @type {?} */

      var end = tNode.directiveEnd;

      if (end > start) {
        /** @type {?} */
        var isInput = direction === 0
        /* Input */
        ;
        /** @type {?} */

        var defs = tView.data;

        for (var i = start; i < end; i++) {
          /** @type {?} */
          var _directiveDef3 =
          /** @type {?} */
          defs[i];
          /** @type {?} */

          var propertyAliasMap = isInput ? _directiveDef3.inputs : _directiveDef3.outputs;

          for (var publicName in propertyAliasMap) {
            if (propertyAliasMap.hasOwnProperty(publicName)) {
              propStore = propStore || {};
              /** @type {?} */

              var internalName = propertyAliasMap[publicName];
              /** @type {?} */

              var hasProperty = propStore.hasOwnProperty(publicName);
              hasProperty ? propStore[publicName].push(i, publicName, internalName) : propStore[publicName] = [i, publicName, internalName];
            }
          }
        }
      }

      return propStore;
    }
    /**
     * Mapping between attributes names that don't correspond to their element property names.
     * Note: this mapping has to be kept in sync with the equally named mapping in the template
     * type-checking machinery of ngtsc.
     * @type {?}
     */


    var ATTR_TO_PROP = {
      'class': 'className',
      'for': 'htmlFor',
      'formaction': 'formAction',
      'innerHtml': 'innerHTML',
      'readonly': 'readOnly',
      'tabindex': 'tabIndex'
    };
    /**
     * @template T
     * @param {?} index
     * @param {?} propName
     * @param {?} value
     * @param {?=} sanitizer
     * @param {?=} nativeOnly
     * @param {?=} loadRendererFn
     * @return {?}
     */

    function elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadRendererFn) {
      ngDevMode && assertNotSame(value,
      /** @type {?} */
      NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var element =
      /** @type {?} */
      getNativeByIndex(index, lView);
      /** @type {?} */

      var tNode = getTNode(index, lView);
      /** @type {?} */

      var inputData;
      /** @type {?} */

      var dataValue;

      if (!nativeOnly && (inputData = initializeTNodeInputs(tNode)) && (dataValue = inputData[propName])) {
        setInputsForProperty(lView, dataValue, value);
        if (isComponent(tNode)) markDirtyIfOnPush(lView, index + HEADER_OFFSET);

        if (ngDevMode) {
          if (tNode.type === 3
          /* Element */
          || tNode.type === 0
          /* Container */
          ) {
              /**
               * dataValue is an array containing runtime input or output names for the directives:
               * i+0: directive instance index
               * i+1: publicName
               * i+2: privateName
               *
               * e.g. [0, 'change', 'change-minified']
               * we want to set the reflected property with the privateName: dataValue[i+2]
               */
              for (var i = 0; i < dataValue.length; i += 3) {
                setNgReflectProperty(lView, element, tNode.type,
                /** @type {?} */
                dataValue[i + 2], value);
              }
            }
        }
      } else if (tNode.type === 3
      /* Element */
      ) {
          propName = ATTR_TO_PROP[propName] || propName;

          if (ngDevMode) {
            validateAgainstEventProperties(propName);
            validateAgainstUnknownProperties(lView, element, propName, tNode);
            ngDevMode.rendererSetProperty++;
          }

          savePropertyDebugData(tNode, lView, propName, lView[TVIEW].data, nativeOnly);
          /** @type {?} */

          var renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER]; // 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 ?
          /** @type {?} */
          sanitizer(value, tNode.tagName || '', propName) : value;

          if (isProceduralRenderer(renderer)) {
            renderer.setProperty(
            /** @type {?} */
            element, propName, value);
          } else if (!isAnimationProp(propName)) {
            /** @type {?} */
            element.setProperty ?
            /** @type {?} */
            element.setProperty(propName, value) :
            /** @type {?} */
            element[propName] = value;
          }
        } else if (tNode.type === 0
      /* Container */
      ) {
          // If the node is a container and the property didn't
          // match any of the inputs or schemas we should throw.
          if (ngDevMode && !matchingSchemas(lView, tNode.tagName)) {
            throw createUnknownPropertyError(propName, tNode);
          }
        }
    }
    /**
     * If node is an OnPush component, marks its LView dirty.
     * @param {?} lView
     * @param {?} viewIndex
     * @return {?}
     */


    function markDirtyIfOnPush(lView, viewIndex) {
      ngDevMode && assertLView(lView);
      /** @type {?} */

      var childComponentLView = getComponentViewByIndex(viewIndex, lView);

      if (!(childComponentLView[FLAGS] & 16
      /* CheckAlways */
      )) {
        childComponentLView[FLAGS] |= 64
        /* Dirty */
        ;
      }
    }
    /**
     * @param {?} lView
     * @param {?} element
     * @param {?} type
     * @param {?} attrName
     * @param {?} value
     * @return {?}
     */


    function setNgReflectProperty(lView, element, type, attrName, value) {
      /** @type {?} */
      var renderer = lView[RENDERER];
      attrName = normalizeDebugBindingName(attrName);
      /** @type {?} */

      var debugValue = normalizeDebugBindingValue(value);

      if (type === 3
      /* Element */
      ) {
          if (value == null) {
            isProceduralRenderer(renderer) ? renderer.removeAttribute(
            /** @type {?} */
            element, attrName) :
            /** @type {?} */
            element.removeAttribute(attrName);
          } else {
            isProceduralRenderer(renderer) ? renderer.setAttribute(
            /** @type {?} */
            element, attrName, debugValue) :
            /** @type {?} */
            element.setAttribute(attrName, debugValue);
          }
        } else {
        /** @type {?} */
        var textContent = "bindings=".concat(JSON.stringify(_defineProperty({}, attrName, debugValue), null, 2));

        if (isProceduralRenderer(renderer)) {
          renderer.setValue(
          /** @type {?} */
          element, textContent);
        } else {
          /** @type {?} */
          element.textContent = textContent;
        }
      }
    }
    /**
     * @param {?} hostView
     * @param {?} element
     * @param {?} propName
     * @param {?} tNode
     * @return {?}
     */


    function validateAgainstUnknownProperties(hostView, element, propName, tNode) {
      // If the tag matches any of the schemas we shouldn't throw.
      if (matchingSchemas(hostView, tNode.tagName)) {
        return;
      } // If prop is not a known property of the HTML element...


      if (!(propName in element) && // and we are in a browser context... (web worker nodes should be skipped)
      typeof Node === 'function' && element instanceof Node && // and isn't a synthetic animation property...
      propName[0] !== ANIMATION_PROP_PREFIX) {
        // ... it is probably a user error and we should throw.
        throw createUnknownPropertyError(propName, tNode);
      }
    }
    /**
     * @param {?} hostView
     * @param {?} tagName
     * @return {?}
     */


    function matchingSchemas(hostView, tagName) {
      /** @type {?} */
      var schemas = hostView[TVIEW].schemas;

      if (schemas !== null) {
        for (var i = 0; i < schemas.length; i++) {
          /** @type {?} */
          var schema = schemas[i];

          if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {
            return true;
          }
        }
      }

      return false;
    }
    /**
     * Stores debugging data for this property binding on first template pass.
     * This enables features like DebugElement.properties.
     * @param {?} tNode
     * @param {?} lView
     * @param {?} propName
     * @param {?} tData
     * @param {?} nativeOnly
     * @return {?}
     */


    function savePropertyDebugData(tNode, lView, propName, tData, nativeOnly) {
      /** @type {?} */
      var lastBindingIndex = lView[BINDING_INDEX] - 1; // Bind/interpolation functions save binding metadata in the last binding index,
      // but leave the property name blank. If the interpolation delimiter is at the 0
      // index, we know that this is our first pass and the property name still needs to
      // be set.

      /** @type {?} */

      var bindingMetadata =
      /** @type {?} */
      tData[lastBindingIndex];

      if (bindingMetadata[0] == INTERPOLATION_DELIMITER) {
        tData[lastBindingIndex] = propName + bindingMetadata; // We don't want to store indices for host bindings because they are stored in a
        // different part of LView (the expando section).

        if (!nativeOnly) {
          if (tNode.propertyMetadataStartIndex == -1) {
            tNode.propertyMetadataStartIndex = lastBindingIndex;
          }

          tNode.propertyMetadataEndIndex = lastBindingIndex + 1;
        }
      }
    }
    /**
     * Creates an error that should be thrown when encountering an unknown property on an element.
     * @param {?} propName Name of the invalid property.
     * @param {?} tNode Node on which we encountered the error.
     * @return {?}
     */


    function createUnknownPropertyError(propName, tNode) {
      return new Error("Template error: Can't bind to '".concat(propName, "' since it isn't a known property of '").concat(tNode.tagName, "'."));
    }
    /**
     * Instantiate a root component.
     * @template T
     * @param {?} tView
     * @param {?} viewData
     * @param {?} def
     * @return {?}
     */


    function instantiateRootComponent(tView, viewData, def) {
      /** @type {?} */
      var rootTNode = getPreviousOrParentTNode();

      if (tView.firstTemplatePass) {
        if (def.providersResolver) def.providersResolver(def);
        generateExpandoInstructionBlock(tView, rootTNode, 1);
        baseResolveDirective(tView, viewData, def, def.factory);
      }
      /** @type {?} */


      var directive = getNodeInjectable(tView.data, viewData, viewData.length - 1,
      /** @type {?} */
      rootTNode);
      postProcessBaseDirective(viewData, rootTNode, directive);
      return directive;
    }
    /**
     * Resolve the matched directives on a node.
     * @param {?} tView
     * @param {?} lView
     * @param {?} tNode
     * @param {?} localRefs
     * @return {?}
     */


    function resolveDirectives(tView, lView, tNode, localRefs) {
      // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in
      // tsickle.
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');
      if (!getBindingsEnabled()) return;
      /** @type {?} */

      var directives = findDirectiveMatches(tView, lView, tNode);
      /** @type {?} */

      var exportsMap = localRefs ? {
        '': -1
      } : null;

      if (directives) {
        initNodeFlags(tNode, tView.data.length, directives.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 < directives.length; i++) {
          /** @type {?} */
          var def =
          /** @type {?} */
          directives[i];
          if (def.providersResolver) def.providersResolver(def);
        }

        generateExpandoInstructionBlock(tView, tNode, directives.length);
        /** @type {?} */

        var initialPreOrderHooksLength = tView.preOrderHooks && tView.preOrderHooks.length || 0;
        /** @type {?} */

        var initialPreOrderCheckHooksLength = tView.preOrderCheckHooks && tView.preOrderCheckHooks.length || 0;
        /** @type {?} */

        var nodeIndex = tNode.index - HEADER_OFFSET;

        for (var _i14 = 0; _i14 < directives.length; _i14++) {
          /** @type {?} */
          var _def2 =
          /** @type {?} */
          directives[_i14];
          /** @type {?} */

          var directiveDefIdx = tView.data.length;
          baseResolveDirective(tView, lView, _def2, _def2.factory);
          saveNameToExportMap(
          /** @type {?} */
          tView.data.length - 1, _def2, exportsMap); // Init hooks are queued now so ngOnInit is called in host components before
          // any projected components.

          registerPreOrderHooks(directiveDefIdx, _def2, tView, nodeIndex, initialPreOrderHooksLength, initialPreOrderCheckHooksLength);
        }
      }

      if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);
    }
    /**
     * Instantiate all the directives that were previously resolved on the current node.
     * @param {?} tView
     * @param {?} lView
     * @param {?} tNode
     * @return {?}
     */


    function instantiateAllDirectives(tView, lView, tNode) {
      /** @type {?} */
      var start = tNode.directiveStart;
      /** @type {?} */

      var end = tNode.directiveEnd;

      if (!tView.firstTemplatePass && start < end) {
        getOrCreateNodeInjectorForNode(
        /** @type {?} */
        tNode, lView);
      }

      for (var i = start; i < end; i++) {
        /** @type {?} */
        var def =
        /** @type {?} */
        tView.data[i];

        if (isComponentDef(def)) {
          addComponentLogic(lView, tNode,
          /** @type {?} */
          def);
        }
        /** @type {?} */


        var directive = getNodeInjectable(tView.data,
        /** @type {?} */
        lView, i,
        /** @type {?} */
        tNode);
        postProcessDirective(lView, directive, def, i);
      }
    }
    /**
     * @param {?} tView
     * @param {?} viewData
     * @param {?} tNode
     * @return {?}
     */


    function invokeDirectivesHostBindings(tView, viewData, tNode) {
      /** @type {?} */
      var start = tNode.directiveStart;
      /** @type {?} */

      var end = tNode.directiveEnd;
      /** @type {?} */

      var expando =
      /** @type {?} */
      tView.expandoInstructions;
      /** @type {?} */

      var firstTemplatePass = tView.firstTemplatePass;
      /** @type {?} */

      var elementIndex = tNode.index - HEADER_OFFSET;
      /** @type {?} */

      var selectedIndex = getSelectedIndex();

      try {
        setActiveHostElement(elementIndex);

        for (var i = start; i < end; i++) {
          /** @type {?} */
          var def =
          /** @type {?} */
          tView.data[i];
          /** @type {?} */

          var directive = viewData[i];

          if (def.hostBindings) {
            invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass); // Each directive gets a uniqueId value that is the same for both
            // create and update calls when the hostBindings function is called. The
            // directive uniqueId is not set anywhere--it is just incremented between
            // each hostBindings call and is useful for helping instruction code
            // uniquely determine which directive is currently active when executed.

            incrementActiveDirectiveId();
          } else if (firstTemplatePass) {
            expando.push(null);
          }
        }
      } finally {
        setActiveHostElement(selectedIndex);
      }
    }
    /**
     * @param {?} def
     * @param {?} expando
     * @param {?} directive
     * @param {?} tNode
     * @param {?} firstTemplatePass
     * @return {?}
     */


    function invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass) {
      /** @type {?} */
      var previousExpandoLength = expando.length;
      setCurrentDirectiveDef(def);
      /** @type {?} */

      var elementIndex = tNode.index - HEADER_OFFSET;

      /** @type {?} */
      def.hostBindings(1
      /* Create */
      , directive, elementIndex);
      setCurrentDirectiveDef(null); // `hostBindings` function may or may not contain `allocHostVars` call
      // (e.g. it may not if it only contains host listeners), so we need to check whether
      // `expandoInstructions` has changed and if not - we still push `hostBindings` to
      // expando block, to make sure we execute it for DI cycle

      if (previousExpandoLength === expando.length && firstTemplatePass) {
        expando.push(def.hostBindings);
      }
    }
    /**
     * Generates a new block in TView.expandoInstructions for this node.
     *
     * Each expando block starts with the element index (turned negative so we can distinguish
     * it from the hostVar count) and the directive count. See more in VIEW_DATA.md.
     * @param {?} tView
     * @param {?} tNode
     * @param {?} directiveCount
     * @return {?}
     */


    function generateExpandoInstructionBlock(tView, tNode, directiveCount) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Expando block should only be generated on first template pass.');
      /** @type {?} */

      var elementIndex = -(tNode.index - HEADER_OFFSET);
      /** @type {?} */

      var providerStartIndex = tNode.providerIndexes & 65535
      /* ProvidersStartIndexMask */
      ;
      /** @type {?} */

      var providerCount = tView.data.length - providerStartIndex;
      (tView.expandoInstructions || (tView.expandoInstructions = [])).push(elementIndex, providerCount, directiveCount);
    }
    /**
     * Process a directive on the current node after its creation.
     * @template T
     * @param {?} viewData
     * @param {?} directive
     * @param {?} def
     * @param {?} directiveDefIdx
     * @return {?}
     */


    function postProcessDirective(viewData, directive, def, directiveDefIdx) {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();
      postProcessBaseDirective(viewData, previousOrParentTNode, directive);
      ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');

      if (previousOrParentTNode && previousOrParentTNode.attrs) {
        setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);
      }

      if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {
        previousOrParentTNode.flags |= 4
        /* hasContentQuery */
        ;
      }

      if (isComponentDef(def)) {
        /** @type {?} */
        var componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);
        componentView[CONTEXT] = directive;
      }
    }
    /**
     * A lighter version of postProcessDirective() that is used for the root component.
     * @template T
     * @param {?} lView
     * @param {?} previousOrParentTNode
     * @param {?} directive
     * @return {?}
     */


    function postProcessBaseDirective(lView, previousOrParentTNode, directive) {
      /** @type {?} */
      var _native10 = getNativeByTNode(previousOrParentTNode, lView);

      ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'directives should be created before any bindings');
      ngDevMode && assertPreviousIsParent(getIsParent());
      attachPatchData(directive, lView);

      if (_native10) {
        attachPatchData(_native10, lView);
      }
    }
    /**
     * 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.
     * @param {?} tView
     * @param {?} viewData
     * @param {?} tNode
     * @return {?}
     */


    function findDirectiveMatches(tView, viewData, tNode) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');
      /** @type {?} */

      var registry = tView.directiveRegistry;
      /** @type {?} */

      var matches = null;

      if (registry) {
        for (var i = 0; i < registry.length; i++) {
          /** @type {?} */
          var def =
          /** @type {?} */
          registry[i];

          if (isNodeMatchingSelectorList(tNode,
          /** @type {?} */
          def.selectors,
          /* isProjectionMode */
          false)) {
            matches || (matches = ngDevMode ? new
            /** @type {?} */
            MatchesArray() : []);
            diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);

            if (isComponentDef(def)) {
              if (tNode.flags & 1
              /* isComponent */
              ) throwMultipleComponentError(tNode);
              tNode.flags = 1
              /* isComponent */
              ; // The component is always stored first with directives after.

              matches.unshift(def);
            } else {
              matches.push(def);
            }
          }
        }
      }

      return matches;
    }
    /**
     * Stores index of component's host element so it will be queued for view refresh during CD.
     * @param {?} previousOrParentTNode
     * @return {?}
     */


    function queueComponentIndexForCheck(previousOrParentTNode) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');
      (tView.components || (tView.components = ngDevMode ? new
      /** @type {?} */
      TViewComponents() : [])).push(previousOrParentTNode.index);
    }
    /**
     * Caches local names and their matching directive indices for query and template lookups.
     * @param {?} tNode
     * @param {?} localRefs
     * @param {?} exportsMap
     * @return {?}
     */


    function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
      if (localRefs) {
        /** @type {?} */
        var localNames = tNode.localNames = ngDevMode ? new
        /** @type {?} */
        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) {
          /** @type {?} */
          var index = exportsMap[localRefs[i + 1]];
          if (index == null) throw new Error("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.
     * @param {?} index
     * @param {?} def
     * @param {?} exportsMap
     * @return {?}
     */


    function saveNameToExportMap(index, def, exportsMap) {
      if (exportsMap) {
        if (def.exportAs) {
          for (var i = 0; i < def.exportAs.length; i++) {
            exportsMap[def.exportAs[i]] = index;
          }
        }

        if (
        /** @type {?} */
        def.template) exportsMap[''] = index;
      }
    }
    /**
     * 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 {?} tNode
     * @param {?} index the initial index
     * @param {?} numberOfDirectives
     * @return {?}
     */


    function initNodeFlags(tNode, index, numberOfDirectives) {
      /** @type {?} */
      var flags = tNode.flags;
      ngDevMode && assertEqual(flags === 0 || flags === 1
      /* isComponent */
      , true, 'expected node flags to not be initialized');
      ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives'); // When the first directive is created on a node, save the index

      tNode.flags = flags & 1
      /* isComponent */
      ;
      tNode.directiveStart = index;
      tNode.directiveEnd = index + numberOfDirectives;
      tNode.providerIndexes = index;
    }
    /**
     * @template T
     * @param {?} tView
     * @param {?} viewData
     * @param {?} def
     * @param {?} directiveFactory
     * @return {?}
     */


    function baseResolveDirective(tView, viewData, def, directiveFactory) {
      tView.data.push(def);
      /** @type {?} */

      var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);
      tView.blueprint.push(nodeInjectorFactory);
      viewData.push(nodeInjectorFactory);
    }
    /**
     * @template T
     * @param {?} lView
     * @param {?} previousOrParentTNode
     * @param {?} def
     * @return {?}
     */


    function addComponentLogic(lView, previousOrParentTNode, def) {
      /** @type {?} */
      var _native11 = getNativeByTNode(previousOrParentTNode, lView);
      /** @type {?} */


      var tView = getOrCreateTView(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.

      /** @type {?} */

      var rendererFactory = lView[RENDERER_FACTORY];
      /** @type {?} */

      var componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64
      /* Dirty */
      : 16
      /* CheckAlways */
      , lView[previousOrParentTNode.index],
      /** @type {?} */
      previousOrParentTNode, rendererFactory, rendererFactory.createRenderer(
      /** @type {?} */
      _native11, def)));
      componentView[T_HOST] =
      /** @type {?} */
      previousOrParentTNode; // Component view will always be created before any injected LContainers,
      // so this is a regular element, wrap it with the component view

      lView[previousOrParentTNode.index] = componentView;

      if (lView[TVIEW].firstTemplatePass) {
        queueComponentIndexForCheck(previousOrParentTNode);
      }
    }
    /**
     * @param {?} index
     * @param {?} name
     * @param {?} value
     * @param {?} lView
     * @param {?=} sanitizer
     * @param {?=} namespace
     * @return {?}
     */


    function elementAttributeInternal(index, name, value, lView, sanitizer, namespace) {
      ngDevMode && assertNotSame(value,
      /** @type {?} */
      NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
      ngDevMode && validateAgainstEventAttributes(name);
      /** @type {?} */

      var element =
      /** @type {?} */
      getNativeByIndex(index, lView);
      /** @type {?} */

      var renderer = lView[RENDERER];

      if (value == null) {
        ngDevMode && ngDevMode.rendererRemoveAttribute++;
        isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) : element.removeAttribute(name);
      } else {
        ngDevMode && ngDevMode.rendererSetAttribute++;
        /** @type {?} */

        var tNode = getTNode(index, lView);
        /** @type {?} */

        var strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.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
     *
     * @template T
     * @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
     * @return {?}
     */


    function setInputsFromAttrs(directiveIndex, instance, def, tNode) {
      /** @type {?} */
      var initialInputData =
      /** @type {?} */
      tNode.initialInputs;

      if (initialInputData === undefined || directiveIndex >= initialInputData.length) {
        initialInputData = generateInitialInputs(directiveIndex, def.inputs, tNode);
      }
      /** @type {?} */


      var initialInputs = initialInputData[directiveIndex];

      if (initialInputs) {
        /** @type {?} */
        var setInput = def.setInput;

        for (var i = 0; i < initialInputs.length;) {
          /** @type {?} */
          var publicName = initialInputs[i++];
          /** @type {?} */

          var privateName = initialInputs[i++];
          /** @type {?} */

          var value = initialInputs[i++];

          if (setInput) {
            /** @type {?} */
            def.setInput(instance, value, publicName, privateName);
          } else {
            /** @type {?} */
            instance[privateName] = value;
          }

          if (ngDevMode) {
            /** @type {?} */
            var _lView4 = getLView();
            /** @type {?} */


            var nativeElement =
            /** @type {?} */
            getNativeByTNode(tNode, _lView4);
            setNgReflectProperty(_lView4, 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 {?} directiveIndex Index to store the initial input data
     * @param {?} inputs The list of inputs from the directive def
     * @param {?} tNode The static data on this node
     * @return {?}
     */


    function generateInitialInputs(directiveIndex, inputs, tNode) {
      /** @type {?} */
      var initialInputData = tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new
      /** @type {?} */
      TNodeInitialInputs() : []); // Ensure that we don't create sparse arrays

      for (var _i15 = initialInputData.length; _i15 <= directiveIndex; _i15++) {
        initialInputData.push(null);
      }
      /** @type {?} */


      var attrs =
      /** @type {?} */
      tNode.attrs;
      /** @type {?} */

      var i = 0;

      while (i < attrs.length) {
        /** @type {?} */
        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;
        /** @type {?} */

        var minifiedInputName = inputs[
        /** @type {?} */
        attrName];
        /** @type {?} */

        var attrValue = attrs[i + 1];

        if (minifiedInputName !== undefined) {
          /** @type {?} */
          var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = ngDevMode ? new
          /** @type {?} */
          TNodeInitialData() : []);
          inputsToStore.push(
          /** @type {?} */
          attrName, minifiedInputName,
          /** @type {?} */
          attrValue);
        }

        i += 2;
      }

      return initialInputData;
    } //////////////////////////
    //// ViewContainer & View
    //////////////////////////
    // Not sure why I need to do `any` here but TS complains later.

    /** @type {?} */


    var LContainerArray = ngDevMode && createNamedArrayType('LContainer');
    /**
     * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
     *
     * @param {?} hostNative The host element for the LContainer
     * @param {?} currentView The parent view of the LContainer
     * @param {?} native The native comment element
     * @param {?} tNode
     * @param {?=} isForViewContainerRef Optional a flag indicating the ViewContainerRef case
     * @return {?} LContainer
     */

    function createLContainer(hostNative, currentView, _native12, tNode, isForViewContainerRef) {
      ngDevMode && assertDomNode(_native12);
      ngDevMode && assertLView(currentView); // https://jsperf.com/array-literal-vs-new-array-really

      /** @type {?} */

      var lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native
      true, // Boolean `true` in this position signifies that this is an `LContainer`
      isForViewContainerRef ? -1 : 0, // active index
      currentView, // parent
      null, // next
      null, // queries
      tNode, // t_host
      _native12, // native,
      null);
      ngDevMode && attachLContainerDebug(lContainer);
      return lContainer;
    }
    /**
     * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes
     * them
     * by executing an associated template function.
     * @param {?} lView
     * @return {?}
     */


    function refreshDynamicEmbeddedViews(lView) {
      for (var current = lView[CHILD_HEAD]; current !== null; current = current[NEXT]) {
        // Note: current can be an LView or an LContainer instance, but here we are only interested
        // in LContainer. We can tell it's an LContainer because its length is less than the LView
        // header.
        if (current[ACTIVE_INDEX] === -1 && isLContainer(current)) {
          for (var i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {
            /** @type {?} */
            var dynamicViewData = current[i]; // The directives and pipes are not needed here as an existing view is only being
            // refreshed.

            ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');
            renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW],
            /** @type {?} */
            dynamicViewData[CONTEXT]);
          }
        }
      }
    } /////////////

    /**
     * Refreshes components by entering the component view and processing its bindings, queries, etc.
     *
     * @param {?} hostLView
     * @param {?} adjustedElementIndex  Element index in LView[] (adjusted for HEADER_OFFSET)
     * @return {?}
     */


    function componentRefresh(hostLView, adjustedElementIndex) {
      ngDevMode && assertDataInRange(hostLView, adjustedElementIndex);
      /** @type {?} */

      var componentView = getComponentViewByIndex(adjustedElementIndex, hostLView);
      ngDevMode && assertNodeType(
      /** @type {?} */
      hostLView[TVIEW].data[adjustedElementIndex], 3
      /* Element */
      ); // Only components in creation mode, attached CheckAlways
      // components or attached, dirty OnPush components should be checked

      if ((viewAttachedToChangeDetector(componentView) || isCreationMode(hostLView)) && componentView[FLAGS] & (16
      /* CheckAlways */
      | 64
      /* Dirty */
      )) {
        syncViewWithBlueprint(componentView);
        checkView(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 {?} componentView The view to sync
     * @return {?}
     */


    function syncViewWithBlueprint(componentView) {
      /** @type {?} */
      var componentTView = componentView[TVIEW];

      for (var i = componentView.length; i < componentTView.blueprint.length; i++) {
        componentView[i] = componentTView.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.
     *
     * @template T
     * @param {?} lView The view where LView or LContainer should be added
     * @param {?} lViewOrLContainer The LView or LContainer to add to the view tree
     * @return {?} 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]) {
        /** @type {?} */
        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
     * @return {?} the root LView
     */


    function markViewDirty(lView) {
      while (lView) {
        lView[FLAGS] |= 64
        /* Dirty */
        ;
        /** @type {?} */

        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 =
        /** @type {?} */
        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.
     * @param {?} rootContext
     * @param {?} flags
     * @return {?}
     */


    function scheduleTick(rootContext, flags) {
      /** @type {?} */
      var nothingScheduled = rootContext.flags === 0
      /* Empty */
      ;
      rootContext.flags |= flags;

      if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {
        /** @type {?} */
        var res;
        rootContext.clean = new Promise(
        /**
        * @param {?} r
        * @return {?}
        */
        function (r) {
          return res = r;
        });
        rootContext.scheduler(
        /**
        * @return {?}
        */
        function () {
          if (rootContext.flags & 1
          /* DetectChanges */
          ) {
              rootContext.flags &= ~1
              /* DetectChanges */
              ;
              tickRootContext(rootContext);
            }

          if (rootContext.flags & 2
          /* FlushPlayers */
          ) {
              rootContext.flags &= ~2
              /* FlushPlayers */
              ;
              /** @type {?} */

              var playerHandler = rootContext.playerHandler;

              if (playerHandler) {
                playerHandler.flushPlayers();
              }
            }

          rootContext.clean = _CLEAN_PROMISE;

          /** @type {?} */
          res(null);
        });
      }
    }
    /**
     * @param {?} rootContext
     * @return {?}
     */


    function tickRootContext(rootContext) {
      for (var i = 0; i < rootContext.components.length; i++) {
        /** @type {?} */
        var rootComponent = rootContext.components[i];
        renderComponentOrTemplate(
        /** @type {?} */
        readPatchedLView(rootComponent), rootComponent);
      }
    }
    /**
     * @template T
     * @param {?} view
     * @param {?} context
     * @return {?}
     */


    function detectChangesInternal(view, context) {
      /** @type {?} */
      var rendererFactory = view[RENDERER_FACTORY];
      if (rendererFactory.begin) rendererFactory.begin();

      try {
        if (isCreationMode(view)) {
          checkView(view, context); // creation mode pass
        }

        checkView(view, context); // update mode pass
      } catch (error) {
        handleError(view, 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.
     * @return {?}
     */


    function detectChangesInRootView(lView) {
      tickRootContext(
      /** @type {?} */
      lView[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.
     * @template T
     * @param {?} component
     * @return {?}
     */


    function checkNoChanges(component) {
      /** @type {?} */
      var view = getComponentViewByInstance(component);
      checkNoChangesInternal(view, component);
    }
    /**
     * @template T
     * @param {?} view
     * @param {?} context
     * @return {?}
     */


    function checkNoChangesInternal(view, context) {
      setCheckNoChangesMode(true);

      try {
        detectChangesInternal(view, context);
      } finally {
        setCheckNoChangesMode(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.
     * @return {?}
     */


    function checkNoChangesInRootView(lView) {
      setCheckNoChangesMode(true);

      try {
        detectChangesInRootView(lView);
      } finally {
        setCheckNoChangesMode(false);
      }
    }
    /**
     * Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.
     * @template T
     * @param {?} hostView
     * @param {?} component
     * @return {?}
     */


    function checkView(hostView, component) {
      /** @type {?} */
      var hostTView = hostView[TVIEW];
      /** @type {?} */

      var oldView = enterView(hostView, hostView[T_HOST]);
      /** @type {?} */

      var templateFn =
      /** @type {?} */
      hostTView.template;
      /** @type {?} */

      var creationMode = isCreationMode(hostView); // Will become true if the `try` block executes with no errors.

      /** @type {?} */

      var safeToRunHooks = false;

      try {
        resetPreOrderHookFlags(hostView);
        creationMode && executeViewQueryFn(1
        /* Create */
        , hostTView, component);
        executeTemplate(hostView, templateFn, getRenderFlags(hostView), component);
        refreshDescendantViews(hostView);
        safeToRunHooks = true;
      } finally {
        leaveView(oldView, safeToRunHooks);
      }
    }
    /**
     * @template T
     * @param {?} flags
     * @param {?} tView
     * @param {?} component
     * @return {?}
     */


    function executeViewQueryFn(flags, tView, component) {
      /** @type {?} */
      var viewQuery = tView.viewQuery;

      if (viewQuery !== null) {
        setCurrentQueryIndex(0);
        viewQuery(flags, component);
      }
    } ///////////////////////////////
    //// Bindings & interpolations
    ///////////////////////////////

    /**
     * Creates binding metadata for a particular binding and stores it in
     * TView.data. These are generated in order to support DebugElement.properties.
     *
     * Each binding / interpolation will have one (including attribute bindings)
     * because at the time of binding, we don't know to which instruction the binding
     * belongs. It is always stored in TView.data at the index of the last binding
     * value in LView (e.g. for interpolation8, it would be stored at the index of
     * the 8th value).
     *
     * @param {?} lView The LView that contains the current binding index.
     * @param {?=} prefix The static prefix string
     * @param {?=} suffix The static suffix string
     *
     * @return {?} Newly created binding metadata string for this binding or null
     */


    function storeBindingMetadata(lView) {
      var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
      var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';

      /** @type {?} */
      var tData = lView[TVIEW].data;
      /** @type {?} */

      var lastBindingIndex = lView[BINDING_INDEX] - 1;
      /** @type {?} */

      var value = INTERPOLATION_DELIMITER + prefix + INTERPOLATION_DELIMITER + suffix;
      return tData[lastBindingIndex] == null ? tData[lastBindingIndex] = value : null;
    }
    /** @type {?} */


    var CLEAN_PROMISE = _CLEAN_PROMISE;
    /**
     * @param {?} tNode
     * @return {?}
     */

    function initializeTNodeInputs(tNode) {
      // If tNode.inputs is undefined, a listener has created outputs, but inputs haven't
      // yet been checked.
      if (tNode.inputs === undefined) {
        // mark inputs as checked
        tNode.inputs = generatePropertyAliases(tNode, 0
        /* Input */
        );
      }

      return tNode.inputs;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function getCleanup(view) {
      // top level variables should not be exported for performance reasons (PERF_NOTES.md)
      return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new
      /** @type {?} */
      LCleanup() : []);
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function getTViewCleanup(view) {
      return view[TVIEW].cleanup || (view[TVIEW].cleanup = ngDevMode ? new
      /** @type {?} */
      TCleanup() : []);
    }
    /**
     * There are cases where the sub component's renderer needs to be included
     * instead of the current renderer (see the componentSyntheticHost* instructions).
     * @param {?} tNode
     * @param {?} lView
     * @return {?}
     */


    function loadComponentRenderer(tNode, lView) {
      /** @type {?} */
      var componentLView =
      /** @type {?} */
      lView[tNode.index];
      return componentLView[RENDERER];
    }
    /**
     * Handles an error thrown in an LView.
     * @param {?} lView
     * @param {?} error
     * @return {?}
     */


    function handleError(lView, error) {
      /** @type {?} */
      var injector = lView[INJECTOR$1];
      /** @type {?} */

      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 {?} 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.
     * @return {?}
     */


    function setInputsForProperty(lView, inputs, value) {
      /** @type {?} */
      var tView = lView[TVIEW];

      for (var i = 0; i < inputs.length;) {
        /** @type {?} */
        var index =
        /** @type {?} */
        inputs[i++];
        /** @type {?} */

        var publicName =
        /** @type {?} */
        inputs[i++];
        /** @type {?} */

        var privateName =
        /** @type {?} */
        inputs[i++];
        /** @type {?} */

        var instance = lView[index];
        ngDevMode && assertDataInRange(lView, index);
        /** @type {?} */

        var def =
        /** @type {?} */
        tView.data[index];
        /** @type {?} */

        var setInput = def.setInput;

        if (setInput) {
          /** @type {?} */
          def.setInput(instance, value, publicName, privateName);
        } else {
          instance[privateName] = value;
        }
      }
    }
    /**
     * Updates a text binding at a given index in a given LView.
     * @param {?} lView
     * @param {?} index
     * @param {?} value
     * @return {?}
     */


    function textBindingInternal(lView, index, value) {
      ngDevMode && assertNotSame(value,
      /** @type {?} */
      NO_CHANGE, 'value should not be NO_CHANGE');
      ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
      /** @type {?} */

      var element =
      /** @type {?} */

      /** @type {?} */
      getNativeByIndex(index, lView);
      ngDevMode && assertDefined(element, 'native element should exist');
      ngDevMode && ngDevMode.rendererSetText++;
      /** @type {?} */

      var renderer = lView[RENDERER];
      isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;
    }
    /**
     * Renders all initial styling (class and style values) on to the element from the tNode.
     *
     * All initial styling data (i.e. any values extracted from the `style` or `class` attributes
     * on an element) are collected into the `tNode.styles` and `tNode.classes` data structures.
     * These values are populated during the creation phase of an element and are then later
     * applied once the element is instantiated. This function applies each of the static
     * style and class entries to the element.
     * @param {?} renderer
     * @param {?} native
     * @param {?} tNode
     * @return {?}
     */


    function renderInitialStyling(renderer, _native13, tNode) {
      renderStylingMap(renderer, _native13, tNode.classes, true);
      renderStylingMap(renderer, _native13, tNode.styles, false);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd;
    /**
     * @param {?} tNode
     * @param {?} embeddedView
     * @return {?}
     */

    function getLContainer(tNode, embeddedView) {
      ngDevMode && assertLView(embeddedView);
      /** @type {?} */

      var container =
      /** @type {?} */
      embeddedView[PARENT];

      if (tNode.index === -1) {
        // This is a dynamically created view inside a dynamic container.
        // The parent isn't an LContainer if the embedded view hasn't been attached yet.
        return isLContainer(container) ? container : null;
      } else {
        ngDevMode && assertLContainer(container); // This is a inline view node (e.g. embeddedViewStart)

        return container;
      }
    }
    /**
     * Retrieves render parent for a given view.
     * Might be null if a view is not yet attached to any container.
     * @param {?} tViewNode
     * @param {?} view
     * @return {?}
     */


    function getContainerRenderParent(tViewNode, view) {
      /** @type {?} */
      var container = getLContainer(tViewNode, view);
      return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;
    }
    /** @enum {number} */


    var WalkTNodeTreeAction = {
      /** node insert in the native environment */
      Insert: 0,

      /** node detach from the native environment */
      Detach: 1,

      /** node destruction using the renderer's API */
      Destroy: 2
    };
    /**
     * NOTE: for performance reasons, the possible actions are inlined within the function instead of
     * being passed as an argument.
     * @param {?} action
     * @param {?} renderer
     * @param {?} parent
     * @param {?} lNodeToHandle
     * @param {?=} beforeNode
     * @return {?}
     */

    function executeActionOnElementOrContainer(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) {
        /** @type {?} */
        var lContainer;
        /** @type {?} */

        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 =
          /** @type {?} */
          lNodeToHandle[HOST];
        }
        /** @type {?} */


        var rNode = unwrapRNode(lNodeToHandle);
        ngDevMode && assertDomNode(rNode);

        if (action === 0
        /* Insert */
        ) {
            nativeInsertBefore(renderer,
            /** @type {?} */
            parent, rNode, beforeNode || null);
          } else if (action === 1
        /* Detach */
        ) {
            nativeRemoveNode(renderer, rNode, _isComponent);
          } else if (action === 2
        /* Destroy */
        ) {
            ngDevMode && ngDevMode.rendererDestroyNode++;

            /** @type {?} */

            /** @type {?} */
            renderer.destroyNode(rNode);
          }

        if (lContainer != null) {
          executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);
        }
      }
    }
    /**
     * @param {?} value
     * @param {?} renderer
     * @return {?}
     */


    function createTextNode(value, renderer) {
      return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) : renderer.createTextNode(renderStringify(value));
    }
    /**
     * @param {?} lView
     * @param {?} insertMode
     * @param {?=} beforeNode
     * @return {?}
     */


    function addRemoveViewFromContainer(lView, insertMode, beforeNode) {
      /** @type {?} */
      var renderParent = getContainerRenderParent(
      /** @type {?} */
      lView[TVIEW].node, lView);
      ngDevMode && assertNodeType(
      /** @type {?} */
      lView[TVIEW].node, 2
      /* View */
      );

      if (renderParent) {
        /** @type {?} */
        var renderer = lView[RENDERER];
        /** @type {?} */

        var action = insertMode ? 0
        /* Insert */
        : 1
        /* Detach */
        ;
        executeActionOnView(renderer, action, lView, renderParent, beforeNode);
      }
    }
    /**
     * Detach a `LView` from the DOM by detaching its nodes.
     *
     * @param {?} lView the `LView` to be detached.
     * @return {?}
     */


    function renderDetachView(lView) {
      executeActionOnView(lView[RENDERER], 1
      /* Detach */
      , lView, 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
     * @return {?}
     */


    function destroyViewTree(rootView) {
      // If the view has no children, we can clean it up and return early.

      /** @type {?} */
      var lViewOrLContainer = rootView[CHILD_HEAD];

      if (!lViewOrLContainer) {
        return cleanUpView(rootView);
      }

      while (lViewOrLContainer) {
        /** @type {?} */
        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.

          /** @type {?} */

          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 && !
          /** @type {?} */
          lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {
            cleanUpView(lViewOrLContainer);
            lViewOrLContainer = getParentState(lViewOrLContainer, rootView);
          }

          cleanUpView(lViewOrLContainer || rootView);
          next = lViewOrLContainer &&
          /** @type {?} */
          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 {?} 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
     * @return {?}
     */


    function insertView(lView, lContainer, index) {
      ngDevMode && assertLView(lView);
      ngDevMode && assertLContainer(lContainer);
      /** @type {?} */

      var indexInContainer = CONTAINER_HEADER_OFFSET + index;
      /** @type {?} */

      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

      /** @type {?} */

      var declarationLContainer = lView[DECLARATION_LCONTAINER];

      if (declarationLContainer !== null && lContainer !== declarationLContainer) {
        trackMovedView(declarationLContainer, lView);
      } // notify query that a new view has been added

      /** @type {?} */


      var lQueries = lView[QUERIES];

      if (lQueries !== null) {
        lQueries.insertView(lView[TVIEW]);
      } // Sets the attached flag


      lView[FLAGS] |= 128
      /* Attached */
      ;
    }
    /**
     * Track views created from the declaration container (TemplateRef) and inserted into a
     * different LContainer.
     * @param {?} declarationContainer
     * @param {?} lView
     * @return {?}
     */


    function trackMovedView(declarationContainer, lView) {
      ngDevMode && assertLContainer(declarationContainer);
      /** @type {?} */

      var declaredViews = declarationContainer[MOVED_VIEWS];

      if (declaredViews === null) {
        declarationContainer[MOVED_VIEWS] = [lView];
      } else {
        declaredViews.push(lView);
      }
    }
    /**
     * @param {?} declarationContainer
     * @param {?} lView
     * @return {?}
     */


    function detachMovedView(declarationContainer, lView) {
      ngDevMode && assertLContainer(declarationContainer);
      ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');
      /** @type {?} */

      var projectedViews =
      /** @type {?} */
      declarationContainer[MOVED_VIEWS];
      /** @type {?} */

      var declaredViewIndex = projectedViews.indexOf(lView);
      projectedViews.splice(declaredViewIndex, 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
     * @return {?} Detached LView instance.
     */


    function detachView(lContainer, removeIndex) {
      if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;
      /** @type {?} */

      var indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;
      /** @type {?} */

      var viewToDetach = lContainer[indexInContainer];

      if (viewToDetach) {
        /** @type {?} */
        var declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];

        if (declarationLContainer !== null && declarationLContainer !== lContainer) {
          detachMovedView(declarationLContainer, viewToDetach);
        }

        if (removeIndex > 0) {
          lContainer[indexInContainer - 1][NEXT] =
          /** @type {?} */
          viewToDetach[NEXT];
        }
        /** @type {?} */


        var removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);
        addRemoveViewFromContainer(viewToDetach, false); // notify query that a view has been removed

        /** @type {?} */

        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;
    }
    /**
     * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.
     *
     * @param {?} lContainer The container from which to remove a view
     * @param {?} removeIndex The index of the view to remove
     * @return {?}
     */


    function removeView(lContainer, removeIndex) {
      /** @type {?} */
      var detachedView = detachView(lContainer, removeIndex);
      detachedView && destroyLView(detachedView);
    }
    /**
     * A standalone function which destroys an LView,
     * conducting cleanup (e.g. removing listeners, calling onDestroys).
     *
     * @param {?} lView The view to be destroyed.
     * @return {?}
     */


    function destroyLView(lView) {
      if (!(lView[FLAGS] & 256
      /* Destroyed */
      )) {
        /** @type {?} */
        var renderer = lView[RENDERER];

        if (isProceduralRenderer(renderer) && renderer.destroyNode) {
          executeActionOnView(renderer, 2
          /* Destroy */
          , lView, null, null);
        }

        destroyViewTree(lView);
      }
    }
    /**
     * Determines which LViewOrLContainer to jump to when traversing back up the
     * tree in destroyViewTree.
     *
     * Normally, the view's parent LView should be checked, but in the case of
     * embedded views, the container (which is the view node's parent, but not the
     * LView's parent) needs to be checked for a possible next property.
     *
     * @param {?} lViewOrLContainer The LViewOrLContainer for which we need a parent state
     * @param {?} rootView The rootView, so we don't propagate too far up the view tree
     * @return {?} The correct parent LViewOrLContainer
     */


    function getParentState(lViewOrLContainer, rootView) {
      /** @type {?} */
      var tNode;

      if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) && tNode.type === 2
      /* View */
      ) {
          // if it's an embedded view, the state needs to go up to the container, in case the
          // container has a next
          return getLContainer(
          /** @type {?} */
          tNode, lViewOrLContainer);
        } else {
        // otherwise, use parent view for containers or component views
        return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];
      }
    }
    /**
     * 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 {?} view The LView to clean up
     * @return {?}
     */


    function cleanUpView(view) {
      if (isLView(view) && !(view[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.
        view[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.

        view[FLAGS] |= 256
        /* Destroyed */
        ;
        executeOnDestroys(view);
        removeListeners(view);
        /** @type {?} */

        var hostTNode = view[T_HOST]; // For component views only, the local renderer is destroyed as clean up time.

        if (hostTNode && hostTNode.type === 3
        /* Element */
        && isProceduralRenderer(view[RENDERER])) {
          ngDevMode && ngDevMode.rendererDestroy++;

          /** @type {?} */
          view[RENDERER].destroy();
        }
        /** @type {?} */


        var declarationContainer = view[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container

        if (declarationContainer !== null && isLContainer(view[PARENT])) {
          // and this is a projected view
          if (declarationContainer !== view[PARENT]) {
            detachMovedView(declarationContainer, view);
          } // For embedded views still attached to a container: remove query result from this view.

          /** @type {?} */


          var lQueries = view[QUERIES];

          if (lQueries !== null) {
            lQueries.detachView(view[TVIEW]);
          }
        }
      }
    }
    /**
     * Removes listeners and unsubscribes from output subscriptions
     * @param {?} lView
     * @return {?}
     */


    function removeListeners(lView) {
      /** @type {?} */
      var tCleanup = lView[TVIEW].cleanup;

      if (tCleanup !== null) {
        /** @type {?} */
        var lCleanup =
        /** @type {?} */
        lView[CLEANUP];

        for (var i = 0; i < tCleanup.length - 1; i += 2) {
          if (typeof tCleanup[i] === 'string') {
            // This is a native DOM listener

            /** @type {?} */
            var idxOrTargetGetter = tCleanup[i + 1];
            /** @type {?} */

            var target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]);
            /** @type {?} */

            var listener = lCleanup[tCleanup[i + 2]];
            /** @type {?} */

            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[useCaptureOrSubIdx]();
              } else {
                // Subscription
                lCleanup[-useCaptureOrSubIdx].unsubscribe();
              }
            }

            i += 2;
          } else {
            // This is a cleanup function that is grouped with the index of its context

            /** @type {?} */
            var context = lCleanup[tCleanup[i + 1]];
            tCleanup[i].call(context);
          }
        }

        lView[CLEANUP] = null;
      }
    }
    /**
     * Calls onDestroy hooks for this view
     * @param {?} view
     * @return {?}
     */


    function executeOnDestroys(view) {
      /** @type {?} */
      var tView = view[TVIEW];
      /** @type {?} */

      var destroyHooks;

      if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
        for (var i = 0; i < destroyHooks.length; i += 2) {
          /** @type {?} */
          var context = view[
          /** @type {?} */
          destroyHooks[i]]; // Only call the destroy hook if the context has been requested.

          if (!(context instanceof NodeInjectorFactory)) {
            /** @type {?} */
            destroyHooks[i + 1].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 {?} tNode
     * @param {?} currentView
     * @return {?}
     */


    function getRenderParent(tNode, currentView) {
      // Nodes of the top-most view can be inserted eagerly.
      if (isRootView(currentView)) {
        return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView));
      } // Skip over element and ICU containers as those are represented by a comment node and
      // can't be used as a render parent.

      /** @type {?} */


      var parent = getHighestElementOrICUContainer(tNode);
      /** @type {?} */

      var renderParent = parent.parent; // If the parent is null, then we are inserting across views: either into an embedded view or a
      // component view.

      if (renderParent == null) {
        /** @type {?} */
        var hostTNode =
        /** @type {?} */
        currentView[T_HOST];

        if (hostTNode.type === 2
        /* View */
        ) {
            // We are inserting a root element of an embedded view We might delay insertion of children
            // for a given view if it is disconnected. This might happen for 2 main reasons:
            // - view is not inserted into any container(view was created but not inserted yet)
            // - view is inserted into a container but the container itself is not inserted into the DOM
            // (container might be part of projection or child of a view that is not inserted yet).
            // In other words we can insert children of a given view if this view was inserted into a
            // container and the container itself has its render parent determined.
            return getContainerRenderParent(
            /** @type {?} */
            hostTNode, currentView);
          } else {
          // We are inserting a root element of the component view into the component host element and
          // it should always be eager.
          return getHostNative(currentView);
        }
      } else {
        /** @type {?} */
        var isIcuCase = parent && parent.type === 5
        /* IcuContainer */
        ; // If the parent of this node is an ICU container, then it is represented by comment node and we
        // need to use it as an anchor. If it is projected then its direct parent node is the renderer.

        if (isIcuCase && parent.flags & 2
        /* isProjected */
        ) {
            return (
              /** @type {?} */
              getNativeByTNode(parent, currentView).parentNode
            );
          }

        ngDevMode && assertNodeType(renderParent, 3
        /* Element */
        );

        if (renderParent.flags & 1
        /* isComponent */
        && !isIcuCase) {
          /** @type {?} */
          var tData = currentView[TVIEW].data;
          /** @type {?} */

          var _tNode2 =
          /** @type {?} */
          tData[renderParent.index];
          /** @type {?} */

          var encapsulation =
          /** @type {?} */
          tData[_tNode2.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.ShadowDom && encapsulation !== ViewEncapsulation.Native) {
            return null;
          }
        }

        return (
          /** @type {?} */
          getNativeByTNode(renderParent, currentView)
        );
      }
    }
    /**
     * Gets the native host element for a given view. Will return null if the current view does not have
     * a host element.
     * @param {?} currentView
     * @return {?}
     */


    function getHostNative(currentView) {
      ngDevMode && assertLView(currentView);
      /** @type {?} */

      var hostTNode = currentView[T_HOST];
      return hostTNode && hostTNode.type === 3
      /* Element */
      ?
      /** @type {?} */
      getNativeByTNode(hostTNode,
      /** @type {?} */
      getLViewParent(currentView)) : null;
    }
    /**
     * 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.
     * @param {?} renderer
     * @param {?} parent
     * @param {?} child
     * @param {?} beforeNode
     * @return {?}
     */


    function nativeInsertBefore(renderer, parent, child, beforeNode) {
      ngDevMode && ngDevMode.rendererInsertBefore++;

      if (isProceduralRenderer(renderer)) {
        renderer.insertBefore(parent, child, beforeNode);
      } else {
        parent.insertBefore(child, beforeNode, true);
      }
    }
    /**
     * @param {?} renderer
     * @param {?} parent
     * @param {?} child
     * @return {?}
     */


    function nativeAppendChild(renderer, parent, child) {
      ngDevMode && ngDevMode.rendererAppendChild++;

      if (isProceduralRenderer(renderer)) {
        renderer.appendChild(parent, child);
      } else {
        parent.appendChild(child);
      }
    }
    /**
     * @param {?} renderer
     * @param {?} parent
     * @param {?} child
     * @param {?} beforeNode
     * @return {?}
     */


    function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode) {
      if (beforeNode !== null) {
        nativeInsertBefore(renderer, parent, child, beforeNode);
      } else {
        nativeAppendChild(renderer, parent, child);
      }
    }
    /**
     * Removes a node from the DOM given its native parent.
     * @param {?} renderer
     * @param {?} parent
     * @param {?} child
     * @param {?=} isHostElement
     * @return {?}
     */


    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.
     * @param {?} renderer
     * @param {?} node
     * @return {?}
     */


    function nativeParentNode(renderer, node) {
      return (
        /** @type {?} */
        isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode
      );
    }
    /**
     * Returns a native sibling of a given native node.
     * @param {?} renderer
     * @param {?} node
     * @return {?}
     */


    function nativeNextSibling(renderer, node) {
      return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;
    }
    /**
     * Finds a native "anchor" node for cases where we can't append a native child directly
     * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.
     * @param {?} parentTNode
     * @param {?} lView
     * @return {?}
     */


    function getNativeAnchorNode(parentTNode, lView) {
      if (parentTNode.type === 2
      /* View */
      ) {
          /** @type {?} */
          var lContainer =
          /** @type {?} */
          getLContainer(
          /** @type {?} */
          parentTNode, lView);
          /** @type {?} */

          var index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;
          return getBeforeNodeForView(index, lContainer);
        } else if (parentTNode.type === 4
      /* ElementContainer */
      || parentTNode.type === 5
      /* IcuContainer */
      ) {
          return getNativeByTNode(parentTNode, lView);
        }

      return null;
    }
    /**
     * Appends the `child` native node (or a collection of nodes) to the `parent`.
     *
     * The element insertion might be delayed {\@link canInsertNativeNode}.
     *
     * @param {?} childEl The native child (or children) that should be appended
     * @param {?} childTNode The TNode of the child element
     * @param {?} currentView The current LView
     * @return {?} Whether or not the child was appended
     */


    function appendChild(childEl, childTNode, currentView) {
      /** @type {?} */
      var renderParent = getRenderParent(childTNode, currentView);

      if (renderParent != null) {
        /** @type {?} */
        var renderer = currentView[RENDERER];
        /** @type {?} */

        var parentTNode = childTNode.parent ||
        /** @type {?} */
        currentView[T_HOST];
        /** @type {?} */

        var anchorNode = getNativeAnchorNode(parentTNode, currentView);

        if (Array.isArray(childEl)) {
          var _iterator36 = _createForOfIteratorHelper(childEl),
              _step36;

          try {
            for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {
              var nativeNode = _step36.value;
              nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);
            }
          } catch (err) {
            _iterator36.e(err);
          } finally {
            _iterator36.f();
          }
        } else {
          nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);
        }
      }
    }
    /**
     * Gets the top-level element or an ICU container if those containers are nested.
     *
     * @param {?} tNode The starting TNode for which we should skip element and ICU containers
     * @return {?} The TNode of the highest level ICU container or element container
     */


    function getHighestElementOrICUContainer(tNode) {
      while (tNode.parent != null && (tNode.parent.type === 4
      /* ElementContainer */
      || tNode.parent.type === 5
      /* IcuContainer */
      )) {
        tNode = tNode.parent;
      }

      return tNode;
    }
    /**
     * @param {?} viewIndexInContainer
     * @param {?} lContainer
     * @return {?}
     */


    function getBeforeNodeForView(viewIndexInContainer, lContainer) {
      /** @type {?} */
      var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;

      if (nextViewIndex < lContainer.length) {
        /** @type {?} */
        var _lView5 =
        /** @type {?} */
        lContainer[nextViewIndex];
        ngDevMode && assertDefined(_lView5[T_HOST], 'Missing Host TNode');
        /** @type {?} */

        var tViewNodeChild =
        /** @type {?} */
        _lView5[T_HOST].child;
        return tViewNodeChild !== null ? getNativeByTNodeOrNull(tViewNodeChild, _lView5) : lContainer[NATIVE];
      } else {
        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.
     * @return {?}
     */


    function nativeRemoveNode(renderer, rNode, isHostElement) {
      /** @type {?} */
      var nativeParent = nativeParentNode(renderer, rNode);

      if (nativeParent) {
        nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);
      }
    }
    /**
     * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and
     * stored on a component host level.
     * @param {?} lView A LView where nodes are inserted (target LView)
     * @param {?} tProjectionNode A projection node where previously re-distribution should be appended
     * (target insertion place)
     * @param {?} selectorIndex A bucket from where nodes to project should be taken
     * @param {?} componentView A where projectable nodes were initially created (source view)
     * @return {?}
     */


    function appendProjectedNodes(lView, tProjectionNode, selectorIndex, componentView) {
      /** @type {?} */
      var projectedView =
      /** @type {?} */

      /** @type {?} */
      componentView[PARENT];
      /** @type {?} */

      var componentNode =
      /** @type {?} */
      componentView[T_HOST];
      /** @type {?} */

      var nodeToProject =
      /** @type {?} */
      componentNode.projection[selectorIndex];

      if (Array.isArray(nodeToProject)) {
        appendChild(nodeToProject, tProjectionNode, lView);
      } else {
        while (nodeToProject) {
          if (!(nodeToProject.flags & 32
          /* isDetached */
          )) {
            if (nodeToProject.type === 1
            /* Projection */
            ) {
                appendProjectedNodes(lView, tProjectionNode,
                /** @type {?} */
                nodeToProject.projection, findComponentView(projectedView));
              } else {
              // This flag must be set now or we won't know that this node is projected
              // if the nodes are inserted into a container later.
              nodeToProject.flags |= 2
              /* isProjected */
              ;
              appendProjectedNode(nodeToProject, tProjectionNode, lView, projectedView);
            }
          }

          nodeToProject = nodeToProject.projectionNext;
        }
      }
    }
    /**
     * Loops over all children of a TNode container and appends them to the DOM
     *
     * @param {?} ngContainerChildTNode The first child of the TNode container
     * @param {?} tProjectionNode The projection (ng-content) TNode
     * @param {?} currentView Current LView
     * @param {?} projectionView Projection view (view above current)
     * @return {?}
     */


    function appendProjectedChildren(ngContainerChildTNode, tProjectionNode, currentView, projectionView) {
      while (ngContainerChildTNode) {
        appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);
        ngContainerChildTNode = ngContainerChildTNode.next;
      }
    }
    /**
     * Appends a projected node to the DOM, or in the case of a projected container,
     * appends the nodes from all of the container's active views to the DOM.
     *
     * @param {?} projectedTNode The TNode to be projected
     * @param {?} tProjectionNode The projection (ng-content) TNode
     * @param {?} currentView Current LView
     * @param {?} projectionView Projection view (view above current)
     * @return {?}
     */


    function appendProjectedNode(projectedTNode, tProjectionNode, currentView, projectionView) {
      /** @type {?} */
      var _native14 = getNativeByTNode(projectedTNode, projectionView);

      appendChild(_native14, tProjectionNode, currentView); // the projected contents are processed while in the shadow view (which is the currentView)
      // therefore we need to extract the view where the host element lives since it's the
      // logical container of the content projected views

      attachPatchData(_native14, projectionView);
      /** @type {?} */

      var nodeOrContainer = projectionView[projectedTNode.index];

      if (projectedTNode.type === 0
      /* Container */
      ) {
          // The node we are adding is a container and we are adding it to an element which
          // is not a component (no more re-projection).
          // Alternatively a container is projected at the root of a component's template
          // and can't be re-projected (as not content of any component).
          // Assign the final projection location in those cases.
          for (var i = CONTAINER_HEADER_OFFSET; i < nodeOrContainer.length; i++) {
            addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);
          }
        } else if (projectedTNode.type === 5
      /* IcuContainer */
      ) {
          // The node we are adding is an ICU container which is why we also need to project all the
          // children nodes that might have been created previously and are linked to this anchor

          /** @type {?} */
          var ngContainerChildTNode =
          /** @type {?} */
          projectedTNode.child;
          appendProjectedChildren(ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);
        } else {
        if (projectedTNode.type === 4
        /* ElementContainer */
        ) {
            appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);
          }

        if (isLContainer(nodeOrContainer)) {
          appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);
        }
      }
    }
    /**
     * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,
     * destroy)
     *
     * Inserting a view without projection or containers at top level is simple. Just iterate over the
     * root nodes of the View, and for each node perform the `action`.
     *
     * Things get more complicated with containers and projections. That is because coming across:
     * - Container: implies that we have to insert/remove/destroy the views of that container as well
     *              which in turn can have their own Containers at the View roots.
     * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The
     *               complication is that the nodes we are projecting can themselves have Containers
     *               or other Projections.
     *
     * As you can see this is a very recursive problem. While the recursive implementation is not the
     * most efficient one, trying to unroll the nodes non-recursively results in very complex code that
     * is very hard (to maintain). We are sacrificing a bit of performance for readability using a
     * recursive implementation.
     *
     * @param {?} renderer Renderer to use
     * @param {?} action action to perform (insert, detach, destroy)
     * @param {?} lView The LView which needs to be inserted, detached, destroyed.
     * @param {?} renderParent parent DOM element for insertion/removal.
     * @param {?} beforeNode Before which node the insertions should happen.
     * @return {?}
     */


    function executeActionOnView(renderer, action, lView, renderParent, beforeNode) {
      /** @type {?} */
      var tView = lView[TVIEW];
      ngDevMode && assertNodeType(
      /** @type {?} */
      tView.node, 2
      /* View */
      );
      /** @type {?} */

      var viewRootTNode =
      /** @type {?} */
      tView.node.child;

      while (viewRootTNode !== null) {
        executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);
        viewRootTNode = viewRootTNode.next;
      }
    }
    /**
     * `executeActionOnProjection` performs an 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 Renderer to use
     * @param {?} action action to perform (insert, detach, destroy)
     * @param {?} lView The LView which needs to be inserted, detached, destroyed.
     * @param {?} tProjectionNode projection TNode to process
     * @param {?} renderParent parent DOM element for insertion/removal.
     * @param {?} beforeNode Before which node the insertions should happen.
     * @return {?}
     */


    function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {
      /** @type {?} */
      var componentLView = findComponentView(lView);
      /** @type {?} */

      var componentNode =
      /** @type {?} */
      componentLView[T_HOST];
      ngDevMode && assertDefined(componentNode.projection, 'Element nodes for which projection is processed must have projection defined.');
      /** @type {?} */

      var nodeToProject =
      /** @type {?} */
      componentNode.projection[tProjectionNode.projection];

      if (nodeToProject !== undefined) {
        if (Array.isArray(nodeToProject)) {
          for (var i = 0; i < nodeToProject.length; i++) {
            /** @type {?} */
            var rNode = nodeToProject[i];
            ngDevMode && assertDomNode(rNode);
            executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);
          }
        } else {
          /** @type {?} */
          var projectionTNode = nodeToProject;
          /** @type {?} */

          var projectedComponentLView =
          /** @type {?} */
          componentLView[PARENT];

          while (projectionTNode !== null) {
            executeActionOnNode(renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);
            projectionTNode = projectionTNode.projectionNext;
          }
        }
      }
    }
    /**
     * `executeActionOnContainer` 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 {?} renderParent parent DOM element for insertion/removal.
     * @param {?} beforeNode Before which node the insertions should happen.
     * @return {?}
     */


    function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) {
      ngDevMode && assertLContainer(lContainer);
      /** @type {?} */

      var anchor = lContainer[NATIVE]; // LContainer has its own before node.

      /** @type {?} */

      var _native15 = 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 executeNodeAction)
      // - container's host node (this is done here)


      if (anchor !== _native15) {
        executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);
      }

      for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
        /** @type {?} */
        var _lView6 =
        /** @type {?} */
        lContainer[i];
        executeActionOnView(renderer, action, _lView6, renderParent, anchor);
      }
    }
    /**
     * `executeActionOnElementContainerOrIcuContainer` performs an operation on the ng-container node
     * and its child nodes as specified by the `action` (insert, detach, destroy).
     *
     * @param {?} renderer Renderer to use
     * @param {?} action action to perform (insert, detach, destroy)
     * @param {?} lView The LView which needs to be inserted, detached, destroyed.
     * @param {?} tNode The TNode associated with the `ElementContainer` or `IcuContainer`.
     * @param {?} renderParent parent DOM element for insertion/removal.
     * @param {?} beforeNode Before which node the insertions should happen.
     * @return {?}
     */


    function executeActionOnElementContainerOrIcuContainer(renderer, action, lView, tNode, renderParent, beforeNode) {
      /** @type {?} */
      var node = lView[tNode.index];
      executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);
      /** @type {?} */

      var childTNode = tNode.child;

      while (childTNode) {
        executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);
        childTNode = childTNode.next;
      }
    }
    /**
     * @param {?} renderer
     * @param {?} action
     * @param {?} lView
     * @param {?} tNode
     * @param {?} renderParent
     * @param {?} beforeNode
     * @return {?}
     */


    function executeActionOnNode(renderer, action, lView, tNode, renderParent, beforeNode) {
      /** @type {?} */
      var nodeType = tNode.type;

      if (!(tNode.flags & 32
      /* isDetached */
      )) {
        if (nodeType === 4
        /* ElementContainer */
        || nodeType === 5
        /* IcuContainer */
        ) {
            executeActionOnElementContainerOrIcuContainer(renderer, action, lView,
            /** @type {?} */
            tNode, renderParent, beforeNode);
          } else if (nodeType === 1
        /* Projection */
        ) {
            executeActionOnProjection(renderer, action, lView,
            /** @type {?} */
            tNode, renderParent, beforeNode);
          } else {
          ngDevMode && assertNodeOfPossibleTypes(tNode, 3
          /* Element */
          , 0
          /* Container */
          );
          executeActionOnElementOrContainer(action, renderer, renderParent, lView[tNode.index], beforeNode);
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Unwraps a parent injector location number to find the view offset from the current injector,
     * then walks up the declaration view tree until the TNode of the parent injector is found.
     *
     * @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
     * @param {?} startTNode The TNode instance of the starting element
     * @return {?} The TNode of the parent injector
     */


    function getParentInjectorTNode(location, startView, startTNode) {
      if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {
        // view offset is 0

        /** @type {?} */
        var injectorIndex = startTNode.parent.injectorIndex;
        /** @type {?} */

        var _parentTNode = startTNode.parent;

        while (_parentTNode.parent != null && injectorIndex == _parentTNode.injectorIndex) {
          _parentTNode = _parentTNode.parent;
        }

        return _parentTNode;
      }
      /** @type {?} */


      var viewOffset = getParentInjectorViewOffset(location); // view offset is 1

      /** @type {?} */

      var parentView = startView;
      /** @type {?} */

      var parentTNode =
      /** @type {?} */
      startView[T_HOST]; // view offset is superior to 1

      while (viewOffset > 1) {
        parentView =
        /** @type {?} */
        parentView[DECLARATION_VIEW];
        parentTNode =
        /** @type {?} */
        parentView[T_HOST];
        viewOffset--;
      }

      return parentTNode;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     */


    function viewEngine_ChangeDetectorRef_interface() {}
    /**
     * @template T
     */


    var ViewRef = /*#__PURE__*/function () {
      /**
       * @param {?} _lView
       * @param {?} _context
       * @param {?} _componentIndex
       */
      function ViewRef(_lView, _context, _componentIndex) {
        _classCallCheck(this, ViewRef);

        this._context = _context;
        this._componentIndex = _componentIndex;
        this._appRef = null;
        this._viewContainerRef = null;
        /**
         * \@internal
         */

        this._tViewNode = null;
        this._lView = _lView;
      }
      /**
       * @return {?}
       */


      _createClass2(ViewRef, [{
        key: "destroy",

        /**
         * @return {?}
         */
        value: function destroy() {
          if (this._appRef) {
            this._appRef.detachView(this);
          } else if (this._viewContainerRef) {
            /** @type {?} */
            var index = this._viewContainerRef.indexOf(this);

            if (index > -1) {
              this._viewContainerRef.detach(index);
            }

            this._viewContainerRef = null;
          }

          destroyLView(this._lView);
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          storeCleanupFn(this._lView, 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);
         *   }
         * }
         * ```
         * @return {?}
         */

      }, {
        key: "markForCheck",
        value: function markForCheck() {
          markViewDirty(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);
         *   }
         * }
         *  /
         *   selector: 'app',
         *   providers: [DataProvider],
         *   template: `
         *     <giant-list><giant-list>
         *   `,
         * })
         * class App {
         * }
         * ```
         * @return {?}
         */

      }, {
        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();
         *     }
         *   }
         * }
         *  /
         *   selector: 'my-app',
         *   providers: [DataProvider],
         *   template: `
         *     Live Update: <input type="checkbox" [(ngModel)]="live">
         *     <live-data [live]="live"><live-data>
         *   `,
         * })
         * class AppComponent {
         *   live = true;
         * }
         * ```
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "detectChanges",
        value: function detectChanges() {
          detectChangesInternal(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.
         * @return {?}
         */

      }, {
        key: "checkNoChanges",
        value: function checkNoChanges() {
          checkNoChangesInternal(this._lView, this.context);
        }
        /**
         * @param {?} vcRef
         * @return {?}
         */

      }, {
        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 {?}
         */

      }, {
        key: "detachFromAppRef",
        value: function detachFromAppRef() {
          this._appRef = null;
          renderDetachView(this._lView);
        }
        /**
         * @param {?} appRef
         * @return {?}
         */

      }, {
        key: "attachToAppRef",
        value: function attachToAppRef(appRef) {
          if (this._viewContainerRef) {
            throw new Error('This view is already attached to a ViewContainer!');
          }

          this._appRef = appRef;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_lookUpContext",
        value: function _lookUpContext() {
          return this._context =
          /** @type {?} */

          /** @type {?} */
          getLViewParent(this._lView)[this._componentIndex];
        }
      }, {
        key: "rootNodes",
        get: function get() {
          if (this._lView[HOST] == null) {
            /** @type {?} */
            var tView =
            /** @type {?} */
            this._lView[T_HOST];
            return collectNativeNodes(this._lView, tView, []);
          }

          return [];
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return this._context ? this._context : this._lookUpContext();
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroyed",
        get: function get() {
          return (this._lView[FLAGS] & 256
          /* Destroyed */
          ) === 256
          /* Destroyed */
          ;
        }
      }]);

      return ViewRef;
    }();

    if (false) {}
    /**
     * \@internal
     * @template T
     */


    var RootViewRef = /*#__PURE__*/function (_ViewRef) {
      _inherits(RootViewRef, _ViewRef);

      var _super104 = _createSuper(RootViewRef);

      /**
       * @param {?} _view
       */
      function RootViewRef(_view) {
        var _this310;

        _classCallCheck(this, RootViewRef);

        _this310 = _super104.call(this, _view, null, -1);
        _this310._view = _view;
        return _this310;
      }
      /**
       * @return {?}
       */


      _createClass2(RootViewRef, [{
        key: "detectChanges",
        value: function detectChanges() {
          detectChangesInRootView(this._view);
        }
        /**
         * @return {?}
         */

      }, {
        key: "checkNoChanges",
        value: function checkNoChanges() {
          checkNoChangesInRootView(this._view);
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return (
            /** @type {?} */
            null
          );
        }
      }]);

      return RootViewRef;
    }(ViewRef);

    if (false) {}
    /**
     * @param {?} lView
     * @param {?} parentTNode
     * @param {?} result
     * @return {?}
     */


    function collectNativeNodes(lView, parentTNode, result) {
      /** @type {?} */
      var tNodeChild = parentTNode.child;

      while (tNodeChild) {
        /** @type {?} */
        var nativeNode = getNativeByTNodeOrNull(tNodeChild, lView);
        nativeNode && result.push(nativeNode);

        if (tNodeChild.type === 4
        /* ElementContainer */
        ) {
            collectNativeNodes(lView, tNodeChild, result);
          } else if (tNodeChild.type === 1
        /* Projection */
        ) {
            /** @type {?} */
            var componentView = findComponentView(lView);
            /** @type {?} */

            var componentHost =
            /** @type {?} */
            componentView[T_HOST];
            /** @type {?} */

            var parentView = getLViewParent(componentView);
            /** @type {?} */

            var currentProjectedNode =
            /** @type {?} */
            componentHost.projection[
            /** @type {?} */
            tNodeChild.projection];

            while (currentProjectedNode && parentView) {
              result.push(getNativeByTNode(currentProjectedNode, parentView));
              currentProjectedNode = currentProjectedNode.next;
            }
          }

        tNodeChild = tNodeChild.next;
      }

      return result;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Creates an ElementRef from the most recent node.
     *
     * @param {?} ElementRefToken
     * @return {?} The ElementRef instance to use
     */


    function injectElementRef(ElementRefToken) {
      return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());
    }
    /** @type {?} */


    var R3ElementRef;
    /**
     * Creates an ElementRef given a node.
     *
     * @param {?} ElementRefToken The ElementRef type
     * @param {?} tNode The node for which you'd like an ElementRef
     * @param {?} view The view to which the node belongs
     * @return {?} The ElementRef instance to use
     */

    function createElementRef(ElementRefToken, tNode, view) {
      if (!R3ElementRef) {
        // TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug
        R3ElementRef = /*#__PURE__*/function (_ElementRefToken) {
          _inherits(ElementRef_, _ElementRefToken);

          var _super105 = _createSuper(ElementRef_);

          function ElementRef_() {
            _classCallCheck(this, ElementRef_);

            return _super105.apply(this, arguments);
          }

          return ElementRef_;
        }(ElementRefToken);
      }

      return new R3ElementRef(
      /** @type {?} */
      getNativeByTNode(tNode, view));
    }
    /** @type {?} */


    var R3TemplateRef;
    /**
     * Creates a TemplateRef given a node.
     *
     * @template T
     * @param {?} TemplateRefToken
     * @param {?} ElementRefToken
     * @return {?} The TemplateRef instance to use
     */

    function injectTemplateRef(TemplateRefToken, ElementRefToken) {
      return createTemplateRef(TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());
    }
    /**
     * Creates a TemplateRef and stores it on the injector.
     *
     * @template T
     * @param {?} TemplateRefToken The TemplateRef type
     * @param {?} ElementRefToken The ElementRef type
     * @param {?} hostTNode The node on which a TemplateRef is requested
     * @param {?} hostView The view to which the node belongs
     * @return {?} The TemplateRef instance or null if we can't create a TemplateRef on a given node type
     */


    function createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostView) {
      if (!R3TemplateRef) {
        // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug
        R3TemplateRef = /*#__PURE__*/function (_TemplateRefToken) {
          _inherits(TemplateRef_, _TemplateRefToken);

          var _super106 = _createSuper(TemplateRef_);

          /**
           * @param {?} _declarationView
           * @param {?} _declarationTContainer
           * @param {?} elementRef
           */
          function TemplateRef_(_declarationView, _declarationTContainer, elementRef) {
            var _this311;

            _classCallCheck(this, TemplateRef_);

            _this311 = _super106.call(this);
            _this311._declarationView = _declarationView;
            _this311._declarationTContainer = _declarationTContainer;
            _this311.elementRef = elementRef;
            return _this311;
          }
          /**
           * @param {?} context
           * @return {?}
           */


          _createClass2(TemplateRef_, [{
            key: "createEmbeddedView",
            value: function createEmbeddedView(context) {
              /** @type {?} */
              var embeddedTView =
              /** @type {?} */
              this._declarationTContainer.tViews;
              /** @type {?} */

              var lView = createEmbeddedViewAndNode(embeddedTView, context, this._declarationView, this._declarationTContainer.injectorIndex);
              /** @type {?} */

              var declarationLContainer = this._declarationView[this._declarationTContainer.index];
              ngDevMode && assertLContainer(declarationLContainer);
              lView[DECLARATION_LCONTAINER] = declarationLContainer;
              /** @type {?} */

              var declarationViewLQueries = this._declarationView[QUERIES];

              if (declarationViewLQueries !== null) {
                lView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
              }

              renderEmbeddedTemplate(lView, embeddedTView, context);
              /** @type {?} */

              var viewRef = new ViewRef(lView, context, -1);
              viewRef._tViewNode =
              /** @type {?} */
              lView[T_HOST];
              return viewRef;
            }
          }]);

          return TemplateRef_;
        }(TemplateRefToken);
      }

      if (hostTNode.type === 0
      /* Container */
      ) {
          ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');
          return new R3TemplateRef(hostView,
          /** @type {?} */
          hostTNode, createElementRef(ElementRefToken, hostTNode, hostView));
        } else {
        return null;
      }
    }
    /** @type {?} */


    var R3ViewContainerRef;
    /**
     * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
     * already exists, retrieves the existing ViewContainerRef.
     *
     * @param {?} ViewContainerRefToken
     * @param {?} ElementRefToken
     * @return {?} The ViewContainerRef instance to use
     */

    function injectViewContainerRef(ViewContainerRefToken, ElementRefToken) {
      /** @type {?} */
      var previousTNode =
      /** @type {?} */
      getPreviousOrParentTNode();
      return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());
    }
    /**
     * 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 {?} hostView The view to which the node belongs
     * @return {?} The ViewContainerRef instance to use
     */


    function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, hostView) {
      if (!R3ViewContainerRef) {
        // TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug
        R3ViewContainerRef = /*#__PURE__*/function (_ViewContainerRefToke) {
          _inherits(ViewContainerRef_, _ViewContainerRefToke);

          var _super107 = _createSuper(ViewContainerRef_);

          /**
           * @param {?} _lContainer
           * @param {?} _hostTNode
           * @param {?} _hostView
           */
          function ViewContainerRef_(_lContainer, _hostTNode, _hostView) {
            var _this312;

            _classCallCheck(this, ViewContainerRef_);

            _this312 = _super107.call(this);
            _this312._lContainer = _lContainer;
            _this312._hostTNode = _hostTNode;
            _this312._hostView = _hostView;
            return _this312;
          }
          /**
           * @return {?}
           */


          _createClass2(ViewContainerRef_, [{
            key: "clear",

            /**
             * @return {?}
             */
            value: function clear() {
              while (this.length > 0) {
                this.remove(this.length - 1);
              }
            }
            /**
             * @param {?} index
             * @return {?}
             */

          }, {
            key: "get",
            value: function get(index) {
              return this._lContainer[VIEW_REFS] !== null &&
              /** @type {?} */
              this._lContainer[VIEW_REFS][index] || null;
            }
            /**
             * @return {?}
             */

          }, {
            key: "createEmbeddedView",

            /**
             * @template C
             * @param {?} templateRef
             * @param {?=} context
             * @param {?=} index
             * @return {?}
             */
            value: function createEmbeddedView(templateRef, context, index) {
              /** @type {?} */
              var viewRef = templateRef.createEmbeddedView(context ||
              /** @type {?} */
              {});
              this.insert(viewRef, index);
              return viewRef;
            }
            /**
             * @template C
             * @param {?} componentFactory
             * @param {?=} index
             * @param {?=} injector
             * @param {?=} projectableNodes
             * @param {?=} ngModuleRef
             * @return {?}
             */

          }, {
            key: "createComponent",
            value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {
              /** @type {?} */
              var contextInjector = injector || this.parentInjector;

              if (!ngModuleRef &&
              /** @type {?} */
              componentFactory.ngModule == null && contextInjector) {
                ngModuleRef = contextInjector.get(NgModuleRef, null);
              }
              /** @type {?} */


              var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
              this.insert(componentRef.hostView, index);
              return componentRef;
            }
            /**
             * @param {?} viewRef
             * @param {?=} index
             * @return {?}
             */

          }, {
            key: "insert",
            value: function insert(viewRef, index) {
              if (viewRef.destroyed) {
                throw new Error('Cannot insert a destroyed View in a ViewContainer!');
              }

              this.allocateContainerIfNeeded();
              /** @type {?} */

              var lView =
              /** @type {?} */

              /** @type {?} */
              viewRef._lView;
              /** @type {?} */

              var adjustedIdx = this._adjustIndex(index);

              if (viewAttachedToContainer(lView)) {
                // If view is already attached, fall back to move() so we clean up
                // references appropriately.
                return this.move(viewRef, adjustedIdx);
              }

              insertView(lView, this._lContainer, adjustedIdx);
              /** @type {?} */

              var beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);
              addRemoveViewFromContainer(lView, true, beforeNode);

              /** @type {?} */
              viewRef.attachToViewContainerRef(this);
              addToArray(
              /** @type {?} */
              this._lContainer[VIEW_REFS], adjustedIdx, viewRef);
              return viewRef;
            }
            /**
             * @param {?} viewRef
             * @param {?} newIndex
             * @return {?}
             */

          }, {
            key: "move",
            value: function move(viewRef, newIndex) {
              if (viewRef.destroyed) {
                throw new Error('Cannot move a destroyed View in a ViewContainer!');
              }
              /** @type {?} */


              var index = this.indexOf(viewRef);
              if (index !== -1) this.detach(index);
              this.insert(viewRef, newIndex);
              return viewRef;
            }
            /**
             * @param {?} viewRef
             * @return {?}
             */

          }, {
            key: "indexOf",
            value: function indexOf(viewRef) {
              return this._lContainer[VIEW_REFS] !== null ?
              /** @type {?} */
              this._lContainer[VIEW_REFS].indexOf(viewRef) : 0;
            }
            /**
             * @param {?=} index
             * @return {?}
             */

          }, {
            key: "remove",
            value: function remove(index) {
              this.allocateContainerIfNeeded();
              /** @type {?} */

              var adjustedIdx = this._adjustIndex(index, -1);

              removeView(this._lContainer, adjustedIdx);
              removeFromArray(
              /** @type {?} */
              this._lContainer[VIEW_REFS], adjustedIdx);
            }
            /**
             * @param {?=} index
             * @return {?}
             */

          }, {
            key: "detach",
            value: function detach(index) {
              this.allocateContainerIfNeeded();
              /** @type {?} */

              var adjustedIdx = this._adjustIndex(index, -1);
              /** @type {?} */


              var view = detachView(this._lContainer, adjustedIdx);
              /** @type {?} */

              var wasDetached = view && removeFromArray(
              /** @type {?} */
              this._lContainer[VIEW_REFS], adjustedIdx) != null;
              return wasDetached ? new ViewRef(
              /** @type {?} */
              view,
              /** @type {?} */
              view[CONTEXT], -1) : null;
            }
            /**
             * @private
             * @param {?=} index
             * @param {?=} shift
             * @return {?}
             */

          }, {
            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, 'index must be positive'); // +1 because it's legal to insert at the end.

                assertLessThan(index, this.length + 1 + shift, 'index');
              }

              return index;
            }
            /**
             * @private
             * @return {?}
             */

          }, {
            key: "allocateContainerIfNeeded",
            value: function allocateContainerIfNeeded() {
              if (this._lContainer[VIEW_REFS] === null) {
                this._lContainer[VIEW_REFS] = [];
              }
            }
          }, {
            key: "element",
            get: function get() {
              return createElementRef(ElementRefToken, this._hostTNode, this._hostView);
            }
            /**
             * @return {?}
             */

          }, {
            key: "injector",
            get: function get() {
              return new NodeInjector(this._hostTNode, this._hostView);
            }
            /**
             * @deprecated No replacement
             * @return {?}
             */

          }, {
            key: "parentInjector",
            get: function get() {
              /** @type {?} */
              var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);
              /** @type {?} */

              var parentView = getParentInjectorView(parentLocation, this._hostView);
              /** @type {?} */

              var parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);
              return !hasParentInjector(parentLocation) || parentTNode == null ? new NodeInjector(null, this._hostView) : new NodeInjector(parentTNode, parentView);
            }
          }, {
            key: "length",
            get: function get() {
              return this._lContainer.length - CONTAINER_HEADER_OFFSET;
            }
          }]);

          return ViewContainerRef_;
        }(ViewContainerRefToken);
      }

      ngDevMode && assertNodeOfPossibleTypes(hostTNode, 0
      /* Container */
      , 3
      /* Element */
      , 4
      /* ElementContainer */
      );
      /** @type {?} */

      var lContainer;
      /** @type {?} */

      var slotValue = hostView[hostTNode.index];

      if (isLContainer(slotValue)) {
        // If the host is a container, we don't need to create a new LContainer
        lContainer = slotValue;
        lContainer[ACTIVE_INDEX] = -1;
      } else {
        /** @type {?} */
        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.

        if (hostTNode.type === 4
        /* ElementContainer */
        ) {
            commentNode =
            /** @type {?} */
            unwrapRNode(slotValue);
          } else {
          ngDevMode && ngDevMode.rendererCreateComment++;
          commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');
        } // A container can be created on the root (topmost / bootstrapped) component and in this case we
        // can't use LTree to insert container's marker node (both parent of a comment node and the
        // commend node itself is located outside of elements hold by LTree). In this specific case we
        // use low-level DOM manipulation to insert container's marker (comment) node.


        if (isRootView(hostView)) {
          /** @type {?} */
          var renderer = hostView[RENDERER];
          /** @type {?} */

          var hostNative =
          /** @type {?} */
          getNativeByTNode(hostTNode, hostView);
          /** @type {?} */

          var parentOfHostNative = nativeParentNode(renderer, hostNative);
          nativeInsertBefore(renderer,
          /** @type {?} */
          parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative));
        } else {
          appendChild(commentNode, hostTNode, hostView);
        }

        hostView[hostTNode.index] = lContainer = createLContainer(slotValue, hostView, commentNode, hostTNode, true);
        addToViewTree(hostView, lContainer);
      }

      return new R3ViewContainerRef(lContainer, hostTNode, hostView);
    }
    /**
     * Returns a ChangeDetectorRef (a.k.a. a ViewRef)
     * @param {?=} isPipe
     * @return {?}
     */


    function injectChangeDetectorRef() {
      var isPipe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      return createViewRef(getPreviousOrParentTNode(), getLView(), isPipe);
    }
    /**
     * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).
     *
     * @param {?} hostTNode The node that is requesting a ChangeDetectorRef
     * @param {?} hostView The view to which the node belongs
     * @param {?} isPipe Whether the view is being injected into a pipe.
     * @return {?} The ChangeDetectorRef to use
     */


    function createViewRef(hostTNode, hostView, isPipe) {
      if (isComponent(hostTNode) && !isPipe) {
        /** @type {?} */
        var componentIndex = hostTNode.directiveStart;
        /** @type {?} */

        var componentView = getComponentViewByIndex(hostTNode.index, hostView);
        return new ViewRef(componentView, null, componentIndex);
      } else if (hostTNode.type === 3
      /* Element */
      || hostTNode.type === 0
      /* Container */
      || hostTNode.type === 4
      /* ElementContainer */
      ) {
          /** @type {?} */
          var hostComponentView = findComponentView(hostView);
          return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);
        }

      return (
        /** @type {?} */
        null
      );
    }
    /**
     * Returns a Renderer2 (or throws when application was bootstrapped with Renderer3)
     * @param {?} view
     * @return {?}
     */


    function getOrCreateRenderer2(view) {
      /** @type {?} */
      var renderer = view[RENDERER];

      if (isProceduralRenderer(renderer)) {
        return (
          /** @type {?} */
          renderer
        );
      } else {
        throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');
      }
    }
    /**
     * Injects a Renderer2 for the current component.
     * @return {?}
     */


    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.

      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tNode = getPreviousOrParentTNode();
      /** @type {?} */

      var nodeAtIndex = getComponentViewByIndex(tNode.index, lView);
      return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Base class for Angular Views, 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 rerendered.
     *
     * \@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](http://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
     * @abstract
     */


    var ChangeDetectorRef = function ChangeDetectorRef() {
      _classCallCheck(this, ChangeDetectorRef);
    };
    /**
     * \@internal
     * @nocollapse
     */


    ChangeDetectorRef.__NG_ELEMENT_ID__ =
    /**
    * @return {?}
    */
    function () {
      return SWITCH_CHANGE_DETECTOR_REF_FACTORY();
    };

    if (false) {}
    /** @type {?} */


    var SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;
    /** @type {?} */

    var SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ =
    /**
    * @param {...?} args
    * @return {?}
    */
    function SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__() {};

    var ɵ0$6 = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;
    /** @type {?} */

    var SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 be represented by
     * the `MyCustomComponent` constructor function.
     *
     * @publicApi
     */

    var Type = Function;

    function isType(v) {
      return typeof v === 'function';
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 regex has to hold even if the code is minified!
     */


    var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
    var INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/;
    var INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/;
    var 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 DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS.test(typeStr) && !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 _len15 = arguments.length, args = new Array(_len15), _key16 = 0; _key16 < _len15; _key16++) {
              args[_key16] = arguments[_key16];
            }

            return _construct(t, args);
          };
        }
        /** @internal */

      }, {
        key: "_zipTypesAndAnnotations",
        value: function _zipTypesAndAnnotations(paramTypes, paramAnnotations) {
          var result;

          if (typeof paramTypes === 'undefined') {
            result = new Array(paramAnnotations.length);
          } else {
            result = new Array(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 new Array(type.length).fill(undefined);
        }
      }, {
        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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var _reflect = null;
    /**
     * @return {?}
     */

    function getReflect() {
      return _reflect = _reflect || new ReflectionCapabilities();
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function reflectDependencies(type) {
      return convertDependencies(getReflect().parameters(type));
    }
    /**
     * @param {?} deps
     * @return {?}
     */


    function convertDependencies(deps) {
      /** @type {?} */
      var compiler = getCompilerFacade();
      return deps.map(
      /**
      * @param {?} dep
      * @return {?}
      */
      function (dep) {
        return reflectDependency(compiler, dep);
      });
    }
    /**
     * @param {?} compiler
     * @param {?} dep
     * @return {?}
     */


    function reflectDependency(compiler, dep) {
      /** @type {?} */
      var meta = {
        token: null,
        host: false,
        optional: false,
        resolved: compiler.R3ResolvedDependencyType.Token,
        self: false,
        skipSelf: false
      };
      /**
       * @param {?} token
       * @return {?}
       */

      function setTokenAndResolvedType(token) {
        meta.resolved = compiler.R3ResolvedDependencyType.Token;
        meta.token = token;
      }

      if (Array.isArray(dep)) {
        if (dep.length === 0) {
          throw new Error('Dependency array must have arguments.');
        }

        for (var j = 0; j < dep.length; j++) {
          /** @type {?} */
          var param = dep[j];

          if (param === undefined) {
            // param may be undefined if type of dep is not set by ngtsc
            continue;
          } else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {
            meta.optional = true;
          } else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {
            meta.skipSelf = true;
          } else if (param instanceof Self || param.__proto__.ngMetadataName === 'Self') {
            meta.self = true;
          } else if (param instanceof Host || param.__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) {
            meta.token = param;
            meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;
          } else {
            setTokenAndResolvedType(param);
          }
        }
      } else {
        setTokenAndResolvedType(dep);
      }

      return meta;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
     * `ngInjectableDef` onto the injectable type.
     * @param {?} type
     * @param {?=} srcMeta
     * @return {?}
     */


    function compileInjectable(type, srcMeta) {
      /** @type {?} */
      var def = null; // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it

      if (type.hasOwnProperty(NG_INJECTABLE_DEF)) return;
      Object.defineProperty(type, NG_INJECTABLE_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          if (def === null) {
            // Allow the compilation of a class with a `@Injectable()` decorator without parameters

            /** @type {?} */
            var meta = srcMeta || {
              providedIn: null
            };
            /** @type {?} */

            var hasAProvider = isUseClassProvider(meta) || isUseFactoryProvider(meta) || isUseValueProvider(meta) || isUseExistingProvider(meta);
            /** @type {?} */

            var compilerMeta = {
              name: type.name,
              type: type,
              typeArgumentCount: 0,
              providedIn: meta.providedIn,
              ctorDeps: reflectDependencies(type),
              userDeps: undefined
            };

            if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {
              compilerMeta.userDeps = convertDependencies(meta.deps);
            }

            if (!hasAProvider) {
              // In the case the user specifies a type provider, treat it as {provide: X, useClass: X}.
              // The deps will have been reflected above, causing the factory to create the class by
              // calling
              // its constructor with injected deps.
              compilerMeta.useClass = type;
            } else if (isUseClassProvider(meta)) {
              // The user explicitly specified useClass, and may or may not have provided deps.
              compilerMeta.useClass = meta.useClass;
            } else if (isUseValueProvider(meta)) {
              // The user explicitly specified useValue.
              compilerMeta.useValue = 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 = meta.useExisting;
            } else {
              // Can't happen - either hasAProvider will be false, or one of the providers will be set.
              throw new Error("Unreachable state.");
            }

            def = getCompilerFacade().compileInjectable(angularCoreDiEnv, "ng:///".concat(type.name, "/ngInjectableDef.js"), compilerMeta);
          }

          return def;
        }
      });
    }

    var ɵ0$7 = getClosureSafeProperty;
    /** @type {?} */

    var USE_VALUE$1 = getClosureSafeProperty({
      provide: String,
      useValue: ɵ0$7
    });
    /**
     * @param {?} meta
     * @return {?}
     */

    function isUseClassProvider(meta) {
      return (
        /** @type {?} */
        meta.useClass !== undefined
      );
    }
    /**
     * @param {?} meta
     * @return {?}
     */


    function isUseValueProvider(meta) {
      return USE_VALUE$1 in meta;
    }
    /**
     * @param {?} meta
     * @return {?}
     */


    function isUseFactoryProvider(meta) {
      return (
        /** @type {?} */
        meta.useFactory !== undefined
      );
    }
    /**
     * @param {?} meta
     * @return {?}
     */


    function isUseExistingProvider(meta) {
      return (
        /** @type {?} */
        meta.useExisting !== undefined
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$8 = getClosureSafeProperty;
    /** @type {?} */

    var USE_VALUE$2 = getClosureSafeProperty({
      provide: String,
      useValue: ɵ0$8
    });
    /** @type {?} */

    var EMPTY_ARRAY$1 = [];
    /**
     * @param {?} type
     * @param {?=} provider
     * @return {?}
     */

    function convertInjectableProviderToFactory(type, provider) {
      if (!provider) {
        /** @type {?} */
        var reflectionCapabilities = new ReflectionCapabilities();
        /** @type {?} */

        var deps = reflectionCapabilities.parameters(type); // TODO - convert to flags.

        return (
          /**
          * @return {?}
          */
          function () {
            return _construct(type, _toConsumableArray(injectArgs(
            /** @type {?} */
            deps)));
          }
        );
      }

      if (USE_VALUE$2 in provider) {
        /** @type {?} */
        var valueProvider =
        /** @type {?} */
        provider;
        return (
          /**
          * @return {?}
          */
          function () {
            return valueProvider.useValue;
          }
        );
      } else if (
      /** @type {?} */
      provider.useExisting) {
        /** @type {?} */
        var existingProvider =
        /** @type {?} */
        provider;
        return (
          /**
          * @return {?}
          */
          function () {
            return ɵɵinject(existingProvider.useExisting);
          }
        );
      } else if (
      /** @type {?} */
      provider.useFactory) {
        /** @type {?} */
        var factoryProvider =
        /** @type {?} */
        provider;
        return (
          /**
          * @return {?}
          */
          function () {
            return factoryProvider.useFactory.apply(factoryProvider, _toConsumableArray(injectArgs(factoryProvider.deps || EMPTY_ARRAY$1)));
          }
        );
      } else if (
      /** @type {?} */
      provider.useClass) {
        /** @type {?} */
        var classProvider =
        /** @type {?} */
        provider;
        /** @type {?} */

        var _deps3 =
        /** @type {?} */
        provider.deps;

        if (!_deps3) {
          /** @type {?} */
          var _reflectionCapabilities = new ReflectionCapabilities();

          _deps3 = _reflectionCapabilities.parameters(type);
        }

        return (
          /**
          * @return {?}
          */
          function () {
            return _construct(classProvider.useClass, _toConsumableArray(injectArgs(_deps3)));
          }
        );
      } else {
        /** @type {?} */
        var _deps4 =
        /** @type {?} */
        provider.deps;

        if (!_deps4) {
          /** @type {?} */
          var _reflectionCapabilities2 = new ReflectionCapabilities();

          _deps4 = _reflectionCapabilities2.parameters(type);
        }

        return (
          /**
          * @return {?}
          */
          function () {
            return _construct(type, _toConsumableArray(injectArgs(
            /** @type {?} */
            _deps4)));
          }
        );
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Type of the Injectable decorator / constructor function.
     *
     * \@publicApi
     * @record
     */


    function InjectableDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ0$9 =
    /**
    * @param {?} type
    * @param {?} meta
    * @return {?}
    */
    function ɵ0$9(type, meta) {
      return SWITCH_COMPILE_INJECTABLE(
      /** @type {?} */
      type, meta);
    };
    /**
     * Injectable decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$9);
    /**
     * Type representing injectable service.
     *
     * \@publicApi
     * @record
     * @template T
     */

    function InjectableType() {}

    if (false) {}
    /**
     * Supports \@Injectable() in JIT mode for Render2.
     * @param {?} injectableType
     * @param {?=} options
     * @return {?}
     */


    function render2CompileInjectable(injectableType, options) {
      if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {
        /** @type {?} */
        injectableType.ngInjectableDef = ɵɵdefineInjectable({
          token: injectableType,
          providedIn: options.providedIn,
          factory: convertInjectableProviderToFactory(injectableType, options)
        });
      }
    }
    /** @type {?} */


    var SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;
    /** @type {?} */

    var SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;
    /** @type {?} */

    var SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @type {?}
     */

    var APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Marker which indicates that a value has not yet been created from the factory function.
     * @type {?}
     */

    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.
     * @type {?}
     */

    var CIRCULAR = {};
    /** @type {?} */

    var EMPTY_ARRAY$2 =
    /** @type {?} */
    [];
    /**
     * A lazily initialized NullInjector.
     * @type {?}
     */

    var NULL_INJECTOR = undefined;
    /**
     * @return {?}
     */

    function getNullInjector() {
      if (NULL_INJECTOR === undefined) {
        NULL_INJECTOR = new NullInjector();
      }

      return NULL_INJECTOR;
    }
    /**
     * An entry in the injector which tracks information about the given token, including a possible
     * current value.
     * @record
     * @template T
     */


    function Record() {}

    if (false) {}
    /**
     * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
     *
     * \@publicApi
     * @param {?} defType
     * @param {?=} parent
     * @param {?=} additionalProviders
     * @param {?=} name
     * @return {?}
     */


    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;
      parent = parent || getNullInjector();
      return new R3Injector(defType, additionalProviders, parent, name);
    }

    var R3Injector = /*#__PURE__*/function () {
      /**
       * @param {?} def
       * @param {?} additionalProviders
       * @param {?} parent
       * @param {?=} source
       */
      function R3Injector(def, additionalProviders, parent) {
        var _this313 = 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.
         */

        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; // Start off by creating Records for every provider declared in every InjectorType
        // included transitively in `def`.

        /** @type {?} */

        var dedupStack = [];
        deepForEach([def],
        /**
        * @param {?} injectorDef
        * @return {?}
        */
        function (injectorDef) {
          return _this313.processInjectorType(injectorDef, [], dedupStack);
        });
        additionalProviders && deepForEach(additionalProviders,
        /**
        * @param {?} provider
        * @return {?}
        */
        function (provider) {
          return _this313.processProvider(provider, def, additionalProviders);
        }); // Make sure the INJECTOR token provides this injector.

        this.records.set(INJECTOR, makeRecord(undefined, this)); // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide
        // any injectable scoped to APP_ROOT_SCOPE.

        this.isRootInjector = this.records.has(APP_ROOT); // Eagerly instantiate the InjectorType classes themselves.

        this.injectorDefTypes.forEach(
        /**
        * @param {?} defType
        * @return {?}
        */
        function (defType) {
          return _this313.get(defType);
        }); // Source name, used for debugging

        this.source = source || (typeof def === 'object' ? null : stringify(def));
      }
      /**
       * Flag indicating that this injector was previously destroyed.
       * @return {?}
       */


      _createClass2(R3Injector, [{
        key: "destroy",

        /**
         * 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.
         * @return {?}
         */
        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(
            /**
            * @param {?} service
            * @return {?}
            */
            function (service) {
              return service.ngOnDestroy();
            });
          } finally {
            // Release all references.
            this.records.clear();
            this.onDestroy.clear();
            this.injectorDefTypes.clear();
          }
        }
        /**
         * @template T
         * @param {?} token
         * @param {?=} notFoundValue
         * @param {?=} flags
         * @return {?}
         */

      }, {
        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.

          /** @type {?} */

          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.

              /** @type {?} */
              var record = this.records.get(token);

              if (record === undefined) {
                // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef
                // with a scope matching this injector.

                /** @type {?} */
                var def = couldBeInjectableType(token) && getInjectableDef(token);

                if (def && this.injectableDefInScope(def)) {
                  // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here
                  // all along.
                  record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);
                  this.records.set(token, record);
                }
              } // If a record was found, get the instance for it and return it.


              if (record !== 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.

            /** @type {?} */


            var nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();
            return nextInjector.get(token, flags & InjectFlags.Optional ? null : notFoundValue);
          } catch (e) {
            if (e.name === 'NullInjectorError') {
              /** @type {?} */
              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);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "toString",
        value: function toString() {
          /** @type {?} */
          var tokens =
          /** @type {?} */
          [];
          /** @type {?} */

          var records = this.records;
          records.forEach(
          /**
          * @param {?} v
          * @param {?} token
          * @return {?}
          */
          function (v, token) {
            return tokens.push(stringify(token));
          });
          return "R3Injector[".concat(tokens.join(', '), "]");
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        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)
         * @private
         * @param {?} defOrWrappedDef
         * @param {?} parents
         * @param {?} dedupStack
         * @return {?}
         */

      }, {
        key: "processInjectorType",
        value: function processInjectorType(defOrWrappedDef, parents, dedupStack) {
          var _this314 = this;

          defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
          if (!defOrWrappedDef) return false; // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) 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 ngInjectorDef.

          /** @type {?} */

          var def = getInjectorDef(defOrWrappedDef); // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.

          /** @type {?} */

          var ngModule = def == null &&
          /** @type {?} */
          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`.

          /** @type {?} */

          var defType = ngModule === undefined ?
          /** @type {?} */
          defOrWrappedDef : ngModule; // Check for circular dependencies.

          if (ngDevMode && parents.indexOf(defType) !== -1) {
            /** @type {?} */
            var defName = stringify(defType);
            throw new Error("Circular dependency in DI detected for type ".concat(defName, ". Dependency path: ").concat(parents.map(
            /**
            * @param {?} defType
            * @return {?}
            */
            function (defType) {
              return stringify(defType);
            }).join(' > '), " > ").concat(defName, "."));
          } // Check for multiple imports of the same module

          /** @type {?} */


          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;
          } // Track the InjectorType and add a provider for it.


          this.injectorDefTypes.add(defType);
          this.records.set(defType, makeRecord(def.factory, NOT_YET)); // 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);
            /** @type {?} */

            var importTypesWithProviders;

            try {
              deepForEach(def.imports,
              /**
              * @param {?} imported
              * @return {?}
              */
              function (imported) {
                if (_this314.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 _loop4 = function _loop4(i) {
                var _importTypesWithProvi = importTypesWithProviders[i],
                    ngModule = _importTypesWithProvi.ngModule,
                    providers = _importTypesWithProvi.providers;
                deepForEach(
                /** @type {?} */
                providers,
                /**
                * @param {?} provider
                * @return {?}
                */
                function (provider) {
                  return _this314.processProvider(provider, ngModule, providers || EMPTY_ARRAY$2);
                });
              };

              for (var i = 0; i < importTypesWithProviders.length; i++) {
                _loop4(i);
              }
            }
          } // Next, include providers listed on the definition itself.

          /** @type {?} */


          var defProviders = def.providers;

          if (defProviders != null && !isDuplicate) {
            /** @type {?} */
            var injectorType =
            /** @type {?} */
            defOrWrappedDef;
            deepForEach(defProviders,
            /**
            * @param {?} provider
            * @return {?}
            */
            function (provider) {
              return _this314.processProvider(provider, injectorType, defProviders);
            });
          }

          return ngModule !== undefined &&
          /** @type {?} */
          defOrWrappedDef.providers !== undefined;
        }
        /**
         * Process a `SingleProvider` and add it.
         * @private
         * @param {?} provider
         * @param {?} ngModuleType
         * @param {?} providers
         * @return {?}
         */

      }, {
        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);
          /** @type {?} */

          var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); // Construct a `Record` for the provider.

          /** @type {?} */

          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.

            /** @type {?} */
            var multiRecord = this.records.get(token);

            if (multiRecord) {
              // It has. Throw a nice error if
              if (multiRecord.multi === undefined) {
                throwMixedMultiProviderError();
              }
            } else {
              multiRecord = makeRecord(undefined, NOT_YET, true);

              multiRecord.factory =
              /**
              * @return {?}
              */
              function () {
                return injectArgs(
                /** @type {?} */

                /** @type {?} */
                multiRecord.multi);
              };

              this.records.set(token, multiRecord);
            }

            token = provider;

            /** @type {?} */
            multiRecord.multi.push(provider);
          } else {
            /** @type {?} */
            var existing = this.records.get(token);

            if (existing && existing.multi !== undefined) {
              throwMixedMultiProviderError();
            }
          }

          this.records.set(token, record);
        }
        /**
         * @private
         * @template T
         * @param {?} token
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "hydrate",
        value: function hydrate(token, record) {
          if (record.value === CIRCULAR) {
            throwCyclicDependencyError(stringify(token));
          } else if (record.value === NOT_YET) {
            record.value = CIRCULAR;
            record.value =
            /** @type {?} */
            record.factory();
          }

          if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
            this.onDestroy.add(record.value);
          }

          return (
            /** @type {?} */
            record.value
          );
        }
        /**
         * @private
         * @param {?} def
         * @return {?}
         */

      }, {
        key: "injectableDefInScope",
        value: function injectableDefInScope(def) {
          if (!def.providedIn) {
            return false;
          } else if (typeof def.providedIn === 'string') {
            return def.providedIn === 'any' || def.providedIn === 'root' && this.isRootInjector;
          } else {
            return this.injectorDefTypes.has(def.providedIn);
          }
        }
      }, {
        key: "destroyed",
        get: function get() {
          return this._destroyed;
        }
      }]);

      return R3Injector;
    }();

    if (false) {}
    /**
     * @param {?} token
     * @return {?}
     */


    function injectableDefOrInjectorDefFactory(token) {
      // Most tokens will have an ngInjectableDef directly on them, which specifies a factory directly.

      /** @type {?} */
      var injectableDef = getInjectableDef(token);

      if (injectableDef !== null) {
        return injectableDef.factory;
      } // If the token is an NgModule, it's also injectable but the factory is on its ngInjectorDef.

      /** @type {?} */


      var injectorDef = getInjectorDef(token);

      if (injectorDef !== null) {
        return injectorDef.factory;
      } // InjectionTokens should have an ngInjectableDef 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 an ngInjectableDef 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');
    }
    /**
     * @param {?} token
     * @return {?}
     */


    function getUndecoratedInjectableFactory(token) {
      // If the token has parameters then it has dependencies that we cannot resolve implicitly.

      /** @type {?} */
      var paramLength = token.length;

      if (paramLength > 0) {
        /** @type {?} */
        var args = new Array(paramLength).fill('?');
        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 ngInjectableDef
      // 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.

      /** @type {?} */


      var inheritedInjectableDef = getInheritedInjectableDef(token);

      if (inheritedInjectableDef !== null) {
        return (
          /**
          * @return {?}
          */
          function () {
            return inheritedInjectableDef.factory(
            /** @type {?} */
            token);
          }
        );
      } else {
        return (
          /**
          * @return {?}
          */
          function () {
            return new
            /** @type {?} */
            token();
          }
        );
      }
    }
    /**
     * @param {?} provider
     * @param {?} ngModuleType
     * @param {?} providers
     * @return {?}
     */


    function providerToRecord(provider, ngModuleType, providers) {
      /** @type {?} */
      var factory = providerToFactory(provider, ngModuleType, providers);

      if (isValueProvider(provider)) {
        return makeRecord(undefined, provider.useValue);
      } else {
        return makeRecord(factory, NOT_YET);
      }
    }
    /**
     * Converts a `SingleProvider` into a factory function.
     *
     * @param {?} provider provider to convert to factory
     * @param {?=} ngModuleType
     * @param {?=} providers
     * @return {?}
     */


    function providerToFactory(provider, ngModuleType, providers) {
      /** @type {?} */
      var factory = undefined;

      if (isTypeProvider(provider)) {
        return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));
      } else {
        if (isValueProvider(provider)) {
          factory =
          /**
          * @return {?}
          */
          function factory() {
            return resolveForwardRef(provider.useValue);
          };
        } else if (isExistingProvider(provider)) {
          factory =
          /**
          * @return {?}
          */
          function factory() {
            return ɵɵinject(resolveForwardRef(provider.useExisting));
          };
        } else if (isFactoryProvider(provider)) {
          factory =
          /**
          * @return {?}
          */
          function factory() {
            return provider.useFactory.apply(provider, _toConsumableArray(injectArgs(provider.deps || [])));
          };
        } else {
          /** @type {?} */
          var classRef = resolveForwardRef(provider && (
          /** @type {?} */
          provider.useClass || provider.provide));

          if (!classRef) {
            throwInvalidProviderError(ngModuleType, providers, provider);
          }

          if (hasDeps(provider)) {
            factory =
            /**
            * @return {?}
            */
            function factory() {
              return _construct(classRef, _toConsumableArray(injectArgs(provider.deps)));
            };
          } else {
            return injectableDefOrInjectorDefFactory(classRef);
          }
        }
      }

      return factory;
    }
    /**
     * @template T
     * @param {?} factory
     * @param {?} value
     * @param {?=} multi
     * @return {?}
     */


    function makeRecord(factory, value) {
      var multi = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      return {
        factory: factory,
        value: value,
        multi: multi ? [] : undefined
      };
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isValueProvider(value) {
      return value !== null && typeof value == 'object' && USE_VALUE in value;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isExistingProvider(value) {
      return !!(value &&
      /** @type {?} */
      value.useExisting);
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isFactoryProvider(value) {
      return !!(value &&
      /** @type {?} */
      value.useFactory);
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isTypeProvider(value) {
      return typeof value === 'function';
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isClassProvider(value) {
      return !!
      /** @type {?} */
      value.useClass;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function hasDeps(value) {
      return !!
      /** @type {?} */
      value.deps;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function hasOnDestroy(value) {
      return value !== null && typeof value === 'object' && typeof
      /** @type {?} */
      value.ngOnDestroy === 'function';
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function couldBeInjectableType(value) {
      return typeof value === 'function' || typeof value === 'object' && value instanceof InjectionToken;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} providers
     * @param {?} parent
     * @param {?} name
     * @return {?}
     */


    function INJECTOR_IMPL__PRE_R3__(providers, parent, name) {
      return new StaticInjector(providers, parent, name);
    }
    /**
     * @param {?} providers
     * @param {?} parent
     * @param {?} name
     * @return {?}
     */


    function INJECTOR_IMPL__POST_R3__(providers, parent, name) {
      return createInjector({
        name: name
      }, parent, providers, name);
    }
    /** @type {?} */


    var INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;
    /**
     * Concrete injectors implement this interface.
     *
     * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
     *
     * \@usageNotes
     * ### 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
     * @abstract
     */

    var Injector = /*#__PURE__*/function () {
      function Injector() {
        _classCallCheck(this, Injector);
      }

      _createClass2(Injector, null, [{
        key: "create",

        /**
         * Create a new Injector which is configure using `StaticProvider`s.
         *
         * \@usageNotes
         * ### Example
         *
         * {\@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
         * @param {?} options
         * @param {?=} parent
         * @return {?}
         */
        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 */

    /** @nocollapse */

    Injector.ngInjectableDef = ɵɵdefineInjectable({
      token: Injector,
      providedIn:
      /** @type {?} */
      'any',
      factory:
      /**
      * @return {?}
      */
      function factory() {
        return ɵɵinject(INJECTOR);
      }
    });
    /**
     * \@internal
     * @nocollapse
     */

    Injector.__NG_ELEMENT_ID__ = -1;

    if (false) {}
    /** @type {?} */


    var IDENT =
    /**
    * @template T
    * @param {?} value
    * @return {?}
    */
    function IDENT(value) {
      return value;
    };

    var ɵ0$a = IDENT;
    /** @type {?} */

    var EMPTY =
    /** @type {?} */
    [];
    /** @type {?} */

    var CIRCULAR$1 = IDENT;
    /** @type {?} */

    var MULTI_PROVIDER_FN =
    /**
    * @return {?}
    */
    function MULTI_PROVIDER_FN() {
      return Array.prototype.slice.call(arguments);
    };

    var ɵ1$2 = MULTI_PROVIDER_FN;
    /** @enum {number} */

    var OptionFlags = {
      Optional: 1,
      CheckSelf: 2,
      CheckParent: 4,
      Default: 6
    };
    /** @type {?} */

    var NO_NEW_LINE$1 = 'ɵ';

    var StaticInjector = /*#__PURE__*/function () {
      /**
       * @param {?} providers
       * @param {?=} parent
       * @param {?=} source
       */
      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;
        /** @type {?} */

        var records = this._records = new Map();
        records.set(Injector,
        /** @type {?} */
        {
          token: Injector,
          fn: IDENT,
          deps: EMPTY,
          value: this,
          useNew: false
        });
        records.set(INJECTOR,
        /** @type {?} */
        {
          token: INJECTOR,
          fn: IDENT,
          deps: EMPTY,
          value: this,
          useNew: false
        });
        recursivelyProcessProviders(records, providers);
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @param {?=} flags
       * @return {?}
       */


      _createClass2(StaticInjector, [{
        key: "get",
        value: function get(token, notFoundValue) {
          var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : InjectFlags.Default;

          /** @type {?} */
          var record = this._records.get(token);

          try {
            return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);
          } catch (e) {
            return catchInjectorError(e, token, 'StaticInjectorError', this.source);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "toString",
        value: function toString() {
          /** @type {?} */
          var tokens =
          /** @type {?} */
          [];
          /** @type {?} */

          var records = this._records;
          records.forEach(
          /**
          * @param {?} v
          * @param {?} token
          * @return {?}
          */
          function (v, token) {
            return tokens.push(stringify(token));
          });
          return "StaticInjector[".concat(tokens.join(', '), "]");
        }
      }]);

      return StaticInjector;
    }();

    if (false) {}
    /**
     * @record
     */


    function Record$1() {}

    if (false) {}
    /**
     * @record
     */


    function DependencyRecord() {}

    if (false) {}
    /**
     * @param {?} provider
     * @return {?}
     */


    function resolveProvider(provider) {
      /** @type {?} */
      var deps = computeDeps(provider);
      /** @type {?} */

      var fn = IDENT;
      /** @type {?} */

      var value = EMPTY;
      /** @type {?} */

      var useNew = false;
      /** @type {?} */

      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 =
        /** @type {?} */
        provider.useValue;
      } else if (
      /** @type {?} */
      provider.useFactory) {
        fn =
        /** @type {?} */
        provider.useFactory;
      } else if (
      /** @type {?} */
      provider.useExisting) {// Just use IDENT
      } else if (
      /** @type {?} */
      provider.useClass) {
        useNew = true;
        fn = resolveForwardRef(
        /** @type {?} */
        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
      };
    }
    /**
     * @param {?} token
     * @return {?}
     */


    function multiProviderMixError(token) {
      return staticError('Cannot mix multi providers and regular providers', token);
    }
    /**
     * @param {?} records
     * @param {?} provider
     * @return {?}
     */


    function recursivelyProcessProviders(records, provider) {
      if (provider) {
        provider = resolveForwardRef(provider);

        if (provider instanceof Array) {
          // if we have an array recurse into the array
          for (var i = 0; i < provider.length; i++) {
            recursivelyProcessProviders(records, provider[i]);
          }
        } 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: ?, ....}

          /** @type {?} */
          var token = resolveForwardRef(provider.provide);
          /** @type {?} */

          var resolvedProvider = resolveProvider(provider);

          if (provider.multi === true) {
            // This is a multi provider.

            /** @type {?} */
            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 =
              /** @type {?} */
              {
                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 */

            });
          }
          /** @type {?} */


          var record = records.get(token);

          if (record && record.fn == MULTI_PROVIDER_FN) {
            throw multiProviderMixError(token);
          }

          records.set(token, resolvedProvider);
        } else {
          throw staticError('Unexpected provider', provider);
        }
      }
    }
    /**
     * @param {?} token
     * @param {?} record
     * @param {?} records
     * @param {?} parent
     * @param {?} notFoundValue
     * @param {?} flags
     * @return {?}
     */


    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);
        }
        /** @type {?} */


        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;
      }
    }
    /**
     * @param {?} token
     * @param {?} record
     * @param {?} records
     * @param {?} parent
     * @param {?} notFoundValue
     * @param {?} flags
     * @return {?}
     */


    function resolveToken(token, record, records, parent, notFoundValue, flags) {
      /** @type {?} */
      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;
          /** @type {?} */

          var obj = undefined;
          /** @type {?} */

          var useNew = record.useNew;
          /** @type {?} */

          var fn = record.fn;
          /** @type {?} */

          var depRecords = record.deps;
          /** @type {?} */

          var deps = EMPTY;

          if (depRecords.length) {
            deps = [];

            for (var i = 0; i < depRecords.length; i++) {
              /** @type {?} */
              var depRecord = depRecords[i];
              /** @type {?} */

              var options = depRecord.options;
              /** @type {?} */

              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(
          /** @type {?} */
          fn, _toConsumableArray(deps)) : fn.apply(obj, deps);
        }
      } else if (!(flags & InjectFlags.Self)) {
        value = parent.get(token, notFoundValue, InjectFlags.Default);
      }

      return value;
    }
    /**
     * @param {?} provider
     * @return {?}
     */


    function computeDeps(provider) {
      /** @type {?} */
      var deps = EMPTY;
      /** @type {?} */

      var providerDeps =
      /** @type {?} */
      provider.deps;

      if (providerDeps && providerDeps.length) {
        deps = [];

        for (var i = 0; i < providerDeps.length; i++) {
          /** @type {?} */
          var options = 6
          /* Default */
          ;
          /** @type {?} */

          var token = resolveForwardRef(providerDeps[i]);

          if (token instanceof Array) {
            for (var j = 0, annotations = token; j < annotations.length; j++) {
              /** @type {?} */
              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 =
                /** @type {?} */
                annotation.token;
              } else {
                token = resolveForwardRef(annotation);
              }
            }
          }

          deps.push({
            token: token,
            options: options
          });
        }
      } else if (
      /** @type {?} */
      provider.useExisting) {
        /** @type {?} */
        var _token = resolveForwardRef(
        /** @type {?} */
        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;
    }
    /**
     * @param {?} text
     * @param {?} obj
     * @return {?}
     */


    function staticError(text, obj) {
      return new Error(formatError(text, obj, 'StaticInjectorError'));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} keys
     * @return {?}
     */


    function findFirstClosedCycle(keys) {
      /** @type {?} */
      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;
    }
    /**
     * @param {?} keys
     * @return {?}
     */


    function constructResolvingPath(keys) {
      if (keys.length > 1) {
        /** @type {?} */
        var reversed = findFirstClosedCycle(keys.slice().reverse());
        /** @type {?} */

        var tokenStrs = reversed.map(
        /**
        * @param {?} k
        * @return {?}
        */
        function (k) {
          return stringify(k.token);
        });
        return ' (' + tokenStrs.join(' -> ') + ')';
      }

      return '';
    }
    /**
     * @record
     */


    function InjectionError() {}

    if (false) {}
    /**
     * @param {?} injector
     * @param {?} key
     * @param {?} constructResolvingMessage
     * @param {?=} originalError
     * @return {?}
     */


    function injectionError(injector, key, constructResolvingMessage, originalError) {
      /** @type {?} */
      var keys = [key];
      /** @type {?} */

      var errMsg = constructResolvingMessage(keys);
      /** @type {?} */

      var error =
      /** @type {?} */
      originalError ? wrappedError(errMsg, originalError) : Error(errMsg);
      error.addKey = addKey;
      error.keys = keys;
      error.injectors = [injector];
      error.constructResolvingMessage = constructResolvingMessage;

      /** @type {?} */
      error[ERROR_ORIGINAL_ERROR] = originalError;
      return error;
    }
    /**
     * @this {?}
     * @param {?} injector
     * @param {?} key
     * @return {?}
     */


    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();
     * ```
     * @param {?} injector
     * @param {?} key
     * @return {?}
     */


    function noProviderError(injector, key) {
      return injectionError(injector, key,
      /**
      * @param {?} keys
      * @return {?}
      */
      function (keys) {
        /** @type {?} */
        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.
     * @param {?} injector
     * @param {?} key
     * @return {?}
     */


    function cyclicDependencyError(injector, key) {
      return injectionError(injector, key,
      /**
      * @param {?} keys
      * @return {?}
      */
      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();
     * }
     * ```
     * @param {?} injector
     * @param {?} originalException
     * @param {?} originalStack
     * @param {?} key
     * @return {?}
     */


    function instantiationError(injector, originalException, originalStack, key) {
      return injectionError(injector, key,
      /**
      * @param {?} keys
      * @return {?}
      */
      function (keys) {
        /** @type {?} */
        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();
     * ```
     * @param {?} provider
     * @return {?}
     */


    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();
     * ```
     *
     * @param {?} typeOrFunc
     * @param {?} params
     * @return {?}
     */


    function noAnnotationError(typeOrFunc, params) {
      /** @type {?} */
      var signature = [];

      for (var i = 0, ii = params.length; i < ii; i++) {
        /** @type {?} */
        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();
     * ```
     *
     * @param {?} index
     * @return {?}
     */


    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();
     * ```
     * @param {?} provider1
     * @param {?} provider2
     * @return {?}
     */


    function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {
      return Error("Cannot mix multi providers and regular providers, got: ".concat(provider1, " ").concat(provider2));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
       * @param {?} token
       * @param {?} id
       */
      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.
       * @param {?} token
       * @return {?}
       */


      _createClass2(ReflectiveKey, null, [{
        key: "get",
        value: function get(token) {
          return _globalKeyRegistry.get(resolveForwardRef(token));
        }
        /**
         * @return {?} the number of keys registered in the system.
         */

      }, {
        key: "numberOfKeys",
        get: function get() {
          return _globalKeyRegistry.numberOfKeys;
        }
      }]);

      return ReflectiveKey;
    }();

    if (false) {}

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

        this._allKeys = new Map();
      }
      /**
       * @param {?} token
       * @return {?}
       */


      _createClass2(KeyRegistry, [{
        key: "get",
        value: function get(token) {
          if (token instanceof ReflectiveKey) return token;

          if (this._allKeys.has(token)) {
            return (
              /** @type {?} */
              this._allKeys.get(token)
            );
          }
          /** @type {?} */


          var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);

          this._allKeys.set(token, newKey);

          return newKey;
        }
        /**
         * @return {?}
         */

      }, {
        key: "numberOfKeys",
        get: function get() {
          return this._allKeys.size;
        }
      }]);

      return KeyRegistry;
    }();

    if (false) {}
    /** @type {?} */


    var _globalKeyRegistry = new KeyRegistry();
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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());
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     */

    function NormalizedProvider() {}
    /**
     * `Dependency` is used by the framework to extend DI.
     * This is internal to Angular and should not be used directly.
     */


    var ReflectiveDependency = /*#__PURE__*/function () {
      /**
       * @param {?} key
       * @param {?} optional
       * @param {?} visibility
       */
      function ReflectiveDependency(key, optional, visibility) {
        _classCallCheck(this, ReflectiveDependency);

        this.key = key;
        this.optional = optional;
        this.visibility = visibility;
      }
      /**
       * @param {?} key
       * @return {?}
       */


      _createClass2(ReflectiveDependency, null, [{
        key: "fromKey",
        value: function fromKey(key) {
          return new ReflectiveDependency(key, false, null);
        }
      }]);

      return ReflectiveDependency;
    }();

    if (false) {}
    /** @type {?} */


    var _EMPTY_LIST = [];
    /**
     * An internal resolved representation of a `Provider` used by the `Injector`.
     *
     * \@usageNotes
     * This is usually created automatically by `Injector.resolveAndCreate`.
     *
     * It can be created manually, as follows:
     *
     * ### Example
     *
     * ```typescript
     * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
     * var injector = Injector.fromResolvedProviders(resolvedProviders);
     *
     * expect(injector.get('message')).toEqual('Hello');
     * ```
     *
     * \@publicApi
     * @record
     */

    function ResolvedReflectiveProvider() {}

    if (false) {}

    var ResolvedReflectiveProvider_ =
    /**
     * @param {?} key
     * @param {?} resolvedFactories
     * @param {?} multiProvider
     */
    function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {
      _classCallCheck(this, ResolvedReflectiveProvider_);

      this.key = key;
      this.resolvedFactories = resolvedFactories;
      this.multiProvider = multiProvider;
      this.resolvedFactory = this.resolvedFactories[0];
    };

    if (false) {}
    /**
     * An internal resolved representation of a factory function created by resolving `Provider`.
     * \@publicApi
     */


    var ResolvedReflectiveFactory =
    /**
     * @param {?} factory
     * @param {?} dependencies
     */
    function ResolvedReflectiveFactory(factory, dependencies) {
      _classCallCheck(this, ResolvedReflectiveFactory);

      this.factory = factory;
      this.dependencies = dependencies;
    };

    if (false) {}
    /**
     * Resolve a single provider.
     * @param {?} provider
     * @return {?}
     */


    function resolveReflectiveFactory(provider) {
      /** @type {?} */
      var factoryFn;
      /** @type {?} */

      var resolvedDeps;

      if (provider.useClass) {
        /** @type {?} */
        var useClass = resolveForwardRef(provider.useClass);
        factoryFn = reflector.factory(useClass);
        resolvedDeps = _dependenciesFor(useClass);
      } else if (provider.useExisting) {
        factoryFn =
        /**
        * @param {?} aliasInstance
        * @return {?}
        */
        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 =
        /**
        * @return {?}
        */
        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.
     * @param {?} provider
     * @return {?}
     */


    function resolveReflectiveProvider(provider) {
      return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
    }
    /**
     * Resolve a list of Providers.
     * @param {?} providers
     * @return {?}
     */


    function resolveReflectiveProviders(providers) {
      /** @type {?} */
      var normalized = _normalizeProviders(providers, []);
      /** @type {?} */


      var resolved = normalized.map(resolveReflectiveProvider);
      /** @type {?} */

      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.
     * @param {?} providers
     * @param {?} normalizedProvidersMap
     * @return {?}
     */


    function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
      for (var i = 0; i < providers.length; i++) {
        /** @type {?} */
        var provider = providers[i];
        /** @type {?} */

        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 {
          /** @type {?} */
          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;
    }
    /**
     * @param {?} providers
     * @param {?} res
     * @return {?}
     */


    function _normalizeProviders(providers, res) {
      providers.forEach(
      /**
      * @param {?} b
      * @return {?}
      */
      function (b) {
        if (b instanceof Type) {
          res.push(
          /** @type {?} */
          {
            provide: b,
            useClass: b
          });
        } else if (b && typeof b == 'object' &&
        /** @type {?} */
        b.provide !== undefined) {
          res.push(
          /** @type {?} */
          b);
        } else if (b instanceof Array) {
          _normalizeProviders(b, res);
        } else {
          throw invalidProviderError(b);
        }
      });
      return res;
    }
    /**
     * @param {?} typeOrFunc
     * @param {?=} dependencies
     * @return {?}
     */


    function constructDependencies(typeOrFunc, dependencies) {
      if (!dependencies) {
        return _dependenciesFor(typeOrFunc);
      } else {
        /** @type {?} */
        var params = dependencies.map(
        /**
        * @param {?} t
        * @return {?}
        */
        function (t) {
          return [t];
        });
        return dependencies.map(
        /**
        * @param {?} t
        * @return {?}
        */
        function (t) {
          return _extractToken(typeOrFunc, t, params);
        });
      }
    }
    /**
     * @param {?} typeOrFunc
     * @return {?}
     */


    function _dependenciesFor(typeOrFunc) {
      /** @type {?} */
      var params = reflector.parameters(typeOrFunc);
      if (!params) return [];

      if (params.some(
      /**
      * @param {?} p
      * @return {?}
      */
      function (p) {
        return p == null;
      })) {
        throw noAnnotationError(typeOrFunc, params);
      }

      return params.map(
      /**
      * @param {?} p
      * @return {?}
      */
      function (p) {
        return _extractToken(typeOrFunc, p, params);
      });
    }
    /**
     * @param {?} typeOrFunc
     * @param {?} metadata
     * @param {?} params
     * @return {?}
     */


    function _extractToken(typeOrFunc, metadata, params) {
      /** @type {?} */
      var token = null;
      /** @type {?} */

      var optional = false;

      if (!Array.isArray(metadata)) {
        if (metadata instanceof Inject) {
          return _createDependency(metadata.token, optional, null);
        } else {
          return _createDependency(metadata, optional, null);
        }
      }
      /** @type {?} */


      var visibility = null;

      for (var i = 0; i < metadata.length; ++i) {
        /** @type {?} */
        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);
      }
    }
    /**
     * @param {?} token
     * @param {?} optional
     * @param {?} visibility
     * @return {?}
     */


    function _createDependency(token, optional, visibility) {
      return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // Threshold for the dynamic version

    /** @type {?} */


    var UNDEFINED = new Object();
    /**
     * 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
     * @abstract
     */

    var ReflectiveInjector = /*#__PURE__*/function () {
      function ReflectiveInjector() {
        _classCallCheck(this, ReflectiveInjector);
      }

      _createClass2(ReflectiveInjector, null, [{
        key: "resolve",

        /**
         * 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 {
         * }
         *  /
         * 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");
         * });
         * ```
         *
         * @param {?} providers
         * @return {?}
         */
        value: 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 {
         * }
         *  /
         * class Car {
         *   constructor(public engine:Engine) {}
         * }
         *
         * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
         * expect(injector.get(Car) instanceof Car).toBe(true);
         * ```
         * @param {?} providers
         * @param {?=} parent
         * @return {?}
         */

      }, {
        key: "resolveAndCreate",
        value: function resolveAndCreate(providers, parent) {
          /** @type {?} */
          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 {
         * }
         *  /
         * 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);
         * ```
         * @param {?} providers
         * @param {?=} parent
         * @return {?}
         */

      }, {
        key: "fromResolvedProviders",
        value: function fromResolvedProviders(providers, parent) {
          return new ReflectiveInjector_(providers, parent);
        }
      }]);

      return ReflectiveInjector;
    }();

    if (false) {}

    var ReflectiveInjector_ = /*#__PURE__*/function () {
      /**
       * Private
       * @param {?} _providers
       * @param {?=} _parent
       */
      function ReflectiveInjector_(_providers, _parent) {
        _classCallCheck(this, ReflectiveInjector_);

        /**
         * \@internal
         */
        this._constructionCounter = 0;
        this._providers = _providers;
        this.parent = _parent || null;
        /** @type {?} */

        var len = _providers.length;
        this.keyIds = new Array(len);
        this.objs = new Array(len);

        for (var i = 0; i < len; i++) {
          this.keyIds[i] = _providers[i].key.id;
          this.objs[i] = UNDEFINED;
        }
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @return {?}
       */


      _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);
        }
        /**
         * @param {?} providers
         * @return {?}
         */

      }, {
        key: "resolveAndCreateChild",
        value: function resolveAndCreateChild(providers) {
          /** @type {?} */
          var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
          return this.createChildFromResolved(ResolvedReflectiveProviders);
        }
        /**
         * @param {?} providers
         * @return {?}
         */

      }, {
        key: "createChildFromResolved",
        value: function createChildFromResolved(providers) {
          /** @type {?} */
          var inj = new ReflectiveInjector_(providers);

          /** @type {?} */
          inj.parent = this;
          return inj;
        }
        /**
         * @param {?} provider
         * @return {?}
         */

      }, {
        key: "resolveAndInstantiate",
        value: function resolveAndInstantiate(provider) {
          return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);
        }
        /**
         * @param {?} provider
         * @return {?}
         */

      }, {
        key: "instantiateResolved",
        value: function instantiateResolved(provider) {
          return this._instantiateProvider(provider);
        }
        /**
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "getProviderAtIndex",
        value: function getProviderAtIndex(index) {
          if (index < 0 || index >= this._providers.length) {
            throw outOfBoundsError(index);
          }

          return this._providers[index];
        }
        /**
         * \@internal
         * @param {?} provider
         * @return {?}
         */

      }, {
        key: "_new",
        value: function _new(provider) {
          if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
            throw cyclicDependencyError(this, provider.key);
          }

          return this._instantiateProvider(provider);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_getMaxNumberOfObjects",
        value: function _getMaxNumberOfObjects() {
          return this.objs.length;
        }
        /**
         * @private
         * @param {?} provider
         * @return {?}
         */

      }, {
        key: "_instantiateProvider",
        value: function _instantiateProvider(provider) {
          if (provider.multiProvider) {
            /** @type {?} */
            var res = new Array(provider.resolvedFactories.length);

            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]);
          }
        }
        /**
         * @private
         * @param {?} provider
         * @param {?} ResolvedReflectiveFactory
         * @return {?}
         */

      }, {
        key: "_instantiate",
        value: function _instantiate(provider, ResolvedReflectiveFactory) {
          var _this315 = this;

          /** @type {?} */
          var factory = ResolvedReflectiveFactory.factory;
          /** @type {?} */

          var deps;

          try {
            deps = ResolvedReflectiveFactory.dependencies.map(
            /**
            * @param {?} dep
            * @return {?}
            */
            function (dep) {
              return _this315._getByReflectiveDependency(dep);
            });
          } catch (e) {
            if (e.addKey) {
              e.addKey(this, provider.key);
            }

            throw e;
          }
          /** @type {?} */


          var obj;

          try {
            obj = factory.apply(void 0, _toConsumableArray(deps));
          } catch (e) {
            throw instantiationError(this, e, e.stack, provider.key);
          }

          return obj;
        }
        /**
         * @private
         * @param {?} dep
         * @return {?}
         */

      }, {
        key: "_getByReflectiveDependency",
        value: function _getByReflectiveDependency(dep) {
          return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);
        }
        /**
         * @private
         * @param {?} key
         * @param {?} visibility
         * @param {?} notFoundValue
         * @return {?}
         */

      }, {
        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);
          }
        }
        /**
         * @private
         * @param {?} keyId
         * @return {?}
         */

      }, {
        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
         * @param {?} key
         * @param {?} notFoundValue
         * @return {?}
         */

      }, {
        key: "_throwOrNull",
        value: function _throwOrNull(key, notFoundValue) {
          if (notFoundValue !== THROW_IF_NOT_FOUND) {
            return notFoundValue;
          } else {
            throw noProviderError(this, key);
          }
        }
        /**
         * \@internal
         * @param {?} key
         * @param {?} notFoundValue
         * @return {?}
         */

      }, {
        key: "_getByKeySelf",
        value: function _getByKeySelf(key, notFoundValue) {
          /** @type {?} */
          var obj = this._getObjByKeyId(key.id);

          return obj !== UNDEFINED ? obj : this._throwOrNull(key, notFoundValue);
        }
        /**
         * \@internal
         * @param {?} key
         * @param {?} notFoundValue
         * @param {?} visibility
         * @return {?}
         */

      }, {
        key: "_getByKeyDefault",
        value: function _getByKeyDefault(key, notFoundValue, visibility) {
          /** @type {?} */
          var inj;

          if (visibility instanceof SkipSelf) {
            inj = this.parent;
          } else {
            inj = this;
          }

          while (inj instanceof ReflectiveInjector_) {
            /** @type {?} */
            var inj_ =
            /** @type {?} */
            inj;
            /** @type {?} */

            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);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "toString",

        /**
         * @return {?}
         */
        value: function toString() {
          return this.displayName;
        }
      }, {
        key: "displayName",
        get: function get() {
          /** @type {?} */
          var providers = _mapProviders(this,
          /**
          * @param {?} b
          * @return {?}
          */
          function (b) {
            return ' "' + b.key.displayName + '" ';
          }).join(', ');

          return "ReflectiveInjector(providers: [".concat(providers, "])");
        }
      }]);

      return ReflectiveInjector_;
    }();

    ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);

    if (false) {}
    /**
     * @param {?} injector
     * @param {?} fn
     * @return {?}
     */


    function _mapProviders(injector, fn) {
      /** @type {?} */
      var res = new Array(injector._providers.length);

      for (var i = 0; i < injector._providers.length; ++i) {
        res[i] = fn(injector.getProviderAtIndex(i));
      }

      return res;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @type {?}
     */


    var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');
    /**
     * Type of the `Attribute` decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function AttributeDecorator$1() {}
    /**
     * Type of the Attribute metadata.
     *
     * \@publicApi
     * @record
     */


    function Attribute$1() {}

    if (false) {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * Base class for query metadata.
     *
     * @see `ContentChildren`.
     * @see `ContentChild`.
     * @see `ViewChildren`.
     * @see `ViewChild`.
     *
     * \@publicApi
     * @abstract
     */


    var Query = function Query() {
      _classCallCheck(this, Query);
    };
    /**
     * Type of the ContentChildren decorator / constructor function.
     *
     * @see `ContentChildren`.
     * \@publicApi
     * @record
     */


    function ContentChildrenDecorator() {}

    var ɵ0$b =
    /**
    * @param {?=} selector
    * @param {?=} data
    * @return {?}
    */
    function ɵ0$b(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
     * @type {?}
     */


    var ContentChildren = makePropDecorator('ContentChildren', ɵ0$b, Query);
    /**
     * Type of the ContentChild decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function ContentChildDecorator() {}

    var ɵ1$3 =
    /**
    * @param {?=} selector
    * @param {?=} data
    * @return {?}
    */
    function ɵ1$3(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
     * @type {?}
     */


    var ContentChild = makePropDecorator('ContentChild', ɵ1$3, Query);
    /**
     * Type of the ViewChildren decorator / constructor function.
     *
     * @see `ViewChildren`.
     *
     * \@publicApi
     * @record
     */

    function ViewChildrenDecorator() {}

    var ɵ2 =
    /**
    * @param {?=} selector
    * @param {?=} data
    * @return {?}
    */
    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
     * @type {?}
     */


    var ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);
    /**
     * Type of the ViewChild decorator / constructor function.
     *
     * @see `ViewChild`.
     * \@publicApi
     * @record
     */

    function ViewChildDecorator() {}

    var ɵ3 =
    /**
    * @param {?} selector
    * @param {?} data
    * @return {?}
    */
    function ɵ3(selector, data) {
      return Object.assign({
        selector: selector,
        first: true,
        isViewQuery: true,
        descendants: true
      }, data);
    };
    /**
     * ViewChild decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var ViewChild = makePropDecorator('ViewChild', ɵ3, Query);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.
     * @return {?}
     */

    function resolveComponentResources(resourceResolver) {
      // Store all promises which are fetching the resources.

      /** @type {?} */
      var componentResolved = []; // Cache so that we don't fetch the same resource more than once.

      /** @type {?} */

      var urlMap = new Map();
      /**
       * @param {?} url
       * @return {?}
       */

      function cachedResourceResolve(url) {
        /** @type {?} */
        var promise = urlMap.get(url);

        if (!promise) {
          /** @type {?} */
          var resp = resourceResolver(url);
          urlMap.set(url, promise = resp.then(unwrapResponse));
        }

        return promise;
      }

      componentResourceResolutionQueue.forEach(
      /**
      * @param {?} component
      * @param {?} type
      * @return {?}
      */
      function (component, type) {
        /** @type {?} */
        var promises = [];

        if (component.templateUrl) {
          promises.push(cachedResourceResolve(component.templateUrl).then(
          /**
          * @param {?} template
          * @return {?}
          */
          function (template) {
            component.template = template;
          }));
        }
        /** @type {?} */


        var styleUrls = component.styleUrls;
        /** @type {?} */

        var styles = component.styles || (component.styles = []);
        /** @type {?} */

        var styleOffset = component.styles.length;
        styleUrls && styleUrls.forEach(
        /**
        * @param {?} styleUrl
        * @param {?} index
        * @return {?}
        */
        function (styleUrl, index) {
          styles.push(''); // pre-allocate array.

          promises.push(cachedResourceResolve(styleUrl).then(
          /**
          * @param {?} style
          * @return {?}
          */
          function (style) {
            styles[styleOffset + index] = style;
            styleUrls.splice(styleUrls.indexOf(styleUrl), 1);

            if (styleUrls.length == 0) {
              component.styleUrls = undefined;
            }
          }));
        });
        /** @type {?} */

        var fullyResolved = Promise.all(promises).then(
        /**
        * @return {?}
        */
        function () {
          return componentDefResolved(type);
        });
        componentResolved.push(fullyResolved);
      });
      clearResolutionOfComponentResourcesQueue();
      return Promise.all(componentResolved).then(
      /**
      * @return {?}
      */
      function () {
        return undefined;
      });
    }
    /** @type {?} */


    var componentResourceResolutionQueue = new Map(); // Track when existing ngComponentDef for a Type is waiting on resources.

    /** @type {?} */

    var componentDefPendingResolution = new Set();
    /**
     * @param {?} type
     * @param {?} metadata
     * @return {?}
     */

    function maybeQueueResolutionOfComponentResources(type, metadata) {
      if (componentNeedsResolution(metadata)) {
        componentResourceResolutionQueue.set(type, metadata);
        componentDefPendingResolution.add(type);
      }
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function isComponentDefPendingResolution(type) {
      return componentDefPendingResolution.has(type);
    }
    /**
     * @param {?} component
     * @return {?}
     */


    function componentNeedsResolution(component) {
      return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length);
    }
    /**
     * @return {?}
     */


    function clearResolutionOfComponentResourcesQueue() {
      /** @type {?} */
      var old = componentResourceResolutionQueue;
      componentResourceResolutionQueue = new Map();
      return old;
    }
    /**
     * @param {?} queue
     * @return {?}
     */


    function restoreComponentResolutionQueue(queue) {
      componentDefPendingResolution.clear();
      queue.forEach(
      /**
      * @param {?} _
      * @param {?} type
      * @return {?}
      */
      function (_, type) {
        return componentDefPendingResolution.add(type);
      });
      componentResourceResolutionQueue = queue;
    }
    /**
     * @return {?}
     */


    function isComponentResourceResolutionQueueEmpty() {
      return componentResourceResolutionQueue.size === 0;
    }
    /**
     * @param {?} response
     * @return {?}
     */


    function unwrapResponse(response) {
      return typeof response == 'string' ? response : response.text();
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function componentDefResolved(type) {
      componentDefPendingResolution["delete"](type);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Allocates the necessary amount of slots for host vars.
     *
     * \@codeGenApi
     * @param {?} count Amount of vars to be allocated
     *
     * @return {?}
     */


    function ɵɵallocHostVars(count) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      if (!tView.firstTemplatePass) return;
      queueHostBindingForCheck(tView,
      /** @type {?} */
      getCurrentDirectiveDef(), count);
      prefillHostVars(tView, lView, count);
    }
    /**
     * Stores host binding fn and number of host vars so it will be queued for binding refresh during
     * CD.
     * @param {?} tView
     * @param {?} def
     * @param {?} hostVars
     * @return {?}
     */


    function queueHostBindingForCheck(tView, def, hostVars) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');
      /** @type {?} */

      var expando =
      /** @type {?} */
      tView.expandoInstructions;
      /** @type {?} */

      var length = expando.length; // Check whether a given `hostBindings` function already exists in expandoInstructions,
      // which can happen in case directive definition was extended from base definition (as a part of
      // the `InheritDefinitionFeature` logic). If we found the same `hostBindings` function in the
      // list, we just increase the number of host vars associated with that function, but do not add it
      // into the list again.

      if (length >= 2 && expando[length - 2] === def.hostBindings) {
        expando[length - 1] =
        /** @type {?} */
        expando[length - 1] + hostVars;
      } else {
        expando.push(
        /** @type {?} */
        def.hostBindings, hostVars);
      }
    }
    /**
     * On the first template pass, we need to reserve space for host binding values
     * after directives are matched (so all directives are saved, then bindings).
     * Because we are updating the blueprint, we only need to do this once.
     * @param {?} tView
     * @param {?} lView
     * @param {?} totalHostVars
     * @return {?}
     */


    function prefillHostVars(tView, lView, totalHostVars) {
      ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');

      for (var i = 0; i < totalHostVars; i++) {
        lView.push(NO_CHANGE);
        tView.blueprint.push(NO_CHANGE);
        tView.data.push(null);
      }
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 Inc. All Rights Reserved.
     *
     * Use 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 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 Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */
    // JS has NaN !== NaN


    function looseIdentical(a, b) {
      return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
    }

    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 looseIdentical(a, b);
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    function devModeEqual$1(a, b) {
      /** @type {?} */
      var isListLikeIterableA = isListLikeIterable$1(a);
      /** @type {?} */

      var isListLikeIterableB = isListLikeIterable$1(b);

      if (isListLikeIterableA && isListLikeIterableB) {
        return areIterablesEqual$1(a, b, devModeEqual$1);
      } else {
        /** @type {?} */
        var isAObject = a && (typeof a === 'object' || typeof a === 'function');
        /** @type {?} */

        var isBObject = b && (typeof b === 'object' || typeof b === 'function');

        if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
          return true;
        } else {
          return looseIdentical(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
     */


    var WrappedValue = /*#__PURE__*/function () {
      /**
       * @param {?} value
       */
      function WrappedValue(value) {
        _classCallCheck(this, WrappedValue);

        this.wrapped = value;
      }
      /**
       * Creates a wrapped value.
       * @param {?} value
       * @return {?}
       */


      _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.
         *
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "unwrap",
        value: function unwrap(value) {
          return WrappedValue.isWrapped(value) ? value.wrapped : value;
        }
        /**
         * Returns true if `value` is a wrapped value.
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "isWrapped",
        value: function isWrapped(value) {
          return value instanceof WrappedValue;
        }
      }]);

      return WrappedValue;
    }();

    if (false) {}
    /**
     * @param {?} obj
     * @return {?}
     */


    function isListLikeIterable$1(obj) {
      if (!isJsObject$1(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
    }
    /**
     * @param {?} a
     * @param {?} b
     * @param {?} comparator
     * @return {?}
     */


    function areIterablesEqual$1(a, b, comparator) {
      /** @type {?} */
      var iterator1 = a[getSymbolIterator()]();
      /** @type {?} */

      var iterator2 = b[getSymbolIterator()]();

      while (true) {
        /** @type {?} */
        var item1 = iterator1.next();
        /** @type {?} */

        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;
      }
    }
    /**
     * @param {?} obj
     * @param {?} fn
     * @return {?}
     */


    function iterateListLike$1(obj, fn) {
      if (Array.isArray(obj)) {
        for (var i = 0; i < obj.length; i++) {
          fn(obj[i]);
        }
      } else {
        /** @type {?} */
        var iterator = obj[getSymbolIterator()]();
        /** @type {?} */

        var item;

        while (!(item = iterator.next()).done) {
          fn(item.value);
        }
      }
    }
    /**
     * @param {?} o
     * @return {?}
     */


    function isJsObject$1(o) {
      return o !== null && (typeof o === 'function' || typeof o === 'object');
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // TODO(misko): consider inlining

    /**
     * Updates binding and returns the value.
     * @param {?} lView
     * @param {?} bindingIndex
     * @param {?} value
     * @return {?}
     */


    function updateBinding(lView, bindingIndex, value) {
      return lView[bindingIndex] = value;
    }
    /**
     * Gets the current binding value.
     * @param {?} lView
     * @param {?} bindingIndex
     * @return {?}
     */


    function getBinding(lView, bindingIndex) {
      ngDevMode && assertDataInRange(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.
     * @param {?} lView
     * @param {?} bindingIndex
     * @param {?} value
     * @return {?}
     */


    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");
      /** @type {?} */

      var oldValue = lView[bindingIndex];

      if (isDifferent(oldValue, value)) {
        if (ngDevMode && getCheckNoChangesMode()) {
          // View engine didn't report undefined values as changed on the first checkNoChanges pass
          // (before the change detection was run).

          /** @type {?} */
          var oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;

          if (!devModeEqual$1(oldValueToCompare, value)) {
            throwErrorIfNoChangesMode(oldValue === NO_CHANGE, oldValueToCompare, value);
          }
        }

        lView[bindingIndex] = value;
        return true;
      }

      return false;
    }
    /**
     * Updates 2 bindings if changed, then returns whether either was updated.
     * @param {?} lView
     * @param {?} bindingIndex
     * @param {?} exp1
     * @param {?} exp2
     * @return {?}
     */


    function bindingUpdated2(lView, bindingIndex, exp1, exp2) {
      /** @type {?} */
      var different = bindingUpdated(lView, bindingIndex, exp1);
      return bindingUpdated(lView, bindingIndex + 1, exp2) || different;
    }
    /**
     * Updates 3 bindings if changed, then returns whether any was updated.
     * @param {?} lView
     * @param {?} bindingIndex
     * @param {?} exp1
     * @param {?} exp2
     * @param {?} exp3
     * @return {?}
     */


    function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {
      /** @type {?} */
      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.
     * @param {?} lView
     * @param {?} bindingIndex
     * @param {?} exp1
     * @param {?} exp2
     * @param {?} exp3
     * @param {?} exp4
     * @return {?}
     */


    function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {
      /** @type {?} */
      var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);
      return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     *
     * \@codeGenApi
     * @template T
     * @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.
     * @return {?} This function returns itself so that it may be chained
     * (e.g. `property('name', ctx.name)('title', ctx.title)`)
     *
     */


    function ɵɵproperty(propName, value, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var bindReconciledValue = bind(lView, value);

      if (bindReconciledValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, bindReconciledValue, sanitizer);
      }

      return ɵɵproperty;
    }
    /**
     * Creates a single value binding.
     *
     * @template T
     * @param {?} lView Current view
     * @param {?} value Value to diff
     * @return {?}
     */


    function bind(lView, value) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX]++;
      storeBindingMetadata(lView);
      return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Updates the value of or removes a bound attribute on an Element.
     *
     * Used in the case of `[attr.title]="value"`
     *
     * \@codeGenApi
     * @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.
     *
     * @return {?}
     */


    function ɵɵattribute(name, value, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var bound = bind(lView, value);

      if (bound !== NO_CHANGE) {
        elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);
      }

      return ɵɵattribute;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @param {?} lView
     * @param {?} values
     * @return {?}
     */


    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');
      /** @type {?} */

      var isBindingUpdated = false;
      /** @type {?} */

      var tData = lView[TVIEW].data;
      /** @type {?} */

      var bindingIndex = lView[BINDING_INDEX];

      if (tData[bindingIndex] == null) {
        // 2 is the index of the first static interstitial value (ie. not prefix)
        for (var i = 2; i < values.length; i += 2) {
          tData[bindingIndex++] = values[i];
        }

        bindingIndex = lView[BINDING_INDEX];
      }

      for (var _i16 = 1; _i16 < values.length; _i16 += 2) {
        // Check if bindings (odd indexes) have changed
        isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[_i16]) || isBindingUpdated;
      }

      lView[BINDING_INDEX] = bindingIndex;
      storeBindingMetadata(lView, values[0], values[values.length - 1]);

      if (!isBindingUpdated) {
        return NO_CHANGE;
      } // Build the updated content

      /** @type {?} */


      var content = values[0];

      for (var _i17 = 1; _i17 < values.length; _i17 += 2) {
        content += renderStringify(values[_i17]) + values[_i17 + 1];
      }

      return content;
    }
    /**
     * Creates an interpolation binding with 1 expression.
     *
     * @param {?} lView
     * @param {?} prefix static value used for concatenation only.
     * @param {?} v0 value checked for change.
     * @param {?} suffix static value used for concatenation only.
     * @return {?}
     */


    function interpolation1(lView, prefix, v0, suffix) {
      /** @type {?} */
      var different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);
      storeBindingMetadata(lView, prefix, suffix);
      return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;
    }
    /**
     * Creates an interpolation binding with 2 expressions.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} suffix
     * @return {?}
     */


    function interpolation2(lView, prefix, v0, i0, v1, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated2(lView, bindingIndex, v0, v1);
      lView[BINDING_INDEX] += 2; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        lView[TVIEW].data[bindingIndex] = i0;
      }

      return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;
    }
    /**
     * Creates an interpolation binding with 3 expressions.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} suffix
     * @return {?}
     */


    function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);
      lView[BINDING_INDEX] += 3; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
      }

      return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE;
    }
    /**
     * Create an interpolation binding with 4 expressions.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} suffix
     * @return {?}
     */


    function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
      lView[BINDING_INDEX] += 4; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
        tData[bindingIndex + 2] = i2;
      }

      return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE;
    }
    /**
     * Creates an interpolation binding with 5 expressions.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} suffix
     * @return {?}
     */


    function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
      different = bindingUpdated(lView, bindingIndex + 4, v4) || different;
      lView[BINDING_INDEX] += 5; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
        tData[bindingIndex + 2] = i2;
        tData[bindingIndex + 3] = i3;
      }

      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.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4
     * @param {?} v5
     * @param {?} suffix
     * @return {?}
     */


    function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
      different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;
      lView[BINDING_INDEX] += 6; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
        tData[bindingIndex + 2] = i2;
        tData[bindingIndex + 3] = i3;
        tData[bindingIndex + 4] = i4;
      }

      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.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4
     * @param {?} v5
     * @param {?} i5
     * @param {?} v6
     * @param {?} suffix
     * @return {?}
     */


    function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
      different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;
      lView[BINDING_INDEX] += 7; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
        tData[bindingIndex + 2] = i2;
        tData[bindingIndex + 3] = i3;
        tData[bindingIndex + 4] = i4;
        tData[bindingIndex + 5] = i5;
      }

      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.
     * @param {?} lView
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4
     * @param {?} v5
     * @param {?} i5
     * @param {?} v6
     * @param {?} i6
     * @param {?} v7
     * @param {?} suffix
     * @return {?}
     */


    function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
      /** @type {?} */
      var bindingIndex = lView[BINDING_INDEX];
      /** @type {?} */

      var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);
      different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;
      lView[BINDING_INDEX] += 8; // Only set static strings the first time (data will be null subsequent runs).

      /** @type {?} */

      var data = storeBindingMetadata(lView, prefix, suffix);

      if (data) {
        /** @type {?} */
        var tData = lView[TVIEW].data;
        tData[bindingIndex] = i0;
        tData[bindingIndex + 1] = i1;
        tData[bindingIndex + 2] = i2;
        tData[bindingIndex + 3] = i3;
        tData[bindingIndex + 4] = i4;
        tData[bindingIndex + 5] = i5;
        tData[bindingIndex + 6] = i6;
      }

      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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation1(lView, prefix, v0, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      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');
     * ```
     *
     * \@codeGenApi
     * @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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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) {
        elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);
      }

      return ɵɵattributeInterpolate8;
    }
    /**
     * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.
     *
     * Used when the number of interpolated values exceeds 7.
     *
     * ```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']);
     * ```
     *
     * \@codeGenApi
     * @param {?} attrName The name of the attribute to update.
     * @param {?} values The a 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
     * @param {?=} namespace
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolationV(lView, values);

      if (interpolated !== NO_CHANGE) {
        elementAttributeInternal(index, attrName, interpolated, lView, sanitizer, namespace);
      }

      return ɵɵattributeInterpolateV;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Synchronously perform change detection on a component (and possibly its sub-components).
     *
     * This function triggers change detection in a synchronous way on a component. There should
     * be very little reason to call this function directly since a preferred way to do change
     * detection is to {\@link markDirty} the component and wait for the scheduler to call this method
     * at some future point in time. This is because a single user action often results in many
     * components being invalidated and calling change detection on each component synchronously
     * would be inefficient. It is better to wait until all components are marked as dirty and
     * then perform single change detection across all of the components
     *
     * @template T
     * @param {?} component The component which the change detection should be performed on.
     * @return {?}
     */


    function detectChanges(component) {
      /** @type {?} */
      var view = getComponentViewByInstance(component);
      detectChangesInternal(view, component);
    }
    /**
     * Mark the component as dirty (needing change detection).
     *
     * Marking a component dirty will schedule a change detection on this
     * component at some point in the future. Marking an already dirty
     * component as dirty is a noop. Only one outstanding change detection
     * can be scheduled per component tree. (Two components bootstrapped with
     * separate `renderComponent` will have separate schedulers)
     *
     * When the root component is bootstrapped with `renderComponent`, a scheduler
     * can be provided.
     *
     * \@publicApi
     * @template T
     * @param {?} component Component to mark as dirty.
     *
     * @return {?}
     */


    function markDirty(component) {
      ngDevMode && assertDefined(component, 'component');
      /** @type {?} */

      var rootView =
      /** @type {?} */
      markViewDirty(getComponentViewByInstance(component));
      ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');
      scheduleTick(
      /** @type {?} */
      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.
     * @template T
     * @param {?} component
     * @return {?}
     */


    function tick(component) {
      /** @type {?} */
      var rootView = getRootView(component);
      /** @type {?} */

      var rootContext =
      /** @type {?} */
      rootView[CONTEXT];
      tickRootContext(rootContext);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Creates an LContainer for inline views, e.g.
     *
     * % if (showing) {
     *   <div></div>
     * % }
     *
     * \@codeGenApi
     * @param {?} index The index of the container in the data array
     *
     * @return {?}
     */


    function ɵɵcontainer(index) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tNode = containerInternal(lView, index, null, null);

      if (lView[TVIEW].firstTemplatePass) {
        tNode.tViews = [];
      }

      setIsNotParent();
    }
    /**
     * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
     *
     * <ng-template #foo>
     *    <div></div>
     * </ng-template>
     *
     * \@codeGenApi
     * @param {?} index The index of the container in the data array
     * @param {?} templateFn Inline template
     * @param {?} consts 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 {?=} attrs The attrs attached to the container, if applicable
     * @param {?=} localRefs A set of local reference bindings on the element.
     * @param {?=} localRefExtractor A function which extracts local-refs values from the template.
     *        Defaults to the current element associated with the local-ref.
     *
     * @return {?}
     */


    function ɵɵtemplate(index, templateFn, consts, vars, tagName, attrs, localRefs, localRefExtractor) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW]; // TODO: consider a separate node type for templates

      /** @type {?} */

      var tContainerNode = containerInternal(lView, index, tagName || null, attrs || null);

      if (tView.firstTemplatePass) {
        ngDevMode && ngDevMode.firstTemplatePass++;
        resolveDirectives(tView, lView, tContainerNode, localRefs || null);
        /** @type {?} */

        var embeddedTView = tContainerNode.tViews = createTView(-1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);

        if (tView.queries !== null) {
          tView.queries.template(tView, tContainerNode);
          embeddedTView.queries = tView.queries.embeddedTView(tContainerNode);
        }
      }

      createDirectivesAndLocals(tView, lView, tContainerNode, localRefExtractor);
      attachPatchData(getNativeByTNode(tContainerNode, lView), lView);
      registerPostOrderHooks(tView, tContainerNode);
      setIsNotParent();
    }
    /**
     * Sets a container up to receive views.
     *
     * \@codeGenApi
     * @param {?} index The index of the container in the data array
     *
     * @return {?}
     */


    function ɵɵcontainerRefreshStart(index) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var previousOrParentTNode =
      /** @type {?} */
      loadInternal(tView.data, index);
      ngDevMode && assertNodeType(previousOrParentTNode, 0
      /* Container */
      );
      setPreviousOrParentTNode(previousOrParentTNode, true);
      lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0; // We need to execute init hooks here so ngOnInit hooks are called in top level views
      // before they are called in embedded views (for backwards compatibility).

      executePreOrderHooks(lView, tView, getCheckNoChangesMode(), undefined);
    }
    /**
     * Marks the end of the LContainer.
     *
     * Marking the end of LContainer is the time when to child views get inserted or removed.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵcontainerRefreshEnd() {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();

      if (getIsParent()) {
        setIsNotParent();
      } else {
        ngDevMode && assertNodeType(previousOrParentTNode, 2
        /* View */
        );
        ngDevMode && assertHasParent(previousOrParentTNode);
        previousOrParentTNode =
        /** @type {?} */
        previousOrParentTNode.parent;
        setPreviousOrParentTNode(previousOrParentTNode, false);
      }

      ngDevMode && assertNodeType(previousOrParentTNode, 0
      /* Container */
      );
      /** @type {?} */

      var lContainer = getLView()[previousOrParentTNode.index];
      /** @type {?} */

      var nextIndex = lContainer[ACTIVE_INDEX]; // remove extra views at the end of the container

      while (nextIndex < lContainer.length - CONTAINER_HEADER_OFFSET) {
        removeView(lContainer, nextIndex);
      }
    }
    /**
     * @param {?} lView
     * @param {?} nodeIndex
     * @param {?} tagName
     * @param {?} attrs
     * @return {?}
     */


    function containerInternal(lView, nodeIndex, tagName, attrs) {
      ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'container nodes should be created before any bindings');
      /** @type {?} */

      var adjustedIndex = nodeIndex + HEADER_OFFSET;
      ngDevMode && assertDataInRange(lView, nodeIndex + HEADER_OFFSET);
      ngDevMode && ngDevMode.rendererCreateComment++;
      /** @type {?} */

      var comment = lView[adjustedIndex] = lView[RENDERER].createComment(ngDevMode ? 'container' : '');
      /** @type {?} */

      var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], nodeIndex, 0
      /* Container */
      , tagName, attrs);
      /** @type {?} */

      var lContainer = lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode);
      appendChild(comment, tNode, lView); // Containers are added to the current view tree instead of their embedded views
      // because views can be removed and re-inserted.

      addToViewTree(lView, lContainer);
      ngDevMode && assertNodeType(getPreviousOrParentTNode(), 0
      /* Container */
      );
      return tNode;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Store a value in the `data` at a given `index`.
     * @template T
     * @param {?} index
     * @param {?} value
     * @return {?}
     */


    function store(index, value) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW]; // 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

      /** @type {?} */

      var adjustedIndex = index + HEADER_OFFSET;

      if (adjustedIndex >= tView.data.length) {
        tView.data[adjustedIndex] = null;
        tView.blueprint[adjustedIndex] = null;
      }

      lView[adjustedIndex] = 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.
     *
     * \@codeGenApi
     * @template T
     * @param {?} index The index of the local ref in contextViewData.
     *
     * @return {?}
     */


    function ɵɵreference(index) {
      /** @type {?} */
      var contextLView = getContextLView();
      return loadInternal(contextLView, index);
    }
    /**
     * Retrieves a value from current `viewData`.
     *
     * \@codeGenApi
     * @template T
     * @param {?} index
     * @return {?}
     */


    function ɵɵload(index) {
      return loadInternal(getLView(), index);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @template T
     * @param {?} token
     * @param {?=} flags
     * @return {?}
     */


    function ɵɵdirectiveInject(token) {
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : InjectFlags.Default;
      token = resolveForwardRef(token);
      /** @type {?} */

      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) return ɵɵinject(token, flags);
      return getOrCreateInjectable(
      /** @type {?} */
      getPreviousOrParentTNode(), lView, token, flags);
    }
    /**
     * Facade for the attribute injection from DI.
     *
     * \@codeGenApi
     * @param {?} attrNameToInject
     * @return {?}
     */


    function ɵɵinjectAttribute(attrNameToInject) {
      return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * --------
     *
     * This file contains the core logic for how styling instructions are processed in Angular.
     *
     * To learn more about the algorithm see `TStylingContext`.
     *
     * --------
     */

    /**
     * Temporary function to bridge styling functionality between this new
     * refactor (which is here inside of `styling_next/`) and the old
     * implementation (which lives inside of `styling/`).
     *
     * This function is executed during the creation block of an element.
     * Because the existing styling implementation issues a call to the
     * `styling()` instruction, this instruction will also get run. The
     * central idea here is that the directive index values are bound
     * into the context. The directive index is temporary and is only
     * required until the `select(n)` instruction is fully functional.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵstyling() {
      /** @type {?} */
      var tView = getLView()[TVIEW];

      if (tView.firstTemplatePass) {
        updateLastDirectiveIndex$1(getPreviousOrParentTNode(), getActiveDirectiveStylingIndex());
      }
    }
    /**
     * Sets the current style sanitizer function which will then be used
     * within all follow-up prop and map-based style binding instructions
     * for the given element.
     *
     * Note that once styling has been applied to the element (i.e. once
     * `select(n)` is executed or the hostBindings/template function exits)
     * then the active `sanitizerFn` will be set to `null`. This means that
     * once styling is applied to another element then a another call to
     * `styleSanitizer` will need to be made.
     *
     * \@codeGenApi
     * @param {?} sanitizer
     * @return {?}
     */


    function ɵɵstyleSanitizer(sanitizer) {
      setCurrentStyleSanitizer(sanitizer);
    }
    /**
     * 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`.
     *
     * \@codeGenApi
     * @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 when a suffix is provided then the underlying sanitizer will
     *        be ignored.
     *
     * Note that this will apply the provided style value to the host element if this function is called
     * within a host binding.
     *
     * @return {?}
     */


    function ɵɵstyleProp(prop, value, suffix) {
      stylePropInternal(getSelectedIndex(), prop, value, suffix);
    }
    /**
     * @param {?} elementIndex
     * @param {?} prop
     * @param {?} value
     * @param {?=} suffix
     * @return {?}
     */


    function stylePropInternal(elementIndex, prop, value, suffix) {
      /** @type {?} */
      var lView = getLView(); // if a value is interpolated then it may render a `NO_CHANGE` value.
      // in this case we do not need to do anything, but the binding index
      // still needs to be incremented because all styling binding values
      // are stored inside of the lView.

      /** @type {?} */

      var bindingIndex = lView[BINDING_INDEX]++;
      /** @type {?} */

      var updated = _stylingProp(elementIndex, bindingIndex, prop, resolveStylePropValue(value, suffix), false, deferStylingUpdate());

      if (ngDevMode) {
        ngDevMode.styleProp++;

        if (updated) {
          ngDevMode.stylePropCacheMiss++;
        }
      }
    }
    /**
     * 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.
     *
     * \@codeGenApi
     * @param {?} className
     * @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.
     *
     * @return {?}
     */


    function ɵɵclassProp(className, value) {
      /** @type {?} */
      var lView = getLView(); // if a value is interpolated then it may render a `NO_CHANGE` value.
      // in this case we do not need to do anything, but the binding index
      // still needs to be incremented because all styling binding values
      // are stored inside of the lView.

      /** @type {?} */

      var bindingIndex = lView[BINDING_INDEX]++;
      /** @type {?} */

      var updated = _stylingProp(getSelectedIndex(), bindingIndex, className, value, true, deferStylingUpdate());

      if (ngDevMode) {
        ngDevMode.classProp++;

        if (updated) {
          ngDevMode.classPropCacheMiss++;
        }
      }
    }
    /**
     * Shared function used to update a prop-based styling binding for an element.
     * @param {?} elementIndex
     * @param {?} bindingIndex
     * @param {?} prop
     * @param {?} value
     * @param {?} isClassBased
     * @param {?} defer
     * @return {?}
     */


    function _stylingProp(elementIndex, bindingIndex, prop, value, isClassBased, defer) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tNode = getTNode(elementIndex, lView);
      /** @type {?} */

      var _native16 =
      /** @type {?} */
      getNativeByTNode(tNode, lView);
      /** @type {?} */


      var updated = false;

      if (value !== NO_CHANGE) {
        if (isClassBased) {
          updated = updateClassBinding(getClassesContext(tNode), lView, _native16, prop, bindingIndex,
          /** @type {?} */
          value, defer, false);
        } else {
          /** @type {?} */
          var sanitizer = getCurrentStyleSanitizer();
          updated = updateStyleBinding(getStylesContext(tNode), lView, _native16, prop, bindingIndex,
          /** @type {?} */
          value, sanitizer, defer, false);
        }
      }

      return updated;
    }
    /**
     * 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.
     *
     * \@codeGenApi
     * @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.
     *
     * @return {?}
     */


    function ɵɵstyleMap(styles) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var tNode = getTNode(index, lView);
      /** @type {?} */

      var context = getStylesContext(tNode);
      /** @type {?} */

      var directiveIndex = getActiveDirectiveStylingIndex(); // if a value is interpolated then it may render a `NO_CHANGE` value.
      // in this case we do not need to do anything, but the binding index
      // still needs to be incremented because all styling binding values
      // are stored inside of the lView.

      /** @type {?} */

      var bindingIndex = lView[BINDING_INDEX]++; // inputs are only evaluated from a template binding into a directive, therefore,
      // there should not be a situation where a directive host bindings function
      // evaluates the inputs (this should only happen in the template function)

      if (!directiveIndex && hasStyleInput(tNode) && styles !== NO_CHANGE) {
        updateDirectiveInputValue(context, lView, tNode, bindingIndex, styles, false);
        styles = NO_CHANGE;
      }
      /** @type {?} */


      var updated = _stylingMap(index, context, bindingIndex, styles, false, deferStylingUpdate());

      if (ngDevMode) {
        ngDevMode.styleMap++;

        if (updated) {
          ngDevMode.styleMapCacheMiss++;
        }
      }
    }
    /**
     * 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.
     *
     * \@codeGenApi
     * @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.
     *
     * @return {?}
     */


    function ɵɵclassMap(classes) {
      classMapInternal(getSelectedIndex(), classes);
    }
    /**
     * @param {?} elementIndex
     * @param {?} classes
     * @return {?}
     */


    function classMapInternal(elementIndex, classes) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tNode = getTNode(elementIndex, lView);
      /** @type {?} */

      var context = getClassesContext(tNode);
      /** @type {?} */

      var directiveIndex = getActiveDirectiveStylingIndex(); // if a value is interpolated then it may render a `NO_CHANGE` value.
      // in this case we do not need to do anything, but the binding index
      // still needs to be incremented because all styling binding values
      // are stored inside of the lView.

      /** @type {?} */

      var bindingIndex = lView[BINDING_INDEX]++; // inputs are only evaluated from a template binding into a directive, therefore,
      // there should not be a situation where a directive host bindings function
      // evaluates the inputs (this should only happen in the template function)

      if (!directiveIndex && hasClassInput(tNode) && classes !== NO_CHANGE) {
        updateDirectiveInputValue(context, lView, tNode, bindingIndex, classes, true);
        classes = NO_CHANGE;
      }
      /** @type {?} */


      var updated = _stylingMap(elementIndex, context, bindingIndex, classes, true, deferStylingUpdate());

      if (ngDevMode) {
        ngDevMode.classMap++;

        if (updated) {
          ngDevMode.classMapCacheMiss++;
        }
      }
    }
    /**
     * Shared function used to update a map-based styling binding for an element.
     *
     * When this function is called it will activate support for `[style]` and
     * `[class]` bindings in Angular.
     * @param {?} elementIndex
     * @param {?} context
     * @param {?} bindingIndex
     * @param {?} value
     * @param {?} isClassBased
     * @param {?} defer
     * @return {?}
     */


    function _stylingMap(elementIndex, context, bindingIndex, value, isClassBased, defer) {
      activateStylingMapFeature();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var valueHasChanged = false;

      if (value !== NO_CHANGE) {
        /** @type {?} */
        var tNode = getTNode(elementIndex, lView);
        /** @type {?} */

        var _native17 =
        /** @type {?} */
        getNativeByTNode(tNode, lView);
        /** @type {?} */


        var oldValue = lView[bindingIndex];
        valueHasChanged = hasValueChanged(oldValue, value);
        /** @type {?} */

        var stylingMapArr = normalizeIntoStylingMap(oldValue, value, !isClassBased);

        if (isClassBased) {
          updateClassBinding(context, lView, _native17, null, bindingIndex, stylingMapArr, defer, valueHasChanged);
        } else {
          /** @type {?} */
          var sanitizer = getCurrentStyleSanitizer();
          updateStyleBinding(context, lView, _native17, null, bindingIndex, stylingMapArr, sanitizer, defer, valueHasChanged);
        }
      }

      return valueHasChanged;
    }
    /**
     * Writes a value to a directive's `style` or `class` input binding (if it has changed).
     *
     * If a directive has a `\@Input` binding that is set on `style` or `class` then that value
     * will take priority over the underlying style/class styling bindings. This value will
     * be updated for the binding each time during change detection.
     *
     * When this occurs this function will attempt to write the value to the input binding
     * depending on the following situations:
     *
     * - If `oldValue !== newValue`
     * - If `newValue` is `null` (but this is skipped if it is during the first update pass--
     *    which is when the context is not locked yet)
     * @param {?} context
     * @param {?} lView
     * @param {?} tNode
     * @param {?} bindingIndex
     * @param {?} newValue
     * @param {?} isClassBased
     * @return {?}
     */


    function updateDirectiveInputValue(context, lView, tNode, bindingIndex, newValue, isClassBased) {
      /** @type {?} */
      var oldValue = lView[bindingIndex];

      if (oldValue !== newValue) {
        // even if the value has changed we may not want to emit it to the
        // directive input(s) in the event that it is falsy during the
        // first update pass.
        if (newValue || isContextLocked(context)) {
          /** @type {?} */
          var inputs =
          /** @type {?} */

          /** @type {?} */
          tNode.inputs[isClassBased ? 'class' : 'style'];
          /** @type {?} */

          var initialValue = getInitialStylingValue(context);
          /** @type {?} */

          var value = normalizeStylingDirectiveInputValue(initialValue, newValue, isClassBased);
          setInputsForProperty(lView, inputs, value);
        }

        lView[bindingIndex] = newValue;
      }
    }
    /**
     * Returns the appropriate directive input value for `style` or `class`.
     *
     * Earlier versions of Angular expect a binding value to be passed into directive code
     * exactly as it is unless there is a static value present (in which case both values
     * will be stringified and concatenated).
     * @param {?} initialValue
     * @param {?} bindingValue
     * @param {?} isClassBased
     * @return {?}
     */


    function normalizeStylingDirectiveInputValue(initialValue, bindingValue, isClassBased) {
      /** @type {?} */
      var value = bindingValue; // we only concat values if there is an initial value, otherwise we return the value as is.
      // Note that this is to satisfy backwards-compatibility in Angular.

      if (initialValue.length > 0) {
        if (isClassBased) {
          value = concatString(initialValue, forceClassesAsString(bindingValue));
        } else {
          value = concatString(initialValue, forceStylesAsString(
          /** @type {?} */
          bindingValue), ';');
        }
      }

      return value;
    }
    /**
     * Flushes all styling code to the element.
     *
     * This function is designed to be called from the template and hostBindings
     * functions and may be called multiple times depending whether multiple
     * sources of styling exist. If called multiple times, only the last call
     * to `stlyingApply()` will render styling to the element.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵstylingApply() {
      /** @type {?} */
      var elementIndex = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var tNode = getTNode(elementIndex, lView);
      /** @type {?} */

      var renderer = getRenderer(tNode, lView);
      /** @type {?} */

      var _native18 =
      /** @type {?} */
      getNativeByTNode(tNode, lView);
      /** @type {?} */


      var directiveIndex = getActiveDirectiveStylingIndex();
      /** @type {?} */

      var sanitizer = getCurrentStyleSanitizer();
      flushStyling(renderer, lView, getClassesContext(tNode), getStylesContext(tNode), _native18, directiveIndex, sanitizer);
      setCurrentStyleSanitizer(null);
    }
    /**
     * @param {?} tNode
     * @param {?} lView
     * @return {?}
     */


    function getRenderer(tNode, lView) {
      return tNode.type === 3
      /* Element */
      ? lView[RENDERER] : null;
    }
    /**
     * Searches and assigns provided all static style/class entries (found in the `attrs` value)
     * and registers them in their respective styling contexts.
     * @param {?} tNode
     * @param {?} attrs
     * @param {?} startIndex
     * @return {?}
     */


    function registerInitialStylingOnTNode(tNode, attrs, startIndex) {
      /** @type {?} */
      var hasAdditionalInitialStyling = false;
      /** @type {?} */

      var styles = getStylingMapArray(tNode.styles);
      /** @type {?} */

      var classes = getStylingMapArray(tNode.classes);
      /** @type {?} */

      var mode = -1;

      for (var i = startIndex; i < attrs.length; i++) {
        /** @type {?} */
        var attr =
        /** @type {?} */
        attrs[i];

        if (typeof attr == 'number') {
          mode = attr;
        } else if (mode == 1
        /* Classes */
        ) {
            classes = classes || [''];
            addItemToStylingMap(classes, attr, true);
            hasAdditionalInitialStyling = true;
          } else if (mode == 2
        /* Styles */
        ) {
            /** @type {?} */
            var value =
            /** @type {?} */
            attrs[++i];
            styles = styles || [''];
            addItemToStylingMap(styles, attr, value);
            hasAdditionalInitialStyling = true;
          }
      }

      if (classes && classes.length > 1
      /* ValuesStartPosition */
      ) {
          if (!tNode.classes) {
            tNode.classes = classes;
          }

          updateRawValueOnContext(tNode.classes, stylingMapToString(classes, true));
        }

      if (styles && styles.length > 1
      /* ValuesStartPosition */
      ) {
          if (!tNode.styles) {
            tNode.styles = styles;
          }

          updateRawValueOnContext(tNode.styles, stylingMapToString(styles, false));
        }

      return hasAdditionalInitialStyling;
    }
    /**
     * @param {?} context
     * @param {?} value
     * @return {?}
     */


    function updateRawValueOnContext(context, value) {
      /** @type {?} */
      var stylingMapArr =
      /** @type {?} */
      getStylingMapArray(context);
      stylingMapArr[0
      /* RawValuePosition */
      ] = value;
    }
    /**
     * @return {?}
     */


    function getActiveDirectiveStylingIndex() {
      // whenever a directive's hostBindings function is called a uniqueId value
      // is assigned. Normally this is enough to help distinguish one directive
      // from another for the styling context, but there are situations where a
      // sub-class directive could inherit and assign styling in concert with a
      // parent directive. To help the styling code distinguish between a parent
      // sub-classed directive the inheritance depth is taken into account as well.
      return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();
    }
    /**
     * Temporary function that will update the max directive index value in
     * both the classes and styles contexts present on the provided `tNode`.
     *
     * This code is only used because the `select(n)` code functionality is not
     * yet 100% functional. The `select(n)` instruction cannot yet evaluate host
     * bindings function code in sync with the associated template function code.
     * For this reason the styling algorithm needs to track the last directive index
     * value so that it knows exactly when to render styling to the element since
     * `stylingApply()` is called multiple times per CD (`stylingApply` will be
     * removed once `select(n)` is fixed).
     * @param {?} tNode
     * @param {?} directiveIndex
     * @return {?}
     */


    function updateLastDirectiveIndex$1(tNode, directiveIndex) {
      updateLastDirectiveIndex(getClassesContext(tNode), directiveIndex);
      updateLastDirectiveIndex(getStylesContext(tNode), directiveIndex);
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function getStylesContext(tNode) {
      return getContext(tNode, false);
    }
    /**
     * @param {?} tNode
     * @return {?}
     */


    function getClassesContext(tNode) {
      return getContext(tNode, true);
    }
    /**
     * Returns/instantiates a styling context from/to a `tNode` instance.
     * @param {?} tNode
     * @param {?} isClassBased
     * @return {?}
     */


    function getContext(tNode, isClassBased) {
      /** @type {?} */
      var context = isClassBased ? tNode.classes : tNode.styles;

      if (!isStylingContext(context)) {
        context = allocTStylingContext(context);

        if (ngDevMode) {
          attachStylingDebugObject(
          /** @type {?} */
          context);
        }

        if (isClassBased) {
          tNode.classes = context;
        } else {
          tNode.styles = context;
        }
      }

      return (
        /** @type {?} */
        context
      );
    }
    /**
     * @param {?} value
     * @param {?} suffix
     * @return {?}
     */


    function resolveStylePropValue(value, suffix) {
      if (value === NO_CHANGE) return value;
      /** @type {?} */

      var resolvedValue = null;

      if (value !== null) {
        if (suffix) {
          // when a suffix is applied then it will bypass
          // sanitization entirely (b/c a new string is created)
          resolvedValue = renderStringify(value) + suffix;
        } else {
          // sanitization happens by dealing with a String value
          // this means that the string value will be passed through
          // into the style rendering later (which is where the value
          // will be sanitized before it is applied)
          resolvedValue =
          /** @type {?} */

          /** @type {?} */
          value;
        }
      }

      return resolvedValue;
    }
    /**
     * Whether or not a style/class binding update should be applied later.
     *
     * This function will decide whether a binding should be applied immediately
     * or later (just before the styles/classes are flushed to the element). The
     * reason why this feature exists is because of super/sub directive inheritance.
     * Angular will evaluate host bindings on the super directive first and the sub
     * directive, but the styling bindings on the sub directive are of higher priority
     * than the super directive. For this reason all styling bindings that take place
     * in this circumstance will need to be deferred until later so that they can be
     * applied together and in a different order (the algorithm handles that part).
     * @return {?}
     */


    function deferStylingUpdate() {
      return getActiveDirectiveSuperClassHeight() > 0;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Create DOM element. The instruction must later be followed by `elementEnd()` call.
     *
     * \@codeGenApi
     * @param {?} index Index of the element in the LView array
     * @param {?} name Name of the DOM Node
     * @param {?=} attrs Statically bound set of attributes, classes, and styles to be written into the DOM
     *              element on creation. Use [AttributeMarker] to denote the meaning of this array.
     * @param {?=} localRefs A set of local reference bindings on the element.
     *
     * 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']
     *
     * @return {?}
     */


    function ɵɵelementStart(index, name, attrs, localRefs) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      ngDevMode && assertEqual(lView[BINDING_INDEX], tView.bindingStartIndex, 'elements should be created before any bindings ');
      ngDevMode && ngDevMode.rendererCreateElement++;
      ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
      /** @type {?} */

      var _native19 = lView[index + HEADER_OFFSET] = elementCreate(name);
      /** @type {?} */


      var renderer = lView[RENDERER];
      /** @type {?} */

      var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 3
      /* Element */
      , name, attrs || null);

      if (attrs != null) {
        /** @type {?} */
        var lastAttrIndex = setUpAttributes(_native19, attrs);

        if (tView.firstTemplatePass) {
          registerInitialStylingOnTNode(tNode, attrs, lastAttrIndex);
        }
      }

      renderInitialStyling(renderer, _native19, tNode);
      appendChild(_native19, tNode, lView); // 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(_native19, lView);
      }

      increaseElementDepthCount(); // if a directive contains a host binding for "class" then all class-based data will
      // flow through that (except for `[class.prop]` bindings). This also includes initial
      // static class values as well. (Note that this will be fixed once map-based `[style]`
      // and `[class]` bindings work for multiple directives.)

      if (tView.firstTemplatePass) {
        ngDevMode && ngDevMode.firstTemplatePass++;
        resolveDirectives(tView, lView, tNode, localRefs || null);
        /** @type {?} */

        var inputData = initializeTNodeInputs(tNode);

        if (inputData && inputData.hasOwnProperty('class')) {
          tNode.flags |= 8
          /* hasClassInput */
          ;
        }

        if (inputData && inputData.hasOwnProperty('style')) {
          tNode.flags |= 16
          /* hasStyleInput */
          ;
        }

        if (tView.queries !== null) {
          tView.queries.elementStart(tView, tNode);
        }
      }

      createDirectivesAndLocals(tView, lView, tNode);
      executeContentQueries(tView, tNode, lView);
    }
    /**
     * Mark the end of the element.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵelementEnd() {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();
      ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');

      if (getIsParent()) {
        setIsNotParent();
      } else {
        ngDevMode && assertHasParent(getPreviousOrParentTNode());
        previousOrParentTNode =
        /** @type {?} */
        previousOrParentTNode.parent;
        setPreviousOrParentTNode(previousOrParentTNode, false);
      }
      /** @type {?} */


      var tNode = previousOrParentTNode;
      ngDevMode && assertNodeType(tNode, 3
      /* Element */
      );
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      registerPostOrderHooks(tView, previousOrParentTNode);
      decreaseElementDepthCount();

      if (tView.firstTemplatePass && tView.queries !== null && isContentQueryHost(previousOrParentTNode)) {
        /** @type {?} */
        tView.queries.elementEnd(previousOrParentTNode);
      }

      if (hasClassInput(tNode) && tNode.classes) {
        setDirectiveStylingInput(tNode.classes, lView,
        /** @type {?} */
        tNode.inputs['class']);
      }

      if (hasStyleInput(tNode) && tNode.styles) {
        setDirectiveStylingInput(tNode.styles, lView,
        /** @type {?} */
        tNode.inputs['style']);
      }
    }
    /**
     * Creates an empty element using {\@link elementStart} and {\@link elementEnd}
     *
     * \@codeGenApi
     * @param {?} index Index of the element in the data array
     * @param {?} name Name of the DOM Node
     * @param {?=} attrs Statically bound set of attributes, classes, and styles to be written into the DOM
     *              element on creation. Use [AttributeMarker] to denote the meaning of this array.
     * @param {?=} localRefs A set of local reference bindings on the element.
     *
     * @return {?}
     */


    function ɵɵelement(index, name, attrs, localRefs) {
      ɵɵelementStart(index, name, attrs, localRefs);
      ɵɵelementEnd();
    }
    /**
     * Assign static attribute values to a host element.
     *
     * This instruction will assign static attribute values as well as class and style
     * values to an element within the host bindings function. Since attribute values
     * can consist of different types of values, the `attrs` array must include the values in
     * the following format:
     *
     * attrs = [
     *   // static attributes (like `title`, `name`, `id`...)
     *   attr1, value1, attr2, value,
     *
     *   // a single namespace value (like `x:id`)
     *   NAMESPACE_MARKER, namespaceUri1, name1, value1,
     *
     *   // another single namespace value (like `x:name`)
     *   NAMESPACE_MARKER, namespaceUri2, name2, value2,
     *
     *   // a series of CSS classes that will be applied to the element (no spaces)
     *   CLASSES_MARKER, class1, class2, class3,
     *
     *   // a series of CSS styles (property + value) that will be applied to the element
     *   STYLES_MARKER, prop1, value1, prop2, value2
     * ]
     *
     * All non-class and non-style attributes must be defined at the start of the list
     * first before all class and style values are set. When there is a change in value
     * type (like when classes and styles are introduced) a marker must be used to separate
     * the entries. The marker values themselves are set via entries found in the
     * [AttributeMarker] enum.
     *
     * NOTE: This instruction is meant to used from `hostBindings` function only.
     *
     * \@codeGenApi
     * @param {?} attrs An array of static values (attributes, classes and styles) with the correct marker
     * values.
     *
     * @return {?}
     */


    function ɵɵelementHostAttrs(attrs) {
      /** @type {?} */
      var hostElementIndex = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var tNode = getTNode(hostElementIndex, lView); // non-element nodes (e.g. `<ng-container>`) are not rendered as actual
      // element nodes and adding styles/classes on to them will cause runtime
      // errors...

      if (tNode.type === 3
      /* Element */
      ) {
          /** @type {?} */
          var _native20 =
          /** @type {?} */
          getNativeByTNode(tNode, lView);
          /** @type {?} */


          var lastAttrIndex = setUpAttributes(_native20, attrs);

          if (tView.firstTemplatePass) {
            /** @type {?} */
            var stylingNeedsToBeRendered = registerInitialStylingOnTNode(tNode, attrs, lastAttrIndex); // this is only called during the first template pass in the
            // event that this current directive assigned initial style/class
            // host attribute values to the element. Because initial styling
            // values are applied before directives are first rendered (within
            // `createElement`) this means that initial styling for any directives
            // still needs to be applied. Note that this will only happen during
            // the first template pass and not each time a directive applies its
            // attribute values to the element.

            if (stylingNeedsToBeRendered) {
              /** @type {?} */
              var renderer = lView[RENDERER];
              renderInitialStyling(renderer, _native20, tNode);
            }
          }
        }
    }
    /**
     * @param {?} context
     * @param {?} lView
     * @param {?} stylingInputs
     * @return {?}
     */


    function setDirectiveStylingInput(context, lView, stylingInputs) {
      // older versions of Angular treat the input as `null` in the
      // event that the value does not exist at all. For this reason
      // we can't have a styling value be an empty string.

      /** @type {?} */
      var value = getInitialStylingValue(context) || null; // Ivy does an extra `[class]` write with a falsy value since the value
      // is applied during creation mode. This is a deviation from VE and should
      // be (Jira Issue = FW-1467).

      setInputsForProperty(lView, stylingInputs, value);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * \@codeGenApi
     * @param {?} index Index of the element in the LView array
     * @param {?=} attrs Set of attributes to be used when matching directives.
     * @param {?=} localRefs A set of local reference bindings on the element.
     *
     * 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.
     *
     * @return {?}
     */


    function ɵɵelementContainerStart(index, attrs, localRefs) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var renderer = lView[RENDERER];
      /** @type {?} */

      var tagName = 'ng-container';
      ngDevMode && assertEqual(lView[BINDING_INDEX], tView.bindingStartIndex, 'element containers should be created before any bindings');
      ngDevMode && ngDevMode.rendererCreateComment++;
      ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
      /** @type {?} */

      var _native21 = lView[index + HEADER_OFFSET] = renderer.createComment(ngDevMode ? tagName : '');

      ngDevMode && assertDataInRange(lView, index - 1);
      /** @type {?} */

      var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 4
      /* ElementContainer */
      , tagName, attrs || null);

      if (attrs && tView.firstTemplatePass) {
        // While ng-container doesn't necessarily support styling, we use the style context to identify
        // and execute directives on the ng-container.
        registerInitialStylingOnTNode(tNode,
        /** @type {?} */
        attrs, 0);
      }

      appendChild(_native21, tNode, lView);

      if (tView.firstTemplatePass) {
        ngDevMode && ngDevMode.firstTemplatePass++;
        resolveDirectives(tView, lView, tNode, localRefs || null);

        if (tView.queries) {
          tView.queries.elementStart(tView, tNode);
        }
      }

      createDirectivesAndLocals(tView, lView, tNode);
      attachPatchData(_native21, lView);
      executeContentQueries(tView, tNode, lView);
    }
    /**
     * Mark the end of the <ng-container>.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵelementContainerEnd() {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];

      if (getIsParent()) {
        setIsNotParent();
      } else {
        ngDevMode && assertHasParent(previousOrParentTNode);
        previousOrParentTNode =
        /** @type {?} */
        previousOrParentTNode.parent;
        setPreviousOrParentTNode(previousOrParentTNode, false);
      }

      ngDevMode && assertNodeType(previousOrParentTNode, 4
      /* ElementContainer */
      );
      registerPostOrderHooks(tView, previousOrParentTNode);

      if (tView.firstTemplatePass && tView.queries !== null && isContentQueryHost(previousOrParentTNode)) {
        tView.queries.elementEnd(previousOrParentTNode);
      }
    }
    /**
     * Creates an empty logical container using {\@link elementContainerStart}
     * and {\@link elementContainerEnd}
     *
     * \@codeGenApi
     * @param {?} index Index of the element in the LView array
     * @param {?=} attrs Set of attributes to be used when matching directives.
     * @param {?=} localRefs A set of local reference bindings on the element.
     *
     * @return {?}
     */


    function ɵɵelementContainer(index, attrs, localRefs) {
      ɵɵelementContainerStart(index, attrs, localRefs);
      ɵɵelementContainerEnd();
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Marks the start of an embedded view.
     *
     * \@codeGenApi
     * @param {?} viewBlockId The ID of this view
     * @param {?} consts
     * @param {?} vars
     * @return {?} boolean Whether or not this view is in creation mode
     *
     */


    function ɵɵembeddedViewStart(viewBlockId, consts, vars) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var previousOrParentTNode = getPreviousOrParentTNode(); // The previous node can be a view node if we are processing an inline for loop

      /** @type {?} */

      var containerTNode = previousOrParentTNode.type === 2
      /* View */
      ?
      /** @type {?} */
      previousOrParentTNode.parent : previousOrParentTNode;
      /** @type {?} */

      var lContainer =
      /** @type {?} */
      lView[containerTNode.index];
      ngDevMode && assertNodeType(containerTNode, 0
      /* Container */
      );
      /** @type {?} */

      var viewToRender = scanForView(lContainer,
      /** @type {?} */
      lContainer[ACTIVE_INDEX], viewBlockId);

      if (viewToRender) {
        setIsParent();
        enterView(viewToRender, viewToRender[TVIEW].node);
      } else {
        // When we create a new LView, we always reset the state of the instructions.
        viewToRender = createLView(lView, getOrCreateEmbeddedTView(viewBlockId, consts, vars,
        /** @type {?} */
        containerTNode), null, 16
        /* CheckAlways */
        , null, null);
        /** @type {?} */

        var tParentNode = getIsParent() ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;
        assignTViewNodeToLView(viewToRender[TVIEW], tParentNode, viewBlockId, viewToRender);
        enterView(viewToRender, viewToRender[TVIEW].node);
      }

      if (lContainer) {
        if (isCreationMode(viewToRender)) {
          // it is a new view, insert it into collection of views for a given container
          insertView(viewToRender, lContainer,
          /** @type {?} */
          lContainer[ACTIVE_INDEX]);
        }

        /** @type {?} */lContainer[ACTIVE_INDEX]++;
      }

      return isCreationMode(viewToRender) ? 1
      /* Create */
      | 2
      /* Update */
      : 2
      /* Update */
      ;
    }
    /**
     * Initialize the TView (e.g. static data) for the active embedded view.
     *
     * Each embedded view block must create or retrieve its own TView. Otherwise, the embedded view's
     * static data for a particular node would overwrite the static data for a node in the view above
     * it with the same index (since it's in the same template).
     *
     * @param {?} viewIndex The index of the TView in TNode.tViews
     * @param {?} consts The number of nodes, local refs, and pipes in this template
     * @param {?} vars The number of bindings and pure function bindings in this template
     * @param {?} parent
     * @return {?} TView
     */


    function getOrCreateEmbeddedTView(viewIndex, consts, vars, parent) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      ngDevMode && assertNodeType(parent, 0
      /* Container */
      );
      /** @type {?} */

      var containerTViews =
      /** @type {?} */
      parent.tViews;
      ngDevMode && assertDefined(containerTViews, 'TView expected');
      ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');

      if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {
        containerTViews[viewIndex] = createTView(viewIndex, null, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);
      }

      return containerTViews[viewIndex];
    }
    /**
     * Looks for a view with a given view block id inside a provided LContainer.
     * Removes views that need to be deleted in the process.
     *
     * @param {?} lContainer to search for views
     * @param {?} startIdx starting index in the views array to search from
     * @param {?} viewBlockId exact view block id to look for
     * @return {?}
     */


    function scanForView(lContainer, startIdx, viewBlockId) {
      for (var i = startIdx + CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
        /** @type {?} */
        var viewAtPositionId = lContainer[i][TVIEW].id;

        if (viewAtPositionId === viewBlockId) {
          return lContainer[i];
        } else if (viewAtPositionId < viewBlockId) {
          // found a view that should not be at this position - remove
          removeView(lContainer, i - CONTAINER_HEADER_OFFSET);
        } else {
          // found a view with id greater than the one we are searching for
          // which means that required view doesn't exist and can't be found at
          // later positions in the views array - stop the searchdef.cont here
          break;
        }
      }

      return null;
    }
    /**
     * Marks the end of an embedded view.
     *
     * \@codeGenApi
     * @return {?}
     */


    function ɵɵembeddedViewEnd() {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var viewHost = lView[T_HOST];

      if (isCreationMode(lView)) {
        refreshDescendantViews(lView); // creation mode pass

        lView[FLAGS] &= ~4
        /* CreationMode */
        ;
      }

      resetPreOrderHookFlags(lView);
      refreshDescendantViews(lView); // update mode pass
      // update mode pass

      /** @type {?} */

      var lContainer =
      /** @type {?} */
      lView[PARENT];
      ngDevMode && assertLContainerOrUndefined(lContainer); // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block
      // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to
      // an error being thrown.

      leaveView(
      /** @type {?} */
      lContainer[PARENT],
      /* safeToRunHooks */
      true);
      setPreviousOrParentTNode(
      /** @type {?} */
      viewHost, false);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @return {?}
     */


    function ɵɵgetCurrentView() {
      return (
        /** @type {?} */

        /** @type {?} */
        getLView()
      );
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
     */


    function isObservable(obj) {
      // TODO: use isObservable once we update pass rxjs 6.1
      // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03
      return !!obj && typeof obj.subscribe === 'function';
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * \@codeGenApi
     * @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
     *
     * @return {?}
     */


    function ɵɵlistener(eventName, listenerFn) {
      var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var eventTargetResolver = arguments.length > 3 ? arguments[3] : undefined;
      listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);
    }
    /**
     * Registers a synthetic host listener (e.g. `(\@foo.start)`) on a component.
     *
     * 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.
     *
     * \@codeGenApi
     * @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
     *
     * @return {?}
     */


    function ɵɵcomponentHostSyntheticListener(eventName, listenerFn) {
      var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var eventTargetResolver = arguments.length > 3 ? arguments[3] : undefined;
      listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);
    }
    /**
     * 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.
     * @param {?} lView
     * @param {?} eventName
     * @param {?} tNodeIdx
     * @return {?}
     */


    function findExistingListener(lView, eventName, tNodeIdx) {
      /** @type {?} */
      var tView = lView[TVIEW];
      /** @type {?} */

      var tCleanup = tView.cleanup;

      if (tCleanup != null) {
        for (var i = 0; i < tCleanup.length - 1; i += 2) {
          /** @type {?} */
          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.

            /** @type {?} */
            var lCleanup =
            /** @type {?} */
            lView[CLEANUP];
            /** @type {?} */

            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;
    }
    /**
     * @param {?} eventName
     * @param {?} listenerFn
     * @param {?=} useCapture
     * @param {?=} eventTargetResolver
     * @param {?=} loadRendererFn
     * @return {?}
     */


    function listenerInternal(eventName, listenerFn) {
      var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var eventTargetResolver = arguments.length > 3 ? arguments[3] : undefined;
      var loadRendererFn = arguments.length > 4 ? arguments[4] : undefined;

      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tNode = getPreviousOrParentTNode();
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var firstTemplatePass = tView.firstTemplatePass;
      /** @type {?} */

      var tCleanup = firstTemplatePass && (tView.cleanup || (tView.cleanup = []));
      ngDevMode && assertNodeOfPossibleTypes(tNode, 3
      /* Element */
      , 0
      /* Container */
      , 4
      /* ElementContainer */
      );
      /** @type {?} */

      var processOutputs = true; // add native event listener - applicable to elements only

      if (tNode.type === 3
      /* Element */
      ) {
          /** @type {?} */
          var _native22 =
          /** @type {?} */
          getNativeByTNode(tNode, lView);
          /** @type {?} */


          var resolved = eventTargetResolver ? eventTargetResolver(_native22) :
          /** @type {?} */
          EMPTY_OBJ;
          /** @type {?} */

          var target = resolved.target || _native22;
          /** @type {?} */

          var renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];
          /** @type {?} */

          var lCleanup = getCleanup(lView);
          /** @type {?} */

          var lCleanupIndex = lCleanup.length;
          /** @type {?} */

          var idxOrTargetGetter = eventTargetResolver ?
          /**
          * @param {?} _lView
          * @return {?}
          */
          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.

            /** @type {?} */
            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 && hasDirectives(tNode)) {
              existingListener = findExistingListener(lView, eventName, tNode.index);
            }

            if (existingListener !== null) {
              // Attach a new listener at the head of the coalesced listeners list.

              /** @type {?} */
              listenerFn.__ngNextListenerFn__ =
              /** @type {?} */
              existingListener.__ngNextListenerFn__;

              /** @type {?} */
              existingListener.__ngNextListenerFn__ = 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 */
              );
              /** @type {?} */

              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);
          }
        } // subscribe to directive outputs


      if (tNode.outputs === undefined) {
        // if we create TNode here, inputs must be undefined so we know they still need to be
        // checked
        tNode.outputs = generatePropertyAliases(tNode, 1
        /* Output */
        );
      }
      /** @type {?} */


      var outputs = tNode.outputs;
      /** @type {?} */

      var props;

      if (processOutputs && outputs && (props = outputs[eventName])) {
        /** @type {?} */
        var propsLength = props.length;

        if (propsLength) {
          /** @type {?} */
          var _lCleanup = getCleanup(lView);

          for (var i = 0; i < propsLength; i += 3) {
            /** @type {?} */
            var index =
            /** @type {?} */
            props[i];
            ngDevMode && assertDataInRange(lView, index);
            /** @type {?} */

            var minifiedName = props[i + 2];
            /** @type {?} */

            var directiveInstance = lView[index];
            /** @type {?} */

            var output = directiveInstance[minifiedName];

            if (ngDevMode && !isObservable(output)) {
              throw new Error("@Output ".concat(minifiedName, " not initialized in '").concat(directiveInstance.constructor.name, "'."));
            }
            /** @type {?} */


            var subscription = output.subscribe(listenerFn);
            /** @type {?} */

            var idx = _lCleanup.length;

            _lCleanup.push(listenerFn, subscription);

            tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));
          }
        }
      }
    }
    /**
     * @param {?} lView
     * @param {?} listenerFn
     * @param {?} e
     * @return {?}
     */


    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)
     * @return {?}
     */


    function wrapListener(tNode, lView, listenerFn, wrapWithPreventDefault) {
      // Note: we are performing most of the work in the listener function itself
      // to optimize listener registration.
      return (
        /**
        * @param {?} e
        * @return {?}
        */
        function wrapListenerIn_markDirtyAndPreventDefault(e) {
          // 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).

          /** @type {?} */
          var startView = tNode.flags & 1
          /* isComponent */
          ? getComponentViewByIndex(tNode.index, lView) : lView; // See interfaces/view.ts for more on LViewFlags.ManualOnPush

          if ((lView[FLAGS] & 32
          /* ManualOnPush */
          ) === 0) {
            markViewDirty(startView);
          }
          /** @type {?} */


          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.

          /** @type {?} */

          var nextListenerFn =
          /** @type {?} */
          wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;

          while (nextListenerFn) {
            // We should prevent default if any of the listeners explicitly return false
            result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;
            nextListenerFn =
            /** @type {?} */
            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;
        }
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * \@codeGenApi
     * @template T
     * @param {?=} level The relative level of the view from which to grab context compared to contextVewData
     * @return {?} context
     *
     */


    function ɵɵnextContext() {
      var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
      return nextContextImpl(level);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @param {?} tNode
     * @param {?} projectionSlots
     * @return {?}
     */


    function matchingProjectionSlotIndex(tNode, projectionSlots) {
      /** @type {?} */
      var wildcardNgContentIndex = null;
      /** @type {?} */

      var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);

      for (var i = 0; i < projectionSlots.length; i++) {
        /** @type {?} */
        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).
     *
     * \@codeGenApi
     * @param {?=} projectionSlots
     * @return {?}
     */


    function ɵɵprojectionDef(projectionSlots) {
      /** @type {?} */
      var componentNode =
      /** @type {?} */
      findComponentView(getLView())[T_HOST];

      if (!componentNode.projection) {
        // If no explicit projection slots are defined, fall back to a single
        // projection slot with the wildcard selector.

        /** @type {?} */
        var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;
        /** @type {?} */

        var projectionHeads = componentNode.projection = new Array(numProjectionSlots).fill(null);
        /** @type {?} */

        var tails = projectionHeads.slice();
        /** @type {?} */

        var componentChild = componentNode.child;

        while (componentChild !== null) {
          /** @type {?} */
          var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;

          if (slotIndex !== null) {
            if (tails[slotIndex]) {
              /** @type {?} */
              tails[slotIndex].projectionNext = componentChild;
            } else {
              projectionHeads[slotIndex] = componentChild;
            }

            tails[slotIndex] = componentChild;
          }

          componentChild = componentChild.next;
        }
      }
    }
    /** @type {?} */


    var delayProjection = false;
    /**
     * @param {?} value
     * @return {?}
     */

    function setDelayProjection(value) {
      delayProjection = value;
    }
    /**
     * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
     * to the projectionDef instruction.
     *
     * \@codeGenApi
     * @param {?} nodeIndex
     * @param {?=} selectorIndex
     * @param {?=} attrs
     * @return {?}
     */


    function ɵɵprojection(nodeIndex) {
      var selectorIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var attrs = arguments.length > 2 ? arguments[2] : undefined;

      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tProjectionNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], nodeIndex, 1
      /* 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

      setIsNotParent(); // We might need to delay the projection of nodes if they are in the middle of an i18n block

      if (!delayProjection) {
        // re-distribution of projectable nodes is stored on a component's view level
        appendProjectedNodes(lView, tProjectionNode, selectorIndex, findComponentView(lView));
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     *
     * 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.
     *
     * \@codeGenApi
     * @param {?} propName The name of the property to update
     * @param {?} v0 Value checked for change.
     * @param {?=} sanitizer An optional sanitizer function
     * @return {?} itself, so that it may be chained.
     */


    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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation1(getLView(), prefix, v0, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation2(getLView(), prefix, v0, i0, v1, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation3(getLView(), prefix, v0, i0, v1, i1, v2, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation4(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation5(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation6(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation7(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolation8(getLView(), prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      return ɵɵpropertyInterpolate8;
    }
    /**
     * Update an interpolated property on an element with 8 or more bound values surrounded by text.
     *
     * Used when the number of interpolated values exceeds 7.
     *
     * ```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.
     *
     * \@codeGenApi
     * @param {?} propName The name of the property to update.
     * @param {?} values The a 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
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var interpolatedValue = interpolationV(getLView(), values);

      if (interpolatedValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, interpolatedValue, sanitizer);
      }

      return ɵɵpropertyInterpolateV;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Create static text node
     *
     * \@codeGenApi
     * @param {?} index Index of the node in the data array
     * @param {?=} value Value to write. This value will be stringified.
     *
     * @return {?}
     */


    function ɵɵtext(index, value) {
      /** @type {?} */
      var lView = getLView();
      ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'text nodes should be created before any bindings');
      ngDevMode && ngDevMode.rendererCreateTextNode++;
      ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
      /** @type {?} */

      var textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);
      ngDevMode && ngDevMode.rendererSetText++;
      /** @type {?} */

      var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, 3
      /* Element */
      , null, null); // Text nodes are self closing.

      setIsNotParent();
      appendChild(textNative, tNode, lView);
    }
    /**
     * Create text node with binding
     * Bindings should be handled externally with the proper interpolation(1-8) method
     *
     * \@codeGenApi
     * @template T
     * @param {?} value Stringified value to write.
     *
     * @return {?}
     */


    function ɵɵtextBinding(value) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var index = getSelectedIndex();
      /** @type {?} */

      var bound = bind(lView, value);

      if (bound !== NO_CHANGE) {
        textBindingInternal(lView, index, renderStringify(bound));
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     *
     * 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);
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} v0
     * @return {?} itself, so that it may be chained.
     */


    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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate1(prefix, v0, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation1(lView, prefix, v0, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     * @see ɵɵtextInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     *
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4 Static value used for concatenation only.
     * @param {?} v5 Value checked for change. \@returns itself, so that it may be chained.
     * @param {?} suffix
     * @return {?}
     */


    function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4
     * @param {?} v5
     * @param {?} i5
     * @param {?} v6
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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, index,
        /** @type {?} */
        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');
     * ```
     * @see textInterpolateV
     * \@codeGenApi
     * @param {?} prefix
     * @param {?} v0
     * @param {?} i0
     * @param {?} v1
     * @param {?} i1
     * @param {?} v2
     * @param {?} i2
     * @param {?} v3
     * @param {?} i3
     * @param {?} v4
     * @param {?} i4
     * @param {?} v5
     * @param {?} i5
     * @param {?} v6
     * @param {?} i6
     * @param {?} v7
     * @param {?} suffix
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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, index,
        /** @type {?} */
        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']);
     * ```
     * .
     * \@codeGenApi
     * @param {?} values The a 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']`)
     *
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵtextInterpolateV(values) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var interpolated = interpolationV(lView, values);

      if (interpolated !== NO_CHANGE) {
        textBindingInternal(lView, index,
        /** @type {?} */
        interpolated);
      }

      return ɵɵtextInterpolateV;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prefix Static value used for concatenation only.
     * @param {?} v0 Value checked for change.
     * @param {?} suffix Static value used for concatenation only.
     * @return {?}
     */


    function ɵɵclassMapInterpolate1(prefix, v0, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation1(lView, prefix, v0, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @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.
     * @return {?}
     */


    function ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     * Update an interpolated class on an element with 8 or more bound values surrounded by text.
     *
     * Used when the number of interpolated values exceeds 7.
     *
     * ```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']);
     * ```
     * .
     * \@codeGenApi
     * @param {?} values The a 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']`)
     * @return {?}
     */


    function ɵɵclassMapInterpolateV(values) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolationV(lView, values);
      classMapInternal(getSelectedIndex(), interpolatedValue);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     *
     * 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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation1(lView, prefix, v0, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      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');
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      return ɵɵstylePropInterpolate8;
    }
    /**
     * Update an interpolated style property on an element with 8 or more bound values surrounded by
     * text.
     *
     * Used when the number of interpolated values exceeds 7.
     *
     * ```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']);
     * ```
     *
     * \@codeGenApi
     * @param {?} prop
     * @param {?} values The a 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`.
     * @return {?} itself, so that it may be chained.
     */


    function ɵɵstylePropInterpolateV(prop, values, valueSuffix) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var interpolatedValue = interpolationV(lView, values);
      stylePropInternal(getSelectedIndex(), prop,
      /** @type {?} */
      interpolatedValue, valueSuffix);
      return ɵɵstylePropInterpolateV;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * \@codeGenApi
     * @template T
     * @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.
     * @return {?} This function returns itself so that it may be chained
     * (e.g. `property('name', ctx.name)('title', ctx.title)`)
     *
     */


    function ɵɵhostProperty(propName, value, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      var bindReconciledValue = bind(lView, value);

      if (bindReconciledValue !== NO_CHANGE) {
        elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, true);
      }

      return ɵɵhostProperty;
    }
    /**
     * Updates a synthetic host binding (e.g. `[\@foo]`) on a component.
     *
     * 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.
     *
     * \@codeGenApi
     * @template T
     * @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.
     *
     * @return {?}
     */


    function ɵɵupdateSyntheticHostBinding(propName, value, sanitizer) {
      /** @type {?} */
      var index = getSelectedIndex();
      /** @type {?} */

      var lView = getLView(); // TODO(benlesh): remove bind call here.

      /** @type {?} */

      var bound = bind(lView, value);

      if (bound !== NO_CHANGE) {
        elementPropertyInternal(index, propName, bound, sanitizer, true, loadComponentRenderer);
      }

      return ɵɵupdateSyntheticHostBinding;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Returns the component instance associated with a given DOM host element.
     * Elements which don't represent components return `null`.
     *
     * \@publicApi
     * @template T
     * @param {?} element Host DOM element from which the component should be retrieved.
     *
     * ```
     * <my-app>
     *   #VIEW
     *     <div>
     *       <child-comp></child-comp>
     *     </div>
     * </mp-app>
     *
     * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();
     * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();
     * ```
     *
     * @return {?}
     */


    function getComponent(element) {
      /** @type {?} */
      var context = loadLContextFromNode(element);

      if (context.component === undefined) {
        context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);
      }

      return (
        /** @type {?} */
        context.component
      );
    }
    /**
     * Returns the component instance associated with a given DOM host element.
     * Elements which don't represent components return `null`.
     *
     * \@publicApi
     * @template T
     * @param {?} element Host DOM element from which the component should be retrieved.
     *
     * ```
     * <my-app>
     *   #VIEW
     *     <div>
     *       <child-comp></child-comp>
     *     </div>
     * </mp-app>
     *
     * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();
     * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();
     * ```
     *
     * @return {?}
     */


    function getContext$1(element) {
      /** @type {?} */
      var context =
      /** @type {?} */
      loadLContextFromNode(element);
      return (
        /** @type {?} */
        context.lView[CONTEXT]
      );
    }
    /**
     * Returns the component instance associated with view which owns the DOM element (`null`
     * otherwise).
     *
     * \@publicApi
     * @template T
     * @param {?} element DOM element which is owned by an existing component's view.
     *
     * ```
     * <my-app>
     *   #VIEW
     *     <div>
     *       <child-comp></child-comp>
     *     </div>
     * </mp-app>
     *
     * expect(getViewComponent(<child-comp>) instanceof MyApp).toBeTruthy();
     * expect(getViewComponent(<my-app>)).toEqual(null);
     * ```
     *
     * @return {?}
     */


    function getViewComponent(element) {
      /** @type {?} */
      var context =
      /** @type {?} */
      loadLContext(element);
      /** @type {?} */

      var lView = context.lView;
      /** @type {?} */

      var parent;
      ngDevMode && assertLView(lView);

      while (lView[HOST] === null && (parent =
      /** @type {?} */
      getLViewParent(lView))) {
        // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`
        lView = parent;
      }

      return lView[FLAGS] & 512
      /* IsRoot */
      ? null :
      /** @type {?} */
      lView[CONTEXT];
    }
    /**
     * Retrieve all root components.
     *
     * Root components are those which have been bootstrapped by Angular.
     *
     * \@publicApi
     * @param {?} target A DOM element, component or directive instance.
     *
     * @return {?}
     */


    function getRootComponents(target) {
      return _toConsumableArray(getRootContext(target).components);
    }
    /**
     * Retrieves an `Injector` associated with the element, component or directive.
     *
     * \@publicApi
     * @param {?} target A DOM element, component or directive instance.
     *
     * @return {?}
     */


    function getInjector(target) {
      /** @type {?} */
      var context = loadLContext(target);
      /** @type {?} */

      var tNode =
      /** @type {?} */
      context.lView[TVIEW].data[context.nodeIndex];
      return new NodeInjector(tNode, context.lView);
    }
    /**
     * Retrieve a set of injection tokens at a given DOM node.
     *
     * \@publicApi
     * @param {?} element Element for which the injection tokens should be retrieved.
     * @return {?}
     */


    function getInjectionTokens(element) {
      /** @type {?} */
      var context = loadLContext(element, false);
      if (!context) return [];
      /** @type {?} */

      var lView = context.lView;
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var tNode =
      /** @type {?} */
      tView.data[context.nodeIndex];
      /** @type {?} */

      var providerTokens = [];
      /** @type {?} */

      var startIndex = tNode.providerIndexes & 65535
      /* ProvidersStartIndexMask */
      ;
      /** @type {?} */

      var endIndex = tNode.directiveEnd;

      for (var i = startIndex; i < endIndex; i++) {
        /** @type {?} */
        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 directives associated with a given DOM host element.
     *
     * \@publicApi
     * @param {?} target A DOM element, component or directive instance.
     *
     * @return {?}
     */


    function getDirectives(target) {
      /** @type {?} */
      var context =
      /** @type {?} */
      loadLContext(target);

      if (context.directives === undefined) {
        context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);
      }

      return context.directives || [];
    }
    /**
     * @param {?} target
     * @param {?=} throwOnNotFound
     * @return {?}
     */


    function loadLContext(target) {
      var throwOnNotFound = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

      /** @type {?} */
      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.
     *
     * \@publicApi
     * @param {?} target A DOM element, component or directive instance.
     *
     * @return {?}
     */


    function getLocalRefs(target) {
      /** @type {?} */
      var context =
      /** @type {?} */
      loadLContext(target);

      if (context.localRefs === undefined) {
        context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);
      }

      return context.localRefs || {};
    }
    /**
     * Retrieve the host element of the component.
     *
     * Use this function to retrieve the host element of the component. The host
     * element is the element which the component is associated with.
     *
     * \@publicApi
     * @template T
     * @param {?} directive Component or Directive for which the host element should be retrieved.
     *
     * @return {?}
     */


    function getHostElement(directive) {
      return (
        /** @type {?} */

        /** @type {?} */

        /** @type {?} */
        getLContext(directive)["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.
     * @return {?}
     */


    function getRenderedText(component) {
      /** @type {?} */
      var hostElement = getHostElement(component);
      return hostElement.textContent || '';
    }
    /**
     * @param {?} node
     * @return {?}
     */


    function loadLContextFromNode(node) {
      if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Node');
      return (
        /** @type {?} */
        loadLContext(node)
      );
    }
    /**
     * @record
     */


    function Listener() {}

    if (false) {}
    /**
     * @param {?} listener
     * @return {?}
     */


    function isBrowserEvents(listener) {
      // Browser events are those which don't have `useCapture` as boolean.
      return typeof listener.useCapture === 'boolean';
    }
    /**
     * Retrieves a list of DOM listeners.
     *
     * ```
     * <my-app>
     *   #VIEW
     *     <div (click)="doSomething()">
     *     </div>
     * </mp-app>
     *
     * expect(getListeners(<div>)).toEqual({
     *   name: 'click',
     *   element: <div>,
     *   callback: () => doSomething(),
     *   useCapture: false
     * });
     * ```
     *
     * \@publicApi
     * @param {?} element Element for which the DOM listeners should be retrieved.
     * @return {?}
     */


    function getListeners(element) {
      /** @type {?} */
      var lContext = loadLContextFromNode(element);
      /** @type {?} */

      var lView = lContext.lView;
      /** @type {?} */

      var tView = lView[TVIEW];
      /** @type {?} */

      var lCleanup = lView[CLEANUP];
      /** @type {?} */

      var tCleanup = tView.cleanup;
      /** @type {?} */

      var listeners = [];

      if (tCleanup && lCleanup) {
        for (var i = 0; i < tCleanup.length;) {
          /** @type {?} */
          var firstParam = tCleanup[i++];
          /** @type {?} */

          var secondParam = tCleanup[i++];

          if (typeof firstParam === 'string') {
            /** @type {?} */
            var name = firstParam;
            /** @type {?} */

            var listenerElement =
            /** @type {?} */

            /** @type {?} */
            unwrapRNode(lView[secondParam]);
            /** @type {?} */

            var callback = lCleanup[tCleanup[i++]];
            /** @type {?} */

            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

            /** @type {?} */

            var useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : useCaptureOrIndx >= 0 ? false : null;

            if (element == listenerElement) {
              listeners.push({
                element: element,
                name: name,
                callback: callback,
                useCapture: useCapture
              });
            }
          }
        }
      }

      listeners.sort(sortListeners);
      return listeners;
    }
    /**
     * @param {?} a
     * @param {?} b
     * @return {?}
     */


    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.
     * @param {?} obj
     * @return {?}
     */


    function isDirectiveDefHack(obj) {
      return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * This value reflects the property on the window where the dev
     * tools are patched (window.ng).
     *
     * @type {?}
     */


    var GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';
    /** @type {?} */

    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.
     * @return {?}
     */

    function publishDefaultGlobalUtils() {
      if (!_published) {
        _published = true;
        publishGlobalUtil('getComponent', getComponent);
        publishGlobalUtil('getContext', getContext$1);
        publishGlobalUtil('getListeners', getListeners);
        publishGlobalUtil('getViewComponent', getViewComponent);
        publishGlobalUtil('getHostElement', getHostElement);
        publishGlobalUtil('getInjector', getInjector);
        publishGlobalUtil('getRootComponents', getRootComponents);
        publishGlobalUtil('getDirectives', getDirectives);
        publishGlobalUtil('markDirty', markDirty);
      }
    }
    /**
     * Publishes the given function to `window.ng` so that it can be
     * used from the browser console when an application is not in production.
     * @param {?} name
     * @param {?} fn
     * @return {?}
     */


    function publishGlobalUtil(name, fn) {
      /** @type {?} */
      var w =
      /** @type {?} */

      /** @type {?} */
      _global;
      ngDevMode && assertDefined(fn, 'function not defined');

      if (w) {
        /** @type {?} */
        var container = w[GLOBAL_PUBLISH_EXPANDO_KEY];

        if (!container) {
          container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};
        }

        container[name] = fn;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Options that control how the component should be bootstrapped.
     * @record
     */


    function CreateComponentOptions() {}

    if (false) {} // TODO: A hack to not pull in the NullInjector from @angular/core.


    var ɵ0$c =
    /**
    * @param {?} token
    * @param {?=} notFoundValue
    * @return {?}
    */
    function ɵ0$c(token, notFoundValue) {
      throw new Error('NullInjector: Not found: ' + stringifyForError(token));
    };
    /** @type {?} */


    var NULL_INJECTOR$1 = {
      get: ɵ0$c
    };
    /**
     * 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}.
     *
     * @template T
     * @param {?} componentType Component to bootstrap
     * @param {?=} opts
     * @return {?}
     */

    function renderComponent(componentType
    /* Type as workaround for: Microsoft/TypeScript/issues/4881 */
    ) {
      var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      ngDevMode && publishDefaultGlobalUtils();
      ngDevMode && assertComponentType(componentType); // this is preemptively set to avoid having test and debug code accidentally
      // read data from a previous application state...

      setActiveHostElement(null);
      /** @type {?} */

      var rendererFactory = opts.rendererFactory || domRendererFactory3;
      /** @type {?} */

      var sanitizer = opts.sanitizer || null;
      /** @type {?} */

      var componentDef =
      /** @type {?} */
      getComponentDef(componentType);
      if (componentDef.type != componentType) componentDef.type = componentType; // The first index of the first selector is the tag name.

      /** @type {?} */

      var componentTag =
      /** @type {?} */

      /** @type {?} */

      /** @type {?} */
      componentDef.selectors[0][0];
      /** @type {?} */

      var hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);
      /** @type {?} */

      var rootFlags = componentDef.onPush ? 64
      /* Dirty */
      | 512
      /* IsRoot */
      : 16
      /* CheckAlways */
      | 512
      /* IsRoot */
      ;
      /** @type {?} */

      var rootContext = createRootContext(opts.scheduler, opts.playerHandler);
      /** @type {?} */

      var renderer = rendererFactory.createRenderer(hostRNode, componentDef);
      /** @type {?} */

      var rootView = createLView(null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null, rendererFactory, renderer, undefined, opts.injector || null);
      /** @type {?} */

      var oldView = enterView(rootView, null);
      /** @type {?} */

      var component; // Will become true if the `try` block executes with no errors.

      /** @type {?} */

      var safeToRunHooks = false;

      try {
        if (rendererFactory.begin) rendererFactory.begin();
        /** @type {?} */

        var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);
        component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);
        addToViewTree(rootView, componentView);
        refreshDescendantViews(rootView); // creation mode pass

        rootView[FLAGS] &= ~4
        /* CreationMode */
        ;
        resetPreOrderHookFlags(rootView);
        refreshDescendantViews(rootView); // update mode pass

        safeToRunHooks = true;
      } finally {
        leaveView(oldView, safeToRunHooks);
        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
     * @param {?} renderer The current renderer
     * @param {?=} sanitizer The sanitizer, if provided
     *
     * @return {?} Component view created
     */


    function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {
      resetComponentState();
      /** @type {?} */

      var tView = rootView[TVIEW];
      ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);
      rootView[0 + HEADER_OFFSET] = rNode;
      /** @type {?} */

      var tNode = getOrCreateTNode(tView, null, 0, 3
      /* Element */
      , null, null);
      /** @type {?} */

      var componentView = createLView(rootView, getOrCreateTView(def), null, def.onPush ? 64
      /* Dirty */
      : 16
      /* CheckAlways */
      , rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);

      if (tView.firstTemplatePass) {
        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
        tNode.flags = 1
        /* isComponent */
        ;
        initNodeFlags(tNode, rootView.length, 1);
        queueComponentIndexForCheck(tNode);
      } // Store component view at node index, with node as the HOST


      return rootView[HEADER_OFFSET] = componentView;
    }
    /**
     * Creates a root component and sets it up with features and host bindings. Shared by
     * renderComponent() and ViewContainerRef.createComponent().
     * @template T
     * @param {?} componentView
     * @param {?} componentDef
     * @param {?} rootView
     * @param {?} rootContext
     * @param {?} hostFeatures
     * @return {?}
     */


    function createRootComponent(componentView, componentDef, rootView, rootContext, hostFeatures) {
      /** @type {?} */
      var tView = rootView[TVIEW]; // Create directive instance with factory() and store at next index in viewData

      /** @type {?} */

      var component = instantiateRootComponent(tView, rootView, componentDef);
      rootContext.components.push(component);
      componentView[CONTEXT] = component;
      hostFeatures && hostFeatures.forEach(
      /**
      * @param {?} feature
      * @return {?}
      */
      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) {
        componentDef.contentQueries(1
        /* Create */
        , component, rootView.length - 1);
      }
      /** @type {?} */


      var rootTNode = getPreviousOrParentTNode();

      if (tView.firstTemplatePass && componentDef.hostBindings) {
        /** @type {?} */
        var elementIndex = rootTNode.index - HEADER_OFFSET;
        setActiveHostElement(elementIndex);
        /** @type {?} */

        var expando =
        /** @type {?} */
        tView.expandoInstructions;
        invokeHostBindingsInCreationMode(componentDef, expando, component, rootTNode, tView.firstTemplatePass);
        setActiveHostElement(null);
      }

      return component;
    }
    /**
     * @param {?=} scheduler
     * @param {?=} playerHandler
     * @return {?}
     */


    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, {features: [RootLifecycleHooks]});
     * ```
     * @param {?} component
     * @param {?} def
     * @return {?}
     */


    function LifecycleHooksFeature(component, def) {
      /** @type {?} */
      var rootTView =
      /** @type {?} */
      readPatchedLView(component)[TVIEW];
      /** @type {?} */

      var dirIndex = rootTView.data.length - 1;
      registerPreOrderHooks(dirIndex, def, rootTView, -1, -1, -1); // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on
      // LNode).

      registerPostOrderHooks(rootTView,
      /** @type {?} */
      {
        directiveStart: dirIndex,
        directiveEnd: dirIndex + 1
      });
    }
    /**
     * 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
     * @return {?} Promise which resolves when the component is rendered.
     */


    function whenRendered(component) {
      return getRootContext(component).clean;
    }
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var PRIVATE_PREFIX = '__ngOnChanges_';
    /**
     * 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 ngComponentDef = defineComponent({
     *   ...
     *   inputs: {name: 'publicName'},
     *   features: [NgOnChangesFeature()]
     * });
     * ```
     *
     * \@codeGenApi
     * @template T
     * @return {?}
     */

    function ɵɵNgOnChangesFeature() {
      // This option ensures that the ngOnChanges lifecycle hook will be inherited
      // from superclasses (in InheritDefinitionFeature).

      /** @type {?} */
      NgOnChangesFeatureImpl.ngInherit = true;
      return NgOnChangesFeatureImpl;
    }
    /**
     * @template T
     * @param {?} definition
     * @return {?}
     */


    function NgOnChangesFeatureImpl(definition) {
      if (definition.type.prototype.ngOnChanges) {
        definition.setInput = ngOnChangesSetInput;
        definition.onChanges = wrapOnChanges();
      }
    }
    /**
     * @return {?}
     */


    function wrapOnChanges() {
      return (
        /**
        * @this {?}
        * @return {?}
        */
        function wrapOnChangesHook_inPreviousChangesStorage() {
          /** @type {?} */
          var simpleChangesStore = getSimpleChangesStore(this);
          /** @type {?} */

          var current = simpleChangesStore && simpleChangesStore.current;

          if (current) {
            /** @type {?} */
            var previous =
            /** @type {?} */
            simpleChangesStore.previous;

            if (previous === EMPTY_OBJ) {
              /** @type {?} */
              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];
              }
            }

            /** @type {?} */
            simpleChangesStore.current = null;
            this.ngOnChanges(current);
          }
        }
      );
    }
    /**
     * @template T
     * @this {?}
     * @param {?} instance
     * @param {?} value
     * @param {?} publicName
     * @param {?} privateName
     * @return {?}
     */


    function ngOnChangesSetInput(instance, value, publicName, privateName) {
      /** @type {?} */
      var simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {
        previous: EMPTY_OBJ,
        current: null
      });
      /** @type {?} */

      var current = simpleChangesStore.current || (simpleChangesStore.current = {});
      /** @type {?} */

      var previous = simpleChangesStore.previous;
      /** @type {?} */

      var declaredName =
      /** @type {?} */
      this.declaredInputs[publicName];
      /** @type {?} */

      var previousChange = previous[declaredName];
      current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);

      /** @type {?} */
      instance[privateName] = value;
    }
    /** @type {?} */


    var SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';
    /**
     * @param {?} instance
     * @return {?}
     */

    function getSimpleChangesStore(instance) {
      return instance[SIMPLE_CHANGES_STORE] || null;
    }
    /**
     * @param {?} instance
     * @param {?} store
     * @return {?}
     */


    function setSimpleChangesStore(instance, store) {
      return instance[SIMPLE_CHANGES_STORE] = store;
    }
    /**
     * @record
     */


    function NgSimpleChangesStore() {}

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} type
     * @return {?}
     */


    function getSuperType(type) {
      return Object.getPrototypeOf(type.prototype).constructor;
    }
    /**
     * Merges the definition from a super class to a sub class.
     * \@codeGenApi
     * @param {?} definition The definition that is a SubClass of another directive of component
     *
     * @return {?}
     */


    function ɵɵInheritDefinitionFeature(definition) {
      /** @type {?} */
      var superType = getSuperType(definition.type);

      while (superType) {
        /** @type {?} */
        var superDef = undefined;

        if (isComponentDef(definition)) {
          // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.
          superDef = superType.ngComponentDef || superType.ngDirectiveDef;
        } else {
          if (superType.ngComponentDef) {
            throw new Error('Directives cannot inherit Components');
          } // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.


          superDef = superType.ngDirectiveDef;
        }
        /** @nocollapse @type {?} */


        var baseDef =
        /** @type {?} */
        superType.ngBaseDef; // 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.

        if (baseDef || superDef) {
          /** @type {?} */
          var writeableDef =
          /** @type {?} */
          definition;
          writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);
          writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);
          writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);
        }

        if (baseDef) {
          /** @type {?} */
          var baseViewQuery = baseDef.viewQuery;
          /** @type {?} */

          var baseContentQueries = baseDef.contentQueries;
          /** @type {?} */

          var baseHostBindings = baseDef.hostBindings;
          baseHostBindings && inheritHostBindings(definition, baseHostBindings);
          baseViewQuery && inheritViewQuery(definition, baseViewQuery);
          baseContentQueries && inheritContentQueries(definition, baseContentQueries);
          fillProperties(definition.inputs, baseDef.inputs);
          fillProperties(definition.declaredInputs, baseDef.declaredInputs);
          fillProperties(definition.outputs, baseDef.outputs);
        }

        if (superDef) {
          // Merge hostBindings

          /** @type {?} */
          var superHostBindings = superDef.hostBindings;
          superHostBindings && inheritHostBindings(definition, superHostBindings); // Merge queries

          /** @type {?} */

          var superViewQuery = superDef.viewQuery;
          /** @type {?} */

          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); // Inherit hooks
          // Assume super class inheritance feature has already run.

          definition.afterContentChecked = definition.afterContentChecked || superDef.afterContentChecked;
          definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;
          definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;
          definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;
          definition.doCheck = definition.doCheck || superDef.doCheck;
          definition.onDestroy = definition.onDestroy || superDef.onDestroy;
          definition.onInit = definition.onInit || superDef.onInit; // Run parent features

          /** @type {?} */

          var features = superDef.features;

          if (features) {
            var _iterator37 = _createForOfIteratorHelper(features),
                _step37;

            try {
              for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {
                var feature = _step37.value;

                if (feature && feature.ngInherit) {
                  /** @type {?} */
                  feature(definition);
                }
              }
            } catch (err) {
              _iterator37.e(err);
            } finally {
              _iterator37.f();
            }
          }
        } else {
          // Even if we don't have a definition, check the type for the hooks and use those if need be

          /** @type {?} */
          var superPrototype = superType.prototype;

          if (superPrototype) {
            definition.afterContentChecked = definition.afterContentChecked || superPrototype.ngAfterContentChecked;
            definition.afterContentInit = definition.afterContentInit || superPrototype.ngAfterContentInit;
            definition.afterViewChecked = definition.afterViewChecked || superPrototype.ngAfterViewChecked;
            definition.afterViewInit = definition.afterViewInit || superPrototype.ngAfterViewInit;
            definition.doCheck = definition.doCheck || superPrototype.ngDoCheck;
            definition.onDestroy = definition.onDestroy || superPrototype.ngOnDestroy;
            definition.onInit = definition.onInit || superPrototype.ngOnInit;

            if (superPrototype.ngOnChanges) {
              ɵɵNgOnChangesFeature()(definition);
            }
          }
        }

        superType = Object.getPrototypeOf(superType);
      }
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function maybeUnwrapEmpty(value) {
      if (value === EMPTY_OBJ) {
        return {};
      } else if (value === EMPTY_ARRAY) {
        return [];
      } else {
        return value;
      }
    }
    /**
     * @param {?} definition
     * @param {?} superViewQuery
     * @return {?}
     */


    function inheritViewQuery(definition, superViewQuery) {
      /** @type {?} */
      var prevViewQuery = definition.viewQuery;

      if (prevViewQuery) {
        definition.viewQuery =
        /**
        * @param {?} rf
        * @param {?} ctx
        * @return {?}
        */
        function (rf, ctx) {
          superViewQuery(rf, ctx);
          prevViewQuery(rf, ctx);
        };
      } else {
        definition.viewQuery = superViewQuery;
      }
    }
    /**
     * @param {?} definition
     * @param {?} superContentQueries
     * @return {?}
     */


    function inheritContentQueries(definition, superContentQueries) {
      /** @type {?} */
      var prevContentQueries = definition.contentQueries;

      if (prevContentQueries) {
        definition.contentQueries =
        /**
        * @param {?} rf
        * @param {?} ctx
        * @param {?} directiveIndex
        * @return {?}
        */
        function (rf, ctx, directiveIndex) {
          superContentQueries(rf, ctx, directiveIndex);
          prevContentQueries(rf, ctx, directiveIndex);
        };
      } else {
        definition.contentQueries = superContentQueries;
      }
    }
    /**
     * @param {?} definition
     * @param {?} superHostBindings
     * @return {?}
     */


    function inheritHostBindings(definition, superHostBindings) {
      /** @type {?} */
      var prevHostBindings = definition.hostBindings; // If the subclass does not have a host bindings function, we set the subclass host binding
      // function to be the superclass's (in this feature). We should check if they're the same here
      // to ensure we don't inherit it twice.

      if (superHostBindings !== prevHostBindings) {
        if (prevHostBindings) {
          // because inheritance is unknown during compile time, the runtime code
          // needs to be informed of the super-class depth so that instruction code
          // can distinguish one host bindings function from another. The reason why
          // relying on the directive uniqueId exclusively is not enough is because the
          // uniqueId value and the directive instance stay the same between hostBindings
          // calls throughout the directive inheritance chain. This means that without
          // a super-class depth value, there is no way to know whether a parent or
          // sub-class host bindings function is currently being executed.
          definition.hostBindings =
          /**
          * @param {?} rf
          * @param {?} ctx
          * @param {?} elementIndex
          * @return {?}
          */
          function (rf, ctx, elementIndex) {
            // The reason why we increment first and then decrement is so that parent
            // hostBindings calls have a higher id value compared to sub-class hostBindings
            // calls (this way the leaf directive is always at a super-class depth of 0).
            adjustActiveDirectiveSuperClassDepthPosition(1);

            try {
              superHostBindings(rf, ctx, elementIndex);
            } finally {
              adjustActiveDirectiveSuperClassDepthPosition(-1);
            }

            prevHostBindings(rf, ctx, elementIndex);
          };
        } else {
          definition.hostBindings = superHostBindings;
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     *
     * @template T
     * @param {?} def the directive definition
     * @param {?} providers
     * @param {?} viewProviders
     * @return {?}
     */


    function providersResolver(def, providers, viewProviders) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var tView = lView[TVIEW];

      if (tView.firstTemplatePass) {
        /** @type {?} */
        var _isComponent2 = isComponentDef(def); // The list of view providers is processed first, and the flags are updated


        resolveProvider$1(viewProviders, tView.data, tView.blueprint, _isComponent2, true); // Then, the list of providers is processed, and the flags are updated

        resolveProvider$1(providers, tView.data, tView.blueprint, _isComponent2, false);
      }
    }
    /**
     * Resolves a provider and publishes it to the DI system.
     * @param {?} provider
     * @param {?} tInjectables
     * @param {?} lInjectablesBlueprint
     * @param {?} isComponent
     * @param {?} isViewProvider
     * @return {?}
     */


    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 {
        /** @type {?} */
        var _lView7 = getLView();
        /** @type {?} */


        var tView = _lView7[TVIEW];
        /** @type {?} */

        var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);
        /** @type {?} */

        var providerFactory = providerToFactory(provider);
        /** @type {?} */

        var tNode = getPreviousOrParentTNode();
        /** @type {?} */

        var beginIndex = tNode.providerIndexes & 65535
        /* ProvidersStartIndexMask */
        ;
        /** @type {?} */

        var endIndex = tNode.directiveStart;
        /** @type {?} */

        var cptViewProvidersCount = tNode.providerIndexes >> 16
        /* CptViewProvidersCountShift */
        ;

        if (isClassProvider(provider) || isTypeProvider(provider)) {
          /** @type {?} */
          var prototype = (
          /** @type {?} */
          provider.useClass || provider).prototype;
          /** @type {?} */

          var ngOnDestroy = prototype.ngOnDestroy;

          if (ngOnDestroy) {
            (tView.destroyHooks || (tView.destroyHooks = [])).push(tInjectables.length, ngOnDestroy);
          }
        }

        if (isTypeProvider(provider) || !provider.multi) {
          // Single provider case: the factory is created and pushed immediately

          /** @type {?} */
          var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);
          /** @type {?} */

          var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);

          if (existingFactoryIndex == -1) {
            diPublicInInjector(getOrCreateNodeInjectorForNode(
            /** @type {?} */
            tNode, _lView7), tView, token);
            tInjectables.push(token);
            tNode.directiveStart++;
            tNode.directiveEnd++;

            if (isViewProvider) {
              tNode.providerIndexes += 65536
              /* CptViewProvidersCountShifter */
              ;
            }

            lInjectablesBlueprint.push(factory);

            _lView7.push(factory);
          } else {
            lInjectablesBlueprint[existingFactoryIndex] = factory;
            _lView7[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.

          /** @type {?} */
          var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);
          /** @type {?} */

          var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);
          /** @type {?} */

          var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];
          /** @type {?} */

          var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];

          if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {
            // Cases 1.a and 2.a
            diPublicInInjector(getOrCreateNodeInjectorForNode(
            /** @type {?} */
            tNode, _lView7), tView, token);
            /** @type {?} */

            var _factory2 = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);

            if (!isViewProvider && doesViewProvidersFactoryExist) {
              lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = _factory2;
            }

            tInjectables.push(token);
            tNode.directiveStart++;
            tNode.directiveEnd++;

            if (isViewProvider) {
              tNode.providerIndexes += 65536
              /* CptViewProvidersCountShifter */
              ;
            }

            lInjectablesBlueprint.push(_factory2);

            _lView7.push(_factory2);
          } else {
            // Cases 1.b and 2.b
            multiFactoryAdd(
            /** @type {?} */
            lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);
          }

          if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {
            /** @type {?} */lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;
          }
        }
      }
    }
    /**
     * Add a factory in a multi factory.
     * @param {?} multiFactory
     * @param {?} factory
     * @param {?} isComponentProvider
     * @return {?}
     */


    function multiFactoryAdd(multiFactory, factory, isComponentProvider) {
      /** @type {?} */
      multiFactory.multi.push(factory);

      if (isComponentProvider) {
        /** @type {?} */multiFactory.componentProviders++;
      }
    }
    /**
     * Returns the index of item in the array, but only in the begin to end range.
     * @param {?} item
     * @param {?} arr
     * @param {?} begin
     * @param {?} end
     * @return {?}
     */


    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`.
     * @this {?}
     * @param {?} _
     * @param {?} tData
     * @param {?} lData
     * @param {?} tNode
     * @return {?}
     */


    function multiProvidersFactoryResolver(_, tData, lData, tNode) {
      return multiResolve(
      /** @type {?} */
      this.multi, []);
    }
    /**
     * Use this with `multi` `viewProviders`.
     *
     * This factory knows how to concatenate itself with the existing `multi` `providers`.
     * @this {?}
     * @param {?} _
     * @param {?} tData
     * @param {?} lData
     * @param {?} tNode
     * @return {?}
     */


    function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {
      /** @type {?} */
      var factories =
      /** @type {?} */
      this.multi;
      /** @type {?} */

      var result;

      if (this.providerFactory) {
        /** @type {?} */
        var componentCount =
        /** @type {?} */
        this.providerFactory.componentProviders;
        /** @type {?} */

        var multiProviders = getNodeInjectable(tData, lData,
        /** @type {?} */

        /** @type {?} */
        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.
     * @param {?} factories
     * @param {?} result
     * @return {?}
     */


    function multiResolve(factories, result) {
      for (var i = 0; i < factories.length; i++) {
        /** @type {?} */
        var factory =
        /** @type {?} */

        /** @type {?} */
        factories[i];
        result.push(factory());
      }

      return result;
    }
    /**
     * Creates a multi factory.
     * @param {?} factoryFn
     * @param {?} index
     * @param {?} isViewProvider
     * @param {?} isComponent
     * @param {?} f
     * @return {?}
     */


    function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {
      /** @type {?} */
      var factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);
      factory.multi = [];
      factory.index = index;
      factory.componentProviders = 0;
      multiFactoryAdd(factory, f, isComponent && !isViewProvider);
      return factory;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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 ngComponentDef = defineComponent({
     *     type: ComponentWithProviders,
     *     selectors: [['component-with-providers']],
     *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
     *    consts: 1,
     *    vars: 1,
     *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
     *      if (fs & RenderFlags.Create) {
     *        ɵɵtext(0);
     *      }
     *      if (fs & RenderFlags.Update) {
     *        ɵɵselect(0);
     *        ɵɵtextBinding(ctx.greeter.greet());
     *      }
     *    },
     *    features: [ProvidersFeature([GreeterDE])]
     *  });
     * }
     * ```
     *
     * \@codeGenApi
     * @template T
     * @param {?} providers
     * @param {?=} viewProviders
     * @return {?}
     */


    function ɵɵProvidersFeature(providers) {
      var viewProviders = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
      return (
        /**
        * @param {?} definition
        * @return {?}
        */
        function (definition) {
          definition.providersResolver =
          /**
          * @param {?} def
          * @param {?=} processProvidersFn
          * @return {?}
          */
          function (def, processProvidersFn) {
            return providersResolver(def, //
            processProvidersFn ? processProvidersFn(providers) : providers, //
            viewProviders);
          };
        }
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
     * @abstract
     * @template C
     */


    var ComponentRef = function ComponentRef() {
      _classCallCheck(this, ComponentRef);
    };

    if (false) {}
    /**
     * 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
     * @abstract
     * @template C
     */


    var ComponentFactory = function ComponentFactory() {
      _classCallCheck(this, ComponentFactory);
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} component
     * @return {?}
     */


    function noComponentFactoryError(component) {
      /** @type {?} */
      var error = Error("No component factory found for ".concat(stringify(component), ". Did you add it to @NgModule.entryComponents?"));

      /** @type {?} */
      error[ERROR_COMPONENT] = component;
      return error;
    }
    /** @type {?} */


    var ERROR_COMPONENT = 'ngComponent';
    /**
     * @param {?} error
     * @return {?}
     */

    function getComponent$1(error) {
      return (
        /** @type {?} */
        error[ERROR_COMPONENT]
      );
    }

    var _NullComponentFactoryResolver = /*#__PURE__*/function () {
      function _NullComponentFactoryResolver() {
        _classCallCheck(this, _NullComponentFactoryResolver);
      }

      _createClass2(_NullComponentFactoryResolver, [{
        key: "resolveComponentFactory",

        /**
         * @template T
         * @param {?} component
         * @return {?}
         */
        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
     * @abstract
     */


    var ComponentFactoryResolver = function ComponentFactoryResolver() {
      _classCallCheck(this, ComponentFactoryResolver);
    };

    ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();

    if (false) {}

    var CodegenComponentFactoryResolver = /*#__PURE__*/function () {
      /**
       * @param {?} factories
       * @param {?} _parent
       * @param {?} _ngModule
       */
      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++) {
          /** @type {?} */
          var factory = factories[i];

          this._factories.set(factory.componentType, factory);
        }
      }
      /**
       * @template T
       * @param {?} component
       * @return {?}
       */


      _createClass2(CodegenComponentFactoryResolver, [{
        key: "resolveComponentFactory",
        value: function resolveComponentFactory(component) {
          /** @type {?} */
          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;
    }();

    if (false) {}
    /**
     * @template C
     */


    var ComponentFactoryBoundToModule = /*#__PURE__*/function (_ComponentFactory) {
      _inherits(ComponentFactoryBoundToModule, _ComponentFactory);

      var _super108 = _createSuper(ComponentFactoryBoundToModule);

      /**
       * @param {?} factory
       * @param {?} ngModule
       */
      function ComponentFactoryBoundToModule(factory, ngModule) {
        var _this316;

        _classCallCheck(this, ComponentFactoryBoundToModule);

        _this316 = _super108.call(this);
        _this316.factory = factory;
        _this316.ngModule = ngModule;
        _this316.selector = factory.selector;
        _this316.componentType = factory.componentType;
        _this316.ngContentSelectors = factory.ngContentSelectors;
        _this316.inputs = factory.inputs;
        _this316.outputs = factory.outputs;
        return _this316;
      }
      /**
       * @param {?} injector
       * @param {?=} projectableNodes
       * @param {?=} rootSelectorOrNode
       * @param {?=} ngModule
       * @return {?}
       */


      _createClass2(ComponentFactoryBoundToModule, [{
        key: "create",
        value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
          return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);
        }
      }]);

      return ComponentFactoryBoundToModule;
    }(ComponentFactory);

    if (false) {}
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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.
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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](http://g.co/ng/security).
     *
     * \@publicApi
     * @template T
     */
    // 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 =
    /**
     * @param {?} nativeElement
     */
    function ElementRef(nativeElement) {
      _classCallCheck(this, ElementRef);

      this.nativeElement = nativeElement;
    };
    /**
     * \@internal
     * @nocollapse
     */


    ElementRef.__NG_ELEMENT_ID__ =
    /**
    * @return {?}
    */
    function () {
      return SWITCH_ELEMENT_REF_FACTORY(ElementRef);
    };

    if (false) {}
    /** @type {?} */


    var SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;
    /** @type {?} */

    var SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @deprecated Use `RendererType2` (and `Renderer2`) instead.
     * \@publicApi
     */

    var RenderComponentType =
    /**
     * @param {?} id
     * @param {?} templateUrl
     * @param {?} slotCount
     * @param {?} encapsulation
     * @param {?} styles
     * @param {?} animations
     */
    function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {
      _classCallCheck(this, RenderComponentType);

      this.id = id;
      this.templateUrl = templateUrl;
      this.slotCount = slotCount;
      this.encapsulation = encapsulation;
      this.styles = styles;
      this.animations = animations;
    };

    if (false) {}
    /**
     * @deprecated Debug info is handled internally in the view engine now.
     * @abstract
     */


    var RenderDebugInfo = function RenderDebugInfo() {
      _classCallCheck(this, RenderDebugInfo);
    };

    if (false) {}
    /**
     * @deprecated Use the `Renderer2` instead.
     * @record
     */


    function DirectRenderer() {}

    if (false) {}
    /**
     * @deprecated Use the `Renderer2` instead.
     * \@publicApi
     * @abstract
     */


    var Renderer = function Renderer() {
      _classCallCheck(this, Renderer);
    };

    if (false) {}
    /** @type {?} */


    var Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
    /**
     * Injectable service that provides a low-level interface for modifying the UI.
     *
     * Use this service 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 {\@link Renderer#setElementProperty setElementProperty} or
     * {\@link Renderer#setElementAttribute setElementAttribute} respectively.
     *
     * If you are implementing a custom renderer, you must implement this interface.
     *
     * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
     *
     * @deprecated Use `RendererFactory2` instead.
     * \@publicApi
     * @abstract
     */

    var RootRenderer = function RootRenderer() {
      _classCallCheck(this, RootRenderer);
    };

    if (false) {}
    /**
     * Used by `RendererFactory2` to associate custom rendering data and styles
     * with a rendering implementation.
     * \@publicApi
     * @record
     */


    function RendererType2() {}

    if (false) {}
    /**
     * Creates and initializes a custom renderer that implements the `Renderer2` base class.
     *
     * \@publicApi
     * @abstract
     */


    var RendererFactory2 = function RendererFactory2() {
      _classCallCheck(this, RendererFactory2);
    };

    if (false) {}
    /** @enum {number} */


    var RendererStyleFlags2 = {
      /**
       * Marks a style as important.
       */
      Important: 1,

      /**
       * Marks a style as using dash case naming (this-is-dash-case).
       */
      DashCase: 2
    };
    RendererStyleFlags2[RendererStyleFlags2.Important] = 'Important';
    RendererStyleFlags2[RendererStyleFlags2.DashCase] = 'DashCase';
    /**
     * 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
     * @abstract
     */

    var Renderer2 = function Renderer2() {
      _classCallCheck(this, Renderer2);
    };
    /**
     * \@internal
     * @nocollapse
     */


    Renderer2.__NG_ELEMENT_ID__ =
    /**
    * @return {?}
    */
    function () {
      return SWITCH_RENDERER2_FACTORY();
    };

    if (false) {}
    /** @type {?} */


    var SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;
    /** @type {?} */

    var SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 =
    /**
     * @param {?} full
     */
    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('.');
    };

    if (false) {}
    /**
     * \@publicApi
     * @type {?}
     */


    var VERSION = new Version('8.2.14');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var DefaultIterableDifferFactory = /*#__PURE__*/function () {
      function DefaultIterableDifferFactory() {
        _classCallCheck(this, DefaultIterableDifferFactory);
      }
      /**
       * @param {?} obj
       * @return {?}
       */


      _createClass2(DefaultIterableDifferFactory, [{
        key: "supports",
        value: function supports(obj) {
          return isListLikeIterable$1(obj);
        }
        /**
         * @template V
         * @param {?=} trackByFn
         * @return {?}
         */

      }, {
        key: "create",
        value: function create(trackByFn) {
          return new DefaultIterableDiffer(trackByFn);
        }
      }]);

      return DefaultIterableDifferFactory;
    }();
    /** @type {?} */


    var trackByIdentity =
    /**
    * @param {?} index
    * @param {?} item
    * @return {?}
    */
    function trackByIdentity(index, item) {
      return item;
    };

    var ɵ0$d = trackByIdentity;
    /**
     * @deprecated v4.0.0 - Should not be part of public API.
     * \@publicApi
     * @template V
     */

    var DefaultIterableDiffer = /*#__PURE__*/function () {
      /**
       * @param {?=} trackByFn
       */
      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;
      }
      /**
       * @param {?} fn
       * @return {?}
       */


      _createClass2(DefaultIterableDiffer, [{
        key: "forEachItem",
        value: function forEachItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._itHead; record !== null; record = record._next) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachOperation",
        value: function forEachOperation(fn) {
          /** @type {?} */
          var nextIt = this._itHead;
          /** @type {?} */

          var nextRemove = this._removalsHead;
          /** @type {?} */

          var addRemoveOffset = 0;
          /** @type {?} */

          var moveOffsets = null;

          while (nextIt || nextRemove) {
            // Figure out which is the next record to process
            // Order: remove, add, move

            /** @type {?} */
            var record = !nextRemove || nextIt &&
            /** @type {?} */
            nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?
            /** @type {?} */
            nextIt : nextRemove;
            /** @type {?} */

            var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
            /** @type {?} */

            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 =
              /** @type {?} */
              nextIt._next;

              if (record.previousIndex == null) {
                addRemoveOffset++;
              } else {
                // INVARIANT:  currentIndex < previousIndex
                if (!moveOffsets) moveOffsets = [];
                /** @type {?} */

                var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
                /** @type {?} */

                var localCurrentIndex =
                /** @type {?} */
                currentIndex - addRemoveOffset;

                if (localMovePreviousIndex != localCurrentIndex) {
                  for (var i = 0; i < localMovePreviousIndex; i++) {
                    /** @type {?} */
                    var offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
                    /** @type {?} */

                    var index = offset + i;

                    if (localCurrentIndex <= index && index < localMovePreviousIndex) {
                      moveOffsets[i] = offset + 1;
                    }
                  }
                  /** @type {?} */


                  var previousIndex = record.previousIndex;
                  moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
                }
              }
            }

            if (adjPreviousIndex !== currentIndex) {
              fn(record, adjPreviousIndex, currentIndex);
            }
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachPreviousItem",
        value: function forEachPreviousItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachAddedItem",
        value: function forEachAddedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._additionsHead; record !== null; record = record._nextAdded) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachMovedItem",
        value: function forEachMovedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._movesHead; record !== null; record = record._nextMoved) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachRemovedItem",
        value: function forEachRemovedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachIdentityChange",
        value: function forEachIdentityChange(fn) {
          /** @type {?} */
          var record;

          for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
            fn(record);
          }
        }
        /**
         * @param {?} collection
         * @return {?}
         */

      }, {
        key: "diff",
        value: function diff(collection) {
          if (collection == null) collection = [];

          if (!isListLikeIterable$1(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;
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy() {}
        /**
         * @param {?} collection
         * @return {?}
         */

      }, {
        key: "check",
        value: function check(collection) {
          var _this317 = this;

          this._reset();
          /** @type {?} */


          var record = this._itHead;
          /** @type {?} */

          var mayBeDirty = false;
          /** @type {?} */

          var index;
          /** @type {?} */

          var item;
          /** @type {?} */

          var itemTrackBy;

          if (Array.isArray(collection)) {
            /** @type {?} */
            this.length = collection.length;

            for (var _index = 0; _index < this.length; _index++) {
              item = collection[_index];
              itemTrackBy = this._trackByFn(_index, item);

              if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
                record = this._mismatch(record, item, itemTrackBy, _index);
                mayBeDirty = true;
              } else {
                if (mayBeDirty) {
                  // TODO(misko): can we limit this to duplicates only?
                  record = this._verifyReinsertion(record, item, itemTrackBy, _index);
                }

                if (!looseIdentical(record.item, item)) this._addIdentityChange(record, item);
              }

              record = record._next;
            }
          } else {
            index = 0;
            iterateListLike$1(collection,
            /**
            * @param {?} item
            * @return {?}
            */
            function (item) {
              itemTrackBy = _this317._trackByFn(index, item);

              if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {
                record = _this317._mismatch(record, item, itemTrackBy, index);
                mayBeDirty = true;
              } else {
                if (mayBeDirty) {
                  // TODO(misko): can we limit this to duplicates only?
                  record = _this317._verifyReinsertion(record, item, itemTrackBy, index);
                }

                if (!looseIdentical(record.item, item)) _this317._addIdentityChange(record, item);
              }

              record = record._next;
              index++;
            });

            /** @type {?} */
            this.length = index;
          }

          this._truncate(record);

          /** @type {?} */
          this.collection = collection;
          return this.isDirty;
        }
        /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
           * changes.
           */

        /**
         * @return {?}
         */

      }, {
        key: "_reset",

        /**
         * 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
         * @return {?}
         */
        value: function _reset() {
          if (this.isDirty) {
            /** @type {?} */
            var record;
            /** @type {?} */

            var nextRecord;

            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 = nextRecord) {
              record.previousIndex = record.currentIndex;
              nextRecord = record._nextMoved;
            }

            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
         * @param {?} record
         * @param {?} item
         * @param {?} itemTrackBy
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "_mismatch",
        value: function _mismatch(record, item, itemTrackBy, index) {
          // The previous record after which we will append the current one.

          /** @type {?} */
          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 (!looseIdentical(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 (!looseIdentical(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
         * @param {?} record
         * @param {?} item
         * @param {?} itemTrackBy
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "_verifyReinsertion",
        value: function _verifyReinsertion(record, item, itemTrackBy, index) {
          /** @type {?} */
          var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);

          if (reinsertRecord !== null) {
            record = this._reinsertAfter(reinsertRecord,
            /** @type {?} */
            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
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_truncate",
        value: function _truncate(record) {
          // Anything after that needs to be removed;
          while (record !== null) {
            /** @type {?} */
            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
         * @param {?} record
         * @param {?} prevRecord
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "_reinsertAfter",
        value: function _reinsertAfter(record, prevRecord, index) {
          if (this._unlinkedRecords !== null) {
            this._unlinkedRecords.remove(record);
          }
          /** @type {?} */


          var prev = record._prevRemoved;
          /** @type {?} */

          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
         * @param {?} record
         * @param {?} prevRecord
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "_moveAfter",
        value: function _moveAfter(record, prevRecord, index) {
          this._unlink(record);

          this._insertAfter(record, prevRecord, index);

          this._addToMoves(record, index);

          return record;
        }
        /**
         * \@internal
         * @param {?} record
         * @param {?} prevRecord
         * @param {?} index
         * @return {?}
         */

      }, {
        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
         * @param {?} record
         * @param {?} prevRecord
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "_insertAfter",
        value: function _insertAfter(record, prevRecord, index) {
          // TODO(vicb):
          // assert(record != prevRecord);
          // assert(record._next === null);
          // assert(record._prev === null);
          // TODO(vicb):
          // assert(record != prevRecord);
          // assert(record._next === null);
          // assert(record._prev === null);

          /** @type {?} */
          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
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_remove",
        value: function _remove(record) {
          return this._addToRemovals(this._unlink(record));
        }
        /**
         * \@internal
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_unlink",
        value: function _unlink(record) {
          if (this._linkedRecords !== null) {
            this._linkedRecords.remove(record);
          }
          /** @type {?} */


          var prev = record._prev;
          /** @type {?} */

          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
         * @param {?} record
         * @param {?} toIndex
         * @return {?}
         */

      }, {
        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;
        }
        /**
         * @private
         * @param {?} record
         * @return {?}
         */

      }, {
        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
         * @param {?} record
         * @param {?} item
         * @return {?}
         */

      }, {
        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;
        }
      }, {
        key: "isDirty",
        get: function get() {
          return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
        }
      }]);

      return DefaultIterableDiffer;
    }();

    if (false) {}
    /**
     * @template V
     */


    var IterableChangeRecord_ =
    /**
     * @param {?} item
     * @param {?} trackById
     */
    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;
    };

    if (false) {} // A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item

    /**
     * @template V
     */


    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.
       * @param {?} record
       * @return {?}
       */


      _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);

            /** @type {?} */
            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

        /**
         * @param {?} trackById
         * @param {?} atOrAfterIndex
         * @return {?}
         */

      }, {
        key: "get",
        value: function get(trackById, atOrAfterIndex) {
          /** @type {?} */
          var record;

          for (record = this._head; record !== null; record = record._nextDup) {
            if ((atOrAfterIndex === null || atOrAfterIndex <=
            /** @type {?} */
            record.currentIndex) && looseIdentical(record.trackById, trackById)) {
              return record;
            }
          }

          return null;
        }
        /**
         * Remove one {\@link IterableChangeRecord_} from the list of duplicates.
         *
         * Returns whether the list of duplicates is empty.
         * @param {?} record
         * @return {?}
         */

      }, {
        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;
          //});
          // 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;
          //});

          /** @type {?} */
          var prev = record._prevDup;
          /** @type {?} */

          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;
    }();

    if (false) {}
    /**
     * @template V
     */


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

        this.map = new Map();
      }
      /**
       * @param {?} record
       * @return {?}
       */


      _createClass2(_DuplicateMap, [{
        key: "put",
        value: function put(record) {
          /** @type {?} */
          var key = record.trackById;
          /** @type {?} */

          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`.
         * @param {?} trackById
         * @param {?} atOrAfterIndex
         * @return {?}
         */

      }, {
        key: "get",
        value: function get(trackById, atOrAfterIndex) {
          /** @type {?} */
          var key = trackById;
          /** @type {?} */

          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.
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "remove",
        value: function remove(record) {
          /** @type {?} */
          var key = record.trackById;
          /** @type {?} */

          var recordList =
          /** @type {?} */
          this.map.get(key); // Remove the list of duplicates when it gets empty

          if (recordList.remove(record)) {
            this.map["delete"](key);
          }

          return record;
        }
        /**
         * @return {?}
         */

      }, {
        key: "clear",

        /**
         * @return {?}
         */
        value: function clear() {
          this.map.clear();
        }
      }, {
        key: "isEmpty",
        get: function get() {
          return this.map.size === 0;
        }
      }]);

      return _DuplicateMap;
    }();

    if (false) {}
    /**
     * @param {?} item
     * @param {?} addRemoveOffset
     * @param {?} moveOffsets
     * @return {?}
     */


    function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
      /** @type {?} */
      var previousIndex = item.previousIndex;
      if (previousIndex === null) return previousIndex;
      /** @type {?} */

      var moveOffset = 0;

      if (moveOffsets && previousIndex < moveOffsets.length) {
        moveOffset = moveOffsets[previousIndex];
      }

      return previousIndex + addRemoveOffset + moveOffset;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @template K, V
     */


    var DefaultKeyValueDifferFactory = /*#__PURE__*/function () {
      function DefaultKeyValueDifferFactory() {
        _classCallCheck(this, DefaultKeyValueDifferFactory);
      }
      /**
       * @param {?} obj
       * @return {?}
       */


      _createClass2(DefaultKeyValueDifferFactory, [{
        key: "supports",
        value: function supports(obj) {
          return obj instanceof Map || isJsObject$1(obj);
        }
        /**
         * @template K, V
         * @return {?}
         */

      }, {
        key: "create",
        value: function create() {
          return new DefaultKeyValueDiffer();
        }
      }]);

      return DefaultKeyValueDifferFactory;
    }();
    /**
     * @template K, V
     */


    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;
      }
      /**
       * @return {?}
       */


      _createClass2(DefaultKeyValueDiffer, [{
        key: "forEachItem",

        /**
         * @param {?} fn
         * @return {?}
         */
        value: function forEachItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._mapHead; record !== null; record = record._next) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachPreviousItem",
        value: function forEachPreviousItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachChangedItem",
        value: function forEachChangedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._changesHead; record !== null; record = record._nextChanged) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachAddedItem",
        value: function forEachAddedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._additionsHead; record !== null; record = record._nextAdded) {
            fn(record);
          }
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "forEachRemovedItem",
        value: function forEachRemovedItem(fn) {
          /** @type {?} */
          var record;

          for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
            fn(record);
          }
        }
        /**
         * @param {?=} map
         * @return {?}
         */

      }, {
        key: "diff",
        value: function diff(map) {
          if (!map) {
            map = new Map();
          } else if (!(map instanceof Map || isJsObject$1(map))) {
            throw new Error("Error trying to diff '".concat(stringify(map), "'. Only maps and objects are allowed"));
          }

          return this.check(map) ? this : null;
        }
        /**
         * @return {?}
         */

      }, {
        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.
         * @param {?} map
         * @return {?}
         */

      }, {
        key: "check",
        value: function check(map) {
          var _this318 = this;

          this._reset();
          /** @type {?} */


          var insertBefore = this._mapHead;
          this._appendAfter = null;

          this._forEach(map,
          /**
          * @param {?} value
          * @param {?} key
          * @return {?}
          */
          function (value, key) {
            if (insertBefore && insertBefore.key === key) {
              _this318._maybeAddToChanges(insertBefore, value);

              _this318._appendAfter = insertBefore;
              insertBefore = insertBefore._next;
            } else {
              /** @type {?} */
              var record = _this318._getOrCreateRecordForKey(key, value);

              insertBefore = _this318._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.
         * @private
         * @param {?} before
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_insertBeforeOrAppend",
        value: function _insertBeforeOrAppend(before, record) {
          if (before) {
            /** @type {?} */
            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;
        }
        /**
         * @private
         * @param {?} key
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_getOrCreateRecordForKey",
        value: function _getOrCreateRecordForKey(key, value) {
          if (this._records.has(key)) {
            /** @type {?} */
            var _record =
            /** @type {?} */
            this._records.get(key);

            this._maybeAddToChanges(_record, value);
            /** @type {?} */


            var prev = _record._prev;
            /** @type {?} */

            var next = _record._next;

            if (prev) {
              prev._next = next;
            }

            if (next) {
              next._prev = prev;
            }

            _record._next = null;
            _record._prev = null;
            return _record;
          }
          /** @type {?} */


          var record = new KeyValueChangeRecord_(key);

          this._records.set(key, record);

          record.currentValue = value;

          this._addToAdditions(record);

          return record;
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_reset",
        value: function _reset() {
          if (this.isDirty) {
            /** @type {?} */
            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

        /**
         * @private
         * @param {?} record
         * @param {?} newValue
         * @return {?}
         */

      }, {
        key: "_maybeAddToChanges",
        value: function _maybeAddToChanges(record, newValue) {
          if (!looseIdentical(newValue, record.currentValue)) {
            record.previousValue = record.currentValue;
            record.currentValue = newValue;

            this._addToChanges(record);
          }
        }
        /**
         * @private
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_addToAdditions",
        value: function _addToAdditions(record) {
          if (this._additionsHead === null) {
            this._additionsHead = this._additionsTail = record;
          } else {
            /** @type {?} */
            this._additionsTail._nextAdded = record;
            this._additionsTail = record;
          }
        }
        /**
         * @private
         * @param {?} record
         * @return {?}
         */

      }, {
        key: "_addToChanges",
        value: function _addToChanges(record) {
          if (this._changesHead === null) {
            this._changesHead = this._changesTail = record;
          } else {
            /** @type {?} */
            this._changesTail._nextChanged = record;
            this._changesTail = record;
          }
        }
        /**
         * \@internal
         * @private
         * @template K, V
         * @param {?} obj
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "_forEach",
        value: function _forEach(obj, fn) {
          if (obj instanceof Map) {
            obj.forEach(fn);
          } else {
            Object.keys(obj).forEach(
            /**
            * @param {?} k
            * @return {?}
            */
            function (k) {
              return fn(obj[k], k);
            });
          }
        }
      }, {
        key: "isDirty",
        get: function get() {
          return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
        }
      }]);

      return DefaultKeyValueDiffer;
    }();

    if (false) {}
    /**
     * @template K, V
     */


    var KeyValueChangeRecord_ =
    /**
     * @param {?} key
     */
    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;
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A strategy for tracking changes over time to an iterable. Used by {\@link NgForOf} to
     * respond to changes in an iterable by effecting equivalent changes in the DOM.
     *
     * \@publicApi
     * @record
     * @template V
     */


    function IterableDiffer() {}

    if (false) {}
    /**
     * An object describing the changes in the `Iterable` collection since last time
     * `IterableDiffer#diff()` was invoked.
     *
     * \@publicApi
     * @record
     * @template V
     */


    function IterableChanges() {}

    if (false) {}
    /**
     * Record representing the item change information.
     *
     * \@publicApi
     * @record
     * @template V
     */


    function IterableChangeRecord() {}

    if (false) {}
    /**
     * @deprecated v4.0.0 - Use IterableChangeRecord instead.
     * \@publicApi
     * @record
     * @template V
     */


    function CollectionChangeRecord() {}
    /**
     * An optional function passed into the `NgForOf` directive that defines how to track
     * changes for items in an iterable.
     * The function takes the iteration index and item ID.
     * When supplied, Angular tracks changes by the return value of the function.
     *
     * \@publicApi
     * @record
     * @template T
     */


    function TrackByFunction() {}
    /**
     * Provides a factory for {\@link IterableDiffer}.
     *
     * \@publicApi
     * @record
     */


    function IterableDifferFactory() {}

    if (false) {}
    /**
     * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
     *
     * \@publicApi
     */


    var IterableDiffers = /*#__PURE__*/function () {
      /**
       * @param {?} factories
       */
      function IterableDiffers(factories) {
        _classCallCheck(this, IterableDiffers);

        this.factories = factories;
      }
      /**
       * @param {?} factories
       * @param {?=} parent
       * @return {?}
       */


      _createClass2(IterableDiffers, [{
        key: "find",

        /**
         * @param {?} iterable
         * @return {?}
         */
        value: function find(iterable) {
          /** @type {?} */
          var factory = this.factories.find(
          /**
          * @param {?} f
          * @return {?}
          */
          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) {
            /** @type {?} */
            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()])
         *   ]
         * })
         * ```
         * @param {?} factories
         * @return {?}
         */

      }, {
        key: "extend",
        value: function extend(factories) {
          return {
            provide: IterableDiffers,
            useFactory:
            /**
            * @param {?} parent
            * @return {?}
            */
            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 */

    /** @nocollapse */


    IterableDiffers.ngInjectableDef = ɵɵdefineInjectable({
      token: IterableDiffers,
      providedIn: 'root',
      factory:
      /**
      * @nocollapse @return {?}
      */
      function factory() {
        return new IterableDiffers([new DefaultIterableDifferFactory()]);
      }
    });

    if (false) {}
    /**
     * @param {?} type
     * @return {?}
     */


    function getTypeNameForDebugging(type) {
      return type['name'] || typeof type;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A differ that tracks changes made to an object over time.
     *
     * \@publicApi
     * @record
     * @template K, V
     */


    function KeyValueDiffer() {}

    if (false) {}
    /**
     * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
     * `KeyValueDiffer#diff()` was invoked.
     *
     * \@publicApi
     * @record
     * @template K, V
     */


    function KeyValueChanges() {}

    if (false) {}
    /**
     * Record representing the item change information.
     *
     * \@publicApi
     * @record
     * @template K, V
     */


    function KeyValueChangeRecord() {}

    if (false) {}
    /**
     * Provides a factory for {\@link KeyValueDiffer}.
     *
     * \@publicApi
     * @record
     */


    function KeyValueDifferFactory() {}

    if (false) {}
    /**
     * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
     *
     * \@publicApi
     */


    var KeyValueDiffers = /*#__PURE__*/function () {
      /**
       * @param {?} factories
       */
      function KeyValueDiffers(factories) {
        _classCallCheck(this, KeyValueDiffers);

        this.factories = factories;
      }
      /**
       * @template S
       * @param {?} factories
       * @param {?=} parent
       * @return {?}
       */


      _createClass2(KeyValueDiffers, [{
        key: "find",

        /**
         * @param {?} kv
         * @return {?}
         */
        value: function find(kv) {
          /** @type {?} */
          var factory = this.factories.find(
          /**
          * @param {?} f
          * @return {?}
          */
          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) {
            /** @type {?} */
            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()])
         *   ]
         * })
         * ```
         * @template S
         * @param {?} factories
         * @return {?}
         */

      }, {
        key: "extend",
        value: function extend(factories) {
          return {
            provide: KeyValueDiffers,
            useFactory:
            /**
            * @param {?} parent
            * @return {?}
            */
            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 */

    /** @nocollapse */


    KeyValueDiffers.ngInjectableDef = ɵɵdefineInjectable({
      token: KeyValueDiffers,
      providedIn: 'root',
      factory:
      /**
      * @nocollapse @return {?}
      */
      function factory() {
        return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
      }
    });

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Structural diffing for `Object`s and `Map`s.
     * @type {?}
     */


    var keyValDiff = [new DefaultKeyValueDifferFactory()];
    /**
     * Structural diffing for `Iterable` types such as `Array`s.
     * @type {?}
     */

    var iterableDiff = [new DefaultIterableDifferFactory()];
    /** @type {?} */

    var defaultIterableDiffers = new IterableDiffers(iterableDiff);
    /** @type {?} */

    var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @abstract
     * @template C
     */

    var TemplateRef = function TemplateRef() {
      _classCallCheck(this, TemplateRef);
    };
    /**
     * \@internal
     * @nocollapse
     */


    TemplateRef.__NG_ELEMENT_ID__ =
    /**
    * @return {?}
    */
    function () {
      return SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef);
    };

    if (false) {}
    /** @type {?} */


    var SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;
    /** @type {?} */

    var SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @abstract
     */

    var ViewContainerRef = function ViewContainerRef() {
      _classCallCheck(this, ViewContainerRef);
    };
    /**
     * \@internal
     * @nocollapse
     */


    ViewContainerRef.__NG_ELEMENT_ID__ =
    /**
    * @return {?}
    */
    function () {
      return SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef);
    };

    if (false) {}
    /** @type {?} */


    var SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;
    /** @type {?} */

    var SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} context
     * @param {?} oldValue
     * @param {?} currValue
     * @param {?} isFirstCheck
     * @return {?}
     */

    function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {
      /** @type {?} */
      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);
    }
    /**
     * @param {?} err
     * @param {?} context
     * @return {?}
     */


    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;
    }
    /**
     * @param {?} msg
     * @param {?} context
     * @return {?}
     */


    function viewDebugError(msg, context) {
      /** @type {?} */
      var err = new Error(msg);

      _addDebugContext(err, context);

      return err;
    }
    /**
     * @param {?} err
     * @param {?} context
     * @return {?}
     */


    function _addDebugContext(err, context) {
      /** @type {?} */
      err[ERROR_DEBUG_CONTEXT] = context;

      /** @type {?} */
      err[ERROR_LOGGER] = context.logError.bind(context);
    }
    /**
     * @param {?} err
     * @return {?}
     */


    function isViewDebugError(err) {
      return !!getDebugContext(err);
    }
    /**
     * @param {?} action
     * @return {?}
     */


    function viewDestroyedError(action) {
      return new Error("ViewDestroyedError: Attempt to use a destroyed view: ".concat(action));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 for ViewDefinitions/NgModuleDefinitions.
     * We use a function so we can reexeute it in case an error happens and use the given logger
     * function to log the error from the definition of the node, which is shown in all browser
     * logs.
     * @record
     * @template D
     */


    function DefinitionFactory() {}
    /**
     * Function to call console.error at the right source location. This is an indirection
     * via another function as browser will log the location that actually called
     * `console.error`.
     * @record
     */


    function NodeLogger() {}
    /**
     * @record
     * @template DF
     */


    function Definition() {}

    if (false) {}
    /**
     * @record
     */


    function NgModuleDefinition() {}

    if (false) {}
    /**
     * @record
     */


    function NgModuleDefinitionFactory() {}
    /**
     * @record
     */


    function ViewDefinition() {}

    if (false) {}
    /**
     * @record
     */


    function ViewDefinitionFactory() {}
    /**
     * @record
     */


    function ViewUpdateFn() {}
    /**
     * @record
     */


    function NodeCheckFn() {}
    /** @enum {number} */


    var ArgumentType = {
      Inline: 0,
      Dynamic: 1
    };
    /**
     * @record
     */

    function ViewHandleEventFn() {}
    /** @enum {number} */


    var ViewFlags = {
      None: 0,
      OnPush: 2
    };
    /**
     * A node definition in the view.
     *
     * Note: We use one type for all nodes so that loops that loop over all nodes
     * of a ViewDefinition stay monomorphic!
     * @record
     */

    function NodeDef() {}

    if (false) {}
    /** @enum {number} */


    var NodeFlags = {
      None: 0,
      TypeElement: 1,
      TypeText: 2,
      ProjectedTemplate: 4,
      CatRenderNode: 3,
      TypeNgContent: 8,
      TypePipe: 16,
      TypePureArray: 32,
      TypePureObject: 64,
      TypePurePipe: 128,
      CatPureExpression: 224,
      TypeValueProvider: 256,
      TypeClassProvider: 512,
      TypeFactoryProvider: 1024,
      TypeUseExistingProvider: 2048,
      LazyProvider: 4096,
      PrivateProvider: 8192,
      TypeDirective: 16384,
      Component: 32768,
      CatProviderNoDirective: 3840,
      CatProvider: 20224,
      OnInit: 65536,
      OnDestroy: 131072,
      DoCheck: 262144,
      OnChanges: 524288,
      AfterContentInit: 1048576,
      AfterContentChecked: 2097152,
      AfterViewInit: 4194304,
      AfterViewChecked: 8388608,
      EmbeddedViews: 16777216,
      ComponentView: 33554432,
      TypeContentQuery: 67108864,
      TypeViewQuery: 134217728,
      StaticQuery: 268435456,
      DynamicQuery: 536870912,
      TypeNgModule: 1073741824,
      CatQuery: 201326592,
      // mutually exclusive values...
      Types: 201347067
    };
    /**
     * @record
     */

    function BindingDef() {}

    if (false) {}
    /** @enum {number} */


    var BindingFlags = {
      TypeElementAttribute: 1,
      TypeElementClass: 2,
      TypeElementStyle: 4,
      TypeProperty: 8,
      SyntheticProperty: 16,
      SyntheticHostProperty: 32,
      CatSyntheticProperty: 48,
      // mutually exclusive values...
      Types: 15
    };
    /**
     * @record
     */

    function OutputDef() {}

    if (false) {}
    /** @enum {number} */


    var OutputType = {
      ElementOutput: 0,
      DirectiveOutput: 1
    };
    /** @enum {number} */

    var QueryValueType = {
      ElementRef: 0,
      RenderElement: 1,
      TemplateRef: 2,
      ViewContainerRef: 3,
      Provider: 4
    };
    /**
     * @record
     */

    function ElementDef() {}

    if (false) {}
    /**
     * @record
     */


    function ElementHandleEventFn() {}
    /**
     * @record
     */


    function ProviderDef() {}

    if (false) {}
    /**
     * @record
     */


    function NgModuleProviderDef() {}

    if (false) {}
    /**
     * @record
     */


    function DepDef() {}

    if (false) {}
    /** @enum {number} */


    var DepFlags = {
      None: 0,
      SkipSelf: 1,
      Optional: 2,
      Self: 4,
      Value: 8
    };
    /**
     * @record
     */

    function TextDef() {}

    if (false) {}
    /**
     * @record
     */


    function QueryDef() {}

    if (false) {}
    /**
     * @record
     */


    function QueryBindingDef() {}

    if (false) {}
    /** @enum {number} */


    var QueryBindingType = {
      First: 0,
      All: 1
    };
    /**
     * @record
     */

    function NgContentDef() {}

    if (false) {}
    /**
     * @record
     */


    function NgModuleData() {}

    if (false) {}
    /**
     * View instance data.
     * Attention: Adding fields to this is performance sensitive!
     * @record
     */


    function ViewData() {}

    if (false) {}
    /** @enum {number} */


    var ViewState = {
      BeforeFirstCheck: 1,
      FirstCheck: 2,
      Attached: 4,
      ChecksEnabled: 8,
      IsProjectedView: 16,
      CheckProjectedView: 32,
      CheckProjectedViews: 64,
      Destroyed: 128,
      // InitState Uses 3 bits
      InitState_Mask: 1792,
      InitState_BeforeInit: 0,
      InitState_CallingOnInit: 256,
      InitState_CallingAfterContentInit: 512,
      InitState_CallingAfterViewInit: 768,
      InitState_AfterInit: 1024,
      CatDetectChanges: 12,
      CatInit: 13
    }; // 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.

    /**
     * @param {?} view
     * @param {?} priorInitState
     * @param {?} newInitState
     * @return {?}
     */

    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.

      /** @type {?} */
      var state = view.state;
      /** @type {?} */

      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.

    /**
     * @param {?} view
     * @param {?} initState
     * @param {?} index
     * @return {?}
     */


    function shouldCallLifecycleInitHook(view, initState, index) {
      if ((view.state & 1792
      /* InitState_Mask */
      ) === initState && view.initIndex <= index) {
        view.initIndex = index + 1;
        return true;
      }

      return false;
    }
    /**
     * @record
     */


    function DisposableFn() {}
    /**
     * 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);
    };

    if (false) {}
    /**
     * Data for an instantiated NodeType.Text.
     *
     * Attention: Adding fields to this is performance sensitive!
     * @record
     */


    function TextData() {}

    if (false) {}
    /**
     * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function asTextData(view, index) {
      return (
        /** @type {?} */
        view.nodes[index]
      );
    }
    /**
     * Data for an instantiated NodeType.Element.
     *
     * Attention: Adding fields to this is performance sensitive!
     * @record
     */


    function ElementData() {}

    if (false) {}
    /**
     * @record
     */


    function ViewContainerData() {}

    if (false) {}
    /**
     * @record
     */


    function TemplateData() {}

    if (false) {}
    /**
     * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function asElementData(view, index) {
      return (
        /** @type {?} */
        view.nodes[index]
      );
    }
    /**
     * Data for an instantiated NodeType.Provider.
     *
     * Attention: Adding fields to this is performance sensitive!
     * @record
     */


    function ProviderData() {}

    if (false) {}
    /**
     * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function asProviderData(view, index) {
      return (
        /** @type {?} */
        view.nodes[index]
      );
    }
    /**
     * Data for an instantiated NodeType.PureExpression.
     *
     * Attention: Adding fields to this is performance sensitive!
     * @record
     */


    function PureExpressionData() {}

    if (false) {}
    /**
     * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function asPureExpressionData(view, index) {
      return (
        /** @type {?} */
        view.nodes[index]
      );
    }
    /**
     * Accessor for view.nodes, enforcing that every usage site stays monomorphic.
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function asQueryList(view, index) {
      return (
        /** @type {?} */
        view.nodes[index]
      );
    }
    /**
     * @record
     */


    function RootData() {}

    if (false) {}
    /**
     * @abstract
     */


    var DebugContext = function DebugContext() {
      _classCallCheck(this, DebugContext);
    };

    if (false) {}
    /** @enum {number} */


    var CheckType = {
      CheckAndUpdate: 0,
      CheckNoChanges: 1
    };
    /**
     * @record
     */

    function ProviderOverride() {}

    if (false) {} // WARNING: interface has both a type and a value, skipping emit

    /**
     * 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.
     * @type {?}
     */


    var Services = {
      setCurrentNode:
      /** @type {?} */
      undefined,
      createRootView:
      /** @type {?} */
      undefined,
      createEmbeddedView:
      /** @type {?} */
      undefined,
      createComponentView:
      /** @type {?} */
      undefined,
      createNgModuleRef:
      /** @type {?} */
      undefined,
      overrideProvider:
      /** @type {?} */
      undefined,
      overrideComponentView:
      /** @type {?} */
      undefined,
      clearOverrides:
      /** @type {?} */
      undefined,
      checkAndUpdateView:
      /** @type {?} */
      undefined,
      checkNoChangesView:
      /** @type {?} */
      undefined,
      destroyView:
      /** @type {?} */
      undefined,
      resolveDep:
      /** @type {?} */
      undefined,
      createDebugContext:
      /** @type {?} */
      undefined,
      handleEvent:
      /** @type {?} */
      undefined,
      updateDirectives:
      /** @type {?} */
      undefined,
      updateRenderer:
      /** @type {?} */
      undefined,
      dirtyParentQueries:
      /** @type {?} */
      undefined
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var NOOP =
    /**
    * @return {?}
    */
    function NOOP() {};
    /** @type {?} */


    var _tokenKeyCache = new Map();
    /**
     * @param {?} token
     * @return {?}
     */


    function tokenKey(token) {
      /** @type {?} */
      var key = _tokenKeyCache.get(token);

      if (!key) {
        key = stringify(token) + '_' + _tokenKeyCache.size;

        _tokenKeyCache.set(token, key);
      }

      return key;
    }
    /**
     * @param {?} view
     * @param {?} nodeIdx
     * @param {?} bindingIdx
     * @param {?} value
     * @return {?}
     */


    function unwrapValue(view, nodeIdx, bindingIdx, value) {
      if (WrappedValue.isWrapped(value)) {
        value = WrappedValue.unwrap(value);
        /** @type {?} */

        var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;
        /** @type {?} */

        var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);
        view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);
      }

      return value;
    }
    /** @type {?} */


    var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';
    /** @type {?} */

    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!

    /**
     * @param {?} values
     * @return {?}
     */

    function createRendererType2(values) {
      return {
        id: UNDEFINED_RENDERER_TYPE_ID,
        styles: values.styles,
        encapsulation: values.encapsulation,
        data: values.data
      };
    }
    /** @type {?} */


    var _renderCompCount$1 = 0;
    /**
     * @param {?=} type
     * @return {?}
     */

    function resolveRendererType2(type) {
      if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {
        // first time we see this RendererType2. Initialize it...

        /** @type {?} */
        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;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} bindingIdx
     * @param {?} value
     * @return {?}
     */


    function checkBinding(view, def, bindingIdx, value) {
      /** @type {?} */
      var oldValues = view.oldValues;

      if (view.state & 2
      /* FirstCheck */
      || !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {
        return true;
      }

      return false;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} bindingIdx
     * @param {?} value
     * @return {?}
     */


    function checkAndUpdateBinding(view, def, bindingIdx, value) {
      if (checkBinding(view, def, bindingIdx, value)) {
        view.oldValues[def.bindingIndex + bindingIdx] = value;
        return true;
      }

      return false;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} bindingIdx
     * @param {?} value
     * @return {?}
     */


    function checkBindingNoChanges(view, def, bindingIdx, value) {
      /** @type {?} */
      var oldValue = view.oldValues[def.bindingIndex + bindingIdx];

      if (view.state & 1
      /* BeforeFirstCheck */
      || !devModeEqual$1(oldValue, value)) {
        /** @type {?} */
        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);
      }
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function markParentViewsForCheck(view) {
      /** @type {?} */
      var currView = view;

      while (currView) {
        if (currView.def.flags & 2
        /* OnPush */
        ) {
            currView.state |= 8
            /* ChecksEnabled */
            ;
          }

        currView = currView.viewContainerParent || currView.parent;
      }
    }
    /**
     * @param {?} view
     * @param {?} endView
     * @return {?}
     */


    function markParentViewsForCheckProjectedViews(view, endView) {
      /** @type {?} */
      var currView = view;

      while (currView && currView !== endView) {
        currView.state |= 64
        /* CheckProjectedViews */
        ;
        currView = currView.viewContainerParent || currView.parent;
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeIndex
     * @param {?} eventName
     * @param {?} event
     * @return {?}
     */


    function dispatchEvent(view, nodeIndex, eventName, event) {
      try {
        /** @type {?} */
        var nodeDef = view.def.nodes[nodeIndex];
        /** @type {?} */

        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);
      }
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function declaredViewContainer(view) {
      if (view.parent) {
        /** @type {?} */
        var parentView = view.parent;
        return asElementData(parentView,
        /** @type {?} */
        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.
     * @param {?} view
     * @return {?}
     */


    function viewParentEl(view) {
      /** @type {?} */
      var parentView = view.parent;

      if (parentView) {
        return (
          /** @type {?} */
          view.parentNodeDef.parent
        );
      } else {
        return null;
      }
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    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;
      }
    }
    /**
     * @param {?} target
     * @param {?} name
     * @return {?}
     */


    function elementEventFullName(target, name) {
      return target ? "".concat(target, ":").concat(name) : name;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function isComponentView(view) {
      return !!view.parent && !!(
      /** @type {?} */
      view.parentNodeDef.flags & 32768
      /* Component */
      );
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function isEmbeddedView(view) {
      return !!view.parent && !(
      /** @type {?} */
      view.parentNodeDef.flags & 32768
      /* Component */
      );
    }
    /**
     * @param {?} queryId
     * @return {?}
     */


    function filterQueryId(queryId) {
      return 1 << queryId % 32;
    }
    /**
     * @param {?} matchedQueriesDsl
     * @return {?}
     */


    function splitMatchedQueriesDsl(matchedQueriesDsl) {
      /** @type {?} */
      var matchedQueries = {};
      /** @type {?} */

      var matchedQueryIds = 0;
      /** @type {?} */

      var references = {};

      if (matchedQueriesDsl) {
        matchedQueriesDsl.forEach(
        /**
        * @param {?} __0
        * @return {?}
        */
        function (_ref59) {
          var _ref60 = _slicedToArray(_ref59, 2),
              queryId = _ref60[0],
              valueType = _ref60[1];

          if (typeof queryId === 'number') {
            matchedQueries[queryId] = valueType;
            matchedQueryIds |= filterQueryId(queryId);
          } else {
            references[queryId] = valueType;
          }
        });
      }

      return {
        matchedQueries: matchedQueries,
        references: references,
        matchedQueryIds: matchedQueryIds
      };
    }
    /**
     * @param {?} deps
     * @param {?=} sourceName
     * @return {?}
     */


    function splitDepsDsl(deps, sourceName) {
      return deps.map(
      /**
      * @param {?} value
      * @return {?}
      */
      function (value) {
        /** @type {?} */
        var token;
        /** @type {?} */

        var flags;

        if (Array.isArray(value)) {
          var _value10 = _slicedToArray(value, 2);

          flags = _value10[0];
          token = _value10[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)
        };
      });
    }
    /**
     * @param {?} view
     * @param {?} renderHost
     * @param {?} def
     * @return {?}
     */


    function getParentRenderElement(view, renderHost, def) {
      /** @type {?} */
      var renderParent = def.renderParent;

      if (renderParent) {
        if ((renderParent.flags & 1
        /* TypeElement */
        ) === 0 || (renderParent.flags & 33554432
        /* ComponentView */
        ) === 0 ||
        /** @type {?} */
        renderParent.element.componentRendererType &&
        /** @type {?} */

        /** @type {?} */
        renderParent.element.componentRendererType.encapsulation === ViewEncapsulation.Native) {
          // only children of non components, or children of components with native encapsulation should
          // be attached.
          return asElementData(view,
          /** @type {?} */
          def.renderParent.nodeIndex).renderElement;
        }
      } else {
        return renderHost;
      }
    }
    /** @type {?} */


    var DEFINITION_CACHE = new WeakMap();
    /**
     * @template D
     * @param {?} factory
     * @return {?}
     */

    function resolveDefinition(factory) {
      /** @type {?} */
      var value =
      /** @type {?} */

      /** @type {?} */
      DEFINITION_CACHE.get(factory);

      if (!value) {
        value = factory(
        /**
        * @return {?}
        */
        function () {
          return NOOP;
        });
        value.factory = factory;
        DEFINITION_CACHE.set(factory, value);
      }

      return value;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function rootRenderNodes(view) {
      /** @type {?} */
      var renderNodes = [];
      visitRootRenderNodes(view, 0
      /* Collect */
      , undefined, undefined, renderNodes);
      return renderNodes;
    }
    /** @enum {number} */


    var RenderNodeAction = {
      Collect: 0,
      AppendChild: 1,
      InsertBefore: 2,
      RemoveChild: 3
    };
    /**
     * @param {?} view
     * @param {?} action
     * @param {?} parentNode
     * @param {?} nextSibling
     * @param {?=} target
     * @return {?}
     */

    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,
          /** @type {?} */
          view.def.lastRenderRootNode));
        }

      visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
    }
    /**
     * @param {?} view
     * @param {?} action
     * @param {?} startIndex
     * @param {?} endIndex
     * @param {?} parentNode
     * @param {?} nextSibling
     * @param {?=} target
     * @return {?}
     */


    function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {
      for (var i = startIndex; i <= endIndex; i++) {
        /** @type {?} */
        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;
      }
    }
    /**
     * @param {?} view
     * @param {?} ngContentIndex
     * @param {?} action
     * @param {?} parentNode
     * @param {?} nextSibling
     * @param {?=} target
     * @return {?}
     */


    function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {
      /** @type {?} */
      var compView = view;

      while (compView && !isComponentView(compView)) {
        compView = compView.parent;
      }
      /** @type {?} */


      var hostView =
      /** @type {?} */
      compView.parent;
      /** @type {?} */

      var hostElDef = viewParentEl(
      /** @type {?} */
      compView);
      /** @type {?} */

      var startIndex =
      /** @type {?} */
      hostElDef.nodeIndex + 1;
      /** @type {?} */

      var endIndex =
      /** @type {?} */
      hostElDef.nodeIndex +
      /** @type {?} */
      hostElDef.childCount;

      for (var i = startIndex; i <= endIndex; i++) {
        /** @type {?} */
        var nodeDef =
        /** @type {?} */
        hostView.def.nodes[i];

        if (nodeDef.ngContentIndex === ngContentIndex) {
          visitRenderNode(
          /** @type {?} */
          hostView, nodeDef, action, parentNode, nextSibling, target);
        } // jump to next sibling


        i += nodeDef.childCount;
      }

      if (!
      /** @type {?} */
      hostView.parent) {
        // a root view

        /** @type {?} */
        var projectedNodes = view.root.projectableNodes[ngContentIndex];

        if (projectedNodes) {
          for (var _i18 = 0; _i18 < projectedNodes.length; _i18++) {
            execRenderNodeAction(view, projectedNodes[_i18], action, parentNode, nextSibling, target);
          }
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} action
     * @param {?} parentNode
     * @param {?} nextSibling
     * @param {?=} target
     * @return {?}
     */


    function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {
      if (nodeDef.flags & 8
      /* TypeNgContent */
      ) {
          visitProjectedRenderNodes(view,
          /** @type {?} */
          nodeDef.ngContent.index, action, parentNode, nextSibling, target);
        } else {
        /** @type {?} */
        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 */
          ) {
            /** @type {?} */
            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 */
        ) {
            /** @type {?} */
            var embeddedViews =
            /** @type {?} */
            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 */
        && !
        /** @type {?} */
        nodeDef.element.name) {
          visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} renderNode
     * @param {?} action
     * @param {?} parentNode
     * @param {?} nextSibling
     * @param {?=} target
     * @return {?}
     */


    function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {
      /** @type {?} */
      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 */
        :
          /** @type {?} */
          target.push(renderNode);
          break;
      }
    }
    /** @type {?} */


    var NS_PREFIX_RE = /^:([^:]+):(.+)$/;
    /**
     * @param {?} name
     * @return {?}
     */

    function splitNamespace(name) {
      if (name[0] === ':') {
        /** @type {?} */
        var match =
        /** @type {?} */
        name.match(NS_PREFIX_RE);
        return [match[1], match[2]];
      }

      return ['', name];
    }
    /**
     * @param {?} bindings
     * @return {?}
     */


    function calcBindingFlags(bindings) {
      /** @type {?} */
      var flags = 0;

      for (var i = 0; i < bindings.length; i++) {
        flags |= bindings[i].flags;
      }

      return flags;
    }
    /**
     * @param {?} valueCount
     * @param {?} constAndInterp
     * @return {?}
     */


    function interpolate(valueCount, constAndInterp) {
      /** @type {?} */
      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];
    }
    /**
     * @param {?} valueCount
     * @param {?} c0
     * @param {?} a1
     * @param {?} c1
     * @param {?=} a2
     * @param {?=} c2
     * @param {?=} a3
     * @param {?=} c3
     * @param {?=} a4
     * @param {?=} c4
     * @param {?=} a5
     * @param {?=} c5
     * @param {?=} a6
     * @param {?=} c6
     * @param {?=} a7
     * @param {?=} c7
     * @param {?=} a8
     * @param {?=} c8
     * @param {?=} a9
     * @param {?=} c9
     * @return {?}
     */


    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");
      }
    }
    /**
     * @param {?} v
     * @return {?}
     */


    function _toStringWithNull(v) {
      return v != null ? v.toString() : '';
    }
    /** @type {?} */


    var EMPTY_ARRAY$3 = [];
    /** @type {?} */

    var EMPTY_MAP = {};
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var UNDEFINED_VALUE = new Object();
    /** @type {?} */

    var InjectorRefTokenKey = tokenKey(Injector);
    /** @type {?} */

    var INJECTORRefTokenKey = tokenKey(INJECTOR);
    /** @type {?} */

    var NgModuleRefTokenKey = tokenKey(NgModuleRef);
    /**
     * @param {?} flags
     * @param {?} token
     * @param {?} value
     * @param {?} deps
     * @return {?}
     */

    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);
      /** @type {?} */

      var depDefs = splitDepsDsl(deps, stringify(token));
      return {
        // will bet set by the module definition
        index: -1,
        deps: depDefs,
        flags: flags,
        token: token,
        value: value
      };
    }
    /**
     * @param {?} providers
     * @return {?}
     */


    function moduleDef(providers) {
      /** @type {?} */
      var providersByKey = {};
      /** @type {?} */

      var modules = [];
      /** @type {?} */

      var isRoot = false;

      for (var i = 0; i < providers.length; i++) {
        /** @type {?} */
        var provider = providers[i];

        if (provider.token === APP_ROOT && provider.value === true) {
          isRoot = true;
        }

        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,
        isRoot: isRoot
      };
    }
    /**
     * @param {?} data
     * @return {?}
     */


    function initNgModule(data) {
      /** @type {?} */
      var def = data._def;
      /** @type {?} */

      var providers = data._providers = new Array(def.providers.length);

      for (var i = 0; i < def.providers.length; i++) {
        /** @type {?} */
        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);
          }
        }
      }
    }
    /**
     * @param {?} data
     * @param {?} depDef
     * @param {?=} notFoundValue
     * @return {?}
     */


    function resolveNgModuleDep(data, depDef) {
      var notFoundValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Injector.THROW_IF_NOT_FOUND;

      /** @type {?} */
      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);
          }
        /** @type {?} */


        var _tokenKey = depDef.tokenKey;

        switch (_tokenKey) {
          case InjectorRefTokenKey:
          case INJECTORRefTokenKey:
          case NgModuleRefTokenKey:
            return data;
        }
        /** @type {?} */


        var _providerDef2 = data._def.providersByKey[_tokenKey];
        /** @type {?} */

        var injectableDef;

        if (_providerDef2) {
          /** @type {?} */
          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)) {
          /** @type {?} */
          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);
      }
    }
    /**
     * @param {?} ngModule
     * @param {?} scope
     * @return {?}
     */


    function moduleTransitivelyPresent(ngModule, scope) {
      return ngModule._def.modules.indexOf(scope) > -1;
    }
    /**
     * @param {?} ngModule
     * @param {?} def
     * @return {?}
     */


    function targetsModule(ngModule, def) {
      return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) || def.providedIn === 'root' && ngModule._def.isRoot);
    }
    /**
     * @param {?} ngModule
     * @param {?} providerDef
     * @return {?}
     */


    function _createProviderInstance(ngModule, providerDef) {
      /** @type {?} */
      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;
    }
    /**
     * @param {?} ngModule
     * @param {?} ctor
     * @param {?} deps
     * @return {?}
     */


    function _createClass(ngModule, ctor, deps) {
      /** @type {?} */
      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:
          /** @type {?} */
          var depValues = new Array(len);

          for (var i = 0; i < len; i++) {
            depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
          }

          return _construct(ctor, depValues);
      }
    }
    /**
     * @param {?} ngModule
     * @param {?} factory
     * @param {?} deps
     * @return {?}
     */


    function _callFactory(ngModule, factory, deps) {
      /** @type {?} */
      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:
          /** @type {?} */
          var depValues = Array(len);

          for (var i = 0; i < len; i++) {
            depValues[i] = resolveNgModuleDep(ngModule, deps[i]);
          }

          return factory.apply(void 0, depValues);
      }
    }
    /**
     * @param {?} ngModule
     * @param {?} lifecycles
     * @return {?}
     */


    function callNgModuleLifecycle(ngModule, lifecycles) {
      /** @type {?} */
      var def = ngModule._def;
      /** @type {?} */

      var destroyed = new Set();

      for (var i = 0; i < def.providers.length; i++) {
        /** @type {?} */
        var provDef = def.providers[i];

        if (provDef.flags & 131072
        /* OnDestroy */
        ) {
            /** @type {?} */
            var instance = ngModule._providers[i];

            if (instance && instance !== UNDEFINED_VALUE) {
              /** @type {?} */
              var onDestroy = instance.ngOnDestroy;

              if (typeof onDestroy === 'function' && !destroyed.has(instance)) {
                onDestroy.apply(instance);
                destroyed.add(instance);
              }
            }
          }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} parentView
     * @param {?} elementData
     * @param {?} viewIndex
     * @param {?} view
     * @return {?}
     */


    function attachEmbeddedView(parentView, elementData, viewIndex, view) {
      /** @type {?} */
      var embeddedViews =
      /** @type {?} */
      elementData.viewContainer._embeddedViews;

      if (viewIndex === null || viewIndex === undefined) {
        viewIndex = embeddedViews.length;
      }

      view.viewContainerParent = parentView;
      addToArray(embeddedViews,
      /** @type {?} */
      viewIndex, view);
      attachProjectedView(elementData, view);
      Services.dirtyParentQueries(view);
      /** @type {?} */

      var prevView =
      /** @type {?} */
      viewIndex > 0 ? embeddedViews[
      /** @type {?} */
      viewIndex - 1] : null;
      renderAttachEmbeddedView(elementData, prevView, view);
    }
    /**
     * @param {?} vcElementData
     * @param {?} view
     * @return {?}
     */


    function attachProjectedView(vcElementData, view) {
      /** @type {?} */
      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 */
      ;
      /** @type {?} */

      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(
      /** @type {?} */
      view.parent.def,
      /** @type {?} */
      view.parentNodeDef);
    }
    /**
     * @param {?} viewDef
     * @param {?} nodeDef
     * @return {?}
     */


    function markNodeAsProjectedTemplate(viewDef, nodeDef) {
      if (nodeDef.flags & 4
      /* ProjectedTemplate */
      ) {
          return;
        }

      viewDef.nodeFlags |= 4
      /* ProjectedTemplate */
      ;
      nodeDef.flags |= 4
      /* ProjectedTemplate */
      ;
      /** @type {?} */

      var parentNodeDef = nodeDef.parent;

      while (parentNodeDef) {
        parentNodeDef.childFlags |= 4
        /* ProjectedTemplate */
        ;
        parentNodeDef = parentNodeDef.parent;
      }
    }
    /**
     * @param {?} elementData
     * @param {?=} viewIndex
     * @return {?}
     */


    function detachEmbeddedView(elementData, viewIndex) {
      /** @type {?} */
      var embeddedViews =
      /** @type {?} */
      elementData.viewContainer._embeddedViews;

      if (viewIndex == null || viewIndex >= embeddedViews.length) {
        viewIndex = embeddedViews.length - 1;
      }

      if (viewIndex < 0) {
        return null;
      }
      /** @type {?} */


      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;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function detachProjectedView(view) {
      if (!(view.state & 16
      /* IsProjectedView */
      )) {
        return;
      }
      /** @type {?} */


      var dvcElementData = declaredViewContainer(view);

      if (dvcElementData) {
        /** @type {?} */
        var projectedViews = dvcElementData.template._projectedViews;

        if (projectedViews) {
          removeFromArray(projectedViews, projectedViews.indexOf(view));
          Services.dirtyParentQueries(view);
        }
      }
    }
    /**
     * @param {?} elementData
     * @param {?} oldViewIndex
     * @param {?} newViewIndex
     * @return {?}
     */


    function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
      /** @type {?} */
      var embeddedViews =
      /** @type {?} */
      elementData.viewContainer._embeddedViews;
      /** @type {?} */

      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);
      /** @type {?} */

      var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;
      renderAttachEmbeddedView(elementData, prevView, view);
      return view;
    }
    /**
     * @param {?} elementData
     * @param {?} prevView
     * @param {?} view
     * @return {?}
     */


    function renderAttachEmbeddedView(elementData, prevView, view) {
      /** @type {?} */
      var prevRenderNode = prevView ? renderNode(prevView,
      /** @type {?} */
      prevView.def.lastRenderRootNode) : elementData.renderElement;
      /** @type {?} */

      var parentNode = view.renderer.parentNode(prevRenderNode);
      /** @type {?} */

      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);
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function renderDetachView$1(view) {
      visitRootRenderNodes(view, 3
      /* RemoveChild */
      , null, null, undefined);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var EMPTY_CONTEXT = new Object(); // Attention: this function is called as top level function.
    // Putting any logic in here will destroy closure tree shaking!

    /**
     * @param {?} selector
     * @param {?} componentType
     * @param {?} viewDefFactory
     * @param {?} inputs
     * @param {?} outputs
     * @param {?} ngContentSelectors
     * @return {?}
     */

    function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {
      return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);
    }
    /**
     * @param {?} componentFactory
     * @return {?}
     */


    function getComponentViewDefinitionFactory(componentFactory) {
      return (
        /** @type {?} */
        componentFactory.viewDefFactory
      );
    }

    var ComponentFactory_ = /*#__PURE__*/function (_ComponentFactory2) {
      _inherits(ComponentFactory_, _ComponentFactory2);

      var _super109 = _createSuper(ComponentFactory_);

      /**
       * @param {?} selector
       * @param {?} componentType
       * @param {?} viewDefFactory
       * @param {?} _inputs
       * @param {?} _outputs
       * @param {?} ngContentSelectors
       */
      function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {
        var _this319;

        _classCallCheck(this, ComponentFactory_);

        // Attention: this ctor is called as top level function.
        // Putting any logic in here will destroy closure tree shaking!
        _this319 = _super109.call(this);
        _this319.selector = selector;
        _this319.componentType = componentType;
        _this319._inputs = _inputs;
        _this319._outputs = _outputs;
        _this319.ngContentSelectors = ngContentSelectors;
        _this319.viewDefFactory = viewDefFactory;
        return _this319;
      }
      /**
       * @return {?}
       */


      _createClass2(ComponentFactory_, [{
        key: "create",

        /**
         * Creates a new component.
         * @param {?} injector
         * @param {?=} projectableNodes
         * @param {?=} rootSelectorOrNode
         * @param {?=} ngModule
         * @return {?}
         */
        value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
          if (!ngModule) {
            throw new Error('ngModule should be provided');
          }
          /** @type {?} */


          var viewDef = resolveDefinition(this.viewDefFactory);
          /** @type {?} */

          var componentNodeIndex =
          /** @type {?} */

          /** @type {?} */
          viewDef.nodes[0].element.componentProvider.nodeIndex;
          /** @type {?} */

          var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);
          /** @type {?} */

          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);
        }
      }, {
        key: "inputs",
        get: function get() {
          /** @type {?} */
          var inputsArr = [];
          /** @type {?} */

          var inputs =
          /** @type {?} */
          this._inputs;

          for (var propName in inputs) {
            /** @type {?} */
            var templateName = inputs[propName];
            inputsArr.push({
              propName: propName,
              templateName: templateName
            });
          }

          return inputsArr;
        }
        /**
         * @return {?}
         */

      }, {
        key: "outputs",
        get: function get() {
          /** @type {?} */
          var outputsArr = [];

          for (var propName in this._outputs) {
            /** @type {?} */
            var templateName = this._outputs[propName];
            outputsArr.push({
              propName: propName,
              templateName: templateName
            });
          }

          return outputsArr;
        }
      }]);

      return ComponentFactory_;
    }(ComponentFactory);

    if (false) {}

    var ComponentRef_ = /*#__PURE__*/function (_ComponentRef) {
      _inherits(ComponentRef_, _ComponentRef);

      var _super110 = _createSuper(ComponentRef_);

      /**
       * @param {?} _view
       * @param {?} _viewRef
       * @param {?} _component
       */
      function ComponentRef_(_view, _viewRef, _component) {
        var _this320;

        _classCallCheck(this, ComponentRef_);

        _this320 = _super110.call(this);
        _this320._view = _view;
        _this320._viewRef = _viewRef;
        _this320._component = _component;
        _this320._elDef = _this320._view.def.nodes[0];
        _this320.hostView = _viewRef;
        _this320.changeDetectorRef = _viewRef;
        _this320.instance = _component;
        return _this320;
      }
      /**
       * @return {?}
       */


      _createClass2(ComponentRef_, [{
        key: "destroy",

        /**
         * @return {?}
         */
        value: function destroy() {
          this._viewRef.destroy();
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          this._viewRef.onDestroy(callback);
        }
      }, {
        key: "location",
        get: function get() {
          return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);
        }
        /**
         * @return {?}
         */

      }, {
        key: "injector",
        get: function get() {
          return new Injector_(this._view, this._elDef);
        }
        /**
         * @return {?}
         */

      }, {
        key: "componentType",
        get: function get() {
          return (
            /** @type {?} */
            this._component.constructor
          );
        }
      }]);

      return ComponentRef_;
    }(ComponentRef);

    if (false) {}
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} elData
     * @return {?}
     */


    function createViewContainerData(view, elDef, elData) {
      return new ViewContainerRef_(view, elDef, elData);
    }

    var ViewContainerRef_ = /*#__PURE__*/function () {
      /**
       * @param {?} _view
       * @param {?} _elDef
       * @param {?} _data
       */
      function ViewContainerRef_(_view, _elDef, _data) {
        _classCallCheck(this, ViewContainerRef_);

        this._view = _view;
        this._elDef = _elDef;
        this._data = _data;
        /**
         * \@internal
         */

        this._embeddedViews = [];
      }
      /**
       * @return {?}
       */


      _createClass2(ViewContainerRef_, [{
        key: "clear",

        /**
         * @return {?}
         */
        value: function clear() {
          /** @type {?} */
          var len = this._embeddedViews.length;

          for (var i = len - 1; i >= 0; i--) {
            /** @type {?} */
            var view =
            /** @type {?} */
            detachEmbeddedView(this._data, i);
            Services.destroyView(view);
          }
        }
        /**
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "get",
        value: function get(index) {
          /** @type {?} */
          var view = this._embeddedViews[index];

          if (view) {
            /** @type {?} */
            var ref = new ViewRef_(view);
            ref.attachToViewContainerRef(this);
            return ref;
          }

          return null;
        }
        /**
         * @return {?}
         */

      }, {
        key: "createEmbeddedView",

        /**
         * @template C
         * @param {?} templateRef
         * @param {?=} context
         * @param {?=} index
         * @return {?}
         */
        value: function createEmbeddedView(templateRef, context, index) {
          /** @type {?} */
          var viewRef = templateRef.createEmbeddedView(context ||
          /** @type {?} */
          {});
          this.insert(viewRef, index);
          return viewRef;
        }
        /**
         * @template C
         * @param {?} componentFactory
         * @param {?=} index
         * @param {?=} injector
         * @param {?=} projectableNodes
         * @param {?=} ngModuleRef
         * @return {?}
         */

      }, {
        key: "createComponent",
        value: function createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {
          /** @type {?} */
          var contextInjector = injector || this.parentInjector;

          if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {
            ngModuleRef = contextInjector.get(NgModuleRef);
          }
          /** @type {?} */


          var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);
          this.insert(componentRef.hostView, index);
          return componentRef;
        }
        /**
         * @param {?} viewRef
         * @param {?=} index
         * @return {?}
         */

      }, {
        key: "insert",
        value: function insert(viewRef, index) {
          if (viewRef.destroyed) {
            throw new Error('Cannot insert a destroyed View in a ViewContainer!');
          }
          /** @type {?} */


          var viewRef_ =
          /** @type {?} */
          viewRef;
          /** @type {?} */

          var viewData = viewRef_._view;
          attachEmbeddedView(this._view, this._data, index, viewData);
          viewRef_.attachToViewContainerRef(this);
          return viewRef;
        }
        /**
         * @param {?} viewRef
         * @param {?} currentIndex
         * @return {?}
         */

      }, {
        key: "move",
        value: function move(viewRef, currentIndex) {
          if (viewRef.destroyed) {
            throw new Error('Cannot move a destroyed View in a ViewContainer!');
          }
          /** @type {?} */


          var previousIndex = this._embeddedViews.indexOf(viewRef._view);

          moveEmbeddedView(this._data, previousIndex, currentIndex);
          return viewRef;
        }
        /**
         * @param {?} viewRef
         * @return {?}
         */

      }, {
        key: "indexOf",
        value: function indexOf(viewRef) {
          return this._embeddedViews.indexOf(
          /** @type {?} */
          viewRef._view);
        }
        /**
         * @param {?=} index
         * @return {?}
         */

      }, {
        key: "remove",
        value: function remove(index) {
          /** @type {?} */
          var viewData = detachEmbeddedView(this._data, index);

          if (viewData) {
            Services.destroyView(viewData);
          }
        }
        /**
         * @param {?=} index
         * @return {?}
         */

      }, {
        key: "detach",
        value: function detach(index) {
          /** @type {?} */
          var view = detachEmbeddedView(this._data, index);
          return view ? new ViewRef_(view) : null;
        }
      }, {
        key: "element",
        get: function get() {
          return new ElementRef(this._data.renderElement);
        }
        /**
         * @return {?}
         */

      }, {
        key: "injector",
        get: function get() {
          return new Injector_(this._view, this._elDef);
        }
        /**
         * @deprecated No replacement
         * @return {?}
         */

      }, {
        key: "parentInjector",
        get: function get() {
          /** @type {?} */
          var view = this._view;
          /** @type {?} */

          var elDef = this._elDef.parent;

          while (!elDef && view) {
            elDef = viewParentEl(view);
            view =
            /** @type {?} */
            view.parent;
          }

          return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
        }
      }, {
        key: "length",
        get: function get() {
          return this._embeddedViews.length;
        }
      }]);

      return ViewContainerRef_;
    }();

    if (false) {}
    /**
     * @param {?} view
     * @return {?}
     */


    function createChangeDetectorRef(view) {
      return new ViewRef_(view);
    }

    var ViewRef_ = /*#__PURE__*/function () {
      /**
       * @param {?} _view
       */
      function ViewRef_(_view) {
        _classCallCheck(this, ViewRef_);

        this._view = _view;
        this._viewContainerRef = null;
        this._appRef = null;
      }
      /**
       * @return {?}
       */


      _createClass2(ViewRef_, [{
        key: "markForCheck",

        /**
         * @return {?}
         */
        value: function markForCheck() {
          markParentViewsForCheck(this._view);
        }
        /**
         * @return {?}
         */

      }, {
        key: "detach",
        value: function detach() {
          this._view.state &= ~4
          /* Attached */
          ;
        }
        /**
         * @return {?}
         */

      }, {
        key: "detectChanges",
        value: function detectChanges() {
          /** @type {?} */
          var fs = this._view.root.rendererFactory;

          if (fs.begin) {
            fs.begin();
          }

          try {
            Services.checkAndUpdateView(this._view);
          } finally {
            if (fs.end) {
              fs.end();
            }
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "checkNoChanges",
        value: function checkNoChanges() {
          Services.checkNoChangesView(this._view);
        }
        /**
         * @return {?}
         */

      }, {
        key: "reattach",
        value: function reattach() {
          this._view.state |= 4
          /* Attached */
          ;
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          if (!this._view.disposables) {
            this._view.disposables = [];
          }

          this._view.disposables.push(
          /** @type {?} */
          callback);
        }
        /**
         * @return {?}
         */

      }, {
        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);
        }
        /**
         * @return {?}
         */

      }, {
        key: "detachFromAppRef",
        value: function detachFromAppRef() {
          this._appRef = null;
          renderDetachView$1(this._view);
          Services.dirtyParentQueries(this._view);
        }
        /**
         * @param {?} appRef
         * @return {?}
         */

      }, {
        key: "attachToAppRef",
        value: function attachToAppRef(appRef) {
          if (this._viewContainerRef) {
            throw new Error('This view is already attached to a ViewContainer!');
          }

          this._appRef = appRef;
        }
        /**
         * @param {?} vcRef
         * @return {?}
         */

      }, {
        key: "attachToViewContainerRef",
        value: function attachToViewContainerRef(vcRef) {
          if (this._appRef) {
            throw new Error('This view is already attached directly to the ApplicationRef!');
          }

          this._viewContainerRef = vcRef;
        }
      }, {
        key: "rootNodes",
        get: function get() {
          return rootRenderNodes(this._view);
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return this._view.context;
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroyed",
        get: function get() {
          return (this._view.state & 128
          /* Destroyed */
          ) !== 0;
        }
      }]);

      return ViewRef_;
    }();

    if (false) {}
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function createTemplateData(view, def) {
      return new TemplateRef_(view, def);
    }

    var TemplateRef_ = /*#__PURE__*/function (_TemplateRef) {
      _inherits(TemplateRef_, _TemplateRef);

      var _super111 = _createSuper(TemplateRef_);

      /**
       * @param {?} _parentView
       * @param {?} _def
       */
      function TemplateRef_(_parentView, _def) {
        var _this321;

        _classCallCheck(this, TemplateRef_);

        _this321 = _super111.call(this);
        _this321._parentView = _parentView;
        _this321._def = _def;
        return _this321;
      }
      /**
       * @param {?} context
       * @return {?}
       */


      _createClass2(TemplateRef_, [{
        key: "createEmbeddedView",
        value: function createEmbeddedView(context) {
          return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def,
          /** @type {?} */

          /** @type {?} */
          this._def.element.template, context));
        }
        /**
         * @return {?}
         */

      }, {
        key: "elementRef",
        get: function get() {
          return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);
        }
      }]);

      return TemplateRef_;
    }(TemplateRef);

    if (false) {}
    /**
     * @param {?} view
     * @param {?} elDef
     * @return {?}
     */


    function createInjector$1(view, elDef) {
      return new Injector_(view, elDef);
    }

    var Injector_ = /*#__PURE__*/function () {
      /**
       * @param {?} view
       * @param {?} elDef
       */
      function Injector_(view, elDef) {
        _classCallCheck(this, Injector_);

        this.view = view;
        this.elDef = elDef;
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @return {?}
       */


      _createClass2(Injector_, [{
        key: "get",
        value: function get(token) {
          var notFoundValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Injector.THROW_IF_NOT_FOUND;

          /** @type {?} */
          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_;
    }();

    if (false) {}
    /**
     * @param {?} view
     * @param {?} index
     * @return {?}
     */


    function nodeValue(view, index) {
      /** @type {?} */
      var def = view.def.nodes[index];

      if (def.flags & 1
      /* TypeElement */
      ) {
          /** @type {?} */
          var elData = asElementData(view, def.nodeIndex);
          return (
            /** @type {?} */
            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));
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function createRendererV1(view) {
      return new RendererAdapter(view.renderer);
    }

    var RendererAdapter = /*#__PURE__*/function () {
      /**
       * @param {?} delegate
       */
      function RendererAdapter(delegate) {
        _classCallCheck(this, RendererAdapter);

        this.delegate = delegate;
      }
      /**
       * @param {?} selectorOrNode
       * @return {?}
       */


      _createClass2(RendererAdapter, [{
        key: "selectRootElement",
        value: function selectRootElement(selectorOrNode) {
          return this.delegate.selectRootElement(selectorOrNode);
        }
        /**
         * @param {?} parent
         * @param {?} namespaceAndName
         * @return {?}
         */

      }, {
        key: "createElement",
        value: function createElement(parent, namespaceAndName) {
          var _splitNamespace = splitNamespace(namespaceAndName),
              _splitNamespace2 = _slicedToArray(_splitNamespace, 2),
              ns = _splitNamespace2[0],
              name = _splitNamespace2[1];
          /** @type {?} */


          var el = this.delegate.createElement(name, ns);

          if (parent) {
            this.delegate.appendChild(parent, el);
          }

          return el;
        }
        /**
         * @param {?} hostElement
         * @return {?}
         */

      }, {
        key: "createViewRoot",
        value: function createViewRoot(hostElement) {
          return hostElement;
        }
        /**
         * @param {?} parentElement
         * @return {?}
         */

      }, {
        key: "createTemplateAnchor",
        value: function createTemplateAnchor(parentElement) {
          /** @type {?} */
          var comment = this.delegate.createComment('');

          if (parentElement) {
            this.delegate.appendChild(parentElement, comment);
          }

          return comment;
        }
        /**
         * @param {?} parentElement
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "createText",
        value: function createText(parentElement, value) {
          /** @type {?} */
          var node = this.delegate.createText(value);

          if (parentElement) {
            this.delegate.appendChild(parentElement, node);
          }

          return node;
        }
        /**
         * @param {?} parentElement
         * @param {?} nodes
         * @return {?}
         */

      }, {
        key: "projectNodes",
        value: function projectNodes(parentElement, nodes) {
          for (var i = 0; i < nodes.length; i++) {
            this.delegate.appendChild(parentElement, nodes[i]);
          }
        }
        /**
         * @param {?} node
         * @param {?} viewRootNodes
         * @return {?}
         */

      }, {
        key: "attachViewAfter",
        value: function attachViewAfter(node, viewRootNodes) {
          /** @type {?} */
          var parentElement = this.delegate.parentNode(node);
          /** @type {?} */

          var nextSibling = this.delegate.nextSibling(node);

          for (var i = 0; i < viewRootNodes.length; i++) {
            this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);
          }
        }
        /**
         * @param {?} viewRootNodes
         * @return {?}
         */

      }, {
        key: "detachView",
        value: function detachView(viewRootNodes) {
          for (var i = 0; i < viewRootNodes.length; i++) {
            /** @type {?} */
            var node = viewRootNodes[i];
            /** @type {?} */

            var parentElement = this.delegate.parentNode(node);
            this.delegate.removeChild(parentElement, node);
          }
        }
        /**
         * @param {?} hostElement
         * @param {?} viewAllNodes
         * @return {?}
         */

      }, {
        key: "destroyView",
        value: function destroyView(hostElement, viewAllNodes) {
          for (var i = 0; i < viewAllNodes.length; i++) {
            /** @type {?} */
            this.delegate.destroyNode(viewAllNodes[i]);
          }
        }
        /**
         * @param {?} renderElement
         * @param {?} name
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "listen",
        value: function listen(renderElement, name, callback) {
          return this.delegate.listen(renderElement, name,
          /** @type {?} */
          callback);
        }
        /**
         * @param {?} target
         * @param {?} name
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "listenGlobal",
        value: function listenGlobal(target, name, callback) {
          return this.delegate.listen(target, name,
          /** @type {?} */
          callback);
        }
        /**
         * @param {?} renderElement
         * @param {?} propertyName
         * @param {?} propertyValue
         * @return {?}
         */

      }, {
        key: "setElementProperty",
        value: function setElementProperty(renderElement, propertyName, propertyValue) {
          this.delegate.setProperty(renderElement, propertyName, propertyValue);
        }
        /**
         * @param {?} renderElement
         * @param {?} namespaceAndName
         * @param {?=} attributeValue
         * @return {?}
         */

      }, {
        key: "setElementAttribute",
        value: function setElementAttribute(renderElement, namespaceAndName, attributeValue) {
          var _splitNamespace3 = splitNamespace(namespaceAndName),
              _splitNamespace4 = _slicedToArray(_splitNamespace3, 2),
              ns = _splitNamespace4[0],
              name = _splitNamespace4[1];

          if (attributeValue != null) {
            this.delegate.setAttribute(renderElement, name, attributeValue, ns);
          } else {
            this.delegate.removeAttribute(renderElement, name, ns);
          }
        }
        /**
         * @param {?} renderElement
         * @param {?} propertyName
         * @param {?} propertyValue
         * @return {?}
         */

      }, {
        key: "setBindingDebugInfo",
        value: function setBindingDebugInfo(renderElement, propertyName, propertyValue) {}
        /**
         * @param {?} renderElement
         * @param {?} className
         * @param {?} isAdd
         * @return {?}
         */

      }, {
        key: "setElementClass",
        value: function setElementClass(renderElement, className, isAdd) {
          if (isAdd) {
            this.delegate.addClass(renderElement, className);
          } else {
            this.delegate.removeClass(renderElement, className);
          }
        }
        /**
         * @param {?} renderElement
         * @param {?} styleName
         * @param {?=} styleValue
         * @return {?}
         */

      }, {
        key: "setElementStyle",
        value: function setElementStyle(renderElement, styleName, styleValue) {
          if (styleValue != null) {
            this.delegate.setStyle(renderElement, styleName, styleValue);
          } else {
            this.delegate.removeStyle(renderElement, styleName);
          }
        }
        /**
         * @param {?} renderElement
         * @param {?} methodName
         * @param {?} args
         * @return {?}
         */

      }, {
        key: "invokeElementMethod",
        value: function invokeElementMethod(renderElement, methodName, args) {
          /** @type {?} */
          renderElement[methodName].apply(renderElement, args);
        }
        /**
         * @param {?} renderNode
         * @param {?} text
         * @return {?}
         */

      }, {
        key: "setText",
        value: function setText(renderNode, text) {
          this.delegate.setValue(renderNode, text);
        }
        /**
         * @return {?}
         */

      }, {
        key: "animate",
        value: function animate() {
          throw new Error('Renderer.animate is no longer supported!');
        }
      }]);

      return RendererAdapter;
    }();

    if (false) {}
    /**
     * @param {?} moduleType
     * @param {?} parent
     * @param {?} bootstrapComponents
     * @param {?} def
     * @return {?}
     */


    function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {
      return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);
    }

    var NgModuleRef_ = /*#__PURE__*/function () {
      /**
       * @param {?} _moduleType
       * @param {?} _parent
       * @param {?} _bootstrapComponents
       * @param {?} _def
       */
      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);
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @param {?=} injectFlags
       * @return {?}
       */


      _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;

          /** @type {?} */
          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);
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroy",

        /**
         * @return {?}
         */
        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(
          /**
          * @param {?} listener
          * @return {?}
          */
          function (listener) {
            return listener();
          });
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          this._destroyListeners.push(callback);
        }
      }, {
        key: "instance",
        get: function get() {
          return this.get(this._moduleType);
        }
        /**
         * @return {?}
         */

      }, {
        key: "componentFactoryResolver",
        get: function get() {
          return this.get(ComponentFactoryResolver);
        }
      }]);

      return NgModuleRef_;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var RendererV1TokenKey = tokenKey(Renderer);
    /** @type {?} */

    var Renderer2TokenKey = tokenKey(Renderer2);
    /** @type {?} */

    var ElementRefTokenKey = tokenKey(ElementRef);
    /** @type {?} */

    var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);
    /** @type {?} */

    var TemplateRefTokenKey = tokenKey(TemplateRef);
    /** @type {?} */

    var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);
    /** @type {?} */

    var InjectorRefTokenKey$1 = tokenKey(Injector);
    /** @type {?} */

    var INJECTORRefTokenKey$1 = tokenKey(INJECTOR);
    /**
     * @param {?} checkIndex
     * @param {?} flags
     * @param {?} matchedQueries
     * @param {?} childCount
     * @param {?} ctor
     * @param {?} deps
     * @param {?=} props
     * @param {?=} outputs
     * @return {?}
     */

    function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {
      /** @type {?} */
      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
          };
        }
      }
      /** @type {?} */


      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);
    }
    /**
     * @param {?} flags
     * @param {?} ctor
     * @param {?} deps
     * @return {?}
     */


    function pipeDef(flags, ctor, deps) {
      flags |= 16
      /* TypePipe */
      ;
      return _def(-1, flags, null, 0, ctor, ctor, deps);
    }
    /**
     * @param {?} flags
     * @param {?} matchedQueries
     * @param {?} token
     * @param {?} value
     * @param {?} deps
     * @return {?}
     */


    function providerDef(flags, matchedQueries, token, value, deps) {
      return _def(-1, flags, matchedQueries, 0, token, value, deps);
    }
    /**
     * @param {?} checkIndex
     * @param {?} flags
     * @param {?} matchedQueriesDsl
     * @param {?} childCount
     * @param {?} token
     * @param {?} value
     * @param {?} deps
     * @param {?=} bindings
     * @param {?=} outputs
     * @return {?}
     */


    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);
      /** @type {?} */

      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
      };
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function createProviderInstance(view, def) {
      return _createProviderInstance$1(view, def);
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function createPipeInstance(view, def) {
      // deps are looked up from component.

      /** @type {?} */
      var compView = view;

      while (compView.parent && !isComponentView(compView)) {
        compView = compView.parent;
      } // pipes can see the private services of the component

      /** @type {?} */


      var allowPrivateServices = true; // pipes are always eager and classes!

      return createClass(
      /** @type {?} */
      compView.parent,
      /** @type {?} */
      viewParentEl(compView), allowPrivateServices,
      /** @type {?} */
      def.provider.value,
      /** @type {?} */
      def.provider.deps);
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function createDirectiveInstance(view, def) {
      // components can see other private services, other directives can't.

      /** @type {?} */
      var allowPrivateServices = (def.flags & 32768
      /* Component */
      ) > 0; // directives are always eager and classes!

      /** @type {?} */

      var instance = createClass(view,
      /** @type {?} */
      def.parent, allowPrivateServices,
      /** @type {?} */
      def.provider.value,
      /** @type {?} */
      def.provider.deps);

      if (def.outputs.length) {
        for (var i = 0; i < def.outputs.length; i++) {
          /** @type {?} */
          var output = def.outputs[i];
          /** @type {?} */

          var outputObservable = instance[
          /** @type {?} */
          output.propName];

          if (isObservable(outputObservable)) {
            /** @type {?} */
            var subscription = outputObservable.subscribe(eventHandlerClosure(view,
            /** @type {?} */
            def.parent.nodeIndex, output.eventName));

            /** @type {?} */
            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;
    }
    /**
     * @param {?} view
     * @param {?} index
     * @param {?} eventName
     * @return {?}
     */


    function eventHandlerClosure(view, index, eventName) {
      return (
        /**
        * @param {?} event
        * @return {?}
        */
        function (event) {
          return dispatchEvent(view, index, eventName, event);
        }
      );
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} v0
     * @param {?} v1
     * @param {?} v2
     * @param {?} v3
     * @param {?} v4
     * @param {?} v5
     * @param {?} v6
     * @param {?} v7
     * @param {?} v8
     * @param {?} v9
     * @return {?}
     */


    function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      var providerData = asProviderData(view, def.nodeIndex);
      /** @type {?} */

      var directive = providerData.instance;
      /** @type {?} */

      var changed = false;
      /** @type {?} */

      var changes =
      /** @type {?} */
      undefined;
      /** @type {?} */

      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;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} values
     * @return {?}
     */


    function checkAndUpdateDirectiveDynamic(view, def, values) {
      /** @type {?} */
      var providerData = asProviderData(view, def.nodeIndex);
      /** @type {?} */

      var directive = providerData.instance;
      /** @type {?} */

      var changed = false;
      /** @type {?} */

      var changes =
      /** @type {?} */
      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;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function _createProviderInstance$1(view, def) {
      // private services can see other private services

      /** @type {?} */
      var allowPrivateServices = (def.flags & 8192
      /* PrivateProvider */
      ) > 0;
      /** @type {?} */

      var providerDef = def.provider;

      switch (def.flags & 201347067
      /* Types */
      ) {
        case 512
        /* TypeClassProvider */
        :
          return createClass(view,
          /** @type {?} */
          def.parent, allowPrivateServices,
          /** @type {?} */
          providerDef.value,
          /** @type {?} */
          providerDef.deps);

        case 1024
        /* TypeFactoryProvider */
        :
          return callFactory(view,
          /** @type {?} */
          def.parent, allowPrivateServices,
          /** @type {?} */
          providerDef.value,
          /** @type {?} */
          providerDef.deps);

        case 2048
        /* TypeUseExistingProvider */
        :
          return resolveDep(view,
          /** @type {?} */
          def.parent, allowPrivateServices,
          /** @type {?} */
          providerDef.deps[0]);

        case 256
        /* TypeValueProvider */
        :
          return (
            /** @type {?} */
            providerDef.value
          );
      }
    }
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} allowPrivateServices
     * @param {?} ctor
     * @param {?} deps
     * @return {?}
     */


    function createClass(view, elDef, allowPrivateServices, ctor, deps) {
      /** @type {?} */
      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:
          /** @type {?} */
          var depValues = new Array(len);

          for (var i = 0; i < len; i++) {
            depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);
          }

          return _construct(ctor, depValues);
      }
    }
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} allowPrivateServices
     * @param {?} factory
     * @param {?} deps
     * @return {?}
     */


    function callFactory(view, elDef, allowPrivateServices, factory, deps) {
      /** @type {?} */
      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:
          /** @type {?} */
          var depValues = Array(len);

          for (var i = 0; i < len; i++) {
            depValues[i] = 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)

    /** @type {?} */


    var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} allowPrivateServices
     * @param {?} depDef
     * @param {?=} notFoundValue
     * @return {?}
     */

    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;
        }
      /** @type {?} */


      var startView = view;

      if (depDef.flags & 2
      /* Optional */
      ) {
          notFoundValue = null;
        }
      /** @type {?} */


      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 &&
        /** @type {?} */
        elDef.element.componentView);
      }

      if (elDef && depDef.flags & 1
      /* SkipSelf */
      ) {
        allowPrivateServices = false;
        elDef =
        /** @type {?} */
        elDef.parent;
      }
      /** @type {?} */


      var searchView = view;

      while (searchView) {
        if (elDef) {
          switch (tokenKey) {
            case RendererV1TokenKey:
              {
                /** @type {?} */
                var compView = findCompView(searchView, elDef, allowPrivateServices);
                return createRendererV1(compView);
              }

            case Renderer2TokenKey:
              {
                /** @type {?} */
                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 (
                /** @type {?} */
                elDef.element.template) {
                  return asElementData(searchView, elDef.nodeIndex).template;
                }

                break;
              }

            case ChangeDetectorRefTokenKey:
              {
                /** @type {?} */
                var cdView = findCompView(searchView, elDef, allowPrivateServices);
                return createChangeDetectorRef(cdView);
              }

            case InjectorRefTokenKey$1:
            case INJECTORRefTokenKey$1:
              return createInjector$1(searchView, elDef);

            default:
              /** @type {?} */
              var _providerDef3 = (
              /** @type {?} */
              allowPrivateServices ?
              /** @type {?} */
              elDef.element.allProviders :
              /** @type {?} */
              elDef.element.publicProviders)[tokenKey];

              if (_providerDef3) {
                /** @type {?} */
                var providerData = asProviderData(searchView, _providerDef3.nodeIndex);

                if (!providerData) {
                  providerData = {
                    instance: _createProviderInstance$1(searchView, _providerDef3)
                  };
                  searchView.nodes[_providerDef3.nodeIndex] =
                  /** @type {?} */
                  providerData;
                }

                return providerData.instance;
              }

          }
        }

        allowPrivateServices = isComponentView(searchView);
        elDef =
        /** @type {?} */
        viewParentEl(searchView);
        searchView =
        /** @type {?} */
        searchView.parent;

        if (depDef.flags & 4
        /* Self */
        ) {
            searchView = null;
          }
      }
      /** @type {?} */


      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);
    }
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} allowPrivateServices
     * @return {?}
     */


    function findCompView(view, elDef, allowPrivateServices) {
      /** @type {?} */
      var compView;

      if (allowPrivateServices) {
        compView = asElementData(view, elDef.nodeIndex).componentView;
      } else {
        compView = view;

        while (compView.parent && !isComponentView(compView)) {
          compView = compView.parent;
        }
      }

      return compView;
    }
    /**
     * @param {?} view
     * @param {?} providerData
     * @param {?} def
     * @param {?} bindingIdx
     * @param {?} value
     * @param {?} changes
     * @return {?}
     */


    function updateProp(view, providerData, def, bindingIdx, value, changes) {
      if (def.flags & 32768
      /* Component */
      ) {
          /** @type {?} */
          var compView = asElementData(view,
          /** @type {?} */
          def.parent.nodeIndex).componentView;

          if (compView.def.flags & 2
          /* OnPush */
          ) {
              compView.state |= 8
              /* ChecksEnabled */
              ;
            }
        }
      /** @type {?} */


      var binding = def.bindings[bindingIdx];
      /** @type {?} */

      var propName =
      /** @type {?} */
      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 || {};
          /** @type {?} */

          var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);
          /** @type {?} */

          var _binding = def.bindings[bindingIdx];
          changes[
          /** @type {?} */
          _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().

    /**
     * @param {?} view
     * @param {?} lifecycles
     * @return {?}
     */


    function callLifecycleHooksChildrenFirst(view, lifecycles) {
      if (!(view.def.nodeFlags & lifecycles)) {
        return;
      }
      /** @type {?} */


      var nodes = view.def.nodes;
      /** @type {?} */

      var initIndex = 0;

      for (var i = 0; i < nodes.length; i++) {
        /** @type {?} */
        var nodeDef = nodes[i];
        /** @type {?} */

        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;
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} elDef
     * @param {?} lifecycles
     * @param {?} initIndex
     * @return {?}
     */


    function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {
      for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {
        /** @type {?} */
        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;
    }
    /**
     * @param {?} view
     * @param {?} index
     * @param {?} lifecycles
     * @param {?} initIndex
     * @return {?}
     */


    function callProviderLifecycles(view, index, lifecycles, initIndex) {
      /** @type {?} */
      var providerData = asProviderData(view, index);

      if (!providerData) {
        return;
      }
      /** @type {?} */


      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();
        }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ComponentFactoryResolver$1 = /*#__PURE__*/function (_ComponentFactoryReso) {
      _inherits(ComponentFactoryResolver$1, _ComponentFactoryReso);

      var _super112 = _createSuper(ComponentFactoryResolver$1);

      /**
       * @param {?=} ngModule The NgModuleRef to which all resolved factories are bound.
       */
      function ComponentFactoryResolver$1(ngModule) {
        var _this322;

        _classCallCheck(this, ComponentFactoryResolver$1);

        _this322 = _super112.call(this);
        _this322.ngModule = ngModule;
        return _this322;
      }
      /**
       * @template T
       * @param {?} component
       * @return {?}
       */


      _createClass2(ComponentFactoryResolver$1, [{
        key: "resolveComponentFactory",
        value: function resolveComponentFactory(component) {
          ngDevMode && assertComponentType(component);
          /** @type {?} */

          var componentDef =
          /** @type {?} */
          getComponentDef(component);
          return new ComponentFactory$1(componentDef, this.ngModule);
        }
      }]);

      return ComponentFactoryResolver$1;
    }(ComponentFactoryResolver);

    if (false) {}
    /**
     * @param {?} map
     * @return {?}
     */


    function toRefArray(map) {
      /** @type {?} */
      var array = [];

      for (var nonMinified in map) {
        if (map.hasOwnProperty(nonMinified)) {
          /** @type {?} */
          var minified = map[nonMinified];
          array.push({
            propName: minified,
            templateName: nonMinified
          });
        }
      }

      return array;
    }
    /**
     * 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.
     * @type {?}
     */


    var SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
      providedIn: 'root',
      factory:
      /**
      * @return {?}
      */
      function factory() {
        return defaultScheduler;
      }
    });
    /**
     * @param {?} rootViewInjector
     * @param {?} moduleInjector
     * @return {?}
     */

    function createChainedInjector(rootViewInjector, moduleInjector) {
      return {
        get:
        /**
        * @template T
        * @param {?} token
        * @param {?=} notFoundValue
        * @param {?=} flags
        * @return {?}
        */
        function get(token, notFoundValue, flags) {
          /** @type {?} */
          var value = rootViewInjector.get(token,
          /** @type {?} */
          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}.
     * @template T
     */


    var ComponentFactory$1 = /*#__PURE__*/function (_ComponentFactory3) {
      _inherits(ComponentFactory$1, _ComponentFactory3);

      var _super113 = _createSuper(ComponentFactory$1);

      /**
       * @param {?} componentDef The component definition.
       * @param {?=} ngModule The NgModuleRef to which the factory is bound.
       */
      function ComponentFactory$1(componentDef, ngModule) {
        var _this323;

        _classCallCheck(this, ComponentFactory$1);

        _this323 = _super113.call(this);
        _this323.componentDef = componentDef;
        _this323.ngModule = ngModule;
        _this323.componentType = componentDef.type; // default to 'div' in case this component has an attribute selector

        _this323.selector =
        /** @type {?} */
        componentDef.selectors[0][0] || 'div';
        _this323.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
        _this323.isBoundToModule = !!ngModule;
        return _this323;
      }
      /**
       * @return {?}
       */


      _createClass2(ComponentFactory$1, [{
        key: "create",

        /**
         * @param {?} injector
         * @param {?=} projectableNodes
         * @param {?=} rootSelectorOrNode
         * @param {?=} ngModule
         * @return {?}
         */
        value: function create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
          ngModule = ngModule || this.ngModule;
          /** @type {?} */

          var rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;
          /** @type {?} */

          var rendererFactory =
          /** @type {?} */
          rootViewInjector.get(RendererFactory2, domRendererFactory3);
          /** @type {?} */

          var sanitizer = rootViewInjector.get(Sanitizer, null); // Ensure that the namespace for the root node is correct,
          // otherwise the browser might not render out the element properly.

          namespaceHTMLInternal();
          /** @type {?} */

          var hostRNode = rootSelectorOrNode ? locateHostElement(rendererFactory, rootSelectorOrNode) : elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef));
          /** @type {?} */

          var rootFlags = this.componentDef.onPush ? 64
          /* Dirty */
          | 512
          /* IsRoot */
          : 16
          /* CheckAlways */
          | 512
          /* IsRoot */
          ; // Check whether this Component needs to be isolated from other components, i.e. whether it
          // should be placed into its own (empty) root context or existing root context should be used.
          // Note: this is internal-only convention and might change in the future, so it should not be
          // relied upon externally.

          /** @type {?} */

          var isIsolated = typeof rootSelectorOrNode === 'string' && /^#root-ng-internal-isolated-\d+/.test(rootSelectorOrNode);
          /** @type {?} */

          var rootContext = createRootContext();
          /** @type {?} */

          var renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);

          if (rootSelectorOrNode && hostRNode) {
            ngDevMode && ngDevMode.rendererSetAttribute++;
            isProceduralRenderer(renderer) ? renderer.setAttribute(hostRNode, 'ng-version', VERSION.full) : hostRNode.setAttribute('ng-version', VERSION.full);
          } // Create the root view. Uses empty TView and ContentTemplate.

          /** @type {?} */


          var rootLView = createLView(null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null, rendererFactory, renderer, sanitizer, rootViewInjector); // rootView is the parent when bootstrapping

          /** @type {?} */

          var oldLView = enterView(rootLView, null);
          /** @type {?} */

          var component;
          /** @type {?} */

          var tElementNode; // Will become true if the `try` block executes with no errors.

          /** @type {?} */

          var safeToRunHooks = false;

          try {
            /** @type {?} */
            var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, renderer);
            tElementNode =
            /** @type {?} */
            getTNode(0, rootLView);

            if (projectableNodes) {
              // 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.
              tElementNode.projection = projectableNodes.map(
              /**
              * @param {?} nodesforSlot
              * @return {?}
              */
              function (nodesforSlot) {
                return Array.from(nodesforSlot);
              });
            } // 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]);
            addToViewTree(rootLView, componentView);
            refreshDescendantViews(rootLView);
            safeToRunHooks = true;
          } finally {
            leaveView(oldLView, safeToRunHooks);
          }
          /** @type {?} */


          var componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);

          if (!rootSelectorOrNode || isIsolated) {
            // The host element of the internal or isolated root view is attached to the component's host
            // view node.

            /** @type {?} */
            componentRef.hostView._tViewNode.child = tElementNode;
          }

          return componentRef;
        }
      }, {
        key: "inputs",
        get: function get() {
          return toRefArray(this.componentDef.inputs);
        }
        /**
         * @return {?}
         */

      }, {
        key: "outputs",
        get: function get() {
          return toRefArray(this.componentDef.outputs);
        }
      }]);

      return ComponentFactory$1;
    }(ComponentFactory);

    if (false) {}
    /** @type {?} */


    var componentFactoryResolver = new ComponentFactoryResolver$1();
    /**
     * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
     * ComponentFactoryResolver
     * already exists, retrieves the existing ComponentFactoryResolver.
     *
     * @return {?} 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.
     *
     * @template T
     */


    var ComponentRef$1 = /*#__PURE__*/function (_ComponentRef2) {
      _inherits(ComponentRef$1, _ComponentRef2);

      var _super114 = _createSuper(ComponentRef$1);

      /**
       * @param {?} componentType
       * @param {?} instance
       * @param {?} location
       * @param {?} _rootLView
       * @param {?} _tNode
       */
      function ComponentRef$1(componentType, instance, location, _rootLView, _tNode) {
        var _this324;

        _classCallCheck(this, ComponentRef$1);

        _this324 = _super114.call(this);
        _this324.location = location;
        _this324._rootLView = _rootLView;
        _this324._tNode = _tNode;
        _this324.destroyCbs = [];
        _this324.instance = instance;
        _this324.hostView = _this324.changeDetectorRef = new RootViewRef(_rootLView);
        _this324.hostView._tViewNode = assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);
        _this324.componentType = componentType;
        return _this324;
      }
      /**
       * @return {?}
       */


      _createClass2(ComponentRef$1, [{
        key: "destroy",

        /**
         * @return {?}
         */
        value: function destroy() {
          if (this.destroyCbs) {
            this.destroyCbs.forEach(
            /**
            * @param {?} fn
            * @return {?}
            */
            function (fn) {
              return fn();
            });
            this.destroyCbs = null;
            !this.hostView.destroyed && this.hostView.destroy();
          }
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          if (this.destroyCbs) {
            this.destroyCbs.push(callback);
          }
        }
      }, {
        key: "injector",
        get: function get() {
          return new NodeInjector(this._tNode, this._rootLView);
        }
      }]);

      return ComponentRef$1;
    }(ComponentRef);

    if (false) {}
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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';
      })();
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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`
     * @type {?}
     */


    var LOCALE_DATA = {};
    /** @enum {number} */

    var LocaleDataIndex = {
      LocaleId: 0,
      DayPeriodsFormat: 1,
      DayPeriodsStandalone: 2,
      DaysFormat: 3,
      DaysStandalone: 4,
      MonthsFormat: 5,
      MonthsStandalone: 6,
      Eras: 7,
      FirstDayOfWeek: 8,
      WeekendRange: 9,
      DateFormat: 10,
      TimeFormat: 11,
      DateTimeFormat: 12,
      NumberSymbols: 13,
      NumberFormats: 14,
      CurrencySymbol: 15,
      CurrencyName: 16,
      Currencies: 17,
      PluralCase: 18,
      ExtraData: 19
    };
    LocaleDataIndex[LocaleDataIndex.LocaleId] = 'LocaleId';
    LocaleDataIndex[LocaleDataIndex.DayPeriodsFormat] = 'DayPeriodsFormat';
    LocaleDataIndex[LocaleDataIndex.DayPeriodsStandalone] = 'DayPeriodsStandalone';
    LocaleDataIndex[LocaleDataIndex.DaysFormat] = 'DaysFormat';
    LocaleDataIndex[LocaleDataIndex.DaysStandalone] = 'DaysStandalone';
    LocaleDataIndex[LocaleDataIndex.MonthsFormat] = 'MonthsFormat';
    LocaleDataIndex[LocaleDataIndex.MonthsStandalone] = 'MonthsStandalone';
    LocaleDataIndex[LocaleDataIndex.Eras] = 'Eras';
    LocaleDataIndex[LocaleDataIndex.FirstDayOfWeek] = 'FirstDayOfWeek';
    LocaleDataIndex[LocaleDataIndex.WeekendRange] = 'WeekendRange';
    LocaleDataIndex[LocaleDataIndex.DateFormat] = 'DateFormat';
    LocaleDataIndex[LocaleDataIndex.TimeFormat] = 'TimeFormat';
    LocaleDataIndex[LocaleDataIndex.DateTimeFormat] = 'DateTimeFormat';
    LocaleDataIndex[LocaleDataIndex.NumberSymbols] = 'NumberSymbols';
    LocaleDataIndex[LocaleDataIndex.NumberFormats] = 'NumberFormats';
    LocaleDataIndex[LocaleDataIndex.CurrencySymbol] = 'CurrencySymbol';
    LocaleDataIndex[LocaleDataIndex.CurrencyName] = 'CurrencyName';
    LocaleDataIndex[LocaleDataIndex.Currencies] = 'Currencies';
    LocaleDataIndex[LocaleDataIndex.PluralCase] = 'PluralCase';
    LocaleDataIndex[LocaleDataIndex.ExtraData] = 'ExtraData';
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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

    /** @type {?} */

    var u = undefined;
    /**
     * @param {?} n
     * @return {?}
     */

    function plural(n) {
      /** @type {?} */
      var i = Math.floor(Math.abs(n));
      /** @type {?} */

      var 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'], '$', 'US Dollar', {}, plural];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Retrieves the plural function used by ICU expressions to determine the plural case to use
     * for a given locale.
     * @see `NgPlural` / [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     * @param {?} locale A locale code for the locale format rules to use.
     * @return {?} The plural function for the locale.
     */

    function getLocalePluralCase(locale) {
      /** @type {?} */
      var data = findLocaleData(locale);
      return data[LocaleDataIndex.PluralCase];
    }
    /**
     * Finds the locale data for a given locale.
     *
     * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
     * @param {?} locale The locale code.
     * @return {?} The locale data.
     */


    function findLocaleData(locale) {
      /** @type {?} */
      var normalizedLocale = locale.toLowerCase().replace(/_/g, '-');
      /** @type {?} */

      var match = LOCALE_DATA[normalizedLocale];

      if (match) {
        return match;
      } // let's try to find a parent locale

      /** @type {?} */


      var parentLocale = normalizedLocale.split('-')[0];
      match = LOCALE_DATA[parentLocale];

      if (match) {
        return match;
      }

      if (parentLocale === 'en') {
        return localeEn;
      }

      throw new Error("Missing locale data for the locale \"".concat(locale, "\"."));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Returns the plural case based on the locale
     * @param {?} value
     * @param {?} locale
     * @return {?}
     */


    function getPluralCase(value, locale) {
      /** @type {?} */
      var plural = getLocalePluralCase(locale)(value);

      switch (plural) {
        case 0:
          return 'zero';

        case 1:
          return 'one';

        case 2:
          return 'two';

        case 3:
          return 'few';

        case 4:
          return 'many';

        default:
          return 'other';
      }
    }
    /**
     * The locale id that the application is using by default (for translations and ICU expressions).
     * @type {?}
     */


    var DEFAULT_LOCALE_ID = 'en-US';
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var MARKER = "\uFFFD";
    /** @type {?} */

    var ICU_BLOCK_REGEXP = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/;
    /** @type {?} */

    var SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi;
    /** @type {?} */

    var PH_REGEXP = /�(\/?[#*!]\d+):?\d*�/gi;
    /** @type {?} */

    var BINDING_REGEXP = /�(\d+):?\d*�/gi;
    /** @type {?} */

    var ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi;
    /** @enum {string} */

    var TagType = {
      ELEMENT: '#',
      TEMPLATE: '*',
      PROJECTION: '!'
    }; // i18nPostprocess consts

    /** @type {?} */

    var ROOT_TEMPLATE_ID = 0;
    /** @type {?} */

    var PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]/;
    /** @type {?} */

    var PP_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]|(�\/?\*\d+:\d+�)/g;
    /** @type {?} */

    var PP_ICU_VARS_REGEXP = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g;
    /** @type {?} */

    var PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;
    /** @type {?} */

    var PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\d+)?)�/g;
    /** @type {?} */

    var PP_CLOSE_TEMPLATE_REGEXP = /\/\*/;
    /** @type {?} */

    var PP_TEMPLATE_ID_REGEXP = /\d+\:(\d+)/;
    /**
     * @record
     */

    function IcuExpression() {}

    if (false) {}
    /**
     * @record
     */


    function IcuCase() {}

    if (false) {}
    /**
     * 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.
     *
     * @return {?}
     */


    function extractParts(pattern) {
      if (!pattern) {
        return [];
      }
      /** @type {?} */


      var prevPos = 0;
      /** @type {?} */

      var braceStack = [];
      /** @type {?} */

      var results = [];
      /** @type {?} */

      var braces = /[{}]/g; // lastIndex doesn't get set to 0 so we have to.

      braces.lastIndex = 0;
      /** @type {?} */

      var match;

      while (match = braces.exec(pattern)) {
        /** @type {?} */
        var pos = match.index;

        if (match[0] == '}') {
          braceStack.pop();

          if (braceStack.length == 0) {
            // End of the block.

            /** @type {?} */
            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) {
            /** @type {?} */
            var _substring = pattern.substring(prevPos, pos);

            results.push(_substring);
            prevPos = pos + 1;
          }

          braceStack.push('{');
        }
      }
      /** @type {?} */


      var substring = pattern.substring(prevPos);
      results.push(substring);
      return results;
    }
    /**
     * 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.
     *
     * @return {?}
     */


    function parseICUBlock(pattern) {
      /** @type {?} */
      var cases = [];
      /** @type {?} */

      var values = [];
      /** @type {?} */

      var icuType = 1
      /* plural */
      ;
      /** @type {?} */

      var mainBinding = 0;
      pattern = pattern.replace(ICU_BLOCK_REGEXP,
      /**
      * @param {?} str
      * @param {?} binding
      * @param {?} type
      * @return {?}
      */
      function (str, binding, type) {
        if (type === 'select') {
          icuType = 0
          /* select */
          ;
        } else {
          icuType = 1
          /* plural */
          ;
        }

        mainBinding = parseInt(binding.substr(1), 10);
        return '';
      });
      /** @type {?} */

      var parts =
      /** @type {?} */
      extractParts(pattern); // Looking for (key block)+ sequence. One of the keys has to be "other".

      for (var pos = 0; pos < parts.length;) {
        /** @type {?} */
        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);
        }
        /** @type {?} */


        var blocks =
        /** @type {?} */
        extractParts(parts[pos++]);

        if (cases.length > values.length) {
          values.push(blocks);
        }
      }

      assertGreaterThan(cases.indexOf('other'), -1, 'Missing key "other" in ICU statement.'); // TODO(ocombe): support ICU expressions in attributes, see #21615

      return {
        type: icuType,
        mainBinding: mainBinding,
        cases: cases,
        values: values
      };
    }
    /**
     * Removes everything inside the sub-templates of a message.
     * @param {?} message
     * @return {?}
     */


    function removeInnerTemplateTranslation(message) {
      /** @type {?} */
      var match;
      /** @type {?} */

      var res = '';
      /** @type {?} */

      var index = 0;
      /** @type {?} */

      var inTemplate = false;
      /** @type {?} */

      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.
     * @return {?}
     */


    function getTranslationForTemplate(message, subTemplateIndex) {
      if (typeof subTemplateIndex !== 'number') {
        // We want the root template message, ignore all sub-templates
        return removeInnerTemplateTranslation(message);
      } else {
        // We want a specific sub-template

        /** @type {?} */
        var start = message.indexOf(":".concat(subTemplateIndex).concat(MARKER)) + 2 + subTemplateIndex.toString().length;
        /** @type {?} */

        var end = message.search(new RegExp("".concat(MARKER, "\\/\\*\\d+:").concat(subTemplateIndex).concat(MARKER)));
        return removeInnerTemplateTranslation(message.substring(start, end));
      }
    }
    /**
     * Generate the OpCodes to update the bindings of a string.
     *
     * @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.
     * @return {?}
     */


    function generateBindingUpdateOpCodes(str, destinationNode, attrName) {
      var sanitizeFn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

      /** @type {?} */
      var updateOpCodes = [null, null]; // Alloc space for mask and size

      /** @type {?} */

      var textParts = str.split(BINDING_REGEXP);
      /** @type {?} */

      var mask = 0;

      for (var j = 0; j < textParts.length; j++) {
        /** @type {?} */
        var textValue = textParts[j];

        if (j & 1) {
          // Odd indexes are bindings

          /** @type {?} */
          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[0] = mask;
      updateOpCodes[1] = updateOpCodes.length - 2;
      return updateOpCodes;
    }
    /**
     * @param {?} icuExpression
     * @param {?=} mask
     * @return {?}
     */


    function getBindingMask(icuExpression) {
      var mask = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      mask = mask | toMaskBit(icuExpression.mainBinding);
      /** @type {?} */

      var match;

      for (var i = 0; i < icuExpression.values.length; i++) {
        /** @type {?} */
        var valueArr = icuExpression.values[i];

        for (var j = 0; j < valueArr.length; j++) {
          /** @type {?} */
          var value = valueArr[j];

          if (typeof value === 'string') {
            while (match = BINDING_REGEXP.exec(value)) {
              mask = mask | toMaskBit(parseInt(match[1], 10));
            }
          } else {
            mask = getBindingMask(
            /** @type {?} */
            value, mask);
          }
        }
      }

      return mask;
    }
    /** @type {?} */


    var i18nIndexStack = [];
    /** @type {?} */

    var i18nIndexStackPointer = -1;
    /**
     * 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)
     * @param {?} bindingIndex
     * @return {?}
     */

    function toMaskBit(bindingIndex) {
      return 1 << Math.min(bindingIndex, 31);
    }
    /** @type {?} */


    var parentIndexStack = [];
    /**
     * 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})�`: *Projection Placeholder*:  Marks the
     *   beginning and end of <ng-content> that was 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.
     *
     * \@codeGenApi
     * @param {?} index A unique index of the translation in the static block.
     * @param {?} message The translation message.
     * @param {?=} subTemplateIndex Optional sub-template index in the `message`.
     *
     * @return {?}
     */

    function ɵɵi18nStart(index, message, subTemplateIndex) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      ngDevMode && assertDefined(tView, "tView should be defined");
      i18nIndexStack[++i18nIndexStackPointer] = index; // We need to delay projections until `i18nEnd`

      setDelayProjection(true);

      if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
        i18nStartFirstPass(tView, index, message, subTemplateIndex);
      }
    } // Count for the number of vars that will be allocated for each i18n block.
    // It is global because this is used in multiple functions that include loops and recursive calls.
    // This is reset to 0 when `i18nStartFirstPass` is called.

    /** @type {?} */


    var i18nVarsCount;
    /**
     * See `i18nStart` above.
     * @param {?} tView
     * @param {?} index
     * @param {?} message
     * @param {?=} subTemplateIndex
     * @return {?}
     */

    function i18nStartFirstPass(tView, index, message, subTemplateIndex) {
      /** @type {?} */
      var viewData = getLView();
      /** @type {?} */

      var startIndex = tView.blueprint.length - HEADER_OFFSET;
      i18nVarsCount = 0;
      /** @type {?} */

      var previousOrParentTNode = getPreviousOrParentTNode();
      /** @type {?} */

      var parentTNode = getIsParent() ? getPreviousOrParentTNode() : previousOrParentTNode && previousOrParentTNode.parent;
      /** @type {?} */

      var parentIndex = parentTNode && parentTNode !== viewData[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;
      /** @type {?} */

      var parentIndexPointer = 0;
      parentIndexStack[parentIndexPointer] = parentIndex;
      /** @type {?} */

      var createOpCodes = []; // If the previous node wasn't the direct parent then we have a translation without top level
      // element and we need to keep a reference of the previous element if there is one

      if (index > 0 && previousOrParentTNode !== parentTNode) {
        // Create an OpCode to select the previous TNode
        createOpCodes.push(previousOrParentTNode.index << 3
        /* SHIFT_REF */
        | 0
        /* Select */
        );
      }
      /** @type {?} */


      var updateOpCodes = [];
      /** @type {?} */

      var icuExpressions = [];
      /** @type {?} */

      var templateTranslation = getTranslationForTemplate(message, subTemplateIndex);
      /** @type {?} */

      var msgParts = replaceNgsp(templateTranslation).split(PH_REGEXP);

      for (var i = 0; i < msgParts.length; i++) {
        /** @type {?} */
        var value = msgParts[i];

        if (i & 1) {
          // Odd indexes are placeholders (elements and sub-templates)
          if (value.charAt(0) === '/') {
            // It is a closing tag
            if (value.charAt(1) === "#"
            /* ELEMENT */
            ) {
                /** @type {?} */
                var phIndex = parseInt(value.substr(2), 10);
                parentIndex = parentIndexStack[--parentIndexPointer];
                createOpCodes.push(phIndex << 3
                /* SHIFT_REF */
                | 5
                /* ElementEnd */
                );
              }
          } else {
            /** @type {?} */
            var _phIndex = parseInt(value.substr(1), 10); // The value represents a placeholder that we move to the designated index


            createOpCodes.push(_phIndex << 3
            /* SHIFT_REF */
            | 0
            /* Select */
            , parentIndex << 17
            /* SHIFT_PARENT */
            | 1
            /* AppendChild */
            );

            if (value.charAt(0) === "#"
            /* ELEMENT */
            ) {
                parentIndexStack[++parentIndexPointer] = parentIndex = _phIndex;
              }
          }
        } else {
          // Even indexes are text (including bindings & ICU expressions)

          /** @type {?} */
          var parts = extractParts(value);

          for (var j = 0; j < parts.length; j++) {
            if (j & 1) {
              // Odd indexes are ICU expressions
              // Create the comment node that will anchor the ICU expression

              /** @type {?} */
              var icuNodeIndex = startIndex + i18nVarsCount++;
              createOpCodes.push(COMMENT_MARKER, ngDevMode ? "ICU ".concat(icuNodeIndex) : '', icuNodeIndex, parentIndex << 17
              /* SHIFT_PARENT */
              | 1
              /* AppendChild */
              ); // Update codes for the ICU expression

              /** @type {?} */

              var icuExpression =
              /** @type {?} */
              parts[j];
              /** @type {?} */

              var mask = getBindingMask(icuExpression);
              icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex); // Since this is recursive, the last TIcu that was pushed is the one we want

              /** @type {?} */

              var tIcuIndex = icuExpressions.length - 1;
              updateOpCodes.push(toMaskBit(icuExpression.mainBinding), // mask of the main binding
              3, // skip 3 opCodes if not changed
              -1 - icuExpression.mainBinding, icuNodeIndex << 2
              /* SHIFT_REF */
              | 2
              /* IcuSwitch */
              , tIcuIndex, mask, // mask of all the bindings of this ICU expression
              2, // skip 2 opCodes if not changed
              icuNodeIndex << 2
              /* SHIFT_REF */
              | 3
              /* IcuUpdate */
              , tIcuIndex);
            } else if (parts[j] !== '') {
              /** @type {?} */
              var text =
              /** @type {?} */
              parts[j]; // Even indexes are text (including bindings)

              /** @type {?} */

              var hasBinding = text.match(BINDING_REGEXP); // Create text nodes

              /** @type {?} */

              var textNodeIndex = startIndex + i18nVarsCount++;
              createOpCodes.push( // If there is a binding, the value will be set during update
              hasBinding ? '' : text, textNodeIndex, parentIndex << 17
              /* SHIFT_PARENT */
              | 1
              /* AppendChild */
              );

              if (hasBinding) {
                addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);
              }
            }
          }
        }
      }

      if (i18nVarsCount > 0) {
        allocExpando(viewData, i18nVarsCount);
      }

      ngDevMode && attachI18nOpCodesDebug(createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, viewData); // NOTE: local var needed to properly assert the type of `TI18n`.

      /** @type {?} */

      var tI18n = {
        vars: i18nVarsCount,
        create: createOpCodes,
        update: updateOpCodes,
        icus: icuExpressions.length ? icuExpressions : null
      };
      tView.data[index + HEADER_OFFSET] = tI18n;
    }
    /**
     * @param {?} tNode
     * @param {?} parentTNode
     * @param {?} previousTNode
     * @param {?} viewData
     * @return {?}
     */


    function appendI18nNode(tNode, parentTNode, previousTNode, viewData) {
      ngDevMode && ngDevMode.rendererMoveNode++;
      /** @type {?} */

      var nextNode = tNode.next;

      if (!previousTNode) {
        previousTNode = parentTNode;
      } // Re-organize node tree to put this node in the correct position.


      if (previousTNode === parentTNode && tNode !== parentTNode.child) {
        tNode.next = parentTNode.child;
        parentTNode.child = tNode;
      } else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {
        tNode.next = previousTNode.next;
        previousTNode.next = tNode;
      } else {
        tNode.next = null;
      }

      if (parentTNode !== viewData[T_HOST]) {
        tNode.parent =
        /** @type {?} */
        parentTNode;
      } // If tNode was moved around, we might need to fix a broken link.

      /** @type {?} */


      var cursor = tNode.next;

      while (cursor) {
        if (cursor.next === tNode) {
          cursor.next = nextNode;
        }

        cursor = cursor.next;
      } // If the placeholder to append is a projection, we need to move the projected nodes instead


      if (tNode.type === 1
      /* Projection */
      ) {
          /** @type {?} */
          var tProjectionNode =
          /** @type {?} */
          tNode;
          appendProjectedNodes(viewData, tProjectionNode, tProjectionNode.projection, findComponentView(viewData));
          return tNode;
        }

      appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);
      /** @type {?} */

      var slotValue = viewData[tNode.index];

      if (tNode.type !== 0
      /* Container */
      && isLContainer(slotValue)) {
        // Nodes that inject ViewContainerRef also have a comment node that should be moved
        appendChild(slotValue[NATIVE], tNode, viewData);
      }

      return tNode;
    }
    /**
     * 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
     *
     * \@codeGenApi
     * @param {?} message Raw translation string for post processing
     * @param {?=} replacements Set of replacements that should be applied
     *
     * @return {?} Transformed string that can be consumed by i18nStart instruction
     *
     */


    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.
       * @type {?}
       */
      var result = message;

      if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {
        /** @type {?} */
        var matches = {};
        /** @type {?} */

        var templateIdsStack = [ROOT_TEMPLATE_ID];
        result = result.replace(PP_PLACEHOLDERS_REGEXP,
        /**
        * @param {?} m
        * @param {?} phs
        * @param {?} tmpl
        * @return {?}
        */
        function (m, phs, tmpl) {
          /** @type {?} */
          var content = phs || tmpl;
          /** @type {?} */

          var placeholders = matches[content] || [];

          if (!placeholders.length) {
            content.split('|').forEach(
            /**
            * @param {?} placeholder
            * @return {?}
            */
            function (placeholder) {
              /** @type {?} */
              var match = placeholder.match(PP_TEMPLATE_ID_REGEXP);
              /** @type {?} */

              var templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;
              /** @type {?} */

              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));
          }
          /** @type {?} */


          var currentTemplateId = templateIdsStack[templateIdsStack.length - 1];
          /** @type {?} */

          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,
      /**
      * @param {?} match
      * @param {?} start
      * @param {?} key
      * @param {?} _type
      * @param {?} _idx
      * @param {?} end
      * @return {?}
      */
      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,
      /**
      * @param {?} match
      * @param {?} key
      * @return {?}
      */
      function (match, key) {
        return replacements.hasOwnProperty(key) ?
        /** @type {?} */
        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,
      /**
      * @param {?} match
      * @param {?} key
      * @return {?}
      */
      function (match, key) {
        if (replacements.hasOwnProperty(key)) {
          /** @type {?} */
          var list =
          /** @type {?} */
          replacements[key];

          if (!list.length) {
            throw new Error("i18n postprocess: unmatched ICU - ".concat(match, " with key: ").concat(key));
          }

          return (
            /** @type {?} */
            list.shift()
          );
        }

        return match;
      });
      return result;
    }
    /**
     * 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
     * @return {?}
     */


    function ɵɵi18nEnd() {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      ngDevMode && assertDefined(tView, "tView should be defined");
      i18nEndFirstPass(tView); // Stop delaying projections

      setDelayProjection(false);
    }
    /**
     * See `i18nEnd` above.
     * @param {?} tView
     * @return {?}
     */


    function i18nEndFirstPass(tView) {
      /** @type {?} */
      var viewData = getLView();
      ngDevMode && assertEqual(viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex, 'i18nEnd should be called before any binding');
      /** @type {?} */

      var rootIndex = i18nIndexStack[i18nIndexStackPointer--];
      /** @type {?} */

      var tI18n =
      /** @type {?} */
      tView.data[rootIndex + HEADER_OFFSET];
      ngDevMode && assertDefined(tI18n, "You should call i18nStart before i18nEnd"); // Find the last node that was added before `i18nEnd`

      /** @type {?} */

      var lastCreatedNode = getPreviousOrParentTNode(); // Read the instructions to insert/move/remove DOM elements

      /** @type {?} */

      var visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData); // Remove deleted nodes

      for (var i = rootIndex + 1; i <= lastCreatedNode.index - HEADER_OFFSET; i++) {
        if (visitedNodes.indexOf(i) === -1) {
          removeNode(i, viewData);
        }
      }
    }
    /**
     * Creates and stores the dynamic TNode, and unhooks it from the tree for now.
     * @param {?} lView
     * @param {?} index
     * @param {?} type
     * @param {?} native
     * @param {?} name
     * @return {?}
     */


    function createDynamicNodeAtIndex(lView, index, type, _native23, name) {
      /** @type {?} */
      var previousOrParentTNode = getPreviousOrParentTNode();
      ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);
      lView[index + HEADER_OFFSET] = _native23;
      /** @type {?} */

      var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index,
      /** @type {?} */
      type, name, null); // We are creating a dynamic node, the previous tNode might not be pointing at this node.
      // We will link ourselves into the tree later with `appendI18nNode`.

      if (previousOrParentTNode.next === tNode) {
        previousOrParentTNode.next = null;
      }

      return tNode;
    }
    /**
     * @param {?} index
     * @param {?} createOpCodes
     * @param {?} icus
     * @param {?} viewData
     * @return {?}
     */


    function readCreateOpCodes(index, createOpCodes, icus, viewData) {
      /** @type {?} */
      var renderer = getLView()[RENDERER];
      /** @type {?} */

      var currentTNode = null;
      /** @type {?} */

      var previousTNode = null;
      /** @type {?} */

      var visitedNodes = [];

      for (var i = 0; i < createOpCodes.length; i++) {
        /** @type {?} */
        var opCode = createOpCodes[i];

        if (typeof opCode == 'string') {
          /** @type {?} */
          var textRNode = createTextNode(opCode, renderer);
          /** @type {?} */

          var textNodeIndex =
          /** @type {?} */
          createOpCodes[++i];
          ngDevMode && ngDevMode.rendererCreateTextNode++;
          previousTNode = currentTNode;
          currentTNode = createDynamicNodeAtIndex(viewData, textNodeIndex, 3
          /* Element */
          , textRNode, null);
          visitedNodes.push(textNodeIndex);
          setIsNotParent();
        } else if (typeof opCode == 'number') {
          switch (opCode & 7
          /* MASK_OPCODE */
          ) {
            case 1
            /* AppendChild */
            :
              /** @type {?} */
              var destinationNodeIndex = opCode >>> 17
              /* SHIFT_PARENT */
              ;
              /** @type {?} */

              var destinationTNode = void 0;

              if (destinationNodeIndex === index) {
                // If the destination node is `i18nStart`, we don't have a
                // top-level node and we should use the host node instead
                destinationTNode =
                /** @type {?} */
                viewData[T_HOST];
              } else {
                destinationTNode = getTNode(destinationNodeIndex, viewData);
              }

              ngDevMode && assertDefined(
              /** @type {?} */
              currentTNode, "You need to create or select a node before you can insert it into the DOM");
              previousTNode = appendI18nNode(
              /** @type {?} */
              currentTNode, destinationTNode, previousTNode, viewData);
              break;

            case 0
            /* Select */
            :
              /** @type {?} */
              var nodeIndex = opCode >>> 3
              /* SHIFT_REF */
              ;
              visitedNodes.push(nodeIndex);
              previousTNode = currentTNode;
              currentTNode = getTNode(nodeIndex, viewData);

              if (currentTNode) {
                setPreviousOrParentTNode(currentTNode, currentTNode.type === 3
                /* Element */
                );
              }

              break;

            case 5
            /* ElementEnd */
            :
              /** @type {?} */
              var elementIndex = opCode >>> 3
              /* SHIFT_REF */
              ;
              previousTNode = currentTNode = getTNode(elementIndex, viewData);
              setPreviousOrParentTNode(currentTNode, false);
              break;

            case 4
            /* Attr */
            :
              /** @type {?} */
              var elementNodeIndex = opCode >>> 3
              /* SHIFT_REF */
              ;
              /** @type {?} */

              var attrName =
              /** @type {?} */
              createOpCodes[++i];
              /** @type {?} */

              var attrValue =
              /** @type {?} */
              createOpCodes[++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

              elementAttributeInternal(elementNodeIndex, attrName, attrValue, viewData);
              break;

            default:
              throw new Error("Unable to determine the type of mutate operation for \"".concat(opCode, "\""));
          }
        } else {
          switch (opCode) {
            case COMMENT_MARKER:
              /** @type {?} */
              var commentValue =
              /** @type {?} */
              createOpCodes[++i];
              /** @type {?} */

              var commentNodeIndex =
              /** @type {?} */
              createOpCodes[++i];
              ngDevMode && assertEqual(typeof commentValue, 'string', "Expected \"".concat(commentValue, "\" to be a comment node value"));
              /** @type {?} */

              var commentRNode = renderer.createComment(commentValue);
              ngDevMode && ngDevMode.rendererCreateComment++;
              previousTNode = currentTNode;
              currentTNode = createDynamicNodeAtIndex(viewData, commentNodeIndex, 5
              /* IcuContainer */
              , commentRNode, null);
              visitedNodes.push(commentNodeIndex);
              attachPatchData(commentRNode, viewData);

              /** @type {?} */
              currentTNode.activeCaseIndex = null; // We will add the case nodes later, during the update phase

              setIsNotParent();
              break;

            case ELEMENT_MARKER:
              /** @type {?} */
              var tagNameValue =
              /** @type {?} */
              createOpCodes[++i];
              /** @type {?} */

              var _elementNodeIndex =
              /** @type {?} */
              createOpCodes[++i];
              ngDevMode && assertEqual(typeof tagNameValue, 'string', "Expected \"".concat(tagNameValue, "\" to be an element node tag name"));
              /** @type {?} */

              var elementRNode = renderer.createElement(tagNameValue);
              ngDevMode && ngDevMode.rendererCreateElement++;
              previousTNode = currentTNode;
              currentTNode = createDynamicNodeAtIndex(viewData, _elementNodeIndex, 3
              /* Element */
              , elementRNode, tagNameValue);
              visitedNodes.push(_elementNodeIndex);
              break;

            default:
              throw new Error("Unable to determine the type of mutate operation for \"".concat(opCode, "\""));
          }
        }
      }

      setIsNotParent();
      return visitedNodes;
    }
    /**
     * @param {?} updateOpCodes
     * @param {?} icus
     * @param {?} bindingsStartIndex
     * @param {?} changeMask
     * @param {?} viewData
     * @param {?=} bypassCheckBit
     * @return {?}
     */


    function readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, viewData) {
      var bypassCheckBit = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;

      /** @type {?} */
      var caseCreated = false;

      for (var i = 0; i < updateOpCodes.length; i++) {
        // bit code to check if we should apply the next update

        /** @type {?} */
        var checkBit =
        /** @type {?} */
        updateOpCodes[i]; // Number of opCodes to skip until next set of update codes

        /** @type {?} */

        var skipCodes =
        /** @type {?} */
        updateOpCodes[++i];

        if (bypassCheckBit || checkBit & changeMask) {
          // The value has been updated since last checked

          /** @type {?} */
          var value = '';

          for (var j = i + 1; j <= i + skipCodes; j++) {
            /** @type {?} */
            var opCode = updateOpCodes[j];

            if (typeof opCode == 'string') {
              value += opCode;
            } else if (typeof opCode == 'number') {
              if (opCode < 0) {
                // It's a binding index whose value is negative
                value += renderStringify(viewData[bindingsStartIndex - opCode]);
              } else {
                /** @type {?} */
                var nodeIndex = opCode >>> 2
                /* SHIFT_REF */
                ;
                /** @type {?} */

                var tIcuIndex = void 0;
                /** @type {?} */

                var tIcu = void 0;
                /** @type {?} */

                var icuTNode = void 0;

                switch (opCode & 3
                /* MASK_OPCODE */
                ) {
                  case 1
                  /* Attr */
                  :
                    /** @type {?} */
                    var propName =
                    /** @type {?} */
                    updateOpCodes[++j];
                    /** @type {?} */

                    var sanitizeFn =
                    /** @type {?} */
                    updateOpCodes[++j];
                    elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);
                    break;

                  case 0
                  /* Text */
                  :
                    textBindingInternal(viewData, nodeIndex, value);
                    break;

                  case 2
                  /* IcuSwitch */
                  :
                    tIcuIndex =
                    /** @type {?} */
                    updateOpCodes[++j];
                    tIcu =
                    /** @type {?} */
                    icus[tIcuIndex];
                    icuTNode =
                    /** @type {?} */
                    getTNode(nodeIndex, viewData); // If there is an active case, delete the old nodes

                    if (icuTNode.activeCaseIndex !== null) {
                      /** @type {?} */
                      var removeCodes = tIcu.remove[icuTNode.activeCaseIndex];

                      for (var k = 0; k < removeCodes.length; k++) {
                        /** @type {?} */
                        var removeOpCode =
                        /** @type {?} */
                        removeCodes[k];

                        switch (removeOpCode & 7
                        /* MASK_OPCODE */
                        ) {
                          case 3
                          /* Remove */
                          :
                            /** @type {?} */
                            var _nodeIndex = removeOpCode >>> 3
                            /* SHIFT_REF */
                            ;

                            removeNode(_nodeIndex, viewData);
                            break;

                          case 6
                          /* RemoveNestedIcu */
                          :
                            /** @type {?} */
                            var nestedIcuNodeIndex =
                            /** @type {?} */
                            removeCodes[k + 1] >>> 3
                            /* SHIFT_REF */
                            ;
                            /** @type {?} */

                            var nestedIcuTNode =
                            /** @type {?} */
                            getTNode(nestedIcuNodeIndex, viewData);
                            /** @type {?} */

                            var activeIndex = nestedIcuTNode.activeCaseIndex;

                            if (activeIndex !== null) {
                              /** @type {?} */
                              var nestedIcuTIndex = removeOpCode >>> 3
                              /* SHIFT_REF */
                              ;
                              /** @type {?} */

                              var nestedTIcu =
                              /** @type {?} */
                              icus[nestedIcuTIndex];
                              addAllToArray(nestedTIcu.remove[activeIndex], removeCodes);
                            }

                            break;
                        }
                      }
                    } // Update the active caseIndex

                    /** @type {?} */


                    var caseIndex = getCaseIndex(tIcu, value);
                    icuTNode.activeCaseIndex = caseIndex !== -1 ? caseIndex : null; // Add the nodes for the new case

                    readCreateOpCodes(-1, tIcu.create[caseIndex], icus, viewData);
                    caseCreated = true;
                    break;

                  case 3
                  /* IcuUpdate */
                  :
                    tIcuIndex =
                    /** @type {?} */
                    updateOpCodes[++j];
                    tIcu =
                    /** @type {?} */
                    icus[tIcuIndex];
                    icuTNode =
                    /** @type {?} */
                    getTNode(nodeIndex, viewData);
                    readUpdateOpCodes(tIcu.update[
                    /** @type {?} */
                    icuTNode.activeCaseIndex], icus, bindingsStartIndex, changeMask, viewData, caseCreated);
                    break;
                }
              }
            }
          }
        }

        i += skipCodes;
      }
    }
    /**
     * @param {?} index
     * @param {?} viewData
     * @return {?}
     */


    function removeNode(index, viewData) {
      /** @type {?} */
      var removedPhTNode = getTNode(index, viewData);
      /** @type {?} */

      var removedPhRNode = getNativeByIndex(index, viewData);

      if (removedPhRNode) {
        nativeRemoveNode(viewData[RENDERER], removedPhRNode);
      }
      /** @type {?} */


      var slotValue =
      /** @type {?} */
      ɵɵload(index);

      if (isLContainer(slotValue)) {
        /** @type {?} */
        var lContainer =
        /** @type {?} */
        slotValue;

        if (removedPhTNode.type !== 0
        /* Container */
        ) {
            nativeRemoveNode(viewData[RENDERER], lContainer[NATIVE]);
          }
      } // Define this node as detached so that we don't risk projecting it


      removedPhTNode.flags |= 32
      /* isDetached */
      ;
      ngDevMode && ngDevMode.rendererRemoveNode++;
    }
    /**
     *
     * 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.
     *
     * \@codeGenApi
     * @param {?} index A unique index of the translation in the static block.
     * @param {?} message The translation message.
     * @param {?=} subTemplateIndex Optional sub-template index in the `message`.
     *
     * @return {?}
     */


    function ɵɵi18n(index, message, subTemplateIndex) {
      ɵɵi18nStart(index, message, subTemplateIndex);
      ɵɵi18nEnd();
    }
    /**
     * Marks a list of attributes as translatable.
     *
     * \@codeGenApi
     * @param {?} index A unique index in the static block
     * @param {?} values
     *
     * @return {?}
     */


    function ɵɵi18nAttributes(index, values) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      ngDevMode && assertDefined(tView, "tView should be defined");
      i18nAttributesFirstPass(tView, index, values);
    }
    /**
     * See `i18nAttributes` above.
     * @param {?} tView
     * @param {?} index
     * @param {?} values
     * @return {?}
     */


    function i18nAttributesFirstPass(tView, index, values) {
      /** @type {?} */
      var previousElement = getPreviousOrParentTNode();
      /** @type {?} */

      var previousElementIndex = previousElement.index - HEADER_OFFSET;
      /** @type {?} */

      var updateOpCodes = [];

      for (var i = 0; i < values.length; i += 2) {
        /** @type {?} */
        var attrName = values[i];
        /** @type {?} */

        var message = values[i + 1];
        /** @type {?} */

        var parts = message.split(ICU_REGEXP);

        for (var j = 0; j < parts.length; j++) {
          /** @type {?} */
          var value = parts[j];

          if (j & 1) {
            // Odd indexes are ICU expressions
            // TODO(ocombe): support ICU expressions in attributes
            throw new Error('ICU expressions are not yet supported in attributes');
          } else if (value !== '') {
            // Even indexes are text (including bindings)

            /** @type {?} */
            var hasBinding = !!value.match(BINDING_REGEXP);

            if (hasBinding) {
              if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
                addAllToArray(generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);
              }
            } else {
              /** @type {?} */
              var _lView8 = getLView();

              elementAttributeInternal(previousElementIndex, attrName, value, _lView8); // Check if that attribute is a directive input

              /** @type {?} */

              var tNode = getTNode(previousElementIndex, _lView8);
              /** @type {?} */

              var dataValue = tNode.inputs && tNode.inputs[attrName];

              if (dataValue) {
                setInputsForProperty(_lView8, dataValue, value);
              }
            }
          }
        }
      }

      if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {
        tView.data[index + HEADER_OFFSET] = updateOpCodes;
      }
    }
    /** @type {?} */


    var changeMask = 0;
    /** @type {?} */

    var shiftsCounter = 0;
    /**
     * Stores the values of the bindings during each update cycle in order to determine if we need to
     * update the translated nodes.
     *
     * \@codeGenApi
     * @template T
     * @param {?} value The binding's value
     * @return {?} This function returns itself so that it may be chained
     * (e.g. `i18nExp(ctx.name)(ctx.title)`)
     *
     */

    function ɵɵi18nExp(value) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var expression = bind(lView, value);

      if (expression !== NO_CHANGE) {
        changeMask = changeMask | 1 << shiftsCounter;
      }

      shiftsCounter++;
      return ɵɵi18nExp;
    }
    /**
     * Updates a translation block or an i18n attribute when the bindings have changed.
     *
     * \@codeGenApi
     * @param {?} index Index of either {\@link i18nStart} (translation block) or {\@link i18nAttributes}
     * (i18n attribute) on which it should update the content.
     *
     * @return {?}
     */


    function ɵɵi18nApply(index) {
      if (shiftsCounter) {
        /** @type {?} */
        var _lView9 = getLView();
        /** @type {?} */


        var tView = _lView9[TVIEW];
        ngDevMode && assertDefined(tView, "tView should be defined");
        /** @type {?} */

        var tI18n = tView.data[index + HEADER_OFFSET];
        /** @type {?} */

        var updateOpCodes;
        /** @type {?} */

        var icus = null;

        if (Array.isArray(tI18n)) {
          updateOpCodes =
          /** @type {?} */
          tI18n;
        } else {
          updateOpCodes =
          /** @type {?} */
          tI18n.update;
          icus =
          /** @type {?} */
          tI18n.icus;
        }
        /** @type {?} */


        var bindingsStartIndex = _lView9[BINDING_INDEX] - shiftsCounter - 1;
        readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, _lView9); // Reset changeMask & maskBit to default for the next update cycle

        changeMask = 0;
        shiftsCounter = 0;
      }
    }
    /**
     * 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
     * @return {?}
     */


    function getCaseIndex(icuExpression, bindingValue) {
      /** @type {?} */
      var index = icuExpression.cases.indexOf(bindingValue);

      if (index === -1) {
        switch (icuExpression.type) {
          case 1
          /* plural */
          :
            {
              /** @type {?} */
              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;
    }
    /**
     * Generate the OpCodes for ICU expressions.
     *
     * @param {?} tIcus
     * @param {?} icuExpression
     * @param {?} startIndex
     * @param {?} expandoStartIndex
     * @return {?}
     */


    function icuStart(tIcus, icuExpression, startIndex, expandoStartIndex) {
      /** @type {?} */
      var createCodes = [];
      /** @type {?} */

      var removeCodes = [];
      /** @type {?} */

      var updateCodes = [];
      /** @type {?} */

      var vars = [];
      /** @type {?} */

      var childIcus = [];

      for (var i = 0; i < icuExpression.values.length; i++) {
        // Each value is an array of strings & other ICU expressions

        /** @type {?} */
        var valueArr = icuExpression.values[i];
        /** @type {?} */

        var nestedIcus = [];

        for (var j = 0; j < valueArr.length; j++) {
          /** @type {?} */
          var value = valueArr[j];

          if (typeof value !== 'string') {
            // It is an nested ICU expression

            /** @type {?} */
            var icuIndex = nestedIcus.push(
            /** @type {?} */
            value) - 1; // Replace nested ICU expression by a comment node

            valueArr[j] = "<!--\uFFFD".concat(icuIndex, "\uFFFD-->");
          }
        }
        /** @type {?} */


        var icuCase = parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);
        createCodes.push(icuCase.create);
        removeCodes.push(icuCase.remove);
        updateCodes.push(icuCase.update);
        vars.push(icuCase.vars);
        childIcus.push(icuCase.childIcus);
      }
      /** @type {?} */


      var tIcu = {
        type: icuExpression.type,
        vars: vars,
        childIcus: childIcus,
        cases: icuExpression.cases,
        create: createCodes,
        remove: removeCodes,
        update: updateCodes
      };
      tIcus.push(tIcu); // Adding the maximum possible of vars needed (based on the cases with the most vars)

      i18nVarsCount += Math.max.apply(Math, vars);
    }
    /**
     * Transforms a string template into an HTML template and a list of instructions used to update
     * attributes or nodes that contain bindings.
     *
     * @param {?} unsafeHtml The string to parse
     * @param {?} parentIndex
     * @param {?} nestedIcus
     * @param {?} tIcus
     * @param {?} expandoStartIndex
     * @return {?}
     */


    function parseIcuCase(unsafeHtml, parentIndex, nestedIcus, tIcus, expandoStartIndex) {
      /** @type {?} */
      var inertBodyHelper = new InertBodyHelper(document);
      /** @type {?} */

      var inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);

      if (!inertBodyElement) {
        throw new Error('Unable to generate inert body element');
      }
      /** @type {?} */


      var wrapper =
      /** @type {?} */
      getTemplateContent(
      /** @type {?} */
      inertBodyElement) || inertBodyElement;
      /** @type {?} */

      var opCodes = {
        vars: 0,
        childIcus: [],
        create: [],
        remove: [],
        update: []
      };
      parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);
      return opCodes;
    }
    /** @type {?} */


    var NESTED_ICU = /�(\d+)�/;
    /**
     * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.
     *
     * @param {?} currentNode The first node to parse
     * @param {?} icuCase The data for the ICU expression case that contains those nodes
     * @param {?} parentIndex Index of the current node's parent
     * @param {?} nestedIcus Data for the nested ICU expressions that this case contains
     * @param {?} tIcus Data for all ICU expressions of the current message
     * @param {?} expandoStartIndex Expando start index for the current ICU expression
     * @return {?}
     */

    function parseNodes(currentNode, icuCase, parentIndex, nestedIcus, tIcus, expandoStartIndex) {
      if (currentNode) {
        /** @type {?} */
        var nestedIcusToCreate = [];

        while (currentNode) {
          /** @type {?} */
          var nextNode = currentNode.nextSibling;
          /** @type {?} */

          var newIndex = expandoStartIndex + ++icuCase.vars;

          switch (currentNode.nodeType) {
            case Node.ELEMENT_NODE:
              /** @type {?} */
              var element =
              /** @type {?} */
              currentNode;
              /** @type {?} */

              var tagName = element.tagName.toLowerCase();

              if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {
                // This isn't a valid element, we won't create an element for it
                icuCase.vars--;
              } else {
                icuCase.create.push(ELEMENT_MARKER, tagName, newIndex, parentIndex << 17
                /* SHIFT_PARENT */
                | 1
                /* AppendChild */
                );
                /** @type {?} */

                var elAttrs = element.attributes;

                for (var i = 0; i < elAttrs.length; i++) {
                  /** @type {?} */
                  var attr =
                  /** @type {?} */
                  elAttrs.item(i);
                  /** @type {?} */

                  var lowerAttrName = attr.name.toLowerCase();
                  /** @type {?} */

                  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]) {
                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl), icuCase.update);
                      } else if (SRCSET_ATTRS[lowerAttrName]) {
                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, sanitizeSrcset), icuCase.update);
                      } else {
                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name), icuCase.update);
                      }
                    } else {
                      ngDevMode && console.warn("WARNING: ignoring unsafe attribute value ".concat(lowerAttrName, " on element ").concat(tagName, " (see http://g.co/ng/security#xss)"));
                    }
                  } else {
                    icuCase.create.push(newIndex << 3
                    /* SHIFT_REF */
                    | 4
                    /* Attr */
                    , attr.name, attr.value);
                  }
                } // Parse the children of this node (if any)


                parseNodes(currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex); // Remove the parent node after the children

                icuCase.remove.push(newIndex << 3
                /* SHIFT_REF */
                | 3
                /* Remove */
                );
              }

              break;

            case Node.TEXT_NODE:
              /** @type {?} */
              var value = currentNode.textContent || '';
              /** @type {?} */

              var hasBinding = value.match(BINDING_REGEXP);
              icuCase.create.push(hasBinding ? '' : value, newIndex, parentIndex << 17
              /* SHIFT_PARENT */
              | 1
              /* AppendChild */
              );
              icuCase.remove.push(newIndex << 3
              /* SHIFT_REF */
              | 3
              /* Remove */
              );

              if (hasBinding) {
                addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);
              }

              break;

            case Node.COMMENT_NODE:
              // Check if the comment node is a placeholder for a nested ICU

              /** @type {?} */
              var match = NESTED_ICU.exec(currentNode.textContent || '');

              if (match) {
                /** @type {?} */
                var nestedIcuIndex = parseInt(match[1], 10);
                /** @type {?} */

                var newLocal = ngDevMode ? "nested ICU ".concat(nestedIcuIndex) : ''; // Create the comment node that will anchor the ICU expression

                icuCase.create.push(COMMENT_MARKER, newLocal, newIndex, parentIndex << 17
                /* SHIFT_PARENT */
                | 1
                /* AppendChild */
                );
                /** @type {?} */

                var nestedIcu = nestedIcus[nestedIcuIndex];
                nestedIcusToCreate.push([nestedIcu, newIndex]);
              } else {
                // We do not handle any other type of comment
                icuCase.vars--;
              }

              break;

            default:
              // We do not handle any other type of element
              icuCase.vars--;
          }

          currentNode =
          /** @type {?} */
          nextNode;
        }

        for (var _i19 = 0; _i19 < nestedIcusToCreate.length; _i19++) {
          /** @type {?} */
          var _nestedIcu = nestedIcusToCreate[_i19][0];
          /** @type {?} */

          var nestedIcuNodeIndex = nestedIcusToCreate[_i19][1];
          icuStart(tIcus, _nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars); // Since this is recursive, the last TIcu that was pushed is the one we want

          /** @type {?} */

          var nestTIcuIndex = tIcus.length - 1;
          icuCase.vars += Math.max.apply(Math, _toConsumableArray(tIcus[nestTIcuIndex].vars));
          icuCase.childIcus.push(nestTIcuIndex);
          /** @type {?} */

          var mask = getBindingMask(_nestedIcu);
          icuCase.update.push(toMaskBit(_nestedIcu.mainBinding), // mask of the main binding
          3, // skip 3 opCodes if not changed
          -1 - _nestedIcu.mainBinding, nestedIcuNodeIndex << 2
          /* SHIFT_REF */
          | 2
          /* IcuSwitch */
          , nestTIcuIndex, mask, // mask of all the bindings of this ICU expression
          2, // skip 2 opCodes if not changed
          nestedIcuNodeIndex << 2
          /* SHIFT_REF */
          | 3
          /* IcuUpdate */
          , nestTIcuIndex);
          icuCase.remove.push(nestTIcuIndex << 3
          /* SHIFT_REF */
          | 6
          /* RemoveNestedIcu */
          , nestedIcuNodeIndex << 3
          /* SHIFT_REF */
          | 3
          /* Remove */
          );
        }
      }
    }
    /**
     * 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.
     * @type {?}
     */


    var NGSP_UNICODE_REGEXP = /\uE500/g;
    /**
     * @param {?} value
     * @return {?}
     */

    function replaceNgsp(value) {
      return value.replace(NGSP_UNICODE_REGEXP, ' ');
    }
    /** @type {?} */


    var TRANSLATIONS = {};
    /**
     * @record
     */

    function I18nLocalizeOptions() {}

    if (false) {}
    /**
     * Set the configuration for `i18nLocalize`.
     *
     * @deprecated this method is temporary & should not be used as it will be removed soon
     * @param {?=} options
     * @return {?}
     */


    function i18nConfigureLocalize() {
      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
        translations: {}
      };
      TRANSLATIONS = options.translations;
    }
    /** @type {?} */


    var LOCALIZE_PH_REGEXP = /\{\$(.*?)\}/g;
    /**
     * A goog.getMsg-like function for users that do not use Closure.
     *
     * This method is required as a *temporary* measure to prevent i18n tests from being blocked while
     * running outside of Closure Compiler. This method will not be needed once runtime translation
     * service support is introduced.
     *
     * \@codeGenApi
     * @deprecated this method is temporary & should not be used as it will be removed soon
     * @param {?} input
     * @param {?=} placeholders
     * @return {?}
     */

    function ɵɵi18nLocalize(input, placeholders) {
      if (typeof TRANSLATIONS[input] !== 'undefined') {
        // to account for empty string
        input = TRANSLATIONS[input];
      }

      if (placeholders !== undefined && Object.keys(placeholders).length) {
        return input.replace(LOCALIZE_PH_REGEXP,
        /**
        * @param {?} _
        * @param {?} key
        * @return {?}
        */
        function (_, key) {
          return placeholders[key] || '';
        });
      }

      return input;
    }
    /**
     * 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.
     * @type {?}
     */


    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
     * @return {?}
     */

    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.
     * @return {?}
     */


    function getLocaleId() {
      return LOCALE_ID;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Map of module-id to the corresponding NgModule.
     * - In pre Ivy we track NgModuleFactory,
     * - In post Ivy we track the NgModuleType
     * @type {?}
     */


    var modules = new Map();
    /**
     * Registers a loaded module. Should only be called from generated NgModuleFactory code.
     * \@publicApi
     * @param {?} id
     * @param {?} factory
     * @return {?}
     */

    function registerModuleFactory(id, factory) {
      /** @type {?} */
      var existing =
      /** @type {?} */
      modules.get(id);
      assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
      modules.set(id, factory);
    }
    /**
     * @param {?} id
     * @param {?} type
     * @param {?} incoming
     * @return {?}
     */


    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)));
      }
    }
    /**
     * @param {?} ngModuleType
     * @return {?}
     */


    function registerNgModuleType(ngModuleType) {
      if (ngModuleType.ngModuleDef.id !== null) {
        /** @type {?} */
        var id = ngModuleType.ngModuleDef.id;
        /** @type {?} */

        var existing =
        /** @type {?} */
        modules.get(id);
        assertSameOrNotExisting(id, existing, ngModuleType);
        modules.set(id, ngModuleType);
      }
      /** @type {?} */


      var imports = ngModuleType.ngModuleDef.imports;

      if (imports instanceof Function) {
        imports = imports();
      }

      if (imports) {
        imports.forEach(
        /**
        * @param {?} i
        * @return {?}
        */
        function (i) {
          return registerNgModuleType(
          /** @type {?} */
          i);
        });
      }
    }
    /**
     * @return {?}
     */


    function clearModulesForTest() {
      modules.clear();
    }
    /**
     * @param {?} id
     * @return {?}
     */


    function getRegisteredNgModuleType(id) {
      return modules.get(id);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     * @template T
     */


    function NgModuleType() {}

    if (false) {}
    /** @type {?} */


    var COMPONENT_FACTORY_RESOLVER = {
      provide: ComponentFactoryResolver,
      useClass: ComponentFactoryResolver$1,
      deps: [NgModuleRef]
    };
    /**
     * @template T
     */

    var NgModuleRef$1 = /*#__PURE__*/function (_NgModuleRef) {
      _inherits(NgModuleRef$1, _NgModuleRef);

      var _super115 = _createSuper(NgModuleRef$1);

      /**
       * @param {?} ngModuleType
       * @param {?} _parent
       */
      function NgModuleRef$1(ngModuleType, _parent) {
        var _this325;

        _classCallCheck(this, NgModuleRef$1);

        _this325 = _super115.call(this);
        _this325._parent = _parent; // tslint:disable-next-line:require-internal-with-underscore

        _this325._bootstrapComponents = [];
        _this325.injector = _assertThisInitialized(_this325);
        _this325.destroyCbs = [];
        /** @type {?} */

        /** @nocollapse */

        var ngModuleDef = getNgModuleDef(ngModuleType);
        ngDevMode && assertDefined(ngModuleDef, "NgModule '".concat(stringify(ngModuleType), "' is not a subtype of 'NgModuleType'."));
        /** @type {?} */

        var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);

        if (ngLocaleIdDef) {
          setLocaleId(ngLocaleIdDef);
        }

        _this325._bootstrapComponents = maybeUnwrapFn(
        /** @type {?} */
        ngModuleDef.bootstrap);
        /** @type {?} */

        var additionalProviders = [{
          provide: NgModuleRef,
          useValue: _assertThisInitialized(_this325)
        }, COMPONENT_FACTORY_RESOLVER];
        _this325._r3Injector =
        /** @type {?} */
        createInjector(ngModuleType, _parent, additionalProviders, stringify(ngModuleType));
        _this325.instance = _this325.get(ngModuleType);
        return _this325;
      }
      /**
       * @param {?} token
       * @param {?=} notFoundValue
       * @param {?=} injectFlags
       * @return {?}
       */


      _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) {
            return this;
          }

          return this._r3Injector.get(token, notFoundValue, injectFlags);
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroy",

        /**
         * @return {?}
         */
        value: function destroy() {
          ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');
          /** @type {?} */

          var injector = this._r3Injector;
          !injector.destroyed && injector.destroy();

          /** @type {?} */
          this.destroyCbs.forEach(
          /**
          * @param {?} fn
          * @return {?}
          */
          function (fn) {
            return fn();
          });
          this.destroyCbs = null;
        }
        /**
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');

          /** @type {?} */
          this.destroyCbs.push(callback);
        }
      }, {
        key: "componentFactoryResolver",
        get: function get() {
          return this.get(ComponentFactoryResolver);
        }
      }]);

      return NgModuleRef$1;
    }(NgModuleRef);

    if (false) {}
    /**
     * @template T
     */


    var NgModuleFactory$1 = /*#__PURE__*/function (_NgModuleFactory) {
      _inherits(NgModuleFactory$1, _NgModuleFactory);

      var _super116 = _createSuper(NgModuleFactory$1);

      /**
       * @param {?} moduleType
       */
      function NgModuleFactory$1(moduleType) {
        var _this326;

        _classCallCheck(this, NgModuleFactory$1);

        _this326 = _super116.call(this);
        _this326.moduleType = moduleType;
        /** @type {?} */

        /** @nocollapse */

        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(
          /** @type {?} */
          moduleType);
        }

        return _this326;
      }
      /**
       * @param {?} parentInjector
       * @return {?}
       */


      _createClass2(NgModuleFactory$1, [{
        key: "create",
        value: function create(parentInjector) {
          return new NgModuleRef$1(this.moduleType, parentInjector);
        }
      }]);

      return NgModuleFactory$1;
    }(NgModuleFactory);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     */


    function TypeWithMetadata() {}

    if (false) {}
    /**
     * 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.
     * @param {?} type
     * @param {?} decorators
     * @param {?} ctorParameters
     * @param {?} propDecorators
     * @return {?}
     */


    function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
      return (
        /** @type {?} */
        noSideEffects(
        /**
        * @return {?}
        */
        function () {
          /** @type {?} */
          var clazz =
          /** @type {?} */
          type; // We determine whether a class has its own metadata by taking the metadata from the parent
          // constructor and checking whether it's the same as the subclass metadata below. We can't use
          // `hasOwnProperty` here because it doesn't work correctly in IE10 for static fields that are
          // defined by TS. See https://github.com/angular/angular/pull/28439#issuecomment-459349218.

          /** @type {?} */

          var parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;
          /** @type {?} */

          var parentConstructor = parentPrototype && parentPrototype.constructor;

          if (decorators !== null) {
            if (clazz.decorators !== undefined && (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {
              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.propDecorators !== undefined && (!parentConstructor || parentConstructor.propDecorators !== clazz.propDecorators)) {
              clazz.propDecorators = Object.assign({}, clazz.propDecorators, propDecorators);
            } else {
              clazz.propDecorators = propDecorators;
            }
          }
        })
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Bindings for pure functions are stored after regular bindings.
     *
     * |------consts------|---------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.
     *
     * \@codeGenApi
     * @template T
     * @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
     * @return {?} value
     *
     */


    function ɵɵpureFunction0(slotOffset, pureFn, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      return isCreationMode() ? 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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var bindingIndex = getBindingRoot() + slotOffset;
      return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getBinding(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.
     *
     * \@codeGenApi
     * @param {?} slotOffset the offset from binding root to the reserved slot
     * @param {?} pureFn
     * @param {?} exp1
     * @param {?} exp2
     * @param {?=} thisArg Optional calling context of pureFn
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getBinding(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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getBinding(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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      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)) : getBinding(lView, bindingIndex + 4);
    }
    /**
     * 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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var lView = getLView();
      /** @type {?} */

      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.
     *
     * \@codeGenApi
     * @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
     * @return {?} Updated or cached value
     *
     */


    function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {
      // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings

      /** @type {?} */
      var bindingIndex = getBindingRoot() + slotOffset;
      /** @type {?} */

      var different = false;
      /** @type {?} */

      var lView = getLView();

      for (var i = 0; i < exps.length; i++) {
        bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);
      }

      return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getBinding(lView, bindingIndex);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Create a pipe.
     *
     * \@codeGenApi
     * @param {?} index Pipe index where the pipe will be stored.
     * @param {?} pipeName The name of the pipe
     * @return {?} T the instance of the pipe.
     *
     */


    function ɵɵpipe(index, pipeName) {
      /** @type {?} */
      var tView = getLView()[TVIEW];
      /** @type {?} */

      var pipeDef;
      /** @type {?} */

      var adjustedIndex = index + HEADER_OFFSET;

      if (tView.firstTemplatePass) {
        pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);
        tView.data[adjustedIndex] = pipeDef;

        if (pipeDef.onDestroy) {
          (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);
        }
      } else {
        pipeDef =
        /** @type {?} */
        tView.data[adjustedIndex];
      }
      /** @type {?} */


      var pipeInstance = pipeDef.factory();
      store(index, pipeInstance);
      return pipeInstance;
    }
    /**
     * 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.
     *
     * \@publicApi
     * @param {?} name Name of pipe to resolve
     * @param {?} registry Full list of available pipes
     * @return {?} Matching PipeDef
     *
     */


    function getPipeDef$1(name, registry) {
      if (registry) {
        for (var i = registry.length - 1; i >= 0; i--) {
          /** @type {?} */
          var _pipeDef = registry[i];

          if (name === _pipeDef.name) {
            return _pipeDef;
          }
        }
      }

      throw new Error("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.
     *
     * \@codeGenApi
     * @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}.
     *
     * @return {?}
     */


    function ɵɵpipeBind1(index, slotOffset, v1) {
      /** @type {?} */
      var pipeInstance = ɵɵload(index);
      return unwrapValue$1(isPure(index) ? ɵɵpureFunction1(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.
     *
     * \@codeGenApi
     * @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}.
     *
     * @return {?}
     */


    function ɵɵpipeBind2(index, slotOffset, v1, v2) {
      /** @type {?} */
      var pipeInstance = ɵɵload(index);
      return unwrapValue$1(isPure(index) ? ɵɵpureFunction2(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.
     *
     * \@codeGenApi
     * @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}.
     *
     * @return {?}
     */


    function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {
      /** @type {?} */
      var pipeInstance = ɵɵload(index);
      return unwrapValue$1(isPure(index) ? ɵɵpureFunction3(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.
     *
     * \@codeGenApi
     * @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}.
     *
     * @return {?}
     */


    function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {
      /** @type {?} */
      var pipeInstance = ɵɵload(index);
      return unwrapValue$1(isPure(index) ? ɵɵpureFunction4(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.
     *
     * \@codeGenApi
     * @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.
     *
     * @return {?}
     */


    function ɵɵpipeBindV(index, slotOffset, values) {
      /** @type {?} */
      var pipeInstance = ɵɵload(index);
      return unwrapValue$1(isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values));
    }
    /**
     * @param {?} index
     * @return {?}
     */


    function isPure(index) {
      return (
        /** @type {?} */
        getLView()[TVIEW].data[index + HEADER_OFFSET].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.
     * @return {?}
     */


    function unwrapValue$1(newValue) {
      if (WrappedValue.isWrapped(newValue)) {
        newValue = WrappedValue.unwrap(newValue);
        /** @type {?} */

        var _lView10 = getLView(); // The NO_CHANGE value needs to be written at the index where the impacted binding value is
        // stored

        /** @type {?} */


        var bindingToInvalidateIdx = _lView10[BINDING_INDEX];
        _lView10[bindingToInvalidateIdx] = NO_CHANGE;
      }

      return newValue;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Use in components with the `\@Output` directive to emit custom events
     * synchronously or asynchronously, and register handlers for those events
     * by subscribing to an instance.
     *
     * \@usageNotes
     *
     * Extends
     * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
     * for Angular by adding the `emit()` method.
     *
     * In the following example, a component defines two output properties
     * that create event emitters. When the title is clicked, the emitter
     * emits an open or close event to toggle the current visibility state.
     *
     * ```html
     * \@Component({
     *   selector: 'zippy',
     *   template: `
     *   <div class="zippy">
     *     <div (click)="toggle()">Toggle</div>
     *     <div [hidden]="!visible">
     *       <ng-content></ng-content>
     *     </div>
     *  </div>`})
     * export class Zippy {
     *   visible: boolean = true;
     * \@Output() open: EventEmitter<any> = new EventEmitter();
     * \@Output() close: EventEmitter<any> = new EventEmitter();
     *
     *   toggle() {
     *     this.visible = !this.visible;
     *     if (this.visible) {
     *       this.open.emit(null);
     *     } else {
     *       this.close.emit(null);
     *     }
     *   }
     * }
     * ```
     *
     * Access the event object with the `$event` argument passed to the output event
     * handler:
     *
     * ```html
     * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
     * ```
     *
     * @see [Observables in Angular](guide/observables-in-angular)
     * \@publicApi
     * @template T
     */


    var EventEmitter = /*#__PURE__*/function (_rxjs__WEBPACK_IMPORT) {
      _inherits(EventEmitter, _rxjs__WEBPACK_IMPORT);

      var _super117 = _createSuper(EventEmitter);

      // tslint:disable-line

      /**
       * Creates an instance of this class that can
       * deliver events synchronously or asynchronously.
       *
       * @param {?=} isAsync When true, deliver events asynchronously.
       *
       */
      function EventEmitter() {
        var _this327;

        var isAsync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

        _classCallCheck(this, EventEmitter);

        _this327 = _super117.call(this);
        _this327.__isAsync = isAsync;
        return _this327;
      }
      /**
       * Emits an event containing a given value.
       * @param {?=} value The value to emit.
       * @return {?}
       */


      _createClass2(EventEmitter, [{
        key: "emit",
        value: function emit(value) {
          _get(_getPrototypeOf(EventEmitter.prototype), "next", this).call(this, value);
        }
        /**
         * Registers handlers for events emitted by this instance.
         * @param {?=} generatorOrNext When supplied, a custom handler for emitted events.
         * @param {?=} error When supplied, a custom handler for an error notification
         * from this emitter.
         * @param {?=} complete When supplied, a custom handler for a completion
         * notification from this emitter.
         * @return {?}
         */

      }, {
        key: "subscribe",
        value: function subscribe(generatorOrNext, error, complete) {
          /** @type {?} */
          var schedulerFn;
          /** @type {?} */

          var errorFn =
          /**
          * @param {?} err
          * @return {?}
          */
          function errorFn(err) {
            return null;
          };
          /** @type {?} */


          var completeFn =
          /**
          * @return {?}
          */
          function completeFn() {
            return null;
          };

          if (generatorOrNext && typeof generatorOrNext === 'object') {
            schedulerFn = this.__isAsync ?
            /**
            * @param {?} value
            * @return {?}
            */
            function (value) {
              setTimeout(
              /**
              * @return {?}
              */
              function () {
                return generatorOrNext.next(value);
              });
            } :
            /**
            * @param {?} value
            * @return {?}
            */
            function (value) {
              generatorOrNext.next(value);
            };

            if (generatorOrNext.error) {
              errorFn = this.__isAsync ?
              /**
              * @param {?} err
              * @return {?}
              */
              function (err) {
                setTimeout(
                /**
                * @return {?}
                */
                function () {
                  return generatorOrNext.error(err);
                });
              } :
              /**
              * @param {?} err
              * @return {?}
              */
              function (err) {
                generatorOrNext.error(err);
              };
            }

            if (generatorOrNext.complete) {
              completeFn = this.__isAsync ?
              /**
              * @return {?}
              */
              function () {
                setTimeout(
                /**
                * @return {?}
                */
                function () {
                  return generatorOrNext.complete();
                });
              } :
              /**
              * @return {?}
              */
              function () {
                generatorOrNext.complete();
              };
            }
          } else {
            schedulerFn = this.__isAsync ?
            /**
            * @param {?} value
            * @return {?}
            */
            function (value) {
              setTimeout(
              /**
              * @return {?}
              */
              function () {
                return generatorOrNext(value);
              });
            } :
            /**
            * @param {?} value
            * @return {?}
            */
            function (value) {
              generatorOrNext(value);
            };

            if (error) {
              errorFn = this.__isAsync ?
              /**
              * @param {?} err
              * @return {?}
              */
              function (err) {
                setTimeout(
                /**
                * @return {?}
                */
                function () {
                  return error(err);
                });
              } :
              /**
              * @param {?} err
              * @return {?}
              */
              function (err) {
                error(err);
              };
            }

            if (complete) {
              completeFn = this.__isAsync ?
              /**
              * @return {?}
              */
              function () {
                setTimeout(
                /**
                * @return {?}
                */
                function () {
                  return complete();
                });
              } :
              /**
              * @return {?}
              */
              function () {
                complete();
              };
            }
          }
          /** @type {?} */


          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"]);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @template T
     * @this {?}
     * @return {?}
     */


    function symbolIterator() {
      return (
        /** @type {?} */

        /** @type {?} */

        /** @type {?} */
        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
     * @template T
     */


    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> { ... }

        /** @type {?} */

        var symbol = getSymbolIterator();
        /** @type {?} */

        var proto =
        /** @type {?} */
        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)
       * @template U
       * @param {?} fn
       * @return {?}
       */


      _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)
         * @param {?} fn
         * @return {?}
         */

      }, {
        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)
         * @param {?} fn
         * @return {?}
         */

      }, {
        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)
         * @template U
         * @param {?} fn
         * @param {?} init
         * @return {?}
         */

      }, {
        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)
         * @param {?} fn
         * @return {?}
         */

      }, {
        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)
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "some",
        value: function some(fn) {
          return this._results.some(fn);
        }
        /**
         * Returns a copy of the internal results list as an Array.
         * @return {?}
         */

      }, {
        key: "toArray",
        value: function toArray() {
          return this._results.slice();
        }
        /**
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "reset",
        value: function reset(resultsTree) {
          this._results = flatten(resultsTree);

          /** @type {?} */
          this.dirty = false;

          /** @type {?} */
          this.length = this._results.length;

          /** @type {?} */
          this.last = this._results[this.length - 1];

          /** @type {?} */
          this.first = this._results[0];
        }
        /**
         * Triggers a change event by emitting on the `changes` {\@link EventEmitter}.
         * @return {?}
         */

      }, {
        key: "notifyOnChanges",
        value: function notifyOnChanges() {
          /** @type {?} */
          this.changes.emit(this);
        }
        /**
         * internal
         * @return {?}
         */

      }, {
        key: "setDirty",
        value: function setDirty() {
          /** @type {?} */
          this.dirty = true;
        }
        /**
         * internal
         * @return {?}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          /** @type {?} */
          this.changes.complete();

          /** @type {?} */
          this.changes.unsubscribe();
        }
      }]);

      return QueryList;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /** @enum {number} */


    var RenderFlags = {
      /* Whether to run the creation block (e.g. create elements and directives) */
      Create: 1,

      /* Whether to run the update block (e.g. refresh bindings) */
      Update: 2
    };
    /**
     * A subclass of `Type` which has a static `ngComponentDef`:`ComponentDef` field making it
     * consumable for rendering.
     * @record
     * @template T
     */

    function ComponentType() {}

    if (false) {}
    /**
     * A subclass of `Type` which has a static `ngDirectiveDef`:`DirectiveDef` field making it
     * consumable for rendering.
     * @record
     * @template T
     */


    function DirectiveType() {}

    if (false) {}
    /** @enum {number} */


    var DirectiveDefFlags = {
      ContentQuery: 2
    };
    /**
     * A subclass of `Type` which has a static `ngPipeDef`:`PipeDef` field making it
     * consumable for rendering.
     * @record
     * @template T
     */

    function PipeType() {}

    if (false) {}
    /**
     * Runtime information for classes that are inherited by components or directives
     * that aren't defined as components or directives.
     *
     * This is an internal data structure used by the renderer to determine what inputs
     * and outputs should be inherited.
     *
     * See: {\@link defineBase}
     *
     * \@codeGenApi
     * @record
     * @template T
     */


    function ɵɵBaseDef() {}

    if (false) {}
    /**
     * Runtime link information for Directives.
     *
     * This is internal data structure used by the render to link
     * directives into templates.
     *
     * NOTE: Always use `defineDirective` function to create this object,
     * never create the object directly since the shape of this object
     * can change between versions.
     *
     * @param Selector type metadata specifying the selector of the directive or component
     *
     * See: {\@link defineDirective}
     * @record
     * @template T
     */


    function DirectiveDef() {}

    if (false) {}
    /**
     * Runtime link information for Components.
     *
     * This is internal data structure used by the render to link
     * components into templates.
     *
     * NOTE: Always use `defineComponent` function to create this object,
     * never create the object directly since the shape of this object
     * can change between versions.
     *
     * See: {\@link defineComponent}
     * @record
     * @template T
     */


    function ComponentDef() {}

    if (false) {}
    /**
     * Runtime link information for Pipes.
     *
     * This is internal data structure used by the renderer to link
     * pipes into templates.
     *
     * NOTE: Always use `definePipe` function to create this object,
     * never create the object directly since the shape of this object
     * can change between versions.
     *
     * See: {\@link definePipe}
     * @record
     * @template T
     */


    function PipeDef() {}

    if (false) {}
    /**
     * @record
     */


    function DirectiveDefFeature() {}

    if (false) {}
    /**
     * @record
     */


    function ComponentDefFeature() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$7 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 object representing query metadata extracted from query annotations.
     * @record
     */

    function TQueryMetadata() {}

    if (false) {}
    /**
     * TQuery objects represent all the query-related data that remain the same from one view instance
     * to another and can be determined on the very first template pass. Most notably TQuery holds all
     * the matches for a given view.
     * @record
     */


    function TQuery() {}

    if (false) {}
    /**
     * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
     * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
     * @record
     */


    function TQueries() {}

    if (false) {}
    /**
     * An interface that represents query-related information specific to a view instance. Most notably
     * it contains:
     * - materialized query matches;
     * - a pointer to a QueryList where materialized query results should be reported.
     * @record
     * @template T
     */


    function LQuery() {}

    if (false) {}
    /**
     * lQueries represent a collection of individual LQuery objects tracked in a given view.
     * @record
     */


    function LQueries() {}

    if (false) {} // Note: This hack is necessary so we don't erroneously get a circular dependency
    // failure based on types.

    /** @type {?} */


    var unusedValueExportToPlacateAjd$8 = 1;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;
    /**
     * @template T
     */

    var LQuery_ = /*#__PURE__*/function () {
      /**
       * @param {?} queryList
       */
      function LQuery_(queryList) {
        _classCallCheck(this, LQuery_);

        this.queryList = queryList;
        this.matches = null;
      }
      /**
       * @return {?}
       */


      _createClass2(LQuery_, [{
        key: "clone",
        value: function clone() {
          return new LQuery_(this.queryList);
        }
        /**
         * @return {?}
         */

      }, {
        key: "setDirty",
        value: function setDirty() {
          this.queryList.setDirty();
        }
      }]);

      return LQuery_;
    }();

    if (false) {}

    var LQueries_ = /*#__PURE__*/function () {
      /**
       * @param {?=} queries
       */
      function LQueries_() {
        var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

        _classCallCheck(this, LQueries_);

        this.queries = queries;
      }
      /**
       * @param {?} tView
       * @return {?}
       */


      _createClass2(LQueries_, [{
        key: "createEmbeddedView",
        value: function createEmbeddedView(tView) {
          /** @type {?} */
          var tQueries = tView.queries;

          if (tQueries !== null) {
            /** @type {?} */
            var noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;
            /** @type {?} */

            var viewLQueries = new Array(noOfInheritedQueries); // 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++) {
              /** @type {?} */
              var tQuery = tQueries.getByIndex(i);
              /** @type {?} */

              var parentLQuery = this.queries[tQuery.indexInDeclarationView];
              viewLQueries[i] = parentLQuery.clone();
            }

            return new LQueries_(viewLQueries);
          }

          return null;
        }
        /**
         * @param {?} tView
         * @return {?}
         */

      }, {
        key: "insertView",
        value: function insertView(tView) {
          this.dirtyQueriesWithMatches(tView);
        }
        /**
         * @param {?} tView
         * @return {?}
         */

      }, {
        key: "detachView",
        value: function detachView(tView) {
          this.dirtyQueriesWithMatches(tView);
        }
        /**
         * @private
         * @param {?} tView
         * @return {?}
         */

      }, {
        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_;
    }();

    if (false) {}

    var TQueryMetadata_ =
    /**
     * @param {?} predicate
     * @param {?} descendants
     * @param {?} isStatic
     * @param {?=} read
     */
    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;
    };

    if (false) {}

    var TQueries_ = /*#__PURE__*/function () {
      /**
       * @param {?=} queries
       */
      function TQueries_() {
        var queries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

        _classCallCheck(this, TQueries_);

        this.queries = queries;
      }
      /**
       * @param {?} tView
       * @param {?} tNode
       * @return {?}
       */


      _createClass2(TQueries_, [{
        key: "elementStart",
        value: function elementStart(tView, tNode) {
          ngDevMode && assertFirstTemplatePass(tView, 'Queries should collect results on the first template pass only');

          var _iterator38 = _createForOfIteratorHelper(this.queries),
              _step38;

          try {
            for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {
              var query = _step38.value;
              query.elementStart(tView, tNode);
            }
          } catch (err) {
            _iterator38.e(err);
          } finally {
            _iterator38.f();
          }
        }
        /**
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "elementEnd",
        value: function elementEnd(tNode) {
          var _iterator39 = _createForOfIteratorHelper(this.queries),
              _step39;

          try {
            for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {
              var query = _step39.value;
              query.elementEnd(tNode);
            }
          } catch (err) {
            _iterator39.e(err);
          } finally {
            _iterator39.f();
          }
        }
        /**
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "embeddedTView",
        value: function embeddedTView(tNode) {
          /** @type {?} */
          var queriesForTemplateRef = null;

          for (var i = 0; i < this.length; i++) {
            /** @type {?} */
            var childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;
            /** @type {?} */

            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;
        }
        /**
         * @param {?} tView
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "template",
        value: function template(tView, tNode) {
          ngDevMode && assertFirstTemplatePass(tView, 'Queries should collect results on the first template pass only');

          var _iterator40 = _createForOfIteratorHelper(this.queries),
              _step40;

          try {
            for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {
              var query = _step40.value;
              query.template(tView, tNode);
            }
          } catch (err) {
            _iterator40.e(err);
          } finally {
            _iterator40.f();
          }
        }
        /**
         * @param {?} index
         * @return {?}
         */

      }, {
        key: "getByIndex",
        value: function getByIndex(index) {
          ngDevMode && assertDataInRange(this.queries, index);
          return this.queries[index];
        }
        /**
         * @return {?}
         */

      }, {
        key: "track",

        /**
         * @param {?} tquery
         * @return {?}
         */
        value: function track(tquery) {
          this.queries.push(tquery);
        }
      }, {
        key: "length",
        get: function get() {
          return this.queries.length;
        }
      }]);

      return TQueries_;
    }();

    if (false) {}

    var TQuery_ = /*#__PURE__*/function () {
      /**
       * @param {?} metadata
       * @param {?=} nodeIndex
       */
      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;
      }
      /**
       * @param {?} tView
       * @param {?} tNode
       * @return {?}
       */


      _createClass2(TQuery_, [{
        key: "elementStart",
        value: function elementStart(tView, tNode) {
          if (this.isApplyingToNode(tNode)) {
            this.matchTNode(tView, tNode);
          }
        }
        /**
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "elementEnd",
        value: function elementEnd(tNode) {
          if (this._declarationNodeIndex === tNode.index) {
            this._appliesToNextNode = false;
          }
        }
        /**
         * @param {?} tView
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "template",
        value: function template(tView, tNode) {
          this.elementStart(tView, tNode);
        }
        /**
         * @param {?} tNode
         * @param {?} childQueryIndex
         * @return {?}
         */

      }, {
        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;
        }
        /**
         * @private
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "isApplyingToNode",
        value: function isApplyingToNode(tNode) {
          if (this._appliesToNextNode && this.metadata.descendants === false) {
            return this._declarationNodeIndex === (tNode.parent ? tNode.parent.index : -1);
          }

          return this._appliesToNextNode;
        }
        /**
         * @private
         * @param {?} tView
         * @param {?} tNode
         * @return {?}
         */

      }, {
        key: "matchTNode",
        value: function matchTNode(tView, tNode) {
          if (Array.isArray(this.metadata.predicate)) {
            /** @type {?} */
            var localNames =
            /** @type {?} */
            this.metadata.predicate;

            for (var i = 0; i < localNames.length; i++) {
              this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, localNames[i]));
            }
          } else {
            /** @type {?} */
            var typePredicate =
            /** @type {?} */
            this.metadata.predicate;

            if (typePredicate === TemplateRef) {
              if (tNode.type === 0
              /* Container */
              ) {
                  this.matchTNodeWithReadOption(tView, tNode, -1);
                }
            } else {
              this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, typePredicate, false, false));
            }
          }
        }
        /**
         * @private
         * @param {?} tView
         * @param {?} tNode
         * @param {?} nodeMatchIdx
         * @return {?}
         */

      }, {
        key: "matchTNodeWithReadOption",
        value: function matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {
          if (nodeMatchIdx !== null) {
            /** @type {?} */
            var read = this.metadata.read;

            if (read !== null) {
              if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && tNode.type === 0
              /* Container */
              ) {
                  this.addMatch(tNode.index, -2);
                } else {
                /** @type {?} */
                var directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);

                if (directiveOrProviderIdx !== null) {
                  this.addMatch(tNode.index, directiveOrProviderIdx);
                }
              }
            } else {
              this.addMatch(tNode.index, nodeMatchIdx);
            }
          }
        }
        /**
         * @private
         * @param {?} tNodeIdx
         * @param {?} matchIdx
         * @return {?}
         */

      }, {
        key: "addMatch",
        value: function addMatch(tNodeIdx, matchIdx) {
          if (this.matches === null) {
            this.matches = [tNodeIdx, matchIdx];
          } else {
            this.matches.push(tNodeIdx, matchIdx);
          }
        }
      }]);

      return TQuery_;
    }();

    if (false) {}
    /**
     * 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
     * @return {?} directive index, -1 or null if a selector didn't match any of the local names
     */


    function getIdxOfMatchingSelector(tNode, selector) {
      /** @type {?} */
      var localNames = tNode.localNames;

      if (localNames !== null) {
        for (var i = 0; i < localNames.length; i += 2) {
          if (localNames[i] === selector) {
            return (
              /** @type {?} */
              localNames[i + 1]
            );
          }
        }
      }

      return null;
    }
    /**
     * @param {?} tNode
     * @param {?} currentView
     * @return {?}
     */


    function createResultByTNodeType(tNode, currentView) {
      if (tNode.type === 3
      /* Element */
      || tNode.type === 4
      /* ElementContainer */
      ) {
          return createElementRef(ElementRef, tNode, currentView);
        } else if (tNode.type === 0
      /* Container */
      ) {
          return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);
        }

      return null;
    }
    /**
     * @param {?} lView
     * @param {?} tNode
     * @param {?} matchingIdx
     * @param {?} read
     * @return {?}
     */


    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[TVIEW].data, lView, matchingIdx,
        /** @type {?} */
        tNode);
      }
    }
    /**
     * @param {?} lView
     * @param {?} tNode
     * @param {?} read
     * @return {?}
     */


    function createSpecialToken(lView, tNode, read) {
      if (read === ElementRef) {
        return createElementRef(ElementRef, tNode, lView);
      } else if (read === TemplateRef) {
        return createTemplateRef(TemplateRef, ElementRef, tNode, lView);
      } else if (read === ViewContainerRef) {
        ngDevMode && assertNodeOfPossibleTypes(tNode, 3
        /* Element */
        , 0
        /* Container */
        , 4
        /* ElementContainer */
        );
        return createContainerRef(ViewContainerRef, ElementRef,
        /** @type {?} */
        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).
     * @template T
     * @param {?} lView
     * @param {?} tQuery
     * @param {?} queryIndex
     * @return {?}
     */


    function materializeViewResults(lView, tQuery, queryIndex) {
      /** @type {?} */
      var lQuery =
      /** @type {?} */

      /** @type {?} */
      lView[QUERIES].queries[queryIndex];

      if (lQuery.matches === null) {
        /** @type {?} */
        var tViewData = lView[TVIEW].data;
        /** @type {?} */

        var tQueryMatches =
        /** @type {?} */
        tQuery.matches;
        /** @type {?} */

        var result = new Array(tQueryMatches.length / 2);

        for (var i = 0; i < tQueryMatches.length; i += 2) {
          /** @type {?} */
          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[i / 2] = null;
          } else {
            ngDevMode && assertDataInRange(tViewData, matchedNodeIdx);
            /** @type {?} */

            var tNode =
            /** @type {?} */
            tViewData[matchedNodeIdx];
            result[i / 2] = 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.
     * @template T
     * @param {?} lView
     * @param {?} queryIndex
     * @param {?} result
     * @return {?}
     */


    function collectQueryResults(lView, queryIndex, result) {
      /** @type {?} */
      var tQuery =
      /** @type {?} */
      lView[TVIEW].queries.getByIndex(queryIndex);
      /** @type {?} */

      var tQueryMatches = tQuery.matches;

      if (tQueryMatches !== null) {
        /** @type {?} */
        var lViewResults = materializeViewResults(lView, tQuery, queryIndex);

        for (var i = 0; i < tQueryMatches.length; i += 2) {
          /** @type {?} */
          var tNodeIdx = tQueryMatches[i];

          if (tNodeIdx > 0) {
            /** @type {?} */
            var viewResult = lViewResults[i / 2];
            ngDevMode && assertDefined(viewResult, 'materialized query result should be defined');
            result.push(
            /** @type {?} */
            viewResult);
          } else {
            /** @type {?} */
            var childQueryIndex = tQueryMatches[i + 1];
            /** @type {?} */

            var declarationLContainer =
            /** @type {?} */
            lView[-tNodeIdx];
            ngDevMode && assertLContainer(declarationLContainer); // collect matches for views inserted in this container

            for (var _i20 = CONTAINER_HEADER_OFFSET; _i20 < declarationLContainer.length; _i20++) {
              /** @type {?} */
              var embeddedLView = declarationLContainer[_i20];

              if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {
                collectQueryResults(embeddedLView, childQueryIndex, result);
              }
            } // collect matches for views created from this declaration container and inserted into
            // different containers


            if (declarationLContainer[MOVED_VIEWS] !== null) {
              var _iterator41 = _createForOfIteratorHelper(
              /** @type {?} */
              declarationLContainer[MOVED_VIEWS]),
                  _step41;

              try {
                for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {
                  var _embeddedLView = _step41.value;
                  collectQueryResults(_embeddedLView, childQueryIndex, result);
                }
              } catch (err) {
                _iterator41.e(err);
              } finally {
                _iterator41.f();
              }
            }
          }
        }
      }

      return result;
    }
    /**
     * Refreshes a query by combining matches from all active views and removing matches from deleted
     * views.
     *
     * \@codeGenApi
     * @param {?} queryList
     * @return {?} `true` if a query got dirty during change detection or if this is a static query
     * resolving in creation mode, `false` otherwise.
     *
     */


    function ɵɵqueryRefresh(queryList) {
      /** @type {?} */
      var lView = getLView();
      /** @type {?} */

      var queryIndex = getCurrentQueryIndex();
      setCurrentQueryIndex(queryIndex + 1);
      /** @type {?} */

      var tQuery = getTQuery(lView[TVIEW], queryIndex);

      if (queryList.dirty && isCreationMode() === tQuery.metadata.isStatic) {
        if (tQuery.matches === null) {
          queryList.reset([]);
        } else {
          /** @type {?} */
          var result = tQuery.crossesNgTemplate ? collectQueryResults(lView, queryIndex, []) : materializeViewResults(lView, tQuery, queryIndex);
          queryList.reset(result);
          queryList.notifyOnChanges();
        }

        return true;
      }

      return false;
    }
    /**
     * Creates new QueryList for a static view query.
     *
     * \@codeGenApi
     * @template T
     * @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
     *
     * @return {?}
     */


    function ɵɵstaticViewQuery(predicate, descend, read) {
      viewQueryInternal(getLView(), predicate, descend, read, true);
    }
    /**
     * Creates new QueryList, stores the reference in LView and returns QueryList.
     *
     * \@codeGenApi
     * @template T
     * @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
     *
     * @return {?}
     */


    function ɵɵviewQuery(predicate, descend, read) {
      viewQueryInternal(getLView(), predicate, descend, read, false);
    }
    /**
     * @template T
     * @param {?} lView
     * @param {?} predicate
     * @param {?} descend
     * @param {?} read
     * @param {?} isStatic
     * @return {?}
     */


    function viewQueryInternal(lView, predicate, descend, read, isStatic) {
      /** @type {?} */
      var tView = lView[TVIEW];

      if (tView.firstTemplatePass) {
        createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), -1);

        if (isStatic) {
          tView.staticViewQueries = true;
        }
      }

      createLQuery(lView);
    }
    /**
     * Loads a QueryList corresponding to the current view query.
     *
     * \@codeGenApi
     * @template T
     * @return {?}
     */


    function ɵɵloadViewQuery() {
      return loadQueryInternal(getLView(), getCurrentQueryIndex());
    }
    /**
     * Registers a QueryList, associated with a content query, for later refresh (part of a view
     * refresh).
     *
     * \@codeGenApi
     * @template T
     * @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
     * @return {?} QueryList<T>
     *
     */


    function ɵɵcontentQuery(directiveIndex, predicate, descend, read) {
      contentQueryInternal(getLView(), predicate, descend, read, false, getPreviousOrParentTNode(), directiveIndex);
    }
    /**
     * Registers a QueryList, associated with a static content query, for later refresh
     * (part of a view refresh).
     *
     * \@codeGenApi
     * @template T
     * @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
     * @return {?} QueryList<T>
     *
     */


    function ɵɵstaticContentQuery(directiveIndex, predicate, descend, read) {
      contentQueryInternal(getLView(), predicate, descend, read, true, getPreviousOrParentTNode(), directiveIndex);
    }
    /**
     * @template T
     * @param {?} lView
     * @param {?} predicate
     * @param {?} descend
     * @param {?} read
     * @param {?} isStatic
     * @param {?} tNode
     * @param {?} directiveIndex
     * @return {?}
     */


    function contentQueryInternal(lView, predicate, descend, read, isStatic, tNode, directiveIndex) {
      /** @type {?} */
      var tView = lView[TVIEW];

      if (tView.firstTemplatePass) {
        createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), tNode.index);
        saveContentQueryAndDirectiveIndex(tView, directiveIndex);

        if (isStatic) {
          tView.staticContentQueries = true;
        }
      }

      createLQuery(lView);
    }
    /**
     * Loads a QueryList corresponding to the current content query.
     *
     * \@codeGenApi
     * @template T
     * @return {?}
     */


    function ɵɵloadContentQuery() {
      return loadQueryInternal(getLView(), getCurrentQueryIndex());
    }
    /**
     * @template T
     * @param {?} lView
     * @param {?} queryIndex
     * @return {?}
     */


    function loadQueryInternal(lView, queryIndex) {
      ngDevMode && assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');
      ngDevMode && assertDataInRange(
      /** @type {?} */
      lView[QUERIES].queries, queryIndex);
      return (
        /** @type {?} */
        lView[QUERIES].queries[queryIndex].queryList
      );
    }
    /**
     * @template T
     * @param {?} lView
     * @return {?}
     */


    function createLQuery(lView) {
      /** @type {?} */
      var queryList = new QueryList();
      storeCleanupWithContext(lView, queryList, queryList.destroy);
      if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_();

      /** @type {?} */
      lView[QUERIES].queries.push(new LQuery_(queryList));
    }
    /**
     * @param {?} tView
     * @param {?} metadata
     * @param {?} nodeIndex
     * @return {?}
     */


    function createTQuery(tView, metadata, nodeIndex) {
      if (tView.queries === null) tView.queries = new TQueries_();
      tView.queries.track(new TQuery_(metadata, nodeIndex));
    }
    /**
     * @param {?} tView
     * @param {?} directiveIndex
     * @return {?}
     */


    function saveContentQueryAndDirectiveIndex(tView, directiveIndex) {
      /** @type {?} */
      var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);
      /** @type {?} */

      var lastSavedDirectiveIndex = tView.contentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;

      if (directiveIndex !== lastSavedDirectiveIndex) {
        tViewContentQueries.push(
        /** @type {?} */
        tView.queries.length - 1, directiveIndex);
      }
    }
    /**
     * @param {?} tView
     * @param {?} index
     * @return {?}
     */


    function getTQuery(tView, index) {
      ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');
      return (
        /** @type {?} */
        tView.queries.getByIndex(index)
      );
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
     * `<ng-template>` element.
     *
     * \@codeGenApi
     * @param {?} tNode
     * @param {?} currentView
     * @return {?}
     */


    function ɵɵtemplateRefExtractor(tNode, currentView) {
      return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);
    }
    /**
     * Returns the appropriate `ChangeDetectorRef` for a pipe.
     *
     * \@codeGenApi
     * @param {?=} flags
     * @return {?}
     */


    function ɵɵinjectPipeChangeDetectorRef() {
      var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : InjectFlags.Default;

      /** @type {?} */
      var value = injectChangeDetectorRef(true);

      if (value == null && !(flags & InjectFlags.Optional)) {
        throw new Error("No provider for ChangeDetectorRef!");
      } else {
        return value;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$e =
    /**
    * @return {?}
    */
    function ɵ0$e() {
      return {
        'ɵɵattribute': ɵɵattribute,
        'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,
        'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,
        'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,
        'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,
        'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,
        'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,
        'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,
        'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,
        'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,
        'ɵɵdefineBase': ɵɵdefineBase,
        'ɵɵdefineComponent': ɵɵdefineComponent,
        'ɵɵdefineDirective': ɵɵdefineDirective,
        'ɵɵdefineInjectable': ɵɵdefineInjectable,
        'ɵɵdefineInjector': ɵɵdefineInjector,
        'ɵɵdefineNgModule': ɵɵdefineNgModule,
        'ɵɵdefinePipe': ɵɵdefinePipe,
        'ɵɵdirectiveInject': ɵɵdirectiveInject,
        'ɵɵgetFactoryOf': ɵɵgetFactoryOf,
        'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,
        'ɵɵinject': ɵɵinject,
        'ɵɵinjectAttribute': ɵɵinjectAttribute,
        'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef,
        'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
        'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
        'ɵɵProvidersFeature': ɵɵProvidersFeature,
        'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
        'ɵɵcontainer': ɵɵcontainer,
        'ɵɵnextContext': ɵɵnextContext,
        'ɵɵcontainerRefreshStart': ɵɵcontainerRefreshStart,
        'ɵɵcontainerRefreshEnd': ɵɵcontainerRefreshEnd,
        'ɵɵnamespaceHTML': ɵɵnamespaceHTML,
        'ɵɵnamespaceMathML': ɵɵnamespaceMathML,
        'ɵɵnamespaceSVG': ɵɵnamespaceSVG,
        'ɵɵenableBindings': ɵɵenableBindings,
        'ɵɵdisableBindings': ɵɵdisableBindings,
        'ɵɵallocHostVars': ɵɵallocHostVars,
        'ɵɵ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,
        'ɵɵload': ɵɵload,
        'ɵɵprojection': ɵɵprojection,
        'ɵɵupdateSyntheticHostBinding': ɵɵupdateSyntheticHostBinding,
        'ɵɵcomponentHostSyntheticListener': ɵɵcomponentHostSyntheticListener,
        'ɵɵ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,
        'ɵɵloadViewQuery': ɵɵloadViewQuery,
        'ɵɵcontentQuery': ɵɵcontentQuery,
        'ɵɵloadContentQuery': ɵɵloadContentQuery,
        'ɵɵreference': ɵɵreference,
        'ɵɵelementHostAttrs': ɵɵelementHostAttrs,
        'ɵɵclassMap': ɵɵclassMap,
        'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,
        'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,
        'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,
        'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,
        'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,
        'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,
        'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,
        'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,
        'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,
        'ɵɵstyling': ɵɵstyling,
        'ɵɵstyleMap': ɵɵstyleMap,
        'ɵɵstyleProp': ɵɵstyleProp,
        'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,
        'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,
        'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,
        'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,
        'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,
        'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,
        'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,
        'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,
        'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,
        'ɵɵstyleSanitizer': ɵɵstyleSanitizer,
        'ɵɵstylingApply': ɵɵstylingApply,
        'ɵɵclassProp': ɵɵclassProp,
        'ɵɵselect': ɵɵselect,
        'ɵɵtemplate': ɵɵtemplate,
        'ɵɵtext': ɵɵtext,
        'ɵɵtextBinding': ɵɵtextBinding,
        'ɵɵtextInterpolate': ɵɵtextInterpolate,
        'ɵɵtextInterpolate1': ɵɵtextInterpolate1,
        'ɵɵtextInterpolate2': ɵɵtextInterpolate2,
        'ɵɵtextInterpolate3': ɵɵtextInterpolate3,
        'ɵɵtextInterpolate4': ɵɵtextInterpolate4,
        'ɵɵtextInterpolate5': ɵɵtextInterpolate5,
        'ɵɵtextInterpolate6': ɵɵtextInterpolate6,
        'ɵɵtextInterpolate7': ɵɵtextInterpolate7,
        'ɵɵtextInterpolate8': ɵɵtextInterpolate8,
        'ɵɵtextInterpolateV': ɵɵtextInterpolateV,
        'ɵɵembeddedViewStart': ɵɵembeddedViewStart,
        'ɵɵembeddedViewEnd': ɵɵembeddedViewEnd,
        'ɵɵi18n': ɵɵi18n,
        'ɵɵi18nAttributes': ɵɵi18nAttributes,
        'ɵɵi18nExp': ɵɵi18nExp,
        'ɵɵi18nStart': ɵɵi18nStart,
        'ɵɵi18nEnd': ɵɵi18nEnd,
        'ɵɵi18nApply': ɵɵi18nApply,
        'ɵɵi18nPostprocess': ɵɵi18nPostprocess,
        'ɵɵi18nLocalize': ɵɵi18nLocalize,
        'ɵɵresolveWindow': ɵɵresolveWindow,
        'ɵɵresolveDocument': ɵɵresolveDocument,
        'ɵɵresolveBody': ɵɵresolveBody,
        'ɵɵsetComponentScope': ɵɵsetComponentScope,
        'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
        'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
        'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
        'ɵɵdefaultStyleSanitizer': ɵɵdefaultStyleSanitizer,
        'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
        'ɵɵsanitizeScript': ɵɵsanitizeScript,
        'ɵɵsanitizeUrl': ɵɵsanitizeUrl,
        'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl
      };
    };
    /**
     * 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.
     * @type {?}
     */


    var angularCoreEnv = ɵ0$e();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var EMPTY_ARRAY$4 = [];
    /**
     * @record
     */

    function ModuleQueueItem() {}

    if (false) {}
    /** @type {?} */


    var moduleQueue = [];
    /**
     * Enqueues moduleDef to be checked later to see if scope can be set on its
     * component declarations.
     * @param {?} moduleType
     * @param {?} ngModule
     * @return {?}
     */

    function enqueueModuleForDelayedScoping(moduleType, ngModule) {
      moduleQueue.push({
        moduleType: moduleType,
        ngModule: ngModule
      });
    }
    /** @type {?} */


    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.
     * @return {?}
     */

    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).
     * @param {?} declaration
     * @return {?}
     */


    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.
     * @param {?} moduleType
     * @param {?=} ngModule
     * @return {?}
     */


    function compileNgModule(moduleType) {
      var ngModule = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      compileNgModuleDefs(
      /** @type {?} */
      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 `ngModuleDef` and `ngInjectorDef` properties to the module class.
     *
     * It's possible to compile a module via this API which will allow duplicate declarations in its
     * root.
     * @param {?} moduleType
     * @param {?} ngModule
     * @param {?=} allowDuplicateDeclarationsInRoot
     * @return {?}
     */


    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');
      /** @type {?} */

      var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4);
      /** @type {?} */

      /** @nocollapse */

      var ngModuleDef = null;
      Object.defineProperty(moduleType, NG_MODULE_DEF, {
        configurable: true,
        get:
        /**
        * @return {?}
        */
        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, "/ngModuleDef.js"), {
              type: moduleType,
              bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$4).map(resolveForwardRef),
              declarations: declarations.map(resolveForwardRef),
              imports: flatten(ngModule.imports || EMPTY_ARRAY$4).map(resolveForwardRef).map(expandModuleWithProviders),
              exports: flatten(ngModule.exports || EMPTY_ARRAY$4).map(resolveForwardRef).map(expandModuleWithProviders),
              emitInline: true,
              schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,
              id: ngModule.id || null
            });
          }

          return ngModuleDef;
        }
      });
      /** @type {?} */

      /** @nocollapse */

      var ngInjectorDef = null;
      Object.defineProperty(moduleType, NG_INJECTOR_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          if (ngInjectorDef === null) {
            ngDevMode && verifySemanticsOfNgModuleDef(
            /** @type {?} */

            /** @type {?} */
            moduleType, allowDuplicateDeclarationsInRoot);
            /** @type {?} */

            var meta = {
              name: moduleType.name,
              type: moduleType,
              deps: reflectDependencies(moduleType),
              providers: ngModule.providers || EMPTY_ARRAY$4,
              imports: [(ngModule.imports || EMPTY_ARRAY$4).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY$4).map(resolveForwardRef)]
            };
            ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, "ng:///".concat(moduleType.name, "/ngInjectorDef.js"), meta);
          }

          return ngInjectorDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode
      });
    }
    /**
     * @param {?} moduleType
     * @param {?} allowDuplicateDeclarationsInRoot
     * @param {?=} importingModule
     * @return {?}
     */


    function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {
      if (verifiedNgModule.get(moduleType)) return;
      verifiedNgModule.set(moduleType, true);
      moduleType = resolveForwardRef(moduleType);
      /** @type {?} */

      var ngModuleDef;

      if (importingModule) {
        ngModuleDef =
        /** @type {?} */
        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);
      }
      /** @type {?} */


      var errors = [];
      /** @type {?} */

      var declarations = maybeUnwrapFn(ngModuleDef.declarations);
      /** @type {?} */

      var imports = maybeUnwrapFn(ngModuleDef.imports);
      flatten(imports).map(unwrapModuleWithProvidersImports).forEach(
      /**
      * @param {?} mod
      * @return {?}
      */
      function (mod) {
        verifySemanticsOfNgModuleImport(mod, moduleType);
        verifySemanticsOfNgModuleDef(mod, false, moduleType);
      });
      /** @type {?} */

      var exports = maybeUnwrapFn(ngModuleDef.exports);
      declarations.forEach(verifyDeclarationsHaveDefinitions);
      /** @type {?} */

      var combinedDeclarations = [].concat(_toConsumableArray(declarations.map(resolveForwardRef)), _toConsumableArray(flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)));
      exports.forEach(verifyExportsAreDeclaredOrReExported);
      declarations.forEach(
      /**
      * @param {?} decl
      * @return {?}
      */
      function (decl) {
        return verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot);
      });
      declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);
      /** @type {?} */

      var ngModule = getAnnotation(moduleType, 'NgModule');

      if (ngModule) {
        ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(
        /**
        * @param {?} mod
        * @return {?}
        */
        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'));
      } ////////////////////////////////////////////////////////////////////////////////////////////////

      /**
       * @param {?} type
       * @return {?}
       */


      function verifyDeclarationsHaveDefinitions(type) {
        type = resolveForwardRef(type);
        /** @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."));
        }
      }
      /**
       * @param {?} type
       * @return {?}
       */


      function verifyExportsAreDeclaredOrReExported(type) {
        type = resolveForwardRef(type);
        /** @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!"));
          }
        }
      }
      /**
       * @param {?} type
       * @param {?} suppressErrors
       * @return {?}
       */


      function verifyDeclarationIsUnique(type, suppressErrors) {
        type = resolveForwardRef(type);
        /** @type {?} */

        var existingModule = ownerNgModule.get(type);

        if (existingModule && existingModule !== moduleType) {
          if (!suppressErrors) {
            /** @type {?} */
            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);
        }
      }
      /**
       * @param {?} type
       * @return {?}
       */


      function verifyComponentIsPartOfNgModule(type) {
        type = resolveForwardRef(type);
        /** @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."));
        }
      }
      /**
       * @param {?} type
       * @return {?}
       */


      function verifyCorrectBootstrapType(type) {
        type = resolveForwardRef(type);

        if (!getComponentDef(type)) {
          errors.push("".concat(stringifyForError(type), " cannot be used as an entry component."));
        }
      }
      /**
       * @param {?} type
       * @return {?}
       */


      function verifyComponentEntryComponentsIsPartOfNgModule(type) {
        type = resolveForwardRef(type);

        if (getComponentDef(type)) {
          // We know we are component

          /** @type {?} */
          var component = getAnnotation(type, 'Component');

          if (component && component.entryComponents) {
            deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);
          }
        }
      }
      /**
       * @param {?} type
       * @param {?} importingModule
       * @return {?}
       */


      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."));
        }
      }
    }
    /**
     * @param {?} typeOrWithProviders
     * @return {?}
     */


    function unwrapModuleWithProvidersImports(typeOrWithProviders) {
      typeOrWithProviders = resolveForwardRef(typeOrWithProviders);
      return (
        /** @type {?} */
        typeOrWithProviders.ngModule || typeOrWithProviders
      );
    }
    /**
     * @template T
     * @param {?} type
     * @param {?} name
     * @return {?}
     */


    function getAnnotation(type, name) {
      /** @type {?} */
      var annotation = null;
      collect(type.__annotations__);
      collect(type.decorators);
      return annotation;
      /**
       * @param {?} annotations
       * @return {?}
       */

      function collect(annotations) {
        if (annotations) {
          annotations.forEach(readAnnotation);
        }
      }
      /**
       * @param {?} decorator
       * @return {?}
       */


      function readAnnotation(decorator) {
        if (!annotation) {
          /** @type {?} */
          var proto = Object.getPrototypeOf(decorator);

          if (proto.ngMetadataName == name) {
            annotation =
            /** @type {?} */
            decorator;
          } else if (decorator.type) {
            /** @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.
     * @type {?}
     */


    var ownerNgModule = new Map();
    /** @type {?} */

    var verifiedNgModule = new Map();
    /**
     * @return {?}
     */

    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
     * @return {?}
     */


    function computeCombinedExports(type) {
      type = resolveForwardRef(type);
      /** @type {?} */

      /** @nocollapse */

      var ngModuleDef = getNgModuleDef(type, true);
      return _toConsumableArray(flatten(maybeUnwrapFn(ngModuleDef.exports).map(
      /**
      * @param {?} type
      * @return {?}
      */
      function (type) {
        /** @type {?} */

        /** @nocollapse */
        var ngModuleDef = getNgModuleDef(type);

        if (ngModuleDef) {
          verifySemanticsOfNgModuleDef(
          /** @type {?} */

          /** @type {?} */
          type, false);
          return computeCombinedExports(type);
        } else {
          return type;
        }
      })));
    }
    /**
     * Some declared components may be compiled asynchronously, and thus may not have their
     * ngComponentDef set yet. If this is the case, then a reference to the module is written into
     * the `ngSelectorScope` property of the declared type.
     * @param {?} moduleType
     * @param {?} ngModule
     * @return {?}
     */


    function setScopeOnDeclaredComponents(moduleType, ngModule) {
      /** @type {?} */
      var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4);
      /** @type {?} */

      var transitiveScopes = transitiveScopesFor(moduleType);
      declarations.forEach(
      /**
      * @param {?} declaration
      * @return {?}
      */
      function (declaration) {
        if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {
          // An `ngComponentDef` field exists - go ahead and patch the component directly.

          /** @type {?} */
          var component =
          /** @type {?} */
          declaration;
          /** @type {?} */

          var componentDef =
          /** @type {?} */
          getComponentDef(component);
          patchComponentDefWithScope(componentDef, transitiveScopes);
        } else if (!declaration.hasOwnProperty(NG_DIRECTIVE_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {
          // Set `ngSelectorScope` for future reference when the component compilation finishes.

          /** @type {?} */
          declaration.ngSelectorScope = moduleType;
        }
      });
    }
    /**
     * Patch the definition of a component with directives and pipes from the compilation scope of
     * a given module.
     * @template C
     * @param {?} componentDef
     * @param {?} transitiveScopes
     * @return {?}
     */


    function patchComponentDefWithScope(componentDef, transitiveScopes) {
      componentDef.directiveDefs =
      /**
      * @return {?}
      */
      function () {
        return Array.from(transitiveScopes.compilation.directives).map(
        /**
        * @param {?} dir
        * @return {?}
        */
        function (dir) {
          return dir.hasOwnProperty(NG_COMPONENT_DEF) ?
          /** @type {?} */
          getComponentDef(dir) :
          /** @type {?} */
          getDirectiveDef(dir);
        }).filter(
        /**
        * @param {?} def
        * @return {?}
        */
        function (def) {
          return !!def;
        });
      };

      componentDef.pipeDefs =
      /**
      * @return {?}
      */
      function () {
        return Array.from(transitiveScopes.compilation.pipes).map(
        /**
        * @param {?} pipe
        * @return {?}
        */
        function (pipe) {
          return (
            /** @type {?} */
            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. It can be called
     * on modules with components that have not fully compiled yet, but the result should not be used
     * until they have.
     * @template T
     * @param {?} moduleType
     * @param {?=} processNgModuleFn
     * @return {?}
     */


    function transitiveScopesFor(moduleType, processNgModuleFn) {
      if (!isNgModule(moduleType)) {
        throw new Error("".concat(moduleType.name, " does not have an ngModuleDef"));
      }
      /** @type {?} */


      var def =
      /** @type {?} */
      getNgModuleDef(moduleType);

      if (def.transitiveCompileScopes !== null) {
        return def.transitiveCompileScopes;
      }
      /** @type {?} */


      var scopes = {
        schemas: def.schemas || null,
        compilation: {
          directives: new Set(),
          pipes: new Set()
        },
        exported: {
          directives: new Set(),
          pipes: new Set()
        }
      };
      maybeUnwrapFn(def.declarations).forEach(
      /**
      * @param {?} declared
      * @return {?}
      */
      function (declared) {
        /** @type {?} */
        var declaredWithDefs =
        /** @type {?} */
        declared;

        if (getPipeDef(declaredWithDefs)) {
          scopes.compilation.pipes.add(declared);
        } else {
          // Either declared has an ngComponentDef or ngDirectiveDef, 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.imports).forEach(
      /**
      * @template I
      * @param {?} imported
      * @return {?}
      */
      function (imported) {
        /** @type {?} */
        var importedType =
        /** @type {?} */
        imported;

        if (!isNgModule(importedType)) {
          throw new Error("Importing ".concat(importedType.name, " which does not have an ngModuleDef"));
        }

        if (processNgModuleFn) {
          processNgModuleFn(
          /** @type {?} */
          importedType);
        } // When this module imports another, the imported module's exported directives and pipes are
        // added to the compilation scope of this module.

        /** @type {?} */


        var importedScope = transitiveScopesFor(importedType, processNgModuleFn);
        importedScope.exported.directives.forEach(
        /**
        * @param {?} entry
        * @return {?}
        */
        function (entry) {
          return scopes.compilation.directives.add(entry);
        });
        importedScope.exported.pipes.forEach(
        /**
        * @param {?} entry
        * @return {?}
        */
        function (entry) {
          return scopes.compilation.pipes.add(entry);
        });
      });
      maybeUnwrapFn(def.exports).forEach(
      /**
      * @template E
      * @param {?} exported
      * @return {?}
      */
      function (exported) {
        /** @type {?} */
        var exportedType =
        /** @type {?} */
        exported; // Either the type is a module, a pipe, or a component/directive (which may not have an
        // ngComponentDef 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.

          /** @type {?} */
          var exportedScope = transitiveScopesFor(exportedType, processNgModuleFn);
          exportedScope.exported.directives.forEach(
          /**
          * @param {?} entry
          * @return {?}
          */
          function (entry) {
            scopes.compilation.directives.add(entry);
            scopes.exported.directives.add(entry);
          });
          exportedScope.exported.pipes.forEach(
          /**
          * @param {?} entry
          * @return {?}
          */
          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;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function expandModuleWithProviders(value) {
      if (isModuleWithProviders(value)) {
        return value.ngModule;
      }

      return value;
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isModuleWithProviders(value) {
      return (
        /** @type {?} */
        value.ngModule !== undefined
      );
    }
    /**
     * @template T
     * @param {?} value
     * @return {?}
     */


    function isNgModule(value) {
      return !!getNgModuleDef(value);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Compile an Angular component according to its decorator metadata, and patch the resulting
     * ngComponentDef 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 `ngComponentDef`
     * until the global queue has been resolved with a call to `resolveComponentResources`.
     * @param {?} type
     * @param {?} metadata
     * @return {?}
     */


    function compileComponent(type, metadata) {
      /** @type {?} */

      /** @nocollapse */
      var ngComponentDef = null; // Metadata may have resources which need to be resolved.

      maybeQueueResolutionOfComponentResources(type, metadata);
      Object.defineProperty(type, NG_COMPONENT_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          /** @type {?} */
          var compiler = getCompilerFacade();

          if (ngComponentDef === null) {
            if (componentNeedsResolution(metadata)) {
              /** @type {?} */
              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'));
            }
            /** @type {?} */


            var templateUrl = metadata.templateUrl || "ng:///".concat(type.name, "/template.html");
            /** @type {?} */

            var meta = Object.assign({}, directiveMetadata(type, metadata), {
              typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),
              template: metadata.template || '',
              preserveWhitespaces: metadata.preserveWhitespaces || false,
              styles: metadata.styles || EMPTY_ARRAY,
              animations: metadata.animations,
              directives: [],
              changeDetection: metadata.changeDetection,
              pipes: new Map(),
              encapsulation: metadata.encapsulation || ViewEncapsulation.Emulated,
              interpolation: metadata.interpolation,
              viewProviders: metadata.viewProviders || null
            });

            if (meta.usesInheritance) {
              addBaseDefToUndecoratedParents(type);
            }

            ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta); // 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)) {
              /** @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
      }); // Add ngInjectableDef so components are reachable through the module injector by default
      // This is mostly to support injecting components in tests. In real application code,
      // components should be retrieved through the node injector, so this isn't a problem.

      compileInjectable(type);
    }
    /**
     * @template T
     * @param {?} component
     * @return {?}
     */


    function hasSelectorScope(component) {
      return (
        /** @type {?} */
        component.ngSelectorScope !== undefined
      );
    }
    /**
     * Compile an Angular directive according to its decorator metadata, and patch the resulting
     * ngDirectiveDef 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.
     * @param {?} type
     * @param {?} directive
     * @return {?}
     */


    function compileDirective(type, directive) {
      /** @type {?} */

      /** @nocollapse */
      var ngDirectiveDef = null;
      Object.defineProperty(type, NG_DIRECTIVE_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          if (ngDirectiveDef === null) {
            /** @type {?} */
            var name = type && type.name;
            /** @type {?} */

            var sourceMapUrl = "ng:///".concat(name, "/ngDirectiveDef.js");
            /** @type {?} */

            var compiler = getCompilerFacade();
            /** @type {?} */

            var facade = directiveMetadata(
            /** @type {?} */
            type, directive);
            facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);

            if (facade.usesInheritance) {
              addBaseDefToUndecoratedParents(type);
            }

            ngDirectiveDef = compiler.compileDirective(angularCoreEnv, sourceMapUrl, facade);
          }

          return ngDirectiveDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode
      }); // Add ngInjectableDef so directives are reachable through the module injector by default
      // This is mostly to support injecting directives in tests. In real application code,
      // directives should be retrieved through the node injector, so this isn't a problem.

      compileInjectable(type);
    }
    /**
     * @param {?} type
     * @return {?}
     */


    function extendsDirectlyFromObject(type) {
      return Object.getPrototypeOf(type.prototype) === Object.prototype;
    }
    /**
     * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a
     * `Component`).
     * @param {?} type
     * @param {?} metadata
     * @return {?}
     */


    function directiveMetadata(type, metadata) {
      // Reflect inputs and outputs.

      /** @type {?} */
      var propMetadata = getReflect().ownPropMetadata(type);
      return {
        name: type.name,
        type: type,
        typeArgumentCount: 0,
        selector:
        /** @type {?} */
        metadata.selector,
        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: type.prototype.hasOwnProperty('ngOnChanges')
        },
        typeSourceSpan:
        /** @type {?} */
        null,
        usesInheritance: !extendsDirectlyFromObject(type),
        exportAs: extractExportAs(metadata.exportAs),
        providers: metadata.providers || null,
        viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
      };
    }
    /**
     * Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.
     * @param {?} type
     * @return {?}
     */


    function addBaseDefToUndecoratedParents(type) {
      /** @type {?} */
      var objPrototype = Object.prototype;
      /** @type {?} */

      var parent = Object.getPrototypeOf(type); // 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 base def if there are no annotations and the base def hasn't been created already.
        if (!getDirectiveDef(parent) && !getComponentDef(parent) && !getBaseDef(parent)) {
          /** @type {?} */
          var facade = extractBaseDefMetadata(parent);
          facade && compileBase(parent, facade);
        }

        parent = Object.getPrototypeOf(parent);
      }
    }
    /**
     * Compiles the base metadata into a base definition.
     * @param {?} type
     * @param {?} facade
     * @return {?}
     */


    function compileBase(type, facade) {
      /** @type {?} */

      /** @nocollapse */
      var ngBaseDef = null;
      Object.defineProperty(type, NG_BASE_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          if (ngBaseDef === null) {
            /** @type {?} */
            var name = type && type.name;
            /** @type {?} */

            var sourceMapUrl = "ng://".concat(name, "/ngBaseDef.js");
            /** @type {?} */

            var compiler = getCompilerFacade();
            ngBaseDef = compiler.compileBase(angularCoreEnv, sourceMapUrl, facade);
          }

          return ngBaseDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode
      });
    }
    /**
     * Extracts the metadata necessary to construct an `ngBaseDef` from a class.
     * @param {?} type
     * @return {?}
     */


    function extractBaseDefMetadata(type) {
      /** @type {?} */
      var propMetadata = getReflect().ownPropMetadata(type);
      /** @type {?} */

      var viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery);
      /** @type {?} */

      var queries = extractQueriesMetadata(type, propMetadata, isContentQuery);
      /** @type {?} */

      var inputs;
      /** @type {?} */

      var outputs; // We only need to know whether there are any HostListener or HostBinding
      // decorators present, the parsing logic is in the compiler already.

      /** @type {?} */

      var hasHostDecorators = false;

      var _loop5 = function _loop5(field) {
        propMetadata[field].forEach(
        /**
        * @param {?} ann
        * @return {?}
        */
        function (ann) {
          /** @type {?} */
          var metadataName = ann.ngMetadataName;

          if (metadataName === 'Input') {
            inputs = inputs || {};
            inputs[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;
          } else if (metadataName === 'Output') {
            outputs = outputs || {};
            outputs[field] = ann.bindingPropertyName || field;
          } else if (metadataName === 'HostBinding' || metadataName === 'HostListener') {
            hasHostDecorators = true;
          }
        });
      };

      for (var field in propMetadata) {
        _loop5(field);
      } // Only generate the base def if there's any info inside it.


      if (inputs || outputs || viewQueries.length || queries.length || hasHostDecorators) {
        return {
          name: type.name,
          type: type,
          inputs: inputs,
          outputs: outputs,
          viewQueries: viewQueries,
          queries: queries,
          propMetadata: propMetadata
        };
      }

      return null;
    }
    /**
     * @param {?} selector
     * @return {?}
     */


    function convertToR3QueryPredicate(selector) {
      return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);
    }
    /**
     * @param {?} propertyName
     * @param {?} ann
     * @return {?}
     */


    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"]
      };
    }
    /**
     * @param {?} type
     * @param {?} propMetadata
     * @param {?} isQueryAnn
     * @return {?}
     */


    function extractQueriesMetadata(type, propMetadata, isQueryAnn) {
      /** @type {?} */
      var queriesMeta = [];

      var _loop6 = function _loop6(field) {
        if (propMetadata.hasOwnProperty(field)) {
          /** @type {?} */
          var annotations = propMetadata[field];
          annotations.forEach(
          /**
          * @param {?} ann
          * @return {?}
          */
          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(isInputAnn)) {
                throw new Error("Cannot combine @Input decorators with query decorators");
              }

              queriesMeta.push(convertToR3QueryMetadata(field, ann));
            }
          });
        }
      };

      for (var field in propMetadata) {
        _loop6(field);
      }

      return queriesMeta;
    }
    /**
     * @param {?} exportAs
     * @return {?}
     */


    function extractExportAs(exportAs) {
      if (exportAs === undefined) {
        return null;
      }

      return exportAs.split(',').map(
      /**
      * @param {?} part
      * @return {?}
      */
      function (part) {
        return part.trim();
      });
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isContentQuery(value) {
      /** @type {?} */
      var name = value.ngMetadataName;
      return name === 'ContentChild' || name === 'ContentChildren';
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isViewQuery(value) {
      /** @type {?} */
      var name = value.ngMetadataName;
      return name === 'ViewChild' || name === 'ViewChildren';
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function isInputAnn(value) {
      return value.ngMetadataName === 'Input';
    }
    /**
     * @param {?} value
     * @return {?}
     */


    function splitByComma(value) {
      return value.split(',').map(
      /**
      * @param {?} piece
      * @return {?}
      */
      function (piece) {
        return piece.trim();
      });
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} type
     * @param {?} meta
     * @return {?}
     */


    function compilePipe(type, meta) {
      /** @type {?} */

      /** @nocollapse */
      var ngPipeDef = null;
      Object.defineProperty(type, NG_PIPE_DEF, {
        get:
        /**
        * @return {?}
        */
        function get() {
          if (ngPipeDef === null) {
            /** @type {?} */
            var _typeName = type.name;
            ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, "ng:///".concat(_typeName, "/ngPipeDef.js"), {
              type: type,
              typeArgumentCount: 0,
              name: _typeName,
              deps: reflectDependencies(type),
              pipeName: meta.name,
              pure: meta.pure !== undefined ? meta.pure : true
            });
          }

          return ngPipeDef;
        },
        // Make the property configurable in dev mode to allow overriding in tests
        configurable: !!ngDevMode
      });
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Type of the Directive decorator / constructor function.
     * \@publicApi
     * @record
     */


    function DirectiveDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ0$f =
    /**
    * @param {?=} dir
    * @return {?}
    */
    function ɵ0$f() {
      var dir = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      return dir;
    },
        ɵ1$4 =
    /**
    * @param {?} type
    * @param {?} meta
    * @return {?}
    */
    function ɵ1$4(type, meta) {
      return SWITCH_COMPILE_DIRECTIVE(type, meta);
    };
    /**
     * Type of the Directive metadata.
     *
     * \@publicApi
     * @type {?}
     */


    var Directive = makeDecorator('Directive', ɵ0$f, undefined, undefined, ɵ1$4);
    /**
     * Component decorator interface
     *
     * \@publicApi
     * @record
     */

    function ComponentDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ2$1 =
    /**
    * @param {?=} c
    * @return {?}
    */
    function ɵ2$1() {
      var c = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      return Object.assign({
        changeDetection: ChangeDetectionStrategy.Default
      }, c);
    },
        ɵ3$1 =
    /**
    * @param {?} type
    * @param {?} meta
    * @return {?}
    */
    function ɵ3$1(type, meta) {
      return SWITCH_COMPILE_COMPONENT(type, meta);
    };
    /**
     * Component decorator and metadata.
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);
    /**
     * Type of the Pipe decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ4 =
    /**
    * @param {?} p
    * @return {?}
    */
    function ɵ4(p) {
      return Object.assign({
        pure: true
      }, p);
    },
        ɵ5 =
    /**
    * @param {?} type
    * @param {?} meta
    * @return {?}
    */
    function ɵ5(type, meta) {
      return SWITCH_COMPILE_PIPE(type, meta);
    };
    /**
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);
    /**
     * \@publicApi
     * @record
     */

    function InputDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ6 =
    /**
    * @param {?=} bindingPropertyName
    * @return {?}
    */
    function ɵ6(bindingPropertyName) {
      return {
        bindingPropertyName: bindingPropertyName
      };
    };
    /**
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Input = makePropDecorator('Input', ɵ6);
    /**
     * Type of the Output decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function OutputDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ7 =
    /**
    * @param {?=} bindingPropertyName
    * @return {?}
    */
    function ɵ7(bindingPropertyName) {
      return {
        bindingPropertyName: bindingPropertyName
      };
    };
    /**
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var Output = makePropDecorator('Output', ɵ7);
    /**
     * Type of the HostBinding decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function HostBindingDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ8 =
    /**
    * @param {?=} hostPropertyName
    * @return {?}
    */
    function ɵ8(hostPropertyName) {
      return {
        hostPropertyName: hostPropertyName
      };
    };
    /**
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var HostBinding = makePropDecorator('HostBinding', ɵ8);
    /**
     * Type of the HostListener decorator / constructor function.
     *
     * \@publicApi
     * @record
     */

    function HostListenerDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ9 =
    /**
    * @param {?=} eventName
    * @param {?=} args
    * @return {?}
    */
    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 {}
     * ```
     *
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var HostListener = makePropDecorator('HostListener', ɵ9);
    /** @type {?} */

    var SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;
    /** @type {?} */

    var SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;
    /** @type {?} */

    var SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;
    /** @type {?} */

    var SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_COMPILE_PIPE__PRE_R3__ = noop;
    /** @type {?} */

    var SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__PRE_R3__;
    /** @type {?} */

    var SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;
    /** @type {?} */

    var SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Represents the expansion of an `NgModule` into its scopes.
     *
     * A scope is a set of directives and pipes that are visible in a particular context. Each
     * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
     * be recognized in the templates of components declared by the module. The `exported` scope is the
     * set of directives and pipes exported by a module (that is, module B's exported scope gets added
     * to module A's compilation scope when module A imports B).
     * @record
     */

    function NgModuleTransitiveScopes() {}

    if (false) {}
    /**
     * Runtime link information for NgModules.
     *
     * This is the internal data structure used by the runtime to assemble components, directives,
     * pipes, and injectors.
     *
     * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
     * never create the object directly since the shape of this object
     * can change between versions.
     * @record
     * @template T
     */


    function NgModuleDef() {}

    if (false) {}
    /**
     * A wrapper around an NgModule that associates it with the providers.
     *
     * @param T the module type. In Ivy applications, this must be explicitly
     * provided.
     *
     * \@publicApi
     * @record
     * @template T
     */


    function ModuleWithProviders() {}

    if (false) {}
    /**
     * Type of the NgModule decorator / constructor function.
     *
     * \@publicApi
     * @record
     */


    function NgModuleDecorator() {} // WARNING: interface has both a type and a value, skipping emit


    var ɵ0$g =
    /**
    * @param {?} ngModule
    * @return {?}
    */
    function ɵ0$g(ngModule) {
      return ngModule;
    },
        ɵ1$5 =
    /**
    * 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.
    * @param {?} type
    * @param {?} meta
    * @return {?}
    */
    function ɵ1$5(type, meta) {
      return SWITCH_COMPILE_NGMODULE(type, meta);
    };
    /**
     * \@Annotation
     * \@publicApi
     * @type {?}
     */


    var NgModule = makeDecorator('NgModule', ɵ0$g, undefined, undefined, ɵ1$5);
    /**
     * \@description
     * Hook for manual bootstrapping of the application instead of using bootstrap array in \@NgModule
     * annotation.
     *
     * Reference to the current application is provided as a parameter.
     *
     * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
     *
     * \@usageNotes
     * ```typescript
     * class AppModule implements DoBootstrap {
     *   ngDoBootstrap(appRef: ApplicationRef) {
     *     appRef.bootstrap(AppComponent); // Or some other component
     *   }
     * }
     * ```
     *
     * \@publicApi
     * @record
     */

    function DoBootstrap() {}

    if (false) {}
    /**
     * @param {?} moduleType
     * @param {?=} metadata
     * @return {?}
     */


    function preR3NgModuleCompile(moduleType, metadata) {
      /** @type {?} */
      var imports = metadata && metadata.imports || [];

      if (metadata && metadata.exports) {
        imports = [].concat(_toConsumableArray(imports), [metadata.exports]);
      }

      /** @type {?} */
      moduleType.ngInjectorDef = ɵɵdefineInjector({
        factory: convertInjectableProviderToFactory(moduleType, {
          useClass: moduleType
        }),
        providers: metadata && metadata.providers,
        imports: imports
      });
    }
    /** @type {?} */


    var SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;
    /** @type {?} */

    var SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;
    /** @type {?} */

    var SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A function that will be executed when an application is initialized.
     *
     * \@publicApi
     * @type {?}
     */

    var APP_INITIALIZER = new InjectionToken('Application Initializer');
    /**
     * A class that reflects the state of running {\@link APP_INITIALIZER}s.
     *
     * \@publicApi
     */

    var ApplicationInitStatus = /*#__PURE__*/function () {
      /**
       * @param {?} appInits
       */
      function ApplicationInitStatus(appInits) {
        var _this328 = this;

        _classCallCheck(this, ApplicationInitStatus);

        this.appInits = appInits;
        this.initialized = false;
        this.done = false;
        this.donePromise = new Promise(
        /**
        * @param {?} res
        * @param {?} rej
        * @return {?}
        */
        function (res, rej) {
          _this328.resolve = res;
          _this328.reject = rej;
        });
      }
      /**
       * \@internal
       * @return {?}
       */


      _createClass2(ApplicationInitStatus, [{
        key: "runInitializers",
        value: function runInitializers() {
          var _this329 = this;

          if (this.initialized) {
            return;
          }
          /** @type {?} */


          var asyncInitPromises = [];
          /** @type {?} */

          var complete =
          /**
          * @return {?}
          */
          function complete() {
            /** @type {?} */
            _this329.done = true;

            _this329.resolve();
          };

          if (this.appInits) {
            for (var i = 0; i < this.appInits.length; i++) {
              /** @type {?} */
              var initResult = this.appInits[i]();

              if (isPromise(initResult)) {
                asyncInitPromises.push(initResult);
              }
            }
          }

          Promise.all(asyncInitPromises).then(
          /**
          * @return {?}
          */
          function () {
            complete();
          })["catch"](
          /**
          * @param {?} e
          * @return {?}
          */
          function (e) {
            _this329.reject(e);
          });

          if (asyncInitPromises.length === 0) {
            complete();
          }

          this.initialized = true;
        }
      }]);

      return ApplicationInitStatus;
    }();

    ApplicationInitStatus.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    ApplicationInitStatus.ctorParameters = function () {
      return [{
        type: Array,
        decorators: [{
          type: Inject,
          args: [APP_INITIALIZER]
        }, {
          type: Optional
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A DI Token representing a unique string id assigned to the application by Angular and used
     * primarily for prefixing application attributes and CSS styles when
     * {\@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
     *
     * If you need to avoid randomly generated value to be used as an application id, you can provide
     * a custom value via a DI provider <!-- TODO: provider --> configuring the root {\@link Injector}
     * using this token.
     * \@publicApi
     * @type {?}
     */


    var APP_ID = new InjectionToken('AppId');
    /**
     * @return {?}
     */

    function _appIdRandomProviderFactory() {
      return "".concat(_randomChar()).concat(_randomChar()).concat(_randomChar());
    }
    /**
     * Providers that will generate a random APP_ID_TOKEN.
     * \@publicApi
     * @type {?}
     */


    var APP_ID_RANDOM_PROVIDER = {
      provide: APP_ID,
      useFactory: _appIdRandomProviderFactory,
      deps:
      /** @type {?} */
      []
    };
    /**
     * @return {?}
     */

    function _randomChar() {
      return String.fromCharCode(97 + Math.floor(Math.random() * 25));
    }
    /**
     * A function that will be executed when a platform is initialized.
     * \@publicApi
     * @type {?}
     */


    var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');
    /**
     * A token that indicates an opaque platform id.
     * \@publicApi
     * @type {?}
     */

    var PLATFORM_ID = new InjectionToken('Platform ID');
    /**
     * All callbacks provided via this token will be called for every component that is bootstrapped.
     * Signature of the callback:
     *
     * `(componentRef: ComponentRef) => void`.
     *
     * \@publicApi
     * @type {?}
     */

    var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
    /**
     * A token which indicates the root directory of the application
     * \@publicApi
     * @type {?}
     */

    var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var Console = /*#__PURE__*/function () {
      function Console() {
        _classCallCheck(this, Console);
      }

      _createClass2(Console, [{
        key: "log",

        /**
         * @param {?} message
         * @return {?}
         */
        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

        /**
         * @param {?} message
         * @return {?}
         */

      }, {
        key: "warn",
        value: function warn(message) {
          // tslint:disable-next-line:no-console
          console.warn(message);
        }
      }]);

      return Console;
    }();

    Console.decorators = [{
      type: Injectable
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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
     * @type {?}
     */

    var LOCALE_ID$1 = new InjectionToken('LocaleId');
    /**
     * 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
     * @type {?}
     */

    var TRANSLATIONS$1 = 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
     * @type {?}
     */

    var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
    /** @enum {number} */

    var MissingTranslationStrategy = {
      Error: 0,
      Warning: 1,
      Ignore: 2
    };
    MissingTranslationStrategy[MissingTranslationStrategy.Error] = 'Error';
    MissingTranslationStrategy[MissingTranslationStrategy.Warning] = 'Warning';
    MissingTranslationStrategy[MissingTranslationStrategy.Ignore] = 'Ignore';
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */

    var SWITCH_IVY_ENABLED__POST_R3__ = true;
    /** @type {?} */

    var SWITCH_IVY_ENABLED__PRE_R3__ = false;
    /** @type {?} */

    var ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Combination of NgModuleFactory and ComponentFactorys.
     *
     * \@publicApi
     * @template T
     */

    var ModuleWithComponentFactories =
    /**
     * @param {?} ngModuleFactory
     * @param {?} componentFactories
     */
    function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {
      _classCallCheck(this, ModuleWithComponentFactories);

      this.ngModuleFactory = ngModuleFactory;
      this.componentFactories = componentFactories;
    };

    if (false) {}
    /**
     * @return {?}
     */


    function _throwError() {
      throw new Error("Runtime compiler is not loaded");
    }
    /** @type {?} */


    var Compiler_compileModuleSync__PRE_R3__ =
    /** @type {?} */
    _throwError;
    /** @type {?} */

    var Compiler_compileModuleSync__POST_R3__ =
    /**
    * @template T
    * @param {?} moduleType
    * @return {?}
    */
    function Compiler_compileModuleSync__POST_R3__(moduleType) {
      return new NgModuleFactory$1(moduleType);
    };
    /** @type {?} */


    var Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;
    /** @type {?} */

    var Compiler_compileModuleAsync__PRE_R3__ =
    /** @type {?} */
    _throwError;
    /** @type {?} */

    var Compiler_compileModuleAsync__POST_R3__ =
    /**
    * @template T
    * @param {?} moduleType
    * @return {?}
    */
    function Compiler_compileModuleAsync__POST_R3__(moduleType) {
      return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));
    };
    /** @type {?} */


    var Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;
    /** @type {?} */

    var Compiler_compileModuleAndAllComponentsSync__PRE_R3__ =
    /** @type {?} */
    _throwError;
    /** @type {?} */

    var Compiler_compileModuleAndAllComponentsSync__POST_R3__ =
    /**
    * @template T
    * @param {?} moduleType
    * @return {?}
    */
    function Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType) {
      /** @type {?} */
      var ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);
      /** @type {?} */

      var moduleDef =
      /** @type {?} */
      getNgModuleDef(moduleType);
      /** @type {?} */

      var componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce(
      /**
      * @param {?} factories
      * @param {?} declaration
      * @return {?}
      */
      function (factories, declaration) {
        /** @type {?} */
        var componentDef = getComponentDef(declaration);
        componentDef && factories.push(new ComponentFactory$1(componentDef));
        return factories;
      },
      /** @type {?} */
      []);
      return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);
    };
    /** @type {?} */


    var Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__PRE_R3__;
    /** @type {?} */

    var Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ =
    /** @type {?} */
    _throwError;
    /** @type {?} */

    var Compiler_compileModuleAndAllComponentsAsync__POST_R3__ =
    /**
    * @template T
    * @param {?} moduleType
    * @return {?}
    */
    function Compiler_compileModuleAndAllComponentsAsync__POST_R3__(moduleType) {
      return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));
    };
    /** @type {?} */


    var Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__PRE_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.
       * @return {?}
       */


      _createClass2(Compiler, [{
        key: "clearCache",
        value: function clearCache() {}
        /**
         * Clears the cache for the given component/ngModule.
         * @param {?} type
         * @return {?}
         */

      }, {
        key: "clearCacheFor",
        value: function clearCacheFor(type) {}
        /**
         * Returns the id for a given NgModule, if one is defined and known to the compiler.
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "getModuleId",
        value: function getModuleId(moduleType) {
          return undefined;
        }
      }]);

      return Compiler;
    }();

    Compiler.decorators = [{
      type: Injectable
    }];

    if (false) {}
    /**
     * Token to provide CompilerOptions in the platform injector.
     *
     * \@publicApi
     * @type {?}
     */


    var COMPILER_OPTIONS = new InjectionToken('compilerOptions');
    /**
     * A factory for creating a Compiler
     *
     * \@publicApi
     * @abstract
     */

    var CompilerFactory = function CompilerFactory() {
      _classCallCheck(this, CompilerFactory);
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * A scope function for the Web Tracing Framework (WTF).
     *
     * \@publicApi
     * @deprecated the Web Tracing Framework is no longer supported in Angular
     * @record
     */


    function WtfScopeFn() {}
    /**
     * @record
     */


    function WTF() {}

    if (false) {}
    /**
     * @record
     */


    function Trace() {}

    if (false) {}
    /**
     * @record
     */


    function Range() {}
    /**
     * @record
     */


    function Events() {}

    if (false) {}
    /**
     * @record
     */


    function Scope() {}
    /** @type {?} */


    var trace;
    /** @type {?} */

    var events;
    /**
     * @return {?}
     */

    function detectWTF() {
      /** @type {?} */
      var wtf =
      /** @type {?} */
      _global['wtf'];

      if (wtf) {
        trace = wtf['trace'];

        if (trace) {
          events = trace['events'];
          return true;
        }
      }

      return false;
    }
    /**
     * @param {?} signature
     * @param {?=} flags
     * @return {?}
     */


    function createScope(signature) {
      var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      return events.createScope(signature, flags);
    }
    /**
     * @template T
     * @param {?} scope
     * @param {?=} returnValue
     * @return {?}
     */


    function leave(scope, returnValue) {
      trace.leaveScope(scope, returnValue);
      return returnValue;
    }
    /**
     * @param {?} rangeType
     * @param {?} action
     * @return {?}
     */


    function startTimeRange(rangeType, action) {
      return trace.beginTimeRange(rangeType, action);
    }
    /**
     * @param {?} range
     * @return {?}
     */


    function endTimeRange(range) {
      trace.endTimeRange(range);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * True if WTF is enabled.
     * @type {?}
     */


    var wtfEnabled = detectWTF();
    /**
     * @param {?=} arg0
     * @param {?=} arg1
     * @return {?}
     */

    function noopScope(arg0, arg1) {
      return null;
    }
    /**
     * Create trace scope.
     *
     * Scopes must be strictly nested and are analogous to stack frames, but
     * do not have to follow the stack frames. Instead it is recommended that they follow logical
     * nesting. You may want to use
     * [Event
     * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)
     * as they are defined in WTF.
     *
     * Used to mark scope entry. The return value is used to leave the scope.
     *
     *     var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');
     *
     *     someMethod() {
     *        var s = myScope('Foo'); // 'Foo' gets stored in tracing UI
     *        // DO SOME WORK HERE
     *        return wtfLeave(s, 123); // Return value 123
     *     }
     *
     * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can
     * negatively impact the performance of your application. For this reason we recommend that
     * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and
     * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to
     * exception, will produce incorrect trace, but presence of exception signifies logic error which
     * needs to be fixed before the app should be profiled. Add try-finally only when you expect that
     * an exception is expected during normal execution while profiling.
     *
     * \@publicApi
     * @deprecated the Web Tracing Framework is no longer supported in Angular
     * @type {?}
     */


    var wtfCreateScope = wtfEnabled ? createScope :
    /**
    * @param {?} signature
    * @param {?=} flags
    * @return {?}
    */
    function (signature, flags) {
      return noopScope;
    };
    /**
     * Used to mark end of Scope.
     *
     * - `scope` to end.
     * - `returnValue` (optional) to be passed to the WTF.
     *
     * Returns the `returnValue for easy chaining.
     * \@publicApi
     * @deprecated the Web Tracing Framework is no longer supported in Angular
     * @type {?}
     */

    var wtfLeave = wtfEnabled ? leave :
    /**
    * @param {?} s
    * @param {?=} r
    * @return {?}
    */
    function (s, r) {
      return r;
    };
    /**
     * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.
     * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been
     * enabled.
     *
     *     someMethod() {
     *        var s = wtfStartTimeRange('HTTP:GET', 'some.url');
     *        var future = new Future.delay(5).then((_) {
     *          wtfEndTimeRange(s);
     *        });
     *     }
     * \@publicApi
     * @deprecated the Web Tracing Framework is no longer supported in Angular
     * @type {?}
     */

    var wtfStartTimeRange = wtfEnabled ? startTimeRange :
    /**
    * @param {?} rangeType
    * @param {?} action
    * @return {?}
    */
    function (rangeType, action) {
      return null;
    };
    /**
     * Ends a async time range operation.
     * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
     * enabled.
     * \@publicApi
     * @deprecated the Web Tracing Framework is no longer supported in Angular
     * @type {?}
     */

    var wtfEndTimeRange = wtfEnabled ? endTimeRange :
    /**
    * @param {?} r
    * @return {?}
    */
    function (r) {
      return null;
    };
    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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);
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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 () {
      /**
       * @param {?} __0
       */
      function NgZone(_ref61) {
        var _ref61$enableLongStac = _ref61.enableLongStackTrace,
            enableLongStackTrace = _ref61$enableLongStac === void 0 ? false : _ref61$enableLongStac;

        _classCallCheck(this, NgZone);

        this.hasPendingMicrotasks = false;
        this.hasPendingMacrotasks = 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();
        /** @type {?} */

        var self =
        /** @type {?} */

        /** @type {?} */
        this;
        self._nesting = 0;
        self._outer = self._inner = Zone.current;

        if (
        /** @type {?} */
        Zone['wtfZoneSpec']) {
          self._inner = self._inner.fork(
          /** @type {?} */
          Zone['wtfZoneSpec']);
        }

        if (
        /** @type {?} */
        Zone['TaskTrackingZoneSpec']) {
          self._inner = self._inner.fork(new
          /** @type {?} */

          /** @type {?} */
          Zone['TaskTrackingZoneSpec']());
        }

        if (enableLongStackTrace &&
        /** @type {?} */
        Zone['longStackTraceZoneSpec']) {
          self._inner = self._inner.fork(
          /** @type {?} */
          Zone['longStackTraceZoneSpec']);
        }

        forkInnerZoneWithAngularBehavior(self);
      }
      /**
       * @return {?}
       */


      _createClass2(NgZone, [{
        key: "run",

        /**
         * 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`.
         * @template T
         * @param {?} fn
         * @param {?=} applyThis
         * @param {?=} applyArgs
         * @return {?}
         */
        value: function run(fn, applyThis, applyArgs) {
          return (
            /** @type {?} */

            /** @type {?} */

            /** @type {?} */
            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`.
         * @template T
         * @param {?} fn
         * @param {?=} applyThis
         * @param {?=} applyArgs
         * @param {?=} name
         * @return {?}
         */

      }, {
        key: "runTask",
        value: function runTask(fn, applyThis, applyArgs, name) {
          /** @type {?} */
          var zone =
          /** @type {?} */

          /** @type {?} */
          this._inner;
          /** @type {?} */

          var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop$1, noop$1);

          try {
            return (
              /** @type {?} */
              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.
         * @template T
         * @param {?} fn
         * @param {?=} applyThis
         * @param {?=} applyArgs
         * @return {?}
         */

      }, {
        key: "runGuarded",
        value: function runGuarded(fn, applyThis, applyArgs) {
          return (
            /** @type {?} */

            /** @type {?} */

            /** @type {?} */
            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.
         * @template T
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "runOutsideAngular",
        value: function runOutsideAngular(fn) {
          return (
            /** @type {?} */

            /** @type {?} */

            /** @type {?} */
            this._outer.run(fn)
          );
        }
      }], [{
        key: "isInAngularZone",
        value: function isInAngularZone() {
          return Zone.current.get('isAngularZone') === true;
        }
        /**
         * @return {?}
         */

      }, {
        key: "assertInAngularZone",
        value: function assertInAngularZone() {
          if (!NgZone.isInAngularZone()) {
            throw new Error('Expected to be in Angular Zone, but it is not!');
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "assertNotInAngularZone",
        value: function assertNotInAngularZone() {
          if (NgZone.isInAngularZone()) {
            throw new Error('Expected to not be in Angular Zone, but it is!');
          }
        }
      }]);

      return NgZone;
    }();

    if (false) {}
    /**
     * @return {?}
     */


    function noop$1() {}
    /** @type {?} */


    var EMPTY_PAYLOAD = {};
    /**
     * @record
     */

    function NgZonePrivate() {}

    if (false) {}
    /**
     * @param {?} zone
     * @return {?}
     */


    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(
              /**
              * @return {?}
              */
              function () {
                return zone.onStable.emit(null);
              });
            } finally {
              zone.isStable = true;
            }
          }
        }
      }
    }
    /**
     * @param {?} zone
     * @return {?}
     */


    function forkInnerZoneWithAngularBehavior(zone) {
      zone._inner = zone._inner.fork({
        name: 'angular',
        properties:
        /** @type {?} */
        {
          'isAngularZone': true
        },
        onInvokeTask:
        /**
        * @param {?} delegate
        * @param {?} current
        * @param {?} target
        * @param {?} task
        * @param {?} applyThis
        * @param {?} applyArgs
        * @return {?}
        */
        function onInvokeTask(delegate, current, target, task, applyThis, applyArgs) {
          try {
            onEnter(zone);
            return delegate.invokeTask(target, task, applyThis, applyArgs);
          } finally {
            onLeave(zone);
          }
        },
        onInvoke:
        /**
        * @param {?} delegate
        * @param {?} current
        * @param {?} target
        * @param {?} callback
        * @param {?} applyThis
        * @param {?=} applyArgs
        * @param {?=} source
        * @return {?}
        */
        function onInvoke(delegate, current, target, callback, applyThis, applyArgs, source) {
          try {
            onEnter(zone);
            return delegate.invoke(target, callback, applyThis, applyArgs, source);
          } finally {
            onLeave(zone);
          }
        },
        onHasTask:
        /**
        * @param {?} delegate
        * @param {?} current
        * @param {?} target
        * @param {?} hasTaskState
        * @return {?}
        */
        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;
              checkStable(zone);
            } else if (hasTaskState.change == 'macroTask') {
              zone.hasPendingMacrotasks = hasTaskState.macroTask;
            }
          }
        },
        onHandleError:
        /**
        * @param {?} delegate
        * @param {?} current
        * @param {?} target
        * @param {?} error
        * @return {?}
        */
        function onHandleError(delegate, current, target, error) {
          delegate.handleError(target, error);
          zone.runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            return zone.onError.emit(error);
          });
          return false;
        }
      });
    }
    /**
     * @param {?} zone
     * @return {?}
     */


    function onEnter(zone) {
      zone._nesting++;

      if (zone.isStable) {
        zone.isStable = false;
        zone.onUnstable.emit(null);
      }
    }
    /**
     * @param {?} zone
     * @return {?}
     */


    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();
      }
      /**
       * @param {?} fn
       * @return {?}
       */


      _createClass2(NoopNgZone, [{
        key: "run",
        value: function run(fn) {
          return fn();
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "runGuarded",
        value: function runGuarded(fn) {
          return fn();
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "runOutsideAngular",
        value: function runOutsideAngular(fn) {
          return fn();
        }
        /**
         * @template T
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "runTask",
        value: function runTask(fn) {
          return fn();
        }
      }]);

      return NoopNgZone;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @record
     */


    function PendingMacrotask() {}

    if (false) {}
    /**
     * @record
     */


    function TaskData() {}

    if (false) {}
    /**
     * @record
     */


    function WaitCallback() {}

    if (false) {}
    /**
     * 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 () {
      /**
       * @param {?} _ngZone
       */
      function Testability(_ngZone) {
        var _this330 = 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(
        /**
        * @return {?}
        */
        function () {
          _this330.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');
        });
      }
      /**
       * @private
       * @return {?}
       */


      _createClass2(Testability, [{
        key: "_watchAngularEvents",
        value: function _watchAngularEvents() {
          var _this331 = this;

          this._ngZone.onUnstable.subscribe({
            next:
            /**
            * @return {?}
            */
            function next() {
              _this331._didWork = true;
              _this331._isZoneStable = false;
            }
          });

          this._ngZone.runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            _this331._ngZone.onStable.subscribe({
              next:
              /**
              * @return {?}
              */
              function next() {
                NgZone.assertNotInAngularZone();
                scheduleMicroTask(
                /**
                * @return {?}
                */
                function () {
                  _this331._isZoneStable = true;

                  _this331._runCallbacksIfReady();
                });
              }
            });
          });
        }
        /**
         * Increases the number of pending request
         * @deprecated pending requests are now tracked with zones.
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "isStable",
        value: function isStable() {
          return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_runCallbacksIfReady",
        value: function _runCallbacksIfReady() {
          var _this332 = this;

          if (this.isStable()) {
            // Schedules the call backs in a new frame so that it is always async.
            scheduleMicroTask(
            /**
            * @return {?}
            */
            function () {
              while (_this332._callbacks.length !== 0) {
                /** @type {?} */
                var cb =
                /** @type {?} */
                _this332._callbacks.pop();

                clearTimeout(cb.timeoutId);
                cb.doneCb(_this332._didWork);
              }

              _this332._didWork = false;
            });
          } else {
            // Still not stable, send updates.

            /** @type {?} */
            var pending = this.getPendingTasks();
            this._callbacks = this._callbacks.filter(
            /**
            * @param {?} cb
            * @return {?}
            */
            function (cb) {
              if (cb.updateCb && cb.updateCb(pending)) {
                clearTimeout(cb.timeoutId);
                return false;
              }

              return true;
            });
            this._didWork = true;
          }
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        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(
          /**
          * @param {?} t
          * @return {?}
          */
          function (t) {
            return {
              source: t.source,
              // From TaskTrackingZone:
              // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40
              creationLocation:
              /** @type {?} */

              /** @type {?} */
              t.creationLocation,
              data: t.data
            };
          });
        }
        /**
         * @private
         * @param {?} cb
         * @param {?=} timeout
         * @param {?=} updateCb
         * @return {?}
         */

      }, {
        key: "addCallback",
        value: function addCallback(cb, timeout, updateCb) {
          var _this333 = this;

          /** @type {?} */
          var timeoutId = -1;

          if (timeout && timeout > 0) {
            timeoutId = setTimeout(
            /**
            * @return {?}
            */
            function () {
              _this333._callbacks = _this333._callbacks.filter(
              /**
              * @param {?} cb
              * @return {?}
              */
              function (cb) {
                return cb.timeoutId !== timeoutId;
              });
              cb(_this333._didWork, _this333.getPendingTasks());
            }, timeout);
          }

          this._callbacks.push(
          /** @type {?} */
          {
            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.
         * @return {?}
         */

      }, {
        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(
          /** @type {?} */
          doneCb, timeout,
          /** @type {?} */
          updateCb);

          this._runCallbacksIfReady();
        }
        /**
         * Get the number of pending requests
         * @deprecated pending requests are now tracked with zones
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "findProviders",
        value: function findProviders(using, provider, exactMatch) {
          // TODO(juliemr): implement.
          return [];
        }
      }]);

      return Testability;
    }();

    Testability.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    Testability.ctorParameters = function () {
      return [{
        type: NgZone
      }];
    };

    if (false) {}
    /**
     * 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
       * @return {?}
       */


      _createClass2(TestabilityRegistry, [{
        key: "registerApplication",
        value: function registerApplication(token, testability) {
          this._applications.set(token, testability);
        }
        /**
         * Unregisters an application.
         * @param {?} token token of application, root element
         * @return {?}
         */

      }, {
        key: "unregisterApplication",
        value: function unregisterApplication(token) {
          this._applications["delete"](token);
        }
        /**
         * Unregisters all applications
         * @return {?}
         */

      }, {
        key: "unregisterAllApplications",
        value: function unregisterAllApplications() {
          this._applications.clear();
        }
        /**
         * Get a testability hook associated with the application
         * @param {?} elem root element
         * @return {?}
         */

      }, {
        key: "getTestability",
        value: function getTestability(elem) {
          return this._applications.get(elem) || null;
        }
        /**
         * Get all registered testabilities
         * @return {?}
         */

      }, {
        key: "getAllTestabilities",
        value: function getAllTestabilities() {
          return Array.from(this._applications.values());
        }
        /**
         * Get all registered applications(root elements)
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        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.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    TestabilityRegistry.ctorParameters = function () {
      return [];
    };

    if (false) {}
    /**
     * Adapter interface for retrieving the `Testability` service associated for a
     * particular context.
     *
     * \@publicApi
     * @record
     */


    function GetTestability() {}

    if (false) {}

    var _NoopGetTestability = /*#__PURE__*/function () {
      function _NoopGetTestability() {
        _classCallCheck(this, _NoopGetTestability);
      }

      _createClass2(_NoopGetTestability, [{
        key: "addToWindow",

        /**
         * @param {?} registry
         * @return {?}
         */
        value: function addToWindow(registry) {}
        /**
         * @param {?} registry
         * @param {?} elem
         * @param {?} findInAncestors
         * @return {?}
         */

      }, {
        key: "findTestabilityInTree",
        value: function findTestabilityInTree(registry, elem, findInAncestors) {
          return null;
        }
      }]);

      return _NoopGetTestability;
    }();
    /**
     * Set the {\@link GetTestability} implementation used by the Angular testing framework.
     * \@publicApi
     * @param {?} getter
     * @return {?}
     */


    function setTestabilityGetter(getter) {
      _testabilityGetter = getter;
    }
    /** @type {?} */


    var _testabilityGetter = new _NoopGetTestability();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var _platform;
    /** @type {?} */


    var compileNgModuleFactory = compileNgModuleFactory__PRE_R3__;
    /**
     * @template M
     * @param {?} injector
     * @param {?} options
     * @param {?} moduleType
     * @return {?}
     */

    function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {
      /** @type {?} */
      var compilerFactory = injector.get(CompilerFactory);
      /** @type {?} */

      var compiler = compilerFactory.createCompiler([options]);
      return compiler.compileModuleAsync(moduleType);
    }
    /**
     * @template M
     * @param {?} injector
     * @param {?} options
     * @param {?} moduleType
     * @return {?}
     */


    function compileNgModuleFactory__POST_R3__(injector, options, moduleType) {
      ngDevMode && assertNgModuleType(moduleType);
      /** @type {?} */

      var moduleFactory = new NgModuleFactory$1(moduleType);

      if (isComponentResourceResolutionQueueEmpty()) {
        return Promise.resolve(moduleFactory);
      }
      /** @type {?} */


      var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
      /** @type {?} */

      var compilerProviders = _mergeArrays(compilerOptions.map(
      /**
      * @param {?} o
      * @return {?}
      */
      function (o) {
        return (
          /** @type {?} */
          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);
      }
      /** @type {?} */


      var compiler = getCompilerFacade();
      /** @type {?} */

      var compilerInjector = Injector.create({
        providers: compilerProviders
      });
      /** @type {?} */

      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(
      /**
      * @param {?} url
      * @return {?}
      */
      function (url) {
        return Promise.resolve(resourceLoader.get(url));
      }).then(
      /**
      * @return {?}
      */
      function () {
        return moduleFactory;
      });
    }
    /** @type {?} */


    var isBoundToModule = isBoundToModule__PRE_R3__;
    /**
     * @template C
     * @param {?} cf
     * @return {?}
     */

    function isBoundToModule__PRE_R3__(cf) {
      return cf instanceof ComponentFactoryBoundToModule;
    }
    /**
     * @template C
     * @param {?} cf
     * @return {?}
     */


    function isBoundToModule__POST_R3__(cf) {
      return (
        /** @type {?} */
        cf.isBoundToModule
      );
    }
    /** @type {?} */


    var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
    /**
     * A token for third-party components that can register themselves with NgProbe.
     *
     * \@publicApi
     */

    var NgProbeToken =
    /**
     * @param {?} name
     * @param {?} token
     */
    function NgProbeToken(name, token) {
      _classCallCheck(this, NgProbeToken);

      this.name = name;
      this.token = token;
    };

    if (false) {}
    /**
     * Creates a platform.
     * Platforms have to be eagerly created via this function.
     *
     * \@publicApi
     * @param {?} injector
     * @return {?}
     */


    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.');
      }

      _platform = injector.get(PlatformRef);
      /** @type {?} */

      var inits = injector.get(PLATFORM_INITIALIZER, null);
      if (inits) inits.forEach(
      /**
      * @param {?} init
      * @return {?}
      */
      function (init) {
        return init();
      });
      return _platform;
    }
    /**
     * Creates a factory for a platform
     *
     * \@publicApi
     * @param {?} parentPlatformFactory
     * @param {?} name
     * @param {?=} providers
     * @return {?}
     */


    function createPlatformFactory(parentPlatformFactory, name) {
      var providers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];

      /** @type {?} */
      var desc = "Platform: ".concat(name);
      /** @type {?} */

      var marker = new InjectionToken(desc);
      return (
        /**
        * @param {?=} extraProviders
        * @return {?}
        */
        function () {
          var extraProviders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          /** @type {?} */
          var platform = getPlatform();

          if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
            if (parentPlatformFactory) {
              parentPlatformFactory(providers.concat(extraProviders).concat({
                provide: marker,
                useValue: true
              }));
            } else {
              /** @type {?} */
              var injectedProviders = providers.concat(extraProviders).concat({
                provide: marker,
                useValue: true
              });
              createPlatform(Injector.create({
                providers: injectedProviders,
                name: desc
              }));
            }
          }

          return assertPlatform(marker);
        }
      );
    }
    /**
     * Checks that there currently is a platform which contains the given token as a provider.
     *
     * \@publicApi
     * @param {?} requiredToken
     * @return {?}
     */


    function assertPlatform(requiredToken) {
      /** @type {?} */
      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;
    }
    /**
     * Destroy the existing platform.
     *
     * \@publicApi
     * @return {?}
     */


    function destroyPlatform() {
      if (_platform && !_platform.destroyed) {
        _platform.destroy();
      }
    }
    /**
     * Returns the current platform.
     *
     * \@publicApi
     * @return {?}
     */


    function getPlatform() {
      return _platform && !_platform.destroyed ? _platform : null;
    }
    /**
     * Provides additional options to the bootstraping process.
     *
     *
     * @record
     */


    function BootstrapOptions() {}

    if (false) {}
    /**
     * The Angular platform is the entry point for Angular on a web page. Each page
     * has exactly one platform, and 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 via a platform factory
     * (e.g. {\@link platformBrowser}), or explicitly by calling the {\@link createPlatform} function.
     *
     * \@publicApi
     */


    var PlatformRef = /*#__PURE__*/function () {
      /**
       * \@internal
       * @param {?} _injector
       */
      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
       * ### Simple Example
       *
       * ```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);
       * ```
       * @template M
       * @param {?} moduleFactory
       * @param {?=} options
       * @return {?}
       */


      _createClass2(PlatformRef, [{
        key: "bootstrapModuleFactory",
        value: function bootstrapModuleFactory(moduleFactory, options) {
          var _this334 = 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.

          /** @type {?} */
          var ngZoneOption = options ? options.ngZone : undefined;
          /** @type {?} */

          var ngZone = getNgZone(ngZoneOption);
          /** @type {?} */

          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(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var ngZoneInjector = Injector.create({
              providers: providers,
              parent: _this334.injector,
              name: moduleFactory.moduleType.name
            });
            /** @type {?} */

            var moduleRef =
            /** @type {?} */
            moduleFactory.create(ngZoneInjector);
            /** @type {?} */

            var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);

            if (!exceptionHandler) {
              throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
            } // If the `LOCALE_ID` provider is defined at bootstrap we set the value for runtime i18n (ivy)


            if (ivyEnabled) {
              /** @type {?} */
              var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);
              setLocaleId(localeId || DEFAULT_LOCALE_ID);
            }

            moduleRef.onDestroy(
            /**
            * @return {?}
            */
            function () {
              return remove(_this334._modules, moduleRef);
            });

            /** @type {?} */
            ngZone.runOutsideAngular(
            /**
            * @return {?}
            */
            function () {
              return (
                /** @type {?} */
                ngZone.onError.subscribe({
                  next:
                  /**
                  * @param {?} error
                  * @return {?}
                  */
                  function next(error) {
                    exceptionHandler.handleError(error);
                  }
                })
              );
            });
            return _callAndReportToErrorHandler(exceptionHandler,
            /** @type {?} */
            ngZone,
            /**
            * @return {?}
            */
            function () {
              /** @type {?} */
              var initStatus = moduleRef.injector.get(ApplicationInitStatus);
              initStatus.runInitializers();
              return initStatus.donePromise.then(
              /**
              * @return {?}
              */
              function () {
                _this334._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);
         * ```
         *
         * @template M
         * @param {?} moduleType
         * @param {?=} compilerOptions
         * @return {?}
         */

      }, {
        key: "bootstrapModule",
        value: function bootstrapModule(moduleType) {
          var _this335 = this;

          var compilerOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

          /** @type {?} */
          var options = optionsReducer({}, compilerOptions);
          return compileNgModuleFactory(this.injector, options, moduleType).then(
          /**
          * @param {?} moduleFactory
          * @return {?}
          */
          function (moduleFactory) {
            return _this335.bootstrapModuleFactory(moduleFactory, options);
          });
        }
        /**
         * @private
         * @param {?} moduleRef
         * @return {?}
         */

      }, {
        key: "_moduleDoBootstrap",
        value: function _moduleDoBootstrap(moduleRef) {
          /** @type {?} */
          var appRef =
          /** @type {?} */
          moduleRef.injector.get(ApplicationRef);

          if (moduleRef._bootstrapComponents.length > 0) {
            moduleRef._bootstrapComponents.forEach(
            /**
            * @param {?} f
            * @return {?}
            */
            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);
        }
        /**
         * Register a listener to be called when the platform is disposed.
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onDestroy",
        value: function onDestroy(callback) {
          this._destroyListeners.push(callback);
        }
        /**
         * Retrieve the platform {\@link Injector}, which is the parent injector for
         * every Angular application on the page and provides singleton providers.
         * @return {?}
         */

      }, {
        key: "destroy",

        /**
         * Destroy the Angular platform and all Angular applications on the page.
         * @return {?}
         */
        value: function destroy() {
          if (this._destroyed) {
            throw new Error('The platform has already been destroyed!');
          }

          this._modules.slice().forEach(
          /**
          * @param {?} module
          * @return {?}
          */
          function (module) {
            return module.destroy();
          });

          this._destroyListeners.forEach(
          /**
          * @param {?} listener
          * @return {?}
          */
          function (listener) {
            return listener();
          });

          this._destroyed = true;
        }
        /**
         * @return {?}
         */

      }, {
        key: "injector",
        get: function get() {
          return this._injector;
        }
      }, {
        key: "destroyed",
        get: function get() {
          return this._destroyed;
        }
      }]);

      return PlatformRef;
    }();

    PlatformRef.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    PlatformRef.ctorParameters = function () {
      return [{
        type: Injector
      }];
    };

    if (false) {}
    /**
     * @param {?=} ngZoneOption
     * @return {?}
     */


    function getNgZone(ngZoneOption) {
      /** @type {?} */
      var ngZone;

      if (ngZoneOption === 'noop') {
        ngZone = new NoopNgZone();
      } else {
        ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({
          enableLongStackTrace: isDevMode()
        });
      }

      return ngZone;
    }
    /**
     * @param {?} errorHandler
     * @param {?} ngZone
     * @param {?} callback
     * @return {?}
     */


    function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
      try {
        /** @type {?} */
        var result = callback();

        if (isPromise(result)) {
          return result["catch"](
          /**
          * @param {?} e
          * @return {?}
          */
          function (e) {
            ngZone.runOutsideAngular(
            /**
            * @return {?}
            */
            function () {
              return errorHandler.handleError(e);
            }); // rethrow as the exception handler might not do it

            throw e;
          });
        }

        return result;
      } catch (e) {
        ngZone.runOutsideAngular(
        /**
        * @return {?}
        */
        function () {
          return errorHandler.handleError(e);
        }); // rethrow as the exception handler might not do it

        throw e;
      }
    }
    /**
     * @template T
     * @param {?} dst
     * @param {?} objs
     * @return {?}
     */


    function optionsReducer(dst, objs) {
      if (Array.isArray(objs)) {
        dst = objs.reduce(optionsReducer, dst);
      } else {
        dst = Object.assign({}, dst,
        /** @type {?} */
        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
       * @param {?} _zone
       * @param {?} _console
       * @param {?} _injector
       * @param {?} _exceptionHandler
       * @param {?} _componentFactoryResolver
       * @param {?} _initStatus
       */
      function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {
        var _this336 = this;

        _classCallCheck(this, ApplicationRef);

        this._zone = _zone;
        this._console = _console;
        this._injector = _injector;
        this._exceptionHandler = _exceptionHandler;
        this._componentFactoryResolver = _componentFactoryResolver;
        this._initStatus = _initStatus;
        this._bootstrapListeners = [];
        this._views = [];
        this._runningTick = false;
        this._enforceNoNewChanges = 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._enforceNoNewChanges = isDevMode();

        this._zone.onMicrotaskEmpty.subscribe({
          next:
          /**
          * @return {?}
          */
          function next() {
            _this336._zone.run(
            /**
            * @return {?}
            */
            function () {
              _this336.tick();
            });
          }
        });
        /** @type {?} */


        var isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](
        /**
        * @param {?} observer
        * @return {?}
        */
        function (observer) {
          _this336._stable = _this336._zone.isStable && !_this336._zone.hasPendingMacrotasks && !_this336._zone.hasPendingMicrotasks;

          _this336._zone.runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            observer.next(_this336._stable);
            observer.complete();
          });
        });
        /** @type {?} */

        var isStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"](
        /**
        * @param {?} observer
        * @return {?}
        */
        function (observer) {
          // Create the subscription to onStable outside the Angular Zone so that
          // the callback is run outside the Angular Zone.

          /** @type {?} */
          var stableSub;

          _this336._zone.runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            stableSub = _this336._zone.onStable.subscribe(
            /**
            * @return {?}
            */
            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(
              /**
              * @return {?}
              */
              function () {
                if (!_this336._stable && !_this336._zone.hasPendingMacrotasks && !_this336._zone.hasPendingMicrotasks) {
                  _this336._stable = true;
                  observer.next(true);
                }
              });
            });
          });
          /** @type {?} */


          var unstableSub = _this336._zone.onUnstable.subscribe(
          /**
          * @return {?}
          */
          function () {
            NgZone.assertInAngularZone();

            if (_this336._stable) {
              _this336._stable = false;

              _this336._zone.runOutsideAngular(
              /**
              * @return {?}
              */
              function () {
                observer.next(false);
              });
            }
          });

          return (
            /**
            * @return {?}
            */
            function () {
              stableSub.unsubscribe();
              unstableSub.unsubscribe();
            }
          );
        });

        /** @type {?} */
        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'}
       * @template C
       * @param {?} componentOrFactory
       * @param {?=} rootSelectorOrNode
       * @return {?}
       */


      _createClass2(ApplicationRef, [{
        key: "bootstrap",
        value: function bootstrap(componentOrFactory, rootSelectorOrNode) {
          var _this337 = 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.');
          }
          /** @type {?} */


          var componentFactory;

          if (componentOrFactory instanceof ComponentFactory) {
            componentFactory = componentOrFactory;
          } else {
            componentFactory =
            /** @type {?} */
            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

          /** @type {?} */

          var ngModule = isBoundToModule(componentFactory) ? null : this._injector.get(NgModuleRef);
          /** @type {?} */

          var selectorOrNode = rootSelectorOrNode || componentFactory.selector;
          /** @type {?} */

          var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);
          compRef.onDestroy(
          /**
          * @return {?}
          */
          function () {
            _this337._unloadComponent(compRef);
          });
          /** @type {?} */

          var testability = compRef.injector.get(Testability, null);

          if (testability) {
            compRef.injector.get(TestabilityRegistry).registerApplication(compRef.location.nativeElement, testability);
          }

          this._loadComponent(compRef);

          if (isDevMode()) {
            this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the 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.
         * @return {?}
         */

      }, {
        key: "tick",
        value: function tick() {
          var _this338 = this;

          if (this._runningTick) {
            throw new Error('ApplicationRef.tick is called recursively');
          }
          /** @type {?} */


          var scope = ApplicationRef._tickScope();

          try {
            this._runningTick = true;

            var _iterator42 = _createForOfIteratorHelper(this._views),
                _step42;

            try {
              for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {
                var _view3 = _step42.value;

                _view3.detectChanges();
              }
            } catch (err) {
              _iterator42.e(err);
            } finally {
              _iterator42.f();
            }

            if (this._enforceNoNewChanges) {
              var _iterator43 = _createForOfIteratorHelper(this._views),
                  _step43;

              try {
                for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {
                  var view = _step43.value;
                  view.checkNoChanges();
                }
              } catch (err) {
                _iterator43.e(err);
              } finally {
                _iterator43.f();
              }
            }
          } catch (e) {
            // Attention: Don't rethrow as it could cancel subscriptions to Observables!
            this._zone.runOutsideAngular(
            /**
            * @return {?}
            */
            function () {
              return _this338._exceptionHandler.handleError(e);
            });
          } finally {
            this._runningTick = false;
            wtfLeave(scope);
          }
        }
        /**
         * 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.
         * @param {?} viewRef
         * @return {?}
         */

      }, {
        key: "attachView",
        value: function attachView(viewRef) {
          /** @type {?} */
          var view =
          /** @type {?} */
          viewRef;

          this._views.push(view);

          view.attachToAppRef(this);
        }
        /**
         * Detaches a view from dirty checking again.
         * @param {?} viewRef
         * @return {?}
         */

      }, {
        key: "detachView",
        value: function detachView(viewRef) {
          /** @type {?} */
          var view =
          /** @type {?} */
          viewRef;
          remove(this._views, view);
          view.detachFromAppRef();
        }
        /**
         * @private
         * @param {?} componentRef
         * @return {?}
         */

      }, {
        key: "_loadComponent",
        value: function _loadComponent(componentRef) {
          this.attachView(componentRef.hostView);
          this.tick();
          this.components.push(componentRef); // Get the listeners lazily to prevent DI cycles.

          /** @type {?} */

          var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);

          listeners.forEach(
          /**
          * @param {?} listener
          * @return {?}
          */
          function (listener) {
            return listener(componentRef);
          });
        }
        /**
         * @private
         * @param {?} componentRef
         * @return {?}
         */

      }, {
        key: "_unloadComponent",
        value: function _unloadComponent(componentRef) {
          this.detachView(componentRef.hostView);
          remove(this.components, componentRef);
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          // TODO(alxhub): Dispose of the NgZone.
          this._views.slice().forEach(
          /**
          * @param {?} view
          * @return {?}
          */
          function (view) {
            return view.destroy();
          });
        }
        /**
         * Returns the number of attached views.
         * @return {?}
         */

      }, {
        key: "viewCount",
        get: function get() {
          return this._views.length;
        }
      }]);

      return ApplicationRef;
    }();
    /**
     * \@internal
     */


    ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');
    ApplicationRef.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    ApplicationRef.ctorParameters = function () {
      return [{
        type: NgZone
      }, {
        type: Console
      }, {
        type: Injector
      }, {
        type: ErrorHandler
      }, {
        type: ComponentFactoryResolver
      }, {
        type: ApplicationInitStatus
      }];
    };

    if (false) {}
    /**
     * @template T
     * @param {?} list
     * @param {?} el
     * @return {?}
     */


    function remove(list, el) {
      /** @type {?} */
      var index = list.indexOf(el);

      if (index > -1) {
        list.splice(index, 1);
      }
    }
    /**
     * @param {?} parts
     * @return {?}
     */


    function _mergeArrays(parts) {
      /** @type {?} */
      var result = [];
      parts.forEach(
      /**
      * @param {?} part
      * @return {?}
      */
      function (part) {
        return part && result.push.apply(result, _toConsumableArray(part));
      });
      return result;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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.
     * @abstract
     */


    var NgModuleFactoryLoader = function NgModuleFactoryLoader() {
      _classCallCheck(this, NgModuleFactoryLoader);
    };

    if (false) {}
    /**
     * @param {?} id
     * @return {?}
     */


    function getModuleFactory__PRE_R3__(id) {
      /** @type {?} */
      var factory =
      /** @type {?} */
      getRegisteredNgModuleType(id);
      if (!factory) throw noModuleError(id);
      return factory;
    }
    /**
     * @param {?} id
     * @return {?}
     */


    function getModuleFactory__POST_R3__(id) {
      /** @type {?} */
      var type =
      /** @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
     * @type {?}
     */


    var getModuleFactory = getModuleFactory__PRE_R3__;
    /**
     * @param {?} id
     * @return {?}
     */

    function noModuleError(id) {
      return new Error("No module with ID ".concat(id, " loaded"));
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var _SEPARATOR = '#';
    /** @type {?} */

    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.
     * @abstract
     */

    var SystemJsNgModuleLoaderConfig = function SystemJsNgModuleLoaderConfig() {
      _classCallCheck(this, SystemJsNgModuleLoaderConfig);
    };

    if (false) {}
    /** @type {?} */


    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 () {
      /**
       * @param {?} _compiler
       * @param {?=} config
       */
      function SystemJsNgModuleLoader(_compiler, config) {
        _classCallCheck(this, SystemJsNgModuleLoader);

        this._compiler = _compiler;
        this._config = config || DEFAULT_CONFIG;
      }
      /**
       * @param {?} path
       * @return {?}
       */


      _createClass2(SystemJsNgModuleLoader, [{
        key: "load",
        value: function load(path) {
          /** @type {?} */
          var legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;
          return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);
        }
        /**
         * @private
         * @param {?} path
         * @return {?}
         */

      }, {
        key: "loadAndCompile",
        value: function loadAndCompile(path) {
          var _this339 = 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__("./$$_lazy_route_resource lazy recursive")(module).then(
          /**
          * @param {?} module
          * @return {?}
          */
          function (module) {
            return module[exportName];
          }).then(
          /**
          * @param {?} type
          * @return {?}
          */
          function (type) {
            return checkNotEmpty(type, module, exportName);
          }).then(
          /**
          * @param {?} type
          * @return {?}
          */
          function (type) {
            return _this339._compiler.compileModuleAsync(type);
          });
        }
        /**
         * @private
         * @param {?} path
         * @return {?}
         */

      }, {
        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];
          /** @type {?} */


          var factoryClassSuffix = FACTORY_CLASS_SUFFIX;

          if (exportName === undefined) {
            exportName = 'default';
            factoryClassSuffix = '';
          }

          return __webpack_require__("./$$_lazy_route_resource lazy recursive")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix).then(
          /**
          * @param {?} module
          * @return {?}
          */
          function (module) {
            return module[exportName + factoryClassSuffix];
          }).then(
          /**
          * @param {?} factory
          * @return {?}
          */
          function (factory) {
            return checkNotEmpty(factory, module, exportName);
          });
        }
      }]);

      return SystemJsNgModuleLoader;
    }();

    SystemJsNgModuleLoader.decorators = [{
      type: Injectable
    }];
    /** @nocollapse */

    SystemJsNgModuleLoader.ctorParameters = function () {
      return [{
        type: Compiler
      }, {
        type: SystemJsNgModuleLoaderConfig,
        decorators: [{
          type: Optional
        }]
      }];
    };

    if (false) {}
    /**
     * @param {?} value
     * @param {?} modulePath
     * @param {?} exportName
     * @return {?}
     */


    function checkNotEmpty(value, modulePath, exportName) {
      if (!value) {
        throw new Error("Cannot find '".concat(exportName, "' in '").concat(modulePath, "'"));
      }

      return value;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Represents an Angular [view](guide/glossary#view),
     * specifically the [host view](guide/glossary#view-tree) that is defined by a component.
     * Also serves as the base class
     * that adds destroy methods for [embedded views](guide/glossary#view-tree).
     *
     * @see `EmbeddedViewRef`
     *
     * \@publicApi
     * @abstract
     */


    var ViewRef$1 = /*#__PURE__*/function (_ChangeDetectorRef) {
      _inherits(ViewRef$1, _ChangeDetectorRef);

      var _super118 = _createSuper(ViewRef$1);

      function ViewRef$1() {
        _classCallCheck(this, ViewRef$1);

        return _super118.apply(this, arguments);
      }

      return ViewRef$1;
    }(ChangeDetectorRef);

    if (false) {}
    /**
     * 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
     * @abstract
     * @template C
     */


    var EmbeddedViewRef = /*#__PURE__*/function (_ViewRef$) {
      _inherits(EmbeddedViewRef, _ViewRef$);

      var _super119 = _createSuper(EmbeddedViewRef);

      function EmbeddedViewRef() {
        _classCallCheck(this, EmbeddedViewRef);

        return _super119.apply(this, arguments);
      }

      return EmbeddedViewRef;
    }(ViewRef$1);

    if (false) {}
    /**
     * @record
     */


    function InternalViewRef() {}

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     */


    var DebugEventListener =
    /**
     * @param {?} name
     * @param {?} callback
     */
    function DebugEventListener(name, callback) {
      _classCallCheck(this, DebugEventListener);

      this.name = name;
      this.callback = callback;
    };

    if (false) {} // WARNING: interface has both a type and a value, skipping emit


    var DebugNode__PRE_R3__ = /*#__PURE__*/function () {
      /**
       * @param {?} nativeNode
       * @param {?} parent
       * @param {?} _debugContext
       */
      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);
        }
      }
      /**
       * @return {?}
       */


      _createClass2(DebugNode__PRE_R3__, [{
        key: "injector",
        get: function get() {
          return this._debugContext.injector;
        }
        /**
         * @return {?}
         */

      }, {
        key: "componentInstance",
        get: function get() {
          return this._debugContext.component;
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return this._debugContext.context;
        }
        /**
         * @return {?}
         */

      }, {
        key: "references",
        get: function get() {
          return this._debugContext.references;
        }
        /**
         * @return {?}
         */

      }, {
        key: "providerTokens",
        get: function get() {
          return this._debugContext.providerTokens;
        }
      }]);

      return DebugNode__PRE_R3__;
    }();

    if (false) {} // WARNING: interface has both a type and a value, skipping emit


    var DebugElement__PRE_R3__ = /*#__PURE__*/function (_DebugNode__PRE_R3__) {
      _inherits(DebugElement__PRE_R3__, _DebugNode__PRE_R3__);

      var _super120 = _createSuper(DebugElement__PRE_R3__);

      /**
       * @param {?} nativeNode
       * @param {?} parent
       * @param {?} _debugContext
       */
      function DebugElement__PRE_R3__(nativeNode, parent, _debugContext) {
        var _this340;

        _classCallCheck(this, DebugElement__PRE_R3__);

        _this340 = _super120.call(this, nativeNode, parent, _debugContext);
        _this340.properties = {};
        _this340.attributes = {};
        _this340.classes = {};
        _this340.styles = {};
        _this340.childNodes = [];
        _this340.nativeElement = nativeNode;
        return _this340;
      }
      /**
       * @param {?} child
       * @return {?}
       */


      _createClass2(DebugElement__PRE_R3__, [{
        key: "addChild",
        value: function addChild(child) {
          if (child) {
            this.childNodes.push(child);

            /** @type {?} */
            child.parent = this;
          }
        }
        /**
         * @param {?} child
         * @return {?}
         */

      }, {
        key: "removeChild",
        value: function removeChild(child) {
          /** @type {?} */
          var childIndex = this.childNodes.indexOf(child);

          if (childIndex !== -1) {
            /** @type {?} */
            child.parent = null;
            this.childNodes.splice(childIndex, 1);
          }
        }
        /**
         * @param {?} child
         * @param {?} newChildren
         * @return {?}
         */

      }, {
        key: "insertChildrenAfter",
        value: function insertChildrenAfter(child, newChildren) {
          var _this341 = this;

          /** @type {?} */
          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(
            /**
            * @param {?} c
            * @return {?}
            */
            function (c) {
              if (c.parent) {
                /** @type {?} */
                c.parent.removeChild(c);
              }

              /** @type {?} */
              child.parent = _this341;
            });
          }
        }
        /**
         * @param {?} refChild
         * @param {?} newChild
         * @return {?}
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(refChild, newChild) {
          /** @type {?} */
          var refIndex = this.childNodes.indexOf(refChild);

          if (refIndex === -1) {
            this.addChild(newChild);
          } else {
            if (newChild.parent) {
              /** @type {?} */
              newChild.parent.removeChild(newChild);
            }

            /** @type {?} */
            newChild.parent = this;
            this.childNodes.splice(refIndex, 0, newChild);
          }
        }
        /**
         * @param {?} predicate
         * @return {?}
         */

      }, {
        key: "query",
        value: function query(predicate) {
          /** @type {?} */
          var results = this.queryAll(predicate);
          return results[0] || null;
        }
        /**
         * @param {?} predicate
         * @return {?}
         */

      }, {
        key: "queryAll",
        value: function queryAll(predicate) {
          /** @type {?} */
          var matches = [];

          _queryElementChildren(this, predicate, matches);

          return matches;
        }
        /**
         * @param {?} predicate
         * @return {?}
         */

      }, {
        key: "queryAllNodes",
        value: function queryAllNodes(predicate) {
          /** @type {?} */
          var matches = [];

          _queryNodeChildren(this, predicate, matches);

          return matches;
        }
        /**
         * @return {?}
         */

      }, {
        key: "triggerEventHandler",

        /**
         * @param {?} eventName
         * @param {?} eventObj
         * @return {?}
         */
        value: function triggerEventHandler(eventName, eventObj) {
          this.listeners.forEach(
          /**
          * @param {?} listener
          * @return {?}
          */
          function (listener) {
            if (listener.name == eventName) {
              listener.callback(eventObj);
            }
          });
        }
      }, {
        key: "children",
        get: function get() {
          return (
            /** @type {?} */
            this.childNodes //
            .filter(
            /**
            * @param {?} node
            * @return {?}
            */
            function (node) {
              return node instanceof DebugElement__PRE_R3__;
            })
          );
        }
      }]);

      return DebugElement__PRE_R3__;
    }(DebugNode__PRE_R3__);

    if (false) {}
    /**
     * \@publicApi
     * @param {?} debugEls
     * @return {?}
     */


    function asNativeElements(debugEls) {
      return debugEls.map(
      /**
      * @param {?} el
      * @return {?}
      */
      function (el) {
        return el.nativeElement;
      });
    }
    /**
     * @param {?} element
     * @param {?} predicate
     * @param {?} matches
     * @return {?}
     */


    function _queryElementChildren(element, predicate, matches) {
      element.childNodes.forEach(
      /**
      * @param {?} node
      * @return {?}
      */
      function (node) {
        if (node instanceof DebugElement__PRE_R3__) {
          if (predicate(node)) {
            matches.push(node);
          }

          _queryElementChildren(node, predicate, matches);
        }
      });
    }
    /**
     * @param {?} parentNode
     * @param {?} predicate
     * @param {?} matches
     * @return {?}
     */


    function _queryNodeChildren(parentNode, predicate, matches) {
      if (parentNode instanceof DebugElement__PRE_R3__) {
        parentNode.childNodes.forEach(
        /**
        * @param {?} node
        * @return {?}
        */
        function (node) {
          if (predicate(node)) {
            matches.push(node);
          }

          if (node instanceof DebugElement__PRE_R3__) {
            _queryNodeChildren(node, predicate, matches);
          }
        });
      }
    }

    var DebugNode__POST_R3__ = /*#__PURE__*/function () {
      /**
       * @param {?} nativeNode
       */
      function DebugNode__POST_R3__(nativeNode) {
        _classCallCheck(this, DebugNode__POST_R3__);

        this.nativeNode = nativeNode;
      }
      /**
       * @return {?}
       */


      _createClass2(DebugNode__POST_R3__, [{
        key: "parent",
        get: function get() {
          /** @type {?} */
          var parent =
          /** @type {?} */
          this.nativeNode.parentNode;
          return parent ? new DebugElement__POST_R3__(parent) : null;
        }
        /**
         * @return {?}
         */

      }, {
        key: "injector",
        get: function get() {
          return getInjector(this.nativeNode);
        }
        /**
         * @return {?}
         */

      }, {
        key: "componentInstance",
        get: function get() {
          /** @type {?} */
          var nativeElement = this.nativeNode;
          return nativeElement && (getComponent(
          /** @type {?} */
          nativeElement) || getViewComponent(nativeElement));
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return getComponent(
          /** @type {?} */
          this.nativeNode) || getContext$1(
          /** @type {?} */
          this.nativeNode);
        }
        /**
         * @return {?}
         */

      }, {
        key: "listeners",
        get: function get() {
          return getListeners(
          /** @type {?} */
          this.nativeNode).filter(isBrowserEvents);
        }
        /**
         * @return {?}
         */

      }, {
        key: "references",
        get: function get() {
          return getLocalRefs(this.nativeNode);
        }
        /**
         * @return {?}
         */

      }, {
        key: "providerTokens",
        get: function get() {
          return getInjectionTokens(
          /** @type {?} */
          this.nativeNode);
        }
      }]);

      return DebugNode__POST_R3__;
    }();

    if (false) {}

    var DebugElement__POST_R3__ = /*#__PURE__*/function (_DebugNode__POST_R3__) {
      _inherits(DebugElement__POST_R3__, _DebugNode__POST_R3__);

      var _super121 = _createSuper(DebugElement__POST_R3__);

      /**
       * @param {?} nativeNode
       */
      function DebugElement__POST_R3__(nativeNode) {
        _classCallCheck(this, DebugElement__POST_R3__);

        ngDevMode && assertDomNode(nativeNode);
        return _super121.call(this, nativeNode);
      }
      /**
       * @return {?}
       */


      _createClass2(DebugElement__POST_R3__, [{
        key: "query",

        /**
         * @param {?} predicate
         * @return {?}
         */
        value: function query(predicate) {
          /** @type {?} */
          var results = this.queryAll(predicate);
          return results[0] || null;
        }
        /**
         * @param {?} predicate
         * @return {?}
         */

      }, {
        key: "queryAll",
        value: function queryAll(predicate) {
          /** @type {?} */
          var matches = [];

          _queryAllR3(this, predicate, matches, true);

          return matches;
        }
        /**
         * @param {?} predicate
         * @return {?}
         */

      }, {
        key: "queryAllNodes",
        value: function queryAllNodes(predicate) {
          /** @type {?} */
          var matches = [];

          _queryAllR3(this, predicate, matches, false);

          return matches;
        }
        /**
         * @param {?} eventName
         * @param {?} eventObj
         * @return {?}
         */

      }, {
        key: "triggerEventHandler",
        value: function triggerEventHandler(eventName, eventObj) {
          this.listeners.forEach(
          /**
          * @param {?} listener
          * @return {?}
          */
          function (listener) {
            if (listener.name === eventName) {
              listener.callback(eventObj);
            }
          });
        }
      }, {
        key: "nativeElement",
        get: function get() {
          return this.nativeNode.nodeType == Node.ELEMENT_NODE ?
          /** @type {?} */
          this.nativeNode : null;
        }
        /**
         * @return {?}
         */

      }, {
        key: "name",
        get: function get() {
          return (
            /** @type {?} */
            this.nativeElement.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"`)
         * @return {?}
         */

      }, {
        key: "properties",
        get: function get() {
          /** @type {?} */
          var context =
          /** @type {?} */
          loadLContext(this.nativeNode);
          /** @type {?} */

          var lView = context.lView;
          /** @type {?} */

          var tData = lView[TVIEW].data;
          /** @type {?} */

          var tNode =
          /** @type {?} */
          tData[context.nodeIndex];
          /** @type {?} */

          var properties = collectPropertyBindings(tNode, lView, tData);
          /** @type {?} */

          var hostProperties = collectHostPropertyBindings(tNode, lView, tData);
          /** @type {?} */

          var className = collectClassNames(this);
          /** @type {?} */

          var output = Object.assign({}, properties, hostProperties);

          if (className) {
            output['className'] = output['className'] ? output['className'] + " ".concat(className) : className;
          }

          return output;
        }
        /**
         * @return {?}
         */

      }, {
        key: "attributes",
        get: function get() {
          /** @type {?} */
          var attributes = {};
          /** @type {?} */

          var element = this.nativeElement;

          if (!element) {
            return attributes;
          }
          /** @type {?} */


          var context = loadLContext(element);
          /** @type {?} */

          var lView = context.lView;
          /** @type {?} */

          var tNodeAttrs =
          /** @type {?} */
          lView[TVIEW].data[context.nodeIndex].attrs;
          /** @type {?} */

          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) {
            /** @type {?} */
            var i = 0;

            while (i < tNodeAttrs.length) {
              /** @type {?} */
              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;
              /** @type {?} */

              var attrValue = tNodeAttrs[i + 1];
              attributes[attrName] =
              /** @type {?} */
              attrValue;
              lowercaseTNodeAttrs.push(attrName.toLowerCase());
              i += 2;
            }
          }
          /** @type {?} */


          var eAttrs = element.attributes;

          for (var _i21 = 0; _i21 < eAttrs.length; _i21++) {
            /** @type {?} */
            var attr = eAttrs[_i21]; // 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(attr.name) === -1) {
              attributes[attr.name] = attr.value;
            }
          }

          return attributes;
        }
        /**
         * @return {?}
         */

      }, {
        key: "styles",
        get: function get() {
          return _getStylingDebugInfo(this.nativeElement, false);
        }
        /**
         * @return {?}
         */

      }, {
        key: "classes",
        get: function get() {
          return _getStylingDebugInfo(this.nativeElement, true);
        }
        /**
         * @return {?}
         */

      }, {
        key: "childNodes",
        get: function get() {
          /** @type {?} */
          var childNodes = this.nativeNode.childNodes;
          /** @type {?} */

          var children = [];

          for (var i = 0; i < childNodes.length; i++) {
            /** @type {?} */
            var element = childNodes[i];
            children.push(getDebugNode__POST_R3__(element));
          }

          return children;
        }
        /**
         * @return {?}
         */

      }, {
        key: "children",
        get: function get() {
          /** @type {?} */
          var nativeElement = this.nativeElement;
          if (!nativeElement) return [];
          /** @type {?} */

          var childNodes = nativeElement.children;
          /** @type {?} */

          var children = [];

          for (var i = 0; i < childNodes.length; i++) {
            /** @type {?} */
            var element = childNodes[i];
            children.push(getDebugNode__POST_R3__(element));
          }

          return children;
        }
      }]);

      return DebugElement__POST_R3__;
    }(DebugNode__POST_R3__);
    /**
     * @param {?} element
     * @param {?} isClassBased
     * @return {?}
     */


    function _getStylingDebugInfo(element, isClassBased) {
      if (element) {
        /** @type {?} */
        var context = loadLContextFromNode(element);
        /** @type {?} */

        var _lView11 = context.lView;
        /** @type {?} */

        var tData = _lView11[TVIEW].data;
        /** @type {?} */

        var tNode =
        /** @type {?} */
        tData[context.nodeIndex];

        if (isClassBased) {
          return isStylingContext(tNode.classes) ? new NodeStylingDebug(
          /** @type {?} */
          tNode.classes, _lView11, true).values : stylingMapToStringMap(tNode.classes);
        } else {
          return isStylingContext(tNode.styles) ? new NodeStylingDebug(
          /** @type {?} */
          tNode.styles, _lView11, false).values : stylingMapToStringMap(tNode.styles);
        }
      }

      return {};
    }
    /**
     * @param {?} parentElement
     * @param {?} predicate
     * @param {?} matches
     * @param {?} elementsOnly
     * @return {?}
     */


    function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
      /** @type {?} */
      var context =
      /** @type {?} */
      loadLContext(parentElement.nativeNode);
      /** @type {?} */

      var parentTNode =
      /** @type {?} */
      context.lView[TVIEW].data[context.nodeIndex];

      _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
    }
    /**
     * 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
     * @return {?}
     */


    function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
      /** @type {?} */
      var nativeNode = getNativeByTNodeOrNull(tNode, lView); // For each type of TNode, specific logic is executed.

      if (tNode.type === 3
      /* Element */
      || tNode.type === 4
      /* ElementContainer */
      ) {
          // Case 1: the TNode is an element
          // The native node has to be checked.
          _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);

          if (isComponent(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.

            /** @type {?} */
            var componentView = getComponentViewByIndex(tNode.index, lView);

            if (componentView && componentView[TVIEW].firstChild) {
              _queryNodeChildrenR3(
              /** @type {?} */
              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.

          /** @type {?} */


          var nodeOrContainer = lView[tNode.index];

          if (isLContainer(nodeOrContainer)) {
            _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
          }
        } else if (tNode.type === 0
      /* Container */
      ) {
          // Case 2: the TNode is a container
          // The native node has to be checked.

          /** @type {?} */
          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 === 1
      /* 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.

          /** @type {?} */
          var _componentView = findComponentView(
          /** @type {?} */
          lView);
          /** @type {?} */


          var componentHost =
          /** @type {?} */
          _componentView[T_HOST];
          /** @type {?} */

          var head =
          /** @type {?} */
          componentHost.projection[
          /** @type {?} */
          tNode.projection];

          if (Array.isArray(head)) {
            var _iterator44 = _createForOfIteratorHelper(head),
                _step44;

            try {
              for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {
                var _nativeNode = _step44.value;

                _addQueryMatchR3(_nativeNode, predicate, matches, elementsOnly, rootNativeNode);
              }
            } catch (err) {
              _iterator44.e(err);
            } finally {
              _iterator44.f();
            }
          } else if (head) {
            /** @type {?} */
            var nextLView =
            /** @type {?} */

            /** @type {?} */
            _componentView[PARENT];
            /** @type {?} */

            var nextTNode =
            /** @type {?} */
            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.

        /** @type {?} */
        var _nextTNode = tNode.flags & 2
        /* 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
     * @return {?}
     */


    function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
      for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
        /** @type {?} */
        var childView = lContainer[i];

        _queryNodeChildrenR3(
        /** @type {?} */
        childView[TVIEW].node, 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
     * @return {?}
     */


    function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
      if (rootNativeNode !== nativeNode) {
        /** @type {?} */
        var debugNode = getDebugNode(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 &&
        /** @type {?} */
        predicate(debugNode) &&
        /** @type {?} */
        matches.indexOf(debugNode) === -1) {
          /** @type {?} */
          matches.push(debugNode);
        }
      }
    }
    /**
     * Match all the descendants of a DOM node against a predicate.
     *
     * @param {?} parentNode
     * @param {?} predicate the predicate to match
     * @param {?} matches the list of positive matches
     * @param {?} elementsOnly whether only elements should be searched
     * @return {?}
     */


    function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {
      /** @type {?} */
      var nodes = parentNode.childNodes;
      /** @type {?} */

      var length = nodes.length;

      for (var i = 0; i < length; i++) {
        /** @type {?} */
        var node = nodes[i];
        /** @type {?} */

        var debugNode = getDebugNode(node);

        if (debugNode) {
          if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) {
            matches.push(debugNode);
          } else if (!elementsOnly &&
          /** @type {?} */
          predicate(debugNode) &&
          /** @type {?} */
          matches.indexOf(debugNode) === -1) {
            /** @type {?} */
            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.
     * @param {?} tNode
     * @param {?} lView
     * @param {?} tData
     * @return {?}
     */


    function collectPropertyBindings(tNode, lView, tData) {
      /** @type {?} */
      var properties = {};
      /** @type {?} */

      var bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData);

      while (bindingIndex < tNode.propertyMetadataEndIndex) {
        /** @type {?} */
        var value = void 0;
        /** @type {?} */

        var propMetadata =
        /** @type {?} */
        tData[bindingIndex];

        while (!isPropMetadataString(propMetadata)) {
          // This is the first value for an interpolation. We need to build up
          // the full interpolation by combining runtime values in LView with
          // the static interstitial values stored in TData.
          value = (value || '') + renderStringify(lView[bindingIndex]) + tData[bindingIndex];
          propMetadata =
          /** @type {?} */
          tData[++bindingIndex];
        }

        value = value === undefined ? lView[bindingIndex] : value += lView[bindingIndex]; // Property metadata string has 3 parts: property name, prefix, and suffix

        /** @type {?} */

        var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);
        /** @type {?} */

        var propertyName = metadataParts[0]; // Attr bindings don't have property names and should be skipped

        if (propertyName) {
          // Wrap value with prefix and suffix (will be '' for normal bindings), if they're defined.
          // Avoid wrapping for normal bindings so that the value doesn't get cast to a string.
          properties[propertyName] = metadataParts[1] && metadataParts[2] ? metadataParts[1] + value + metadataParts[2] : value;
        }

        bindingIndex++;
      }

      return properties;
    }
    /**
     * Retrieves the first binding index that holds values for this property
     * binding.
     *
     * For normal bindings (e.g. `[id]="id"`), the binding index is the
     * same as the metadata index. For interpolations (e.g. `id="{{id}}-{{name}}"`),
     * there can be multiple binding values, so we might have to loop backwards
     * from the metadata index until we find the first one.
     *
     * @param {?} metadataIndex The index of the first property metadata string for
     * this node.
     * @param {?} tData The data array for the current TView
     * @return {?} The first binding index for this binding
     */


    function getFirstBindingIndex(metadataIndex, tData) {
      /** @type {?} */
      var currentBindingIndex = metadataIndex - 1; // If the slot before the metadata holds a string, we know that this
      // metadata applies to an interpolation with at least 2 bindings, and
      // we need to search further to access the first binding value.

      /** @type {?} */

      var currentValue = tData[currentBindingIndex]; // We need to iterate until we hit either a:
      // - TNode (it is an element slot marking the end of `consts` section), OR a
      // - metadata string (slot is attribute metadata or a previous node's property metadata)

      while (typeof currentValue === 'string' && !isPropMetadataString(currentValue)) {
        currentValue = tData[--currentBindingIndex];
      }

      return currentBindingIndex + 1;
    }
    /**
     * @param {?} tNode
     * @param {?} lView
     * @param {?} tData
     * @return {?}
     */


    function collectHostPropertyBindings(tNode, lView, tData) {
      /** @type {?} */
      var properties = {}; // Host binding values for a node are stored after directives on that node

      /** @type {?} */

      var hostPropIndex = tNode.directiveEnd;
      /** @type {?} */

      var propMetadata =
      /** @type {?} */
      tData[hostPropIndex]; // When we reach a value in TView.data that is not a string, we know we've
      // hit the next node's providers and directives and should stop copying data.

      while (typeof propMetadata === 'string') {
        /** @type {?} */
        var propertyName = propMetadata.split(INTERPOLATION_DELIMITER)[0];
        properties[propertyName] = lView[hostPropIndex];
        propMetadata = tData[++hostPropIndex];
      }

      return properties;
    }
    /**
     * @param {?} debugElement
     * @return {?}
     */


    function collectClassNames(debugElement) {
      /** @type {?} */
      var classes = debugElement.classes;
      /** @type {?} */

      var output = '';

      for (var _i22 = 0, _Object$keys4 = Object.keys(classes); _i22 < _Object$keys4.length; _i22++) {
        var className = _Object$keys4[_i22];

        if (classes[className]) {
          output = output ? output + " ".concat(className) : className;
        }
      }

      return output;
    } // Need to keep the nodes in a global Map so that multiple angular apps are supported.

    /** @type {?} */


    var _nativeNodeToDebugNode = new Map();
    /**
     * @param {?} nativeNode
     * @return {?}
     */


    function getDebugNode__PRE_R3__(nativeNode) {
      return _nativeNodeToDebugNode.get(nativeNode) || null;
    }
    /** @type {?} */


    var NG_DEBUG_PROPERTY = '__ng_debug__';
    /**
     * @param {?} nativeNode
     * @return {?}
     */

    function getDebugNode__POST_R3__(nativeNode) {
      if (nativeNode instanceof Node) {
        if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {
          /** @type {?} */
          nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement__POST_R3__(
          /** @type {?} */
          nativeNode) : new DebugNode__POST_R3__(nativeNode);
        }

        return (
          /** @type {?} */
          nativeNode[NG_DEBUG_PROPERTY]
        );
      }

      return null;
    }
    /**
     * \@publicApi
     * @type {?}
     */


    var getDebugNode = getDebugNode__PRE_R3__;
    /**
     * @return {?}
     */

    function getAllDebugNodes() {
      return Array.from(_nativeNodeToDebugNode.values());
    }
    /**
     * @param {?} node
     * @return {?}
     */


    function indexDebugNode(node) {
      _nativeNodeToDebugNode.set(node.nativeNode, node);
    }
    /**
     * @param {?} node
     * @return {?}
     */


    function removeDebugNodeFromIndex(node) {
      _nativeNodeToDebugNode["delete"](node.nativeNode);
    }
    /**
     * A boolean-valued function over a value, possibly including context information
     * regarding that value's position in an array.
     *
     * \@publicApi
     * @record
     * @template T
     */


    function Predicate() {}
    /**
     * \@publicApi
     * @type {?}
     */


    var DebugNode$1 = DebugNode__PRE_R3__;
    /**
     * \@publicApi
     * @type {?}
     */

    var DebugElement = DebugElement__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    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
     * @type {?}
     */

    var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @return {?}
     */

    function _iterableDiffersFactory() {
      return defaultIterableDiffers;
    }
    /**
     * @return {?}
     */


    function _keyValueDiffersFactory() {
      return defaultKeyValueDiffers;
    }
    /**
     * @param {?=} locale
     * @return {?}
     */


    function _localeFactory(locale) {
      if (locale) {
        if (ivyEnabled) {
          setLocaleId(locale);
        }

        return locale;
      } // Use `goog.LOCALE` as default value for `LOCALE_ID` token for Closure Compiler.
      // Note: default `goog.LOCALE` value is `en`, when Angular used `en-US`. In order to preserve
      // backwards compatibility, we use Angular default value over Closure Compiler's one.


      if (ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
        if (ivyEnabled) {
          setLocaleId(goog.LOCALE);
        }

        return goog.LOCALE;
      }

      return DEFAULT_LOCALE_ID;
    }
    /**
     * A built-in [dependency injection token](guide/glossary#di-token)
     * that is used to configure the root injector for bootstrapping.
     * @type {?}
     */


    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()]]
    }];
    /**
     * 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.
     * @return {?}
     */

    function zoneSchedulerFactory(ngZone) {
      /** @type {?} */
      var queue = [];
      ngZone.onStable.subscribe(
      /**
      * @return {?}
      */
      function () {
        while (queue.length) {
          /** @type {?} */
          queue.pop()();
        }
      });
      return (
        /**
        * @param {?} fn
        * @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...

    /**
     * @param {?} appRef
     */
    function ApplicationModule(appRef) {
      _classCallCheck(this, ApplicationModule);
    };

    ApplicationModule.decorators = [{
      type: NgModule,
      args: [{
        providers: APPLICATION_MODULE_PROVIDERS
      }]
    }];
    /** @nocollapse */

    ApplicationModule.ctorParameters = function () {
      return [{
        type: ApplicationRef
      }];
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} flags
     * @param {?} matchedQueriesDsl
     * @param {?} ngContentIndex
     * @param {?} childCount
     * @param {?=} handleEvent
     * @param {?=} templateFactory
     * @return {?}
     */


    function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {
      flags |= 1
      /* TypeElement */
      ;

      var _splitMatchedQueriesD2 = splitMatchedQueriesDsl(matchedQueriesDsl),
          matchedQueries = _splitMatchedQueriesD2.matchedQueries,
          references = _splitMatchedQueriesD2.references,
          matchedQueryIds = _splitMatchedQueriesD2.matchedQueryIds;
      /** @type {?} */


      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
      };
    }
    /**
     * @param {?} checkIndex
     * @param {?} flags
     * @param {?} matchedQueriesDsl
     * @param {?} ngContentIndex
     * @param {?} childCount
     * @param {?} namespaceAndName
     * @param {?=} fixedAttrs
     * @param {?=} bindings
     * @param {?=} outputs
     * @param {?=} handleEvent
     * @param {?=} componentView
     * @param {?=} componentRendererType
     * @return {?}
     */


    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;
      /** @type {?} */


      var ns =
      /** @type {?} */
      null;
      /** @type {?} */

      var name =
      /** @type {?} */
      null;

      if (namespaceAndName) {
        var _splitNamespace5 = splitNamespace(namespaceAndName);

        var _splitNamespace6 = _slicedToArray(_splitNamespace5, 2);

        ns = _splitNamespace6[0];
        name = _splitNamespace6[1];
      }

      bindings = bindings || [];
      /** @type {?} */

      var bindingDefs = new Array(bindings.length);

      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 _splitNamespace7 = splitNamespace(_namespaceAndName),
            _splitNamespace8 = _slicedToArray(_splitNamespace7, 2),
            _ns = _splitNamespace8[0],
            _name2 = _splitNamespace8[1];
        /** @type {?} */


        var securityContext =
        /** @type {?} */
        undefined;
        /** @type {?} */

        var suffix =
        /** @type {?} */
        undefined;

        switch (bindingFlags & 15
        /* Types */
        ) {
          case 4
          /* TypeElementStyle */
          :
            suffix =
            /** @type {?} */
            suffixOrSecurityContext;
            break;

          case 1
          /* TypeElementAttribute */
          :
          case 8
          /* TypeProperty */
          :
            securityContext =
            /** @type {?} */
            suffixOrSecurityContext;
            break;
        }

        bindingDefs[i] = {
          flags: bindingFlags,
          ns: _ns,
          name: _name2,
          nonMinifiedName: _name2,
          securityContext: securityContext,
          suffix: suffix
        };
      }

      outputs = outputs || [];
      /** @type {?} */

      var outputDefs = new Array(outputs.length);

      for (var _i23 = 0; _i23 < outputs.length; _i23++) {
        var _outputs$_i = _slicedToArray(outputs[_i23], 2),
            target = _outputs$_i[0],
            eventName = _outputs$_i[1];

        outputDefs[_i23] = {
          type: 0
          /* ElementOutput */
          ,
          target:
          /** @type {?} */
          target,
          eventName: eventName,
          propName: null
        };
      }

      fixedAttrs = fixedAttrs || [];
      /** @type {?} */

      var attrs =
      /** @type {?} */
      fixedAttrs.map(
      /**
      * @param {?} __0
      * @return {?}
      */
      function (_ref62) {
        var _ref63 = _slicedToArray(_ref62, 2),
            namespaceAndName = _ref63[0],
            value = _ref63[1];

        var _splitNamespace9 = splitNamespace(namespaceAndName),
            _splitNamespace10 = _slicedToArray(_splitNamespace9, 2),
            ns = _splitNamespace10[0],
            name = _splitNamespace10[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
      };
    }
    /**
     * @param {?} view
     * @param {?} renderHost
     * @param {?} def
     * @return {?}
     */


    function createElement(view, renderHost, def) {
      /** @type {?} */
      var elDef =
      /** @type {?} */
      def.element;
      /** @type {?} */

      var rootSelectorOrNode = view.root.selectorOrNode;
      /** @type {?} */

      var renderer = view.renderer;
      /** @type {?} */

      var el;

      if (view.parent || !rootSelectorOrNode) {
        if (elDef.name) {
          el = renderer.createElement(elDef.name, elDef.ns);
        } else {
          el = renderer.createComment('');
        }
        /** @type {?} */


        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

        /** @type {?} */
        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;
    }
    /**
     * @param {?} view
     * @param {?} compView
     * @param {?} def
     * @param {?} el
     * @return {?}
     */


    function listenToElementOutputs(view, compView, def, el) {
      for (var i = 0; i < def.outputs.length; i++) {
        /** @type {?} */
        var output = def.outputs[i];
        /** @type {?} */

        var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));
        /** @type {?} */

        var listenTarget = output.target;
        /** @type {?} */

        var listenerView = view;

        if (output.target === 'component') {
          listenTarget = null;
          listenerView = compView;
        }
        /** @type {?} */


        var disposable =
        /** @type {?} */
        listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);

        /** @type {?} */
        view.disposables[def.outputIndex + i] = disposable;
      }
    }
    /**
     * @param {?} view
     * @param {?} index
     * @param {?} eventName
     * @return {?}
     */


    function renderEventHandlerClosure(view, index, eventName) {
      return (
        /**
        * @param {?} event
        * @return {?}
        */
        function (event) {
          return dispatchEvent(view, index, eventName, event);
        }
      );
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} v0
     * @param {?} v1
     * @param {?} v2
     * @param {?} v3
     * @param {?} v4
     * @param {?} v5
     * @param {?} v6
     * @param {?} v7
     * @param {?} v8
     * @param {?} v9
     * @return {?}
     */


    function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      var bindLen = def.bindings.length;
      /** @type {?} */

      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;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} values
     * @return {?}
     */


    function checkAndUpdateElementDynamic(view, def, values) {
      /** @type {?} */
      var changed = false;

      for (var i = 0; i < values.length; i++) {
        if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true;
      }

      return changed;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} bindingIdx
     * @param {?} value
     * @return {?}
     */


    function checkAndUpdateElementValue(view, def, bindingIdx, value) {
      if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {
        return false;
      }
      /** @type {?} */


      var binding = def.bindings[bindingIdx];
      /** @type {?} */

      var elData = asElementData(view, def.nodeIndex);
      /** @type {?} */

      var renderNode = elData.renderElement;
      /** @type {?} */

      var name =
      /** @type {?} */
      binding.name;

      switch (binding.flags & 15
      /* Types */
      ) {
        case 1
        /* TypeElementAttribute */
        :
          setElementAttribute(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 */
        :
          /** @type {?} */
          var bindView = def.flags & 33554432
          /* ComponentView */
          && binding.flags & 32
          /* SyntheticHostProperty */
          ? elData.componentView : view;
          setElementProperty(bindView, binding, renderNode, name, value);
          break;
      }

      return true;
    }
    /**
     * @param {?} view
     * @param {?} binding
     * @param {?} renderNode
     * @param {?} ns
     * @param {?} name
     * @param {?} value
     * @return {?}
     */


    function setElementAttribute(view, binding, renderNode, ns, name, value) {
      /** @type {?} */
      var securityContext = binding.securityContext;
      /** @type {?} */

      var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
      renderValue = renderValue != null ? renderValue.toString() : null;
      /** @type {?} */

      var renderer = view.renderer;

      if (value != null) {
        renderer.setAttribute(renderNode, name, renderValue, ns);
      } else {
        renderer.removeAttribute(renderNode, name, ns);
      }
    }
    /**
     * @param {?} view
     * @param {?} renderNode
     * @param {?} name
     * @param {?} value
     * @return {?}
     */


    function setElementClass(view, renderNode, name, value) {
      /** @type {?} */
      var renderer = view.renderer;

      if (value) {
        renderer.addClass(renderNode, name);
      } else {
        renderer.removeClass(renderNode, name);
      }
    }
    /**
     * @param {?} view
     * @param {?} binding
     * @param {?} renderNode
     * @param {?} name
     * @param {?} value
     * @return {?}
     */


    function setElementStyle(view, binding, renderNode, name, value) {
      /** @type {?} */
      var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE,
      /** @type {?} */
      value);

      if (renderValue != null) {
        renderValue = renderValue.toString();
        /** @type {?} */

        var unit = binding.suffix;

        if (unit != null) {
          renderValue = renderValue + unit;
        }
      } else {
        renderValue = null;
      }
      /** @type {?} */


      var renderer = view.renderer;

      if (renderValue != null) {
        renderer.setStyle(renderNode, name, renderValue);
      } else {
        renderer.removeStyle(renderNode, name);
      }
    }
    /**
     * @param {?} view
     * @param {?} binding
     * @param {?} renderNode
     * @param {?} name
     * @param {?} value
     * @return {?}
     */


    function setElementProperty(view, binding, renderNode, name, value) {
      /** @type {?} */
      var securityContext = binding.securityContext;
      /** @type {?} */

      var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;
      view.renderer.setProperty(renderNode, name, renderValue);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} flags
     * @param {?} id
     * @param {?} bindings
     * @return {?}
     */


    function queryDef(flags, id, bindings) {
      /** @type {?} */
      var bindingDefs = [];

      for (var propName in bindings) {
        /** @type {?} */
        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
      };
    }
    /**
     * @return {?}
     */


    function createQuery() {
      return new QueryList();
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function dirtyParentQueries(view) {
      /** @type {?} */
      var queryIds = view.def.nodeMatchedQueries;

      while (view.parent && isEmbeddedView(view)) {
        /** @type {?} */
        var tplDef =
        /** @type {?} */
        view.parentNodeDef;
        view = view.parent; // content queries

        /** @type {?} */

        var end = tplDef.nodeIndex + tplDef.childCount;

        for (var i = 0; i <= end; i++) {
          /** @type {?} */
          var nodeDef = view.def.nodes[i];

          if (nodeDef.flags & 67108864
          /* TypeContentQuery */
          && nodeDef.flags & 536870912
          /* DynamicQuery */
          && (
          /** @type {?} */
          nodeDef.query.filterId & queryIds) ===
          /** @type {?} */
          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 _i24 = 0; _i24 < view.def.nodes.length; _i24++) {
            /** @type {?} */
            var _nodeDef = view.def.nodes[_i24];

            if (_nodeDef.flags & 134217728
            /* TypeViewQuery */
            && _nodeDef.flags & 536870912
            /* DynamicQuery */
            ) {
              asQueryList(view, _i24).setDirty();
            } // only visit the root nodes


            _i24 += _nodeDef.childCount;
          }
        }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @return {?}
     */


    function checkAndUpdateQuery(view, nodeDef) {
      /** @type {?} */
      var queryList = asQueryList(view, nodeDef.nodeIndex);

      if (!queryList.dirty) {
        return;
      }
      /** @type {?} */


      var directiveInstance;
      /** @type {?} */

      var newValues =
      /** @type {?} */
      undefined;

      if (nodeDef.flags & 67108864
      /* TypeContentQuery */
      ) {
          /** @type {?} */
          var _elementDef =
          /** @type {?} */

          /** @type {?} */
          nodeDef.parent.parent;
          newValues = calcQueryValues(view, _elementDef.nodeIndex, _elementDef.nodeIndex + _elementDef.childCount,
          /** @type {?} */
          nodeDef.query, []);
          directiveInstance = asProviderData(view,
          /** @type {?} */
          nodeDef.parent.nodeIndex).instance;
        } else if (nodeDef.flags & 134217728
      /* TypeViewQuery */
      ) {
          newValues = calcQueryValues(view, 0, view.def.nodes.length - 1,
          /** @type {?} */
          nodeDef.query, []);
          directiveInstance = view.component;
        }

      queryList.reset(newValues);
      /** @type {?} */

      var bindings =
      /** @type {?} */
      nodeDef.query.bindings;
      /** @type {?} */

      var notify = false;

      for (var i = 0; i < bindings.length; i++) {
        /** @type {?} */
        var binding = bindings[i];
        /** @type {?} */

        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();
      }
    }
    /**
     * @param {?} view
     * @param {?} startIndex
     * @param {?} endIndex
     * @param {?} queryDef
     * @param {?} values
     * @return {?}
     */


    function calcQueryValues(view, startIndex, endIndex, queryDef, values) {
      for (var i = startIndex; i <= endIndex; i++) {
        /** @type {?} */
        var nodeDef = view.def.nodes[i];
        /** @type {?} */

        var valueType = nodeDef.matchedQueries[queryDef.id];

        if (valueType != null) {
          values.push(getQueryValue(view, nodeDef, valueType));
        }

        if (nodeDef.flags & 1
        /* TypeElement */
        &&
        /** @type {?} */
        nodeDef.element.template && (
        /** @type {?} */

        /** @type {?} */
        nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) === queryDef.filterId) {
          /** @type {?} */
          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 */
          ) {
              /** @type {?} */
              var embeddedViews =
              /** @type {?} */
              elementData.viewContainer._embeddedViews;

              for (var k = 0; k < embeddedViews.length; k++) {
                /** @type {?} */
                var embeddedView = embeddedViews[k];
                /** @type {?} */

                var dvc = declaredViewContainer(embeddedView);

                if (dvc && dvc === elementData) {
                  calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);
                }
              }
            }
          /** @type {?} */


          var projectedViews = elementData.template._projectedViews;

          if (projectedViews) {
            for (var _k = 0; _k < projectedViews.length; _k++) {
              /** @type {?} */
              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;
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} queryValueType
     * @return {?}
     */


    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;
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} ngContentIndex
     * @param {?} index
     * @return {?}
     */


    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
        }
      };
    }
    /**
     * @param {?} view
     * @param {?} renderHost
     * @param {?} def
     * @return {?}
     */


    function appendNgContent(view, renderHost, def) {
      /** @type {?} */
      var parentEl = getParentRenderElement(view, renderHost, def);

      if (!parentEl) {
        // Nothing to do if there is no parent element.
        return;
      }
      /** @type {?} */


      var ngContentIndex =
      /** @type {?} */
      def.ngContent.index;
      visitProjectedRenderNodes(view, ngContentIndex, 1
      /* AppendChild */
      , parentEl, null, undefined);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} checkIndex
     * @param {?} argCount
     * @return {?}
     */


    function purePipeDef(checkIndex, argCount) {
      // argCount + 1 to include the pipe as first arg
      return _pureExpressionDef(128
      /* TypePurePipe */
      , checkIndex, new Array(argCount + 1));
    }
    /**
     * @param {?} checkIndex
     * @param {?} argCount
     * @return {?}
     */


    function pureArrayDef(checkIndex, argCount) {
      return _pureExpressionDef(32
      /* TypePureArray */
      , checkIndex, new Array(argCount));
    }
    /**
     * @param {?} checkIndex
     * @param {?} propToIndex
     * @return {?}
     */


    function pureObjectDef(checkIndex, propToIndex) {
      /** @type {?} */
      var keys = Object.keys(propToIndex);
      /** @type {?} */

      var nbKeys = keys.length;
      /** @type {?} */

      var propertyNames = new Array(nbKeys);

      for (var i = 0; i < nbKeys; i++) {
        /** @type {?} */
        var key = keys[i];
        /** @type {?} */

        var index = propToIndex[key];
        propertyNames[index] = key;
      }

      return _pureExpressionDef(64
      /* TypePureObject */
      , checkIndex, propertyNames);
    }
    /**
     * @param {?} flags
     * @param {?} checkIndex
     * @param {?} propertyNames
     * @return {?}
     */


    function _pureExpressionDef(flags, checkIndex, propertyNames) {
      /** @type {?} */
      var bindings = new Array(propertyNames.length);

      for (var i = 0; i < propertyNames.length; i++) {
        /** @type {?} */
        var prop = propertyNames[i];
        bindings[i] = {
          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
      };
    }
    /**
     * @param {?} view
     * @param {?} def
     * @return {?}
     */


    function createPureExpression(view, def) {
      return {
        value: undefined
      };
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} v0
     * @param {?} v1
     * @param {?} v2
     * @param {?} v3
     * @param {?} v4
     * @param {?} v5
     * @param {?} v6
     * @param {?} v7
     * @param {?} v8
     * @param {?} v9
     * @return {?}
     */


    function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      var bindings = def.bindings;
      /** @type {?} */

      var changed = false;
      /** @type {?} */

      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) {
        /** @type {?} */
        var data = asPureExpressionData(view, def.nodeIndex);
        /** @type {?} */

        var value;

        switch (def.flags & 201347067
        /* Types */
        ) {
          case 32
          /* TypePureArray */
          :
            value = new Array(bindings.length);
            if (bindLen > 0) value[0] = v0;
            if (bindLen > 1) value[1] = v1;
            if (bindLen > 2) value[2] = v2;
            if (bindLen > 3) value[3] = v3;
            if (bindLen > 4) value[4] = v4;
            if (bindLen > 5) value[5] = v5;
            if (bindLen > 6) value[6] = v6;
            if (bindLen > 7) value[7] = v7;
            if (bindLen > 8) value[8] = v8;
            if (bindLen > 9) value[9] = v9;
            break;

          case 64
          /* TypePureObject */
          :
            value = {};
            if (bindLen > 0) value[
            /** @type {?} */
            bindings[0].name] = v0;
            if (bindLen > 1) value[
            /** @type {?} */
            bindings[1].name] = v1;
            if (bindLen > 2) value[
            /** @type {?} */
            bindings[2].name] = v2;
            if (bindLen > 3) value[
            /** @type {?} */
            bindings[3].name] = v3;
            if (bindLen > 4) value[
            /** @type {?} */
            bindings[4].name] = v4;
            if (bindLen > 5) value[
            /** @type {?} */
            bindings[5].name] = v5;
            if (bindLen > 6) value[
            /** @type {?} */
            bindings[6].name] = v6;
            if (bindLen > 7) value[
            /** @type {?} */
            bindings[7].name] = v7;
            if (bindLen > 8) value[
            /** @type {?} */
            bindings[8].name] = v8;
            if (bindLen > 9) value[
            /** @type {?} */
            bindings[9].name] = v9;
            break;

          case 128
          /* TypePurePipe */
          :
            /** @type {?} */
            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;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} values
     * @return {?}
     */


    function checkAndUpdatePureExpressionDynamic(view, def, values) {
      /** @type {?} */
      var bindings = def.bindings;
      /** @type {?} */

      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) {
        /** @type {?} */
        var data = asPureExpressionData(view, def.nodeIndex);
        /** @type {?} */

        var value;

        switch (def.flags & 201347067
        /* Types */
        ) {
          case 32
          /* TypePureArray */
          :
            value = values;
            break;

          case 64
          /* TypePureObject */
          :
            value = {};

            for (var _i25 = 0; _i25 < values.length; _i25++) {
              value[
              /** @type {?} */
              bindings[_i25].name] = values[_i25];
            }

            break;

          case 128
          /* TypePurePipe */
          :
            /** @type {?} */
            var pipe = values[0];
            /** @type {?} */

            var params = values.slice(1);
            value =
            /** @type {?} */
            pipe.transform.apply(pipe, _toConsumableArray(params));
            break;
        }

        data.value = value;
      }

      return changed;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} checkIndex
     * @param {?} ngContentIndex
     * @param {?} staticText
     * @return {?}
     */


    function textDef(checkIndex, ngContentIndex, staticText) {
      /** @type {?} */
      var bindings = new Array(staticText.length - 1);

      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
      };
    }
    /**
     * @param {?} view
     * @param {?} renderHost
     * @param {?} def
     * @return {?}
     */


    function createText(view, renderHost, def) {
      /** @type {?} */
      var renderNode;
      /** @type {?} */

      var renderer = view.renderer;
      renderNode = renderer.createText(
      /** @type {?} */
      def.text.prefix);
      /** @type {?} */

      var parentEl = getParentRenderElement(view, renderHost, def);

      if (parentEl) {
        renderer.appendChild(parentEl, renderNode);
      }

      return {
        renderText: renderNode
      };
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} v0
     * @param {?} v1
     * @param {?} v2
     * @param {?} v3
     * @param {?} v4
     * @param {?} v5
     * @param {?} v6
     * @param {?} v7
     * @param {?} v8
     * @param {?} v9
     * @return {?}
     */


    function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      var changed = false;
      /** @type {?} */

      var bindings = def.bindings;
      /** @type {?} */

      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) {
        /** @type {?} */
        var value =
        /** @type {?} */
        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]);
        /** @type {?} */

        var _renderNode = asTextData(view, def.nodeIndex).renderText;
        view.renderer.setValue(_renderNode, value);
      }

      return changed;
    }
    /**
     * @param {?} view
     * @param {?} def
     * @param {?} values
     * @return {?}
     */


    function checkAndUpdateTextDynamic(view, def, values) {
      /** @type {?} */
      var bindings = def.bindings;
      /** @type {?} */

      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) {
        /** @type {?} */
        var value = '';

        for (var _i26 = 0; _i26 < values.length; _i26++) {
          value = value + _addInterpolationPart(values[_i26], bindings[_i26]);
        }

        value =
        /** @type {?} */
        def.text.prefix + value;
        /** @type {?} */

        var _renderNode2 = asTextData(view, def.nodeIndex).renderText;
        view.renderer.setValue(_renderNode2, value);
      }

      return changed;
    }
    /**
     * @param {?} value
     * @param {?} binding
     * @return {?}
     */


    function _addInterpolationPart(value, binding) {
      /** @type {?} */
      var valueStr = value != null ? value.toString() : '';
      return valueStr + binding.suffix;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} flags
     * @param {?} nodes
     * @param {?=} updateDirectives
     * @param {?=} updateRenderer
     * @return {?}
     */


    function viewDef(flags, nodes, updateDirectives, updateRenderer) {
      // clone nodes and set auto calculated values

      /** @type {?} */
      var viewBindingCount = 0;
      /** @type {?} */

      var viewDisposableCount = 0;
      /** @type {?} */

      var viewNodeFlags = 0;
      /** @type {?} */

      var viewRootNodeFlags = 0;
      /** @type {?} */

      var viewMatchedQueries = 0;
      /** @type {?} */

      var currentParent = null;
      /** @type {?} */

      var currentRenderParent = null;
      /** @type {?} */

      var currentElementHasPublicProviders = false;
      /** @type {?} */

      var currentElementHasPrivateProviders = false;
      /** @type {?} */

      var lastRenderRootNode = null;

      for (var i = 0; i < nodes.length; i++) {
        /** @type {?} */
        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) {
          /** @type {?} */
          var elDef = node.element;
          elDef.publicProviders = currentParent ?
          /** @type {?} */
          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...

              /** @type {?} */

              /** @type {?} */
              currentParent.element.publicProviders = Object.create(
              /** @type {?} */

              /** @type {?} */
              currentParent.element.publicProviders);

              /** @type {?} */

              /** @type {?} */
              currentParent.element.allProviders =
              /** @type {?} */

              /** @type {?} */
              currentParent.element.publicProviders;
            }
            /** @type {?} */


            var isPrivateService = (node.flags & 8192
            /* PrivateProvider */
            ) !== 0;
            /** @type {?} */

            var _isComponent3 = (node.flags & 32768
            /* Component */
            ) !== 0;

            if (!isPrivateService || _isComponent3) {
              /** @type {?} */

              /** @type {?} */

              /** @type {?} */
              currentParent.element.publicProviders[tokenKey(
              /** @type {?} */
              node.provider.token)] = node;
            } else {
              if (!currentElementHasPrivateProviders) {
                currentElementHasPrivateProviders = true; // Use prototypical inheritance to not get O(n^2) complexity...

                /** @type {?} */

                /** @type {?} */
                currentParent.element.allProviders = Object.create(
                /** @type {?} */

                /** @type {?} */
                currentParent.element.publicProviders);
              }

              /** @type {?} */

              /** @type {?} */

              /** @type {?} */
              currentParent.element.allProviders[tokenKey(
              /** @type {?} */
              node.provider.token)] = node;
            }

            if (_isComponent3) {
              /** @type {?} */

              /** @type {?} */
              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) {
            /** @type {?} */
            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;
            }
          }
        }
      }
      /** @type {?} */


      var handleEvent =
      /**
      * @param {?} view
      * @param {?} nodeIndex
      * @param {?} eventName
      * @param {?} event
      * @return {?}
      */
      function handleEvent(view, nodeIndex, eventName, event) {
        return (
          /** @type {?} */

          /** @type {?} */
          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
      };
    }
    /**
     * @param {?} node
     * @return {?}
     */


    function isNgContainer(node) {
      return (node.flags & 1
      /* TypeElement */
      ) !== 0 &&
      /** @type {?} */
      node.element.name === null;
    }
    /**
     * @param {?} parent
     * @param {?} node
     * @param {?} nodeCount
     * @return {?}
     */


    function validateNode(parent, node, nodeCount) {
      /** @type {?} */
      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 */
      ) {
          /** @type {?} */
          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) {
        /** @type {?} */
        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, "!"));
        }
      }
    }
    /**
     * @param {?} parent
     * @param {?} anchorDef
     * @param {?} viewDef
     * @param {?=} context
     * @return {?}
     */


    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.

      /** @type {?} */
      var view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);
      initView(view, parent.component, context);
      createViewNodes(view);
      return view;
    }
    /**
     * @param {?} root
     * @param {?} def
     * @param {?=} context
     * @return {?}
     */


    function createRootView(root, def, context) {
      /** @type {?} */
      var view = createView(root, root.renderer, null, null, def);
      initView(view, context, context);
      createViewNodes(view);
      return view;
    }
    /**
     * @param {?} parentView
     * @param {?} nodeDef
     * @param {?} viewDef
     * @param {?} hostElement
     * @return {?}
     */


    function createComponentView(parentView, nodeDef, viewDef, hostElement) {
      /** @type {?} */
      var rendererType =
      /** @type {?} */
      nodeDef.element.componentRendererType;
      /** @type {?} */

      var compRenderer;

      if (!rendererType) {
        compRenderer = parentView.root.renderer;
      } else {
        compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);
      }

      return createView(parentView.root, compRenderer, parentView,
      /** @type {?} */
      nodeDef.element.componentProvider, viewDef);
    }
    /**
     * @param {?} root
     * @param {?} renderer
     * @param {?} parent
     * @param {?} parentNodeDef
     * @param {?} def
     * @return {?}
     */


    function createView(root, renderer, parent, parentNodeDef, def) {
      /** @type {?} */
      var nodes = new Array(def.nodes.length);
      /** @type {?} */

      var disposables = def.outputCount ? new Array(def.outputCount) : null;
      /** @type {?} */

      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;
    }
    /**
     * @param {?} view
     * @param {?} component
     * @param {?} context
     * @return {?}
     */


    function initView(view, component, context) {
      view.component = component;
      view.context = context;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function createViewNodes(view) {
      /** @type {?} */
      var renderHost;

      if (isComponentView(view)) {
        /** @type {?} */
        var hostDef = view.parentNodeDef;
        renderHost = asElementData(
        /** @type {?} */
        view.parent,
        /** @type {?} */

        /** @type {?} */
        hostDef.parent.nodeIndex).renderElement;
      }
      /** @type {?} */


      var def = view.def;
      /** @type {?} */

      var nodes = view.nodes;

      for (var i = 0; i < def.nodes.length; i++) {
        /** @type {?} */
        var nodeDef = def.nodes[i];
        Services.setCurrentNode(view, i);
        /** @type {?} */

        var nodeData = void 0;

        switch (nodeDef.flags & 201347067
        /* Types */
        ) {
          case 1
          /* TypeElement */
          :
            /** @type {?} */
            var el =
            /** @type {?} */
            createElement(view, renderHost, nodeDef);
            /** @type {?} */

            var componentView =
            /** @type {?} */
            undefined;

            if (nodeDef.flags & 33554432
            /* ComponentView */
            ) {
                /** @type {?} */
                var compViewDef = resolveDefinition(
                /** @type {?} */

                /** @type {?} */
                nodeDef.element.componentView);
                componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
              }

            listenToElementOutputs(view, componentView, nodeDef, el);
            nodeData =
            /** @type {?} */
            {
              renderElement: el,
              componentView: componentView,
              viewContainer: null,
              template:
              /** @type {?} */
              nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined
            };

            if (nodeDef.flags & 16777216
            /* EmbeddedViews */
            ) {
                nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);
              }

            break;

          case 2
          /* TypeText */
          :
            nodeData =
            /** @type {?} */
            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 */
              )) {
                /** @type {?} */
                var instance = createProviderInstance(view, nodeDef);
                nodeData =
                /** @type {?} */
                {
                  instance: instance
                };
              }

              break;
            }

          case 16
          /* TypePipe */
          :
            {
              /** @type {?} */
              var _instance = createPipeInstance(view, nodeDef);

              nodeData =
              /** @type {?} */
              {
                instance: _instance
              };
              break;
            }

          case 16384
          /* TypeDirective */
          :
            {
              nodeData = nodes[i];

              if (!nodeData) {
                /** @type {?} */
                var _instance2 = createDirectiveInstance(view, nodeDef);

                nodeData =
                /** @type {?} */
                {
                  instance: _instance2
                };
              }

              if (nodeDef.flags & 32768
              /* Component */
              ) {
                  /** @type {?} */
                  var compView = asElementData(view,
                  /** @type {?} */
                  nodeDef.parent.nodeIndex).componentView;
                  initView(compView, nodeData.instance, nodeData.instance);
                }

              break;
            }

          case 32
          /* TypePureArray */
          :
          case 64
          /* TypePureObject */
          :
          case 128
          /* TypePurePipe */
          :
            nodeData =
            /** @type {?} */
            createPureExpression(view, nodeDef);
            break;

          case 67108864
          /* TypeContentQuery */
          :
          case 134217728
          /* TypeViewQuery */
          :
            nodeData =
            /** @type {?} */
            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 */
      );
    }
    /**
     * @param {?} view
     * @return {?}
     */


    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 */
      );
    }
    /**
     * @param {?} view
     * @return {?}
     */


    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 */
      );
      /** @type {?} */

      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 */
      );
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} argStyle
     * @param {?=} v0
     * @param {?=} v1
     * @param {?=} v2
     * @param {?=} v3
     * @param {?=} v4
     * @param {?=} v5
     * @param {?=} v6
     * @param {?=} v7
     * @param {?=} v8
     * @param {?=} v9
     * @return {?}
     */


    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);
      }
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function markProjectedViewsForCheck(view) {
      /** @type {?} */
      var def = view.def;

      if (!(def.nodeFlags & 4
      /* ProjectedTemplate */
      )) {
        return;
      }

      for (var i = 0; i < def.nodes.length; i++) {
        /** @type {?} */
        var nodeDef = def.nodes[i];

        if (nodeDef.flags & 4
        /* ProjectedTemplate */
        ) {
            /** @type {?} */
            var projectedViews = asElementData(view, i).template._projectedViews;

            if (projectedViews) {
              for (var _i27 = 0; _i27 < projectedViews.length; _i27++) {
                /** @type {?} */
                var projectedView = projectedViews[_i27];
                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;
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?=} v0
     * @param {?=} v1
     * @param {?=} v2
     * @param {?=} v3
     * @param {?=} v4
     * @param {?=} v5
     * @param {?=} v6
     * @param {?=} v7
     * @param {?=} v8
     * @param {?=} v9
     * @return {?}
     */


    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';
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} values
     * @return {?}
     */


    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';
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} argStyle
     * @param {?=} v0
     * @param {?=} v1
     * @param {?=} v2
     * @param {?=} v3
     * @param {?=} v4
     * @param {?=} v5
     * @param {?=} v6
     * @param {?=} v7
     * @param {?=} v8
     * @param {?=} v9
     * @return {?}
     */


    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;
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} v0
     * @param {?} v1
     * @param {?} v2
     * @param {?} v3
     * @param {?} v4
     * @param {?} v5
     * @param {?} v6
     * @param {?} v7
     * @param {?} v8
     * @param {?} v9
     * @return {?}
     */


    function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      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);
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} values
     * @return {?}
     */


    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}
     * @param {?} view
     * @param {?} nodeDef
     * @return {?}
     */


    function checkNoChangesQuery(view, nodeDef) {
      /** @type {?} */
      var queryList = asQueryList(view, nodeDef.nodeIndex);

      if (queryList.dirty) {
        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), "Query ".concat(
        /** @type {?} */
        nodeDef.query.id, " not dirty"), "Query ".concat(
        /** @type {?} */
        nodeDef.query.id, " dirty"), (view.state & 1
        /* BeforeFirstCheck */
        ) !== 0);
      }
    }
    /**
     * @param {?} view
     * @return {?}
     */


    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 */
      ;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function destroyViewNodes(view) {
      /** @type {?} */
      var len = view.def.nodes.length;

      for (var i = 0; i < len; i++) {
        /** @type {?} */
        var def = view.def.nodes[i];

        if (def.flags & 1
        /* TypeElement */
        ) {
            /** @type {?} */
            view.renderer.destroyNode(asElementData(view, i).renderElement);
          } else if (def.flags & 2
        /* TypeText */
        ) {
            /** @type {?} */
            view.renderer.destroyNode(asTextData(view, i).renderText);
          } else if (def.flags & 67108864
        /* TypeContentQuery */
        || def.flags & 134217728
        /* TypeViewQuery */
        ) {
            asQueryList(view, i).destroy();
          }
      }
    }
    /** @enum {number} */


    var ViewAction = {
      CreateViewNodes: 0,
      CheckNoChanges: 1,
      CheckNoChangesProjectedViews: 2,
      CheckAndUpdate: 3,
      CheckAndUpdateProjectedViews: 4,
      Destroy: 5
    };
    ViewAction[ViewAction.CreateViewNodes] = 'CreateViewNodes';
    ViewAction[ViewAction.CheckNoChanges] = 'CheckNoChanges';
    ViewAction[ViewAction.CheckNoChangesProjectedViews] = 'CheckNoChangesProjectedViews';
    ViewAction[ViewAction.CheckAndUpdate] = 'CheckAndUpdate';
    ViewAction[ViewAction.CheckAndUpdateProjectedViews] = 'CheckAndUpdateProjectedViews';
    ViewAction[ViewAction.Destroy] = 'Destroy';
    /**
     * @param {?} view
     * @param {?} action
     * @return {?}
     */

    function execComponentViewsAction(view, action) {
      /** @type {?} */
      var def = view.def;

      if (!(def.nodeFlags & 33554432
      /* ComponentView */
      )) {
        return;
      }

      for (var i = 0; i < def.nodes.length; i++) {
        /** @type {?} */
        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;
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} action
     * @return {?}
     */


    function execEmbeddedViewsAction(view, action) {
      /** @type {?} */
      var def = view.def;

      if (!(def.nodeFlags & 16777216
      /* EmbeddedViews */
      )) {
        return;
      }

      for (var i = 0; i < def.nodes.length; i++) {
        /** @type {?} */
        var nodeDef = def.nodes[i];

        if (nodeDef.flags & 16777216
        /* EmbeddedViews */
        ) {
            // a leaf

            /** @type {?} */
            var embeddedViews =
            /** @type {?} */
            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;
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} action
     * @return {?}
     */


    function callViewAction(view, action) {
      /** @type {?} */
      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;
      }
    }
    /**
     * @param {?} view
     * @param {?} action
     * @return {?}
     */


    function execProjectedViewsAction(view, action) {
      execEmbeddedViewsAction(view, action);
      execComponentViewsAction(view, action);
    }
    /**
     * @param {?} view
     * @param {?} queryFlags
     * @param {?} staticDynamicQueryFlag
     * @param {?} checkType
     * @return {?}
     */


    function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {
      if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {
        return;
      }
      /** @type {?} */


      var nodeCount = view.def.nodes.length;

      for (var i = 0; i < nodeCount; i++) {
        /** @type {?} */
        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;
        }
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var initialized = false;
    /**
     * @return {?}
     */

    function initServicesIfNeeded() {
      if (initialized) {
        return;
      }

      initialized = true;
      /** @type {?} */

      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;
    }
    /**
     * @return {?}
     */


    function createProdServices() {
      return {
        setCurrentNode:
        /**
        * @return {?}
        */
        function setCurrentNode() {},
        createRootView: createProdRootView,
        createEmbeddedView: createEmbeddedView,
        createComponentView: createComponentView,
        createNgModuleRef: createNgModuleRef,
        overrideProvider: NOOP,
        overrideComponentView: NOOP,
        clearOverrides: NOOP,
        checkAndUpdateView: checkAndUpdateView,
        checkNoChangesView: checkNoChangesView,
        destroyView: destroyView,
        createDebugContext:
        /**
        * @param {?} view
        * @param {?} nodeIndex
        * @return {?}
        */
        function createDebugContext(view, nodeIndex) {
          return new DebugContext_(view, nodeIndex);
        },
        handleEvent:
        /**
        * @param {?} view
        * @param {?} nodeIndex
        * @param {?} eventName
        * @param {?} event
        * @return {?}
        */
        function handleEvent(view, nodeIndex, eventName, event) {
          return view.def.handleEvent(view, nodeIndex, eventName, event);
        },
        updateDirectives:
        /**
        * @param {?} view
        * @param {?} checkType
        * @return {?}
        */
        function updateDirectives(view, checkType) {
          return view.def.updateDirectives(checkType === 0
          /* CheckAndUpdate */
          ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);
        },
        updateRenderer:
        /**
        * @param {?} view
        * @param {?} checkType
        * @return {?}
        */
        function updateRenderer(view, checkType) {
          return view.def.updateRenderer(checkType === 0
          /* CheckAndUpdate */
          ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view);
        }
      };
    }
    /**
     * @return {?}
     */


    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:
        /**
        * @param {?} view
        * @param {?} nodeIndex
        * @return {?}
        */
        function createDebugContext(view, nodeIndex) {
          return new DebugContext_(view, nodeIndex);
        },
        handleEvent: debugHandleEvent,
        updateDirectives: debugUpdateDirectives,
        updateRenderer: debugUpdateRenderer
      };
    }
    /**
     * @param {?} elInjector
     * @param {?} projectableNodes
     * @param {?} rootSelectorOrNode
     * @param {?} def
     * @param {?} ngModule
     * @param {?=} context
     * @return {?}
     */


    function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
      /** @type {?} */
      var rendererFactory = ngModule.injector.get(RendererFactory2);
      return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);
    }
    /**
     * @param {?} elInjector
     * @param {?} projectableNodes
     * @param {?} rootSelectorOrNode
     * @param {?} def
     * @param {?} ngModule
     * @param {?=} context
     * @return {?}
     */


    function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {
      /** @type {?} */
      var rendererFactory = ngModule.injector.get(RendererFactory2);
      /** @type {?} */

      var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);
      /** @type {?} */

      var defWithOverride = applyProviderOverridesToView(def);
      return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);
    }
    /**
     * @param {?} elInjector
     * @param {?} ngModule
     * @param {?} rendererFactory
     * @param {?} projectableNodes
     * @param {?} rootSelectorOrNode
     * @return {?}
     */


    function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {
      /** @type {?} */
      var sanitizer = ngModule.injector.get(Sanitizer);
      /** @type {?} */

      var errorHandler = ngModule.injector.get(ErrorHandler);
      /** @type {?} */

      var renderer = rendererFactory.createRenderer(null, null);
      return {
        ngModule: ngModule,
        injector: elInjector,
        projectableNodes: projectableNodes,
        selectorOrNode: rootSelectorOrNode,
        sanitizer: sanitizer,
        rendererFactory: rendererFactory,
        renderer: renderer,
        errorHandler: errorHandler
      };
    }
    /**
     * @param {?} parentView
     * @param {?} anchorDef
     * @param {?} viewDef
     * @param {?=} context
     * @return {?}
     */


    function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {
      /** @type {?} */
      var defWithOverride = applyProviderOverridesToView(viewDef);
      return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);
    }
    /**
     * @param {?} parentView
     * @param {?} nodeDef
     * @param {?} viewDef
     * @param {?} hostElement
     * @return {?}
     */


    function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {
      /** @type {?} */
      var overrideComponentView = viewDefOverrides.get(
      /** @type {?} */

      /** @type {?} */

      /** @type {?} */
      nodeDef.element.componentProvider.provider.token);

      if (overrideComponentView) {
        viewDef = overrideComponentView;
      } else {
        viewDef = applyProviderOverridesToView(viewDef);
      }

      return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);
    }
    /**
     * @param {?} moduleType
     * @param {?} parentInjector
     * @param {?} bootstrapComponents
     * @param {?} def
     * @return {?}
     */


    function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {
      /** @type {?} */
      var defWithOverride = applyProviderOverridesToNgModule(def);
      return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);
    }
    /** @type {?} */


    var providerOverrides = new Map();
    /** @type {?} */

    var providerOverridesWithScope = new Map();
    /** @type {?} */

    var viewDefOverrides = new Map();
    /**
     * @param {?} override
     * @return {?}
     */

    function debugOverrideProvider(override) {
      providerOverrides.set(override.token, override);
      /** @type {?} */

      var injectableDef;

      if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') {
        providerOverridesWithScope.set(
        /** @type {?} */
        override.token, override);
      }
    }
    /**
     * @param {?} comp
     * @param {?} compFactory
     * @return {?}
     */


    function debugOverrideComponentView(comp, compFactory) {
      /** @type {?} */
      var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
      /** @type {?} */

      var compViewDef = resolveDefinition(
      /** @type {?} */

      /** @type {?} */
      hostViewDef.nodes[0].element.componentView);
      viewDefOverrides.set(comp, compViewDef);
    }
    /**
     * @return {?}
     */


    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.

    /**
     * @param {?} def
     * @return {?}
     */


    function applyProviderOverridesToView(def) {
      if (providerOverrides.size === 0) {
        return def;
      }
      /** @type {?} */


      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 =
      /** @type {?} */
      def.factory(
      /**
      * @return {?}
      */
      function () {
        return NOOP;
      });

      for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {
        applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);
      }

      return def;
      /**
       * @param {?} def
       * @return {?}
       */

      function findElementIndicesWithOverwrittenProviders(def) {
        /** @type {?} */
        var elIndicesWithOverwrittenProviders = [];
        /** @type {?} */

        var lastElementDef = null;

        for (var _i28 = 0; _i28 < def.nodes.length; _i28++) {
          /** @type {?} */
          var nodeDef = def.nodes[_i28];

          if (nodeDef.flags & 1
          /* TypeElement */
          ) {
              lastElementDef = nodeDef;
            }

          if (lastElementDef && nodeDef.flags & 3840
          /* CatProviderNoDirective */
          && providerOverrides.has(
          /** @type {?} */
          nodeDef.provider.token)) {
            elIndicesWithOverwrittenProviders.push(
            /** @type {?} */
            lastElementDef.nodeIndex);
            lastElementDef = null;
          }
        }

        return elIndicesWithOverwrittenProviders;
      }
      /**
       * @param {?} viewDef
       * @param {?} elIndex
       * @return {?}
       */


      function applyProviderOverridesToElement(viewDef, elIndex) {
        for (var _i29 = elIndex + 1; _i29 < viewDef.nodes.length; _i29++) {
          /** @type {?} */
          var nodeDef = viewDef.nodes[_i29];

          if (nodeDef.flags & 1
          /* TypeElement */
          ) {
              // stop at the next element
              return;
            }

          if (nodeDef.flags & 3840
          /* CatProviderNoDirective */
          ) {
              /** @type {?} */
              var provider =
              /** @type {?} */
              nodeDef.provider;
              /** @type {?} */

              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.

    /**
     * @param {?} def
     * @return {?}
     */


    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 =
      /** @type {?} */
      def.factory(
      /**
      * @return {?}
      */
      function () {
        return NOOP;
      });
      applyProviderOverrides(def);
      return def;
      /**
       * @param {?} def
       * @return {?}
       */

      function calcHasOverrides(def) {
        /** @type {?} */
        var hasOverrides = false;
        /** @type {?} */

        var hasDeprecatedOverrides = false;

        if (providerOverrides.size === 0) {
          return {
            hasOverrides: hasOverrides,
            hasDeprecatedOverrides: hasDeprecatedOverrides
          };
        }

        def.providers.forEach(
        /**
        * @param {?} node
        * @return {?}
        */
        function (node) {
          /** @type {?} */
          var override = providerOverrides.get(node.token);

          if (node.flags & 3840
          /* CatProviderNoDirective */
          && override) {
            hasOverrides = true;
            hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
          }
        });
        def.modules.forEach(
        /**
        * @param {?} module
        * @return {?}
        */
        function (module) {
          providerOverridesWithScope.forEach(
          /**
          * @param {?} override
          * @param {?} token
          * @return {?}
          */
          function (override, token) {
            if (
            /** @type {?} */
            getInjectableDef(token).providedIn === module) {
              hasOverrides = true;
              hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;
            }
          });
        });
        return {
          hasOverrides: hasOverrides,
          hasDeprecatedOverrides: hasDeprecatedOverrides
        };
      }
      /**
       * @param {?} def
       * @return {?}
       */


      function applyProviderOverrides(def) {
        for (var i = 0; i < def.providers.length; i++) {
          /** @type {?} */
          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 */
            ;
          }
          /** @type {?} */


          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) {
          /** @type {?} */
          var moduleSet = new Set(def.modules);
          providerOverridesWithScope.forEach(
          /**
          * @param {?} override
          * @param {?} token
          * @return {?}
          */
          function (override, token) {
            if (moduleSet.has(
            /** @type {?} */
            getInjectableDef(token).providedIn)) {
              /** @type {?} */
              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;
            }
          });
        }
      }
    }
    /**
     * @param {?} view
     * @param {?} checkIndex
     * @param {?} argStyle
     * @param {?=} v0
     * @param {?=} v1
     * @param {?=} v2
     * @param {?=} v3
     * @param {?=} v4
     * @param {?=} v5
     * @param {?=} v6
     * @param {?=} v7
     * @param {?=} v8
     * @param {?=} v9
     * @return {?}
     */


    function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      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;
    }
    /**
     * @param {?} view
     * @param {?} checkIndex
     * @param {?} argStyle
     * @param {?=} v0
     * @param {?=} v1
     * @param {?=} v2
     * @param {?=} v3
     * @param {?=} v4
     * @param {?=} v5
     * @param {?=} v6
     * @param {?=} v7
     * @param {?=} v8
     * @param {?=} v9
     * @return {?}
     */


    function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {
      /** @type {?} */
      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;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function debugCheckAndUpdateView(view) {
      return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function debugCheckNoChangesView(view) {
      return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function debugDestroyView(view) {
      return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);
    }
    /** @enum {number} */


    var DebugAction = {
      create: 0,
      detectChanges: 1,
      checkNoChanges: 2,
      destroy: 3,
      handleEvent: 4
    };
    DebugAction[DebugAction.create] = 'create';
    DebugAction[DebugAction.detectChanges] = 'detectChanges';
    DebugAction[DebugAction.checkNoChanges] = 'checkNoChanges';
    DebugAction[DebugAction.destroy] = 'destroy';
    DebugAction[DebugAction.handleEvent] = 'handleEvent';
    /** @type {?} */

    var _currentAction;
    /** @type {?} */


    var _currentView;
    /** @type {?} */


    var _currentNodeIndex;
    /**
     * @param {?} view
     * @param {?} nodeIndex
     * @return {?}
     */


    function debugSetCurrentNode(view, nodeIndex) {
      _currentView = view;
      _currentNodeIndex = nodeIndex;
    }
    /**
     * @param {?} view
     * @param {?} nodeIndex
     * @param {?} eventName
     * @param {?} event
     * @return {?}
     */


    function debugHandleEvent(view, nodeIndex, eventName, event) {
      debugSetCurrentNode(view, nodeIndex);
      return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);
    }
    /**
     * @param {?} view
     * @param {?} checkType
     * @return {?}
     */


    function debugUpdateDirectives(view, checkType) {
      if (view.state & 128
      /* Destroyed */
      ) {
          throw viewDestroyedError(DebugAction[_currentAction]);
        }

      debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));
      return view.def.updateDirectives(debugCheckDirectivesFn, view);
      /**
       * @param {?} view
       * @param {?} nodeIndex
       * @param {?} argStyle
       * @param {...?} values
       * @return {?}
       */

      function debugCheckDirectivesFn(view, nodeIndex, argStyle) {
        /** @type {?} */
        var nodeDef = view.def.nodes[nodeIndex];

        for (var _len16 = arguments.length, values = new Array(_len16 > 3 ? _len16 - 3 : 0), _key17 = 3; _key17 < _len16; _key17++) {
          values[_key17 - 3] = arguments[_key17];
        }

        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;
      }
    }
    /**
     * @param {?} view
     * @param {?} checkType
     * @return {?}
     */


    function debugUpdateRenderer(view, checkType) {
      if (view.state & 128
      /* Destroyed */
      ) {
          throw viewDestroyedError(DebugAction[_currentAction]);
        }

      debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));
      return view.def.updateRenderer(debugCheckRenderNodeFn, view);
      /**
       * @param {?} view
       * @param {?} nodeIndex
       * @param {?} argStyle
       * @param {...?} values
       * @return {?}
       */

      function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {
        /** @type {?} */
        var nodeDef = view.def.nodes[nodeIndex];

        for (var _len17 = arguments.length, values = new Array(_len17 > 3 ? _len17 - 3 : 0), _key18 = 3; _key18 < _len17; _key18++) {
          values[_key18 - 3] = arguments[_key18];
        }

        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;
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} argStyle
     * @param {?} givenValues
     * @return {?}
     */


    function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
      /** @type {?} */
      var changed =
      /** @type {?} */
      checkAndUpdateNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(givenValues)));

      if (changed) {
        /** @type {?} */
        var values = argStyle === 1
        /* Dynamic */
        ? givenValues[0] : givenValues;

        if (nodeDef.flags & 16384
        /* TypeDirective */
        ) {
            /** @type {?} */
            var bindingValues = {};

            for (var i = 0; i < nodeDef.bindings.length; i++) {
              /** @type {?} */
              var binding = nodeDef.bindings[i];
              /** @type {?} */

              var value = values[i];

              if (binding.flags & 8
              /* TypeProperty */
              ) {
                  bindingValues[normalizeDebugBindingName(
                  /** @type {?} */
                  binding.nonMinifiedName)] = normalizeDebugBindingValue(value);
                }
            }
            /** @type {?} */


            var elDef =
            /** @type {?} */
            nodeDef.parent;
            /** @type {?} */

            var el = asElementData(view, elDef.nodeIndex).renderElement;

            if (!
            /** @type {?} */
            elDef.element.name) {
              // a comment.
              view.renderer.setValue(el, "bindings=".concat(JSON.stringify(bindingValues, null, 2)));
            } else {
              // a regular element.
              for (var attr in bindingValues) {
                /** @type {?} */
                var _value11 = bindingValues[attr];

                if (_value11 != null) {
                  view.renderer.setAttribute(el, attr, _value11);
                } else {
                  view.renderer.removeAttribute(el, attr);
                }
              }
            }
          }
      }
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} argStyle
     * @param {?} values
     * @return {?}
     */


    function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {
      /** @type {?} */
      checkNoChangesNode.apply(void 0, [view, nodeDef, argStyle].concat(_toConsumableArray(values)));
    }
    /**
     * @param {?} view
     * @param {?} nodeIndex
     * @return {?}
     */


    function nextDirectiveWithBinding(view, nodeIndex) {
      for (var i = nodeIndex; i < view.def.nodes.length; i++) {
        /** @type {?} */
        var nodeDef = view.def.nodes[i];

        if (nodeDef.flags & 16384
        /* TypeDirective */
        && nodeDef.bindings && nodeDef.bindings.length) {
          return i;
        }
      }

      return null;
    }
    /**
     * @param {?} view
     * @param {?} nodeIndex
     * @return {?}
     */


    function nextRenderNodeWithBinding(view, nodeIndex) {
      for (var i = nodeIndex; i < view.def.nodes.length; i++) {
        /** @type {?} */
        var nodeDef = view.def.nodes[i];

        if (nodeDef.flags & 3
        /* CatRenderNode */
        && nodeDef.bindings && nodeDef.bindings.length) {
          return i;
        }
      }

      return null;
    }

    var DebugContext_ = /*#__PURE__*/function () {
      /**
       * @param {?} view
       * @param {?} nodeIndex
       */
      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];
        /** @type {?} */

        var elDef = this.nodeDef;
        /** @type {?} */

        var elView = view;

        while (elDef && (elDef.flags & 1
        /* TypeElement */
        ) === 0) {
          elDef =
          /** @type {?} */
          elDef.parent;
        }

        if (!elDef) {
          while (!elDef && elView) {
            elDef =
            /** @type {?} */
            viewParentEl(elView);
            elView =
            /** @type {?} */
            elView.parent;
          }
        }

        this.elDef = elDef;
        this.elView = elView;
      }
      /**
       * @private
       * @return {?}
       */


      _createClass2(DebugContext_, [{
        key: "logError",

        /**
         * @param {?} console
         * @param {...?} values
         * @return {?}
         */
        value: function logError(console) {
          for (var _len18 = arguments.length, values = new Array(_len18 > 1 ? _len18 - 1 : 0), _key19 = 1; _key19 < _len18; _key19++) {
            values[_key19 - 1] = arguments[_key19];
          }

          /** @type {?} */
          var logViewDef;
          /** @type {?} */

          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.

          /** @type {?} */


          var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);
          /** @type {?} */

          var currRenderNodeIndex = -1;
          /** @type {?} */

          var nodeLogger =
          /**
          * @return {?}
          */
          function nodeLogger() {
            currRenderNodeIndex++;

            if (currRenderNodeIndex === renderNodeIndex) {
              var _console$error;

              return (_console$error = console.error).bind.apply(_console$error, [console].concat(values));
            } else {
              return NOOP;
            }
          };

          /** @type {?} */
          logViewDef.factory(nodeLogger);

          if (currRenderNodeIndex < renderNodeIndex) {
            console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');

            /** @type {?} */
            console.error.apply(console, values);
          }
        }
      }, {
        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;
        }
        /**
         * @return {?}
         */

      }, {
        key: "injector",
        get: function get() {
          return createInjector$1(this.elView, this.elDef);
        }
        /**
         * @return {?}
         */

      }, {
        key: "component",
        get: function get() {
          return this.elOrCompView.component;
        }
        /**
         * @return {?}
         */

      }, {
        key: "context",
        get: function get() {
          return this.elOrCompView.context;
        }
        /**
         * @return {?}
         */

      }, {
        key: "providerTokens",
        get: function get() {
          /** @type {?} */
          var tokens = [];

          if (this.elDef) {
            for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {
              /** @type {?} */
              var childDef = this.elView.def.nodes[i];

              if (childDef.flags & 20224
              /* CatProvider */
              ) {
                  tokens.push(
                  /** @type {?} */
                  childDef.provider.token);
                }

              i += childDef.childCount;
            }
          }

          return tokens;
        }
        /**
         * @return {?}
         */

      }, {
        key: "references",
        get: function get() {
          /** @type {?} */
          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++) {
              /** @type {?} */
              var childDef = this.elView.def.nodes[i];

              if (childDef.flags & 20224
              /* CatProvider */
              ) {
                  collectReferences(this.elView, childDef, references);
                }

              i += childDef.childCount;
            }
          }

          return references;
        }
        /**
         * @return {?}
         */

      }, {
        key: "componentRenderElement",
        get: function get() {
          /** @type {?} */
          var elData = findHostElement(this.elOrCompView);
          return elData ? elData.renderElement : undefined;
        }
        /**
         * @return {?}
         */

      }, {
        key: "renderNode",
        get: function get() {
          return this.nodeDef.flags & 2
          /* TypeText */
          ? renderNode(this.view, this.nodeDef) : renderNode(this.elView, this.elDef);
        }
      }]);

      return DebugContext_;
    }();

    if (false) {}
    /**
     * @param {?} viewDef
     * @param {?} nodeIndex
     * @return {?}
     */


    function getRenderNodeIndex(viewDef, nodeIndex) {
      /** @type {?} */
      var renderNodeIndex = -1;

      for (var i = 0; i <= nodeIndex; i++) {
        /** @type {?} */
        var nodeDef = viewDef.nodes[i];

        if (nodeDef.flags & 3
        /* CatRenderNode */
        ) {
            renderNodeIndex++;
          }
      }

      return renderNodeIndex;
    }
    /**
     * @param {?} view
     * @return {?}
     */


    function findHostElement(view) {
      while (view && !isComponentView(view)) {
        view =
        /** @type {?} */
        view.parent;
      }

      if (view.parent) {
        return asElementData(view.parent,
        /** @type {?} */
        viewParentEl(view).nodeIndex);
      }

      return null;
    }
    /**
     * @param {?} view
     * @param {?} nodeDef
     * @param {?} references
     * @return {?}
     */


    function collectReferences(view, nodeDef, references) {
      for (var refName in nodeDef.references) {
        references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);
      }
    }
    /**
     * @param {?} action
     * @param {?} fn
     * @param {?} self
     * @param {?} args
     * @return {?}
     */


    function callWithDebugContext(action, fn, self, args) {
      /** @type {?} */
      var oldAction = _currentAction;
      /** @type {?} */

      var oldView = _currentView;
      /** @type {?} */

      var oldNodeIndex = _currentNodeIndex;

      try {
        _currentAction = action;
        /** @type {?} */

        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,
        /** @type {?} */
        getCurrentDebugContext());
      }
    }
    /**
     * @return {?}
     */


    function getCurrentDebugContext() {
      return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;
    }

    var DebugRendererFactory2 = /*#__PURE__*/function () {
      /**
       * @param {?} delegate
       */
      function DebugRendererFactory2(delegate) {
        _classCallCheck(this, DebugRendererFactory2);

        this.delegate = delegate;
      }
      /**
       * @param {?} element
       * @param {?} renderData
       * @return {?}
       */


      _createClass2(DebugRendererFactory2, [{
        key: "createRenderer",
        value: function createRenderer(element, renderData) {
          return new DebugRenderer2(this.delegate.createRenderer(element, renderData));
        }
        /**
         * @return {?}
         */

      }, {
        key: "begin",
        value: function begin() {
          if (this.delegate.begin) {
            this.delegate.begin();
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "end",
        value: function end() {
          if (this.delegate.end) {
            this.delegate.end();
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "whenRenderingDone",
        value: function whenRenderingDone() {
          if (this.delegate.whenRenderingDone) {
            return this.delegate.whenRenderingDone();
          }

          return Promise.resolve(null);
        }
      }]);

      return DebugRendererFactory2;
    }();

    if (false) {}

    var DebugRenderer2 = /*#__PURE__*/function () {
      /**
       * @param {?} delegate
       */
      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;
      }
      /**
       * @private
       * @param {?} nativeElement
       * @return {?}
       */


      _createClass2(DebugRenderer2, [{
        key: "createDebugContext",
        value: function createDebugContext(nativeElement) {
          return this.debugContextFactory(nativeElement);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "destroyNode",
        value: function destroyNode(node) {
          /** @type {?} */
          var debugNode =
          /** @type {?} */
          getDebugNode(node);
          removeDebugNodeFromIndex(debugNode);

          if (debugNode instanceof DebugNode__PRE_R3__) {
            debugNode.listeners.length = 0;
          }

          if (this.delegate.destroyNode) {
            this.delegate.destroyNode(node);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.delegate.destroy();
        }
        /**
         * @param {?} name
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        key: "createElement",
        value: function createElement(name, namespace) {
          /** @type {?} */
          var el = this.delegate.createElement(name, namespace);
          /** @type {?} */

          var debugCtx = this.createDebugContext(el);

          if (debugCtx) {
            /** @type {?} */
            var debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);

            /** @type {?} */
            debugEl.name = name;
            indexDebugNode(debugEl);
          }

          return el;
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "createComment",
        value: function createComment(value) {
          /** @type {?} */
          var comment = this.delegate.createComment(value);
          /** @type {?} */

          var debugCtx = this.createDebugContext(comment);

          if (debugCtx) {
            indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));
          }

          return comment;
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "createText",
        value: function createText(value) {
          /** @type {?} */
          var text = this.delegate.createText(value);
          /** @type {?} */

          var debugCtx = this.createDebugContext(text);

          if (debugCtx) {
            indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));
          }

          return text;
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @return {?}
         */

      }, {
        key: "appendChild",
        value: function appendChild(parent, newChild) {
          /** @type {?} */
          var debugEl = getDebugNode(parent);
          /** @type {?} */

          var debugChildEl = getDebugNode(newChild);

          if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.addChild(debugChildEl);
          }

          this.delegate.appendChild(parent, newChild);
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @param {?} refChild
         * @return {?}
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(parent, newChild, refChild) {
          /** @type {?} */
          var debugEl = getDebugNode(parent);
          /** @type {?} */

          var debugChildEl = getDebugNode(newChild);
          /** @type {?} */

          var debugRefEl =
          /** @type {?} */
          getDebugNode(refChild);

          if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.insertBefore(debugRefEl, debugChildEl);
          }

          this.delegate.insertBefore(parent, newChild, refChild);
        }
        /**
         * @param {?} parent
         * @param {?} oldChild
         * @return {?}
         */

      }, {
        key: "removeChild",
        value: function removeChild(parent, oldChild) {
          /** @type {?} */
          var debugEl = getDebugNode(parent);
          /** @type {?} */

          var debugChildEl = getDebugNode(oldChild);

          if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.removeChild(debugChildEl);
          }

          this.delegate.removeChild(parent, oldChild);
        }
        /**
         * @param {?} selectorOrNode
         * @param {?=} preserveContent
         * @return {?}
         */

      }, {
        key: "selectRootElement",
        value: function selectRootElement(selectorOrNode, preserveContent) {
          /** @type {?} */
          var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);
          /** @type {?} */

          var debugCtx = getCurrentDebugContext();

          if (debugCtx) {
            indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));
          }

          return el;
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?} value
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        key: "setAttribute",
        value: function setAttribute(el, name, value, namespace) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            /** @type {?} */
            var fullName = namespace ? namespace + ':' + name : name;
            debugEl.attributes[fullName] = value;
          }

          this.delegate.setAttribute(el, name, value, namespace);
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        key: "removeAttribute",
        value: function removeAttribute(el, name, namespace) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            /** @type {?} */
            var fullName = namespace ? namespace + ':' + name : name;
            debugEl.attributes[fullName] = null;
          }

          this.delegate.removeAttribute(el, name, namespace);
        }
        /**
         * @param {?} el
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "addClass",
        value: function addClass(el, name) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.classes[name] = true;
          }

          this.delegate.addClass(el, name);
        }
        /**
         * @param {?} el
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "removeClass",
        value: function removeClass(el, name) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.classes[name] = false;
          }

          this.delegate.removeClass(el, name);
        }
        /**
         * @param {?} el
         * @param {?} style
         * @param {?} value
         * @param {?} flags
         * @return {?}
         */

      }, {
        key: "setStyle",
        value: function setStyle(el, style, value, flags) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.styles[style] = value;
          }

          this.delegate.setStyle(el, style, value, flags);
        }
        /**
         * @param {?} el
         * @param {?} style
         * @param {?} flags
         * @return {?}
         */

      }, {
        key: "removeStyle",
        value: function removeStyle(el, style, flags) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.styles[style] = null;
          }

          this.delegate.removeStyle(el, style, flags);
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setProperty",
        value: function setProperty(el, name, value) {
          /** @type {?} */
          var debugEl = getDebugNode(el);

          if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {
            debugEl.properties[name] = value;
          }

          this.delegate.setProperty(el, name, value);
        }
        /**
         * @param {?} target
         * @param {?} eventName
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "listen",
        value: function listen(target, eventName, callback) {
          if (typeof target !== 'string') {
            /** @type {?} */
            var debugEl = getDebugNode(target);

            if (debugEl) {
              debugEl.listeners.push(new DebugEventListener(eventName, callback));
            }
          }

          return this.delegate.listen(target, eventName, callback);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "parentNode",
        value: function parentNode(node) {
          return this.delegate.parentNode(node);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "nextSibling",
        value: function nextSibling(node) {
          return this.delegate.nextSibling(node);
        }
        /**
         * @param {?} node
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setValue",
        value: function setValue(node, value) {
          return this.delegate.setValue(node, value);
        }
      }]);

      return DebugRenderer2;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} override
     * @return {?}
     */


    function overrideProvider(override) {
      initServicesIfNeeded();
      return Services.overrideProvider(override);
    }
    /**
     * @param {?} comp
     * @param {?} componentFactory
     * @return {?}
     */


    function overrideComponentView(comp, componentFactory) {
      initServicesIfNeeded();
      return Services.overrideComponentView(comp, componentFactory);
    }
    /**
     * @return {?}
     */


    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!

    /**
     * @param {?} ngModuleType
     * @param {?} bootstrapComponents
     * @param {?} defFactory
     * @return {?}
     */


    function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {
      return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);
    }
    /**
     * @param {?} def
     * @return {?}
     */


    function cloneNgModuleDefinition(def) {
      /** @type {?} */
      var providers = Array.from(def.providers);
      /** @type {?} */

      var modules = Array.from(def.modules);
      /** @type {?} */

      var providersByKey = {};

      for (var key in def.providersByKey) {
        providersByKey[key] = def.providersByKey[key];
      }

      return {
        factory: def.factory,
        isRoot: def.isRoot,
        providers: providers,
        modules: modules,
        providersByKey: providersByKey
      };
    }

    var NgModuleFactory_ = /*#__PURE__*/function (_NgModuleFactory2) {
      _inherits(NgModuleFactory_, _NgModuleFactory2);

      var _super122 = _createSuper(NgModuleFactory_);

      /**
       * @param {?} moduleType
       * @param {?} _bootstrapComponents
       * @param {?} _ngModuleDefFactory
       */
      function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {
        var _this342;

        _classCallCheck(this, NgModuleFactory_);

        // Attention: this ctor is called as top level function.
        // Putting any logic in here will destroy closure tree shaking!
        _this342 = _super122.call(this);
        _this342.moduleType = moduleType;
        _this342._bootstrapComponents = _bootstrapComponents;
        _this342._ngModuleDefFactory = _ngModuleDefFactory;
        return _this342;
      }
      /**
       * @param {?} parentInjector
       * @return {?}
       */


      _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.

          /** @type {?} */

          var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));
          return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);
        }
      }]);

      return NgModuleFactory_;
    }(NgModuleFactory);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=core.js.map

    /***/

  },

  /***/
  "./node_modules/@angular/forms/fesm2015/forms.js":
  /*!*******************************************************!*\
    !*** ./node_modules/@angular/forms/fesm2015/forms.js ***!
    \*******************************************************/

  /*! exports provided: ɵangular_packages_forms_forms_d, ɵInternalFormsSharedModule, ɵangular_packages_forms_forms_c, ɵangular_packages_forms_forms_a, ɵangular_packages_forms_forms_b, ɵ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_z, ɵNgNoValidate, ɵ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_v, ɵangular_packages_forms_forms_u, ɵangular_packages_forms_forms_w, ɵangular_packages_forms_forms_y, ɵNgSelectMultipleOption, ɵangular_packages_forms_forms_x, ɵangular_packages_forms_forms_bb, ɵangular_packages_forms_forms_bc, ɵangular_packages_forms_forms_be, ɵangular_packages_forms_forms_bd, ɵangular_packages_forms_forms_bf, ɵangular_packages_forms_forms_ba, AbstractControlDirective, AbstractFormGroupDirective, CheckboxControlValueAccessor, ControlContainer, NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgFormSelectorWarning, NgModel, NgModelGroup, NumberValueAccessor, RadioControlValueAccessor, RangeValueAccessor, FormControlDirective, FormControlName, FormGroupDirective, FormArrayName, FormGroupName, NgSelectOption, SelectControlValueAccessor, SelectMultipleControlValueAccessor, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, FormBuilder, AbstractControl, FormArray, FormControl, FormGroup, NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators, VERSION, FormsModule, ReactiveFormsModule */

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

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


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


    __webpack_require__.d(__webpack_exports__, "ɵInternalFormsSharedModule", function () {
      return ɵInternalFormsSharedModule;
    });
    /* 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_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_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 NG_FORM_SELECTOR_WARNING;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵangular_packages_forms_forms_ba", function () {
      return REQUIRED_VALIDATOR;
    });
    /* 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__, "CheckboxControlValueAccessor", function () {
      return CheckboxControlValueAccessor;
    });
    /* harmony export (binding) */


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


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


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


    __webpack_require__.d(__webpack_exports__, "DefaultValueAccessor", function () {
      return DefaultValueAccessor;
    });
    /* 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__, "NgFormSelectorWarning", function () {
      return NgFormSelectorWarning;
    });
    /* 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__, "NumberValueAccessor", function () {
      return NumberValueAccessor;
    });
    /* 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__, "FormControlDirective", function () {
      return FormControlDirective;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "NgSelectOption", function () {
      return NgSelectOption;
    });
    /* 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__, "CheckboxRequiredValidator", function () {
      return CheckboxRequiredValidator;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "EmailValidator", function () {
      return EmailValidator;
    });
    /* 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__, "PatternValidator", function () {
      return PatternValidator;
    });
    /* harmony export (binding) */


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "FormGroup", function () {
      return FormGroup;
    });
    /* 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__, "Validators", function () {
      return Validators;
    });
    /* harmony export (binding) */


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


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


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


    var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /* harmony import */


    var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/platform-browser */
    "./node_modules/@angular/platform-browser/fesm2015/platform-browser.js");
    /* harmony import */


    var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! rxjs */
    "./node_modules/rxjs/_esm2015/index.js");
    /* harmony import */


    var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! rxjs/operators */
    "./node_modules/rxjs/_esm2015/operators/index.js");
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@description
     * Defines an interface that acts as a bridge between the Angular forms API and a
     * native element in the DOM.
     *
     * Implement this interface to create a custom form control directive
     * that integrates with Angular forms.
     *
     * @see DefaultValueAccessor
     *
     * \@publicApi
     * @record
     */


    function ControlValueAccessor() {}

    if (false) {}
    /**
     * Used to provide a `ControlValueAccessor` for form controls.
     *
     * See `DefaultValueAccessor` for how to implement one.
     *
     * \@publicApi
     * @type {?}
     */


    var NG_VALUE_ACCESSOR = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgValueAccessor');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */

    var CHECKBOX_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       */
      function CheckboxControlValueAccessor(_renderer, _elementRef) {
        _classCallCheck(this, CheckboxControlValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        /**
         * \@description
         * The registered callback function called when a change event occurs on the input element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};
      }
      /**
       * Sets the "checked" property on the input element.
       *
       * @param {?} value The checked value
       * @return {?}
       */


      _createClass2(CheckboxControlValueAccessor, [{
        key: "writeValue",
        value: function writeValue(value) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          this.onChange = fn;
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
      }]);

      return CheckboxControlValueAccessor;
    }();

    CheckboxControlValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    CheckboxControlValueAccessor.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var DEFAULT_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return DefaultValueAccessor;
      }),
      multi: true
    };
    /**
     * We must check whether the agent is Android because composition events
     * behave differently between iOS and Android.
     * @return {?}
     */

    function _isAndroid() {
      /** @type {?} */
      var userAgent = Object(_angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["ɵgetDOM"])() ? Object(_angular_platform_browser__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
     * @type {?}
     */


    var COMPOSITION_BUFFER_MODE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('CompositionEventMode');
    /**
     * \@description
     * 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">
     * ```
     *
     * \@ngModule ReactiveFormsModule
     * \@ngModule FormsModule
     * \@publicApi
     */

    var DefaultValueAccessor = /*#__PURE__*/function () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       * @param {?} _compositionMode
       */
      function DefaultValueAccessor(_renderer, _elementRef, _compositionMode) {
        _classCallCheck(this, DefaultValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        this._compositionMode = _compositionMode;
        /**
         * \@description
         * The registered callback function called when an input event occurs on the input element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        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.
       *
       * @param {?} value The checked value
       * @return {?}
       */


      _createClass2(DefaultValueAccessor, [{
        key: "writeValue",
        value: function writeValue(value) {
          /** @type {?} */
          var normalizedValue = value == null ? '' : value;

          this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          this.onChange = fn;
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_handleInput",
        value: function _handleInput(value) {
          if (!this._compositionMode || this._compositionMode && !this._composing) {
            this.onChange(value);
          }
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_compositionStart",
        value: function _compositionStart() {
          this._composing = true;
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_compositionEnd",
        value: function _compositionEnd(value) {
          this._composing = false;
          this._compositionMode && this.onChange(value);
        }
      }]);

      return DefaultValueAccessor;
    }();

    DefaultValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    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]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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
     * @abstract
     */


    var AbstractControlDirective = /*#__PURE__*/function () {
      function AbstractControlDirective() {
        _classCallCheck(this, AbstractControlDirective);
      }

      _createClass2(AbstractControlDirective, [{
        key: "reset",

        /**
         * \@description
         * Resets the control with the provided value if the control is present.
         * @param {?=} value
         * @return {?}
         */
        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.
         *
         * \@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.
         *
         * @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.
         *
         * @return {?} 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.
         *
         * \@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'`
         *
         * @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.
         *
         * @return {?} 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;
        }
      }, {
        key: "value",

        /**
         * \@description
         * Reports the value of the control if it is present, otherwise null.
         * @return {?}
         */
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return null;
        }
      }]);

      return AbstractControlDirective;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@description
     * A base class for directives that contain multiple registered instances of `NgControl`.
     * Only used by the forms module.
     *
     * \@publicApi
     * @abstract
     */


    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",

        /**
         * \@description
         * The top-level form directive for the control.
         * @return {?}
         */
        get: function get() {
          return null;
        }
        /**
         * \@description
         * The path to this group.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return null;
        }
      }]);

      return ControlContainer;
    }(AbstractControlDirective);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @return {?}
     */


    function unimplemented() {
      throw new Error('unimplemented');
    }
    /**
     * \@description
     * A base class that all control `FormControl`-based directives extend. It binds a `FormControl`
     * object to a DOM element.
     *
     * \@publicApi
     * @abstract
     */


    var NgControl = /*#__PURE__*/function (_AbstractControlDirec2) {
      _inherits(NgControl, _AbstractControlDirec2);

      var _super124 = _createSuper(NgControl);

      function NgControl() {
        var _this343;

        _classCallCheck(this, NgControl);

        _this343 = _super124.apply(this, arguments);
        /**
         * \@description
         * The parent form for the control.
         *
         * \@internal
         */

        _this343._parent = null;
        /**
         * \@description
         * The name for the control
         */

        _this343.name = null;
        /**
         * \@description
         * The value accessor for the control
         */

        _this343.valueAccessor = null;
        /**
         * \@description
         * The uncomposed array of synchronous validators for the control
         *
         * \@internal
         */

        _this343._rawValidators = [];
        /**
         * \@description
         * The uncomposed array of async validators for the control
         *
         * \@internal
         */

        _this343._rawAsyncValidators = [];
        return _this343;
      }
      /**
       * \@description
       * The registered synchronous validator function for the control
       *
       * @throws An exception that this method is not implemented
       * @return {?}
       */


      _createClass2(NgControl, [{
        key: "validator",
        get: function get() {
          return (
            /** @type {?} */
            unimplemented()
          );
        }
        /**
         * \@description
         * The registered async validator function for the control
         *
         * @throws An exception that this method is not implemented
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return (
            /** @type {?} */
            unimplemented()
          );
        }
      }]);

      return NgControl;
    }(AbstractControlDirective);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var AbstractControlStatus = /*#__PURE__*/function () {
      /**
       * @param {?} cd
       */
      function AbstractControlStatus(cd) {
        _classCallCheck(this, AbstractControlStatus);

        this._cd = cd;
      }
      /**
       * @return {?}
       */


      _createClass2(AbstractControlStatus, [{
        key: "ngClassUntouched",
        get: function get() {
          return this._cd.control ? this._cd.control.untouched : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassTouched",
        get: function get() {
          return this._cd.control ? this._cd.control.touched : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassPristine",
        get: function get() {
          return this._cd.control ? this._cd.control.pristine : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassDirty",
        get: function get() {
          return this._cd.control ? this._cd.control.dirty : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassValid",
        get: function get() {
          return this._cd.control ? this._cd.control.valid : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassInvalid",
        get: function get() {
          return this._cd.control ? this._cd.control.invalid : false;
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngClassPending",
        get: function get() {
          return this._cd.control ? this._cd.control.pending : false;
        }
      }]);

      return AbstractControlStatus;
    }();

    if (false) {}
    /** @type {?} */


    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);

      /**
       * @param {?} cd
       */
      function NgControlStatus(cd) {
        _classCallCheck(this, NgControlStatus);

        return _super125.call(this, cd);
      }

      return NgControlStatus;
    }(AbstractControlStatus);

    NgControlStatus.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formControlName],[ngModel],[formControl]',
        host: ngControlStatusHost
      }]
    }];
    /** @nocollapse */

    NgControlStatus.ctorParameters = function () {
      return [{
        type: NgControl,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
        }]
      }];
    };
    /**
     * \@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);

      /**
       * @param {?} cd
       */
      function NgControlStatusGroup(cd) {
        _classCallCheck(this, NgControlStatusGroup);

        return _super126.call(this, cd);
      }

      return NgControlStatusGroup;
    }(AbstractControlStatus);

    NgControlStatusGroup.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
        host: ngControlStatusHost
      }]
    }];
    /** @nocollapse */

    NgControlStatusGroup.ctorParameters = function () {
      return [{
        type: ControlContainer,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Self"]
        }]
      }];
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} value
     * @return {?}
     */


    function isEmptyInputValue(value) {
      // we don't check for string here so it also works with arrays
      return value == null || value.length === 0;
    }
    /**
     * \@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
     * @type {?}
     */


    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
     * @type {?}
     */

    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.
     * @type {?}
     */

    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",

        /**
         * \@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}}
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} min
         * @return {?} A validator function that returns an error map with the
         * `min` property if the validation check fails, otherwise `null`.
         *
         */
        value: function min(_min) {
          return (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              if (isEmptyInputValue(control.value) || isEmptyInputValue(_min)) {
                return null; // don't validate empty values to allow optional controls
              }
              /** @type {?} */


              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}}
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} max
         * @return {?} A validator function that returns an error map with the
         * `max` property if the validation check fails, otherwise `null`.
         *
         */

      }, {
        key: "max",
        value: function max(_max) {
          return (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              if (isEmptyInputValue(control.value) || isEmptyInputValue(_max)) {
                return null; // don't validate empty values to allow optional controls
              }
              /** @type {?} */


              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}
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} control
         * @return {?} An error map with the `required` property
         * if the validation check fails, otherwise `null`.
         *
         */

      }, {
        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}
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} control
         * @return {?} An error map that contains the `required` property
         * set to `true` if the validation check fails, otherwise `null`.
         *
         */

      }, {
        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}
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} control
         * @return {?} An error map with the `email` property
         * if the validation check fails, otherwise `null`.
         *
         */

      }, {
        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.
         *
         * \@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">
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} minLength
         * @return {?} A validator function that returns an error map with the
         * `minlength` if the validation check fails, otherwise `null`.
         *
         */

      }, {
        key: "minLength",
        value: function minLength(_minLength) {
          return (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              if (isEmptyInputValue(control.value)) {
                return null; // don't validate empty values to allow optional controls
              }
              /** @type {?} */


              var length = control.value ? control.value.length : 0;
              return length < _minLength ? {
                'minlength': {
                  'requiredLength': _minLength,
                  'actualLength': 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.
         *
         * \@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">
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} maxLength
         * @return {?} A validator function that returns an error map with the
         * `maxlength` property if the validation check fails, otherwise `null`.
         *
         */

      }, {
        key: "maxLength",
        value: function maxLength(_maxLength) {
          return (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              /** @type {?} */
              var length = control.value ? control.value.length : 0;
              return length > _maxLength ? {
                'maxlength': {
                  'requiredLength': _maxLength,
                  'actualLength': 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 ]*">
         * ```
         *
         * @see `updateValueAndValidity()`
         *
         * @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.
         *
         * @return {?} A validator function that returns an error map with the
         * `pattern` property if the validation check fails, otherwise `null`.
         *
         */

      }, {
        key: "pattern",
        value: function pattern(_pattern) {
          if (!_pattern) return Validators.nullValidator;
          /** @type {?} */

          var regex;
          /** @type {?} */

          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 (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              if (isEmptyInputValue(control.value)) {
                return null; // don't validate empty values to allow optional controls
              }
              /** @type {?} */


              var value = control.value;
              return regex.test(value) ? null : {
                'pattern': {
                  'requiredPattern': regexStr,
                  'actualValue': value
                }
              };
            }
          );
        }
        /**
         * \@description
         * Validator that performs no operation.
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} control
         * @return {?}
         */

      }, {
        key: "nullValidator",
        value: function nullValidator(control) {
          return null;
        }
        /**
         * @param {?} validators
         * @return {?}
         */

      }, {
        key: "compose",
        value: function compose(validators) {
          if (!validators) return null;
          /** @type {?} */

          var presentValidators =
          /** @type {?} */
          validators.filter(isPresent);
          if (presentValidators.length == 0) return null;
          return (
            /**
            * @param {?} control
            * @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.
         *
         * @see `updateValueAndValidity()`
         *
         * @param {?} validators
         * @return {?} A validator function that returns an error map with the
         * merged error objects of the async validators if the validation check fails, otherwise `null`.
         *
         */

      }, {
        key: "composeAsync",
        value: function composeAsync(validators) {
          if (!validators) return null;
          /** @type {?} */

          var presentValidators =
          /** @type {?} */
          validators.filter(isPresent);
          if (presentValidators.length == 0) return null;
          return (
            /**
            * @param {?} control
            * @return {?}
            */
            function (control) {
              /** @type {?} */
              var observables = _executeAsyncValidators(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;
    }();
    /**
     * @param {?} o
     * @return {?}
     */


    function isPresent(o) {
      return o != null;
    }
    /**
     * @param {?} r
     * @return {?}
     */


    function toObservable(r) {
      /** @type {?} */
      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)) {
        throw new Error("Expected validator to return Promise or Observable.");
      }

      return obs;
    }
    /**
     * @param {?} control
     * @param {?} validators
     * @return {?}
     */


    function _executeValidators(control, validators) {
      return validators.map(
      /**
      * @param {?} v
      * @return {?}
      */
      function (v) {
        return v(control);
      });
    }
    /**
     * @param {?} control
     * @param {?} validators
     * @return {?}
     */


    function _executeAsyncValidators(control, validators) {
      return validators.map(
      /**
      * @param {?} v
      * @return {?}
      */
      function (v) {
        return v(control);
      });
    }
    /**
     * @param {?} arrayOfErrors
     * @return {?}
     */


    function _mergeErrors(arrayOfErrors) {
      /** @type {?} */
      var res = arrayOfErrors.reduce(
      /**
      * @param {?} res
      * @param {?} errors
      * @return {?}
      */
      function (res, errors) {
        return errors != null ? Object.assign({},
        /** @type {?} */
        res, errors) :
        /** @type {?} */
        res;
      }, {});
      return Object.keys(res).length === 0 ? null : res;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://angular.io/license
     */

    /**
     * @param {?} validator
     * @return {?}
     */


    function normalizeValidator(validator) {
      if (
      /** @type {?} */
      validator.validate) {
        return (
          /**
          * @param {?} c
          * @return {?}
          */
          function (c) {
            return (
              /** @type {?} */
              validator.validate(c)
            );
          }
        );
      } else {
        return (
          /** @type {?} */
          validator
        );
      }
    }
    /**
     * @param {?} validator
     * @return {?}
     */


    function normalizeAsyncValidator(validator) {
      if (
      /** @type {?} */
      validator.validate) {
        return (
          /**
          * @param {?} c
          * @return {?}
          */
          function (c) {
            return (
              /** @type {?} */
              validator.validate(c)
            );
          }
        );
      } else {
        return (
          /** @type {?} */
          validator
        );
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var NUMBER_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       */
      function NumberValueAccessor(_renderer, _elementRef) {
        _classCallCheck(this, NumberValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        /**
         * \@description
         * The registered callback function called when a change or input event occurs on the input
         * element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};
      }
      /**
       * Sets the "value" property on the input element.
       *
       * @param {?} value The checked value
       * @return {?}
       */


      _createClass2(NumberValueAccessor, [{
        key: "writeValue",
        value: function writeValue(value) {
          // The value needs to be normalized for IE9, otherwise it is set to 'null' when null

          /** @type {?} */
          var normalizedValue = value == null ? '' : value;

          this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          this.onChange =
          /**
          * @param {?} value
          * @return {?}
          */
          function (value) {
            fn(value == '' ? null : parseFloat(value));
          };
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
      }]);

      return NumberValueAccessor;
    }();

    NumberValueAccessor.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',
        host: {
          '(change)': 'onChange($event.target.value)',
          '(input)': 'onChange($event.target.value)',
          '(blur)': 'onTouched()'
        },
        providers: [NUMBER_VALUE_ACCESSOR]
      }]
    }];
    /** @nocollapse */

    NumberValueAccessor.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var RADIO_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return RadioControlValueAccessor;
      }),
      multi: true
    };
    /**
     * \@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.
       * @param {?} control
       * @param {?} accessor
       * @return {?}
       */


      _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.
         * @param {?} accessor
         * @return {?}
         */

      }, {
        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.
         * @param {?} accessor
         * @return {?}
         */

      }, {
        key: "select",
        value: function select(accessor) {
          var _this344 = this;

          this._accessors.forEach(
          /**
          * @param {?} c
          * @return {?}
          */
          function (c) {
            if (_this344._isSameGroup(c, accessor) && c[1] !== accessor) {
              c[1].fireUncheck(accessor.value);
            }
          });
        }
        /**
         * @private
         * @param {?} controlPair
         * @param {?} accessor
         * @return {?}
         */

      }, {
        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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       * @param {?} _registry
       * @param {?} _injector
       */
      function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {
        _classCallCheck(this, RadioControlValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        this._registry = _registry;
        this._injector = _injector;
        /**
         * \@description
         * The registered callback function called when a change event occurs on the input element.
         */

        this.onChange =
        /**
        * @return {?}
        */
        function () {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};
      }
      /**
       * \@description
       * A lifecycle method called when the directive is initialized. For internal use only.
       * @return {?}
       */


      _createClass2(RadioControlValueAccessor, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          this._control = this._injector.get(NgControl);

          this._checkName();

          this._registry.add(this._control, this);
        }
        /**
         * \@description
         * Lifecycle method called before the directive's instance is destroyed. For internal use only.
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this._registry.remove(this);
        }
        /**
         * \@description
         * Sets the "checked" property value on the radio input element.
         *
         * @param {?} value The checked value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {
          this._state = value === this.value;

          this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          var _this345 = this;

          this._fn = fn;

          this.onChange =
          /**
          * @return {?}
          */
          function () {
            fn(_this345.value);

            _this345._registry.select(_this345);
          };
        }
        /**
         * Sets the "value" on the radio input element and unchecks it.
         *
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "fireUncheck",
        value: function fireUncheck(value) {
          this.writeValue(value);
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_checkName",
        value: function _checkName() {
          if (this.name && this.formControlName && this.name !== this.formControlName) {
            this._throwNameError();
          }

          if (!this.name && this.formControlName) this.name = this.formControlName;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_throwNameError",
        value: 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    ");
        }
      }]);

      return RadioControlValueAccessor;
    }();

    RadioControlValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var RANGE_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       */
      function RangeValueAccessor(_renderer, _elementRef) {
        _classCallCheck(this, RangeValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        /**
         * \@description
         * The registered callback function called when a change or input event occurs on the input
         * element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};
      }
      /**
       * Sets the "value" property on the input element.
       *
       * @param {?} value The checked value
       * @return {?}
       */


      _createClass2(RangeValueAccessor, [{
        key: "writeValue",
        value: function writeValue(value) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          this.onChange =
          /**
          * @param {?} value
          * @return {?}
          */
          function (value) {
            fn(value == '' ? null : parseFloat(value));
          };
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the range input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
      }]);

      return RangeValueAccessor;
    }();

    RangeValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    RangeValueAccessor.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */


    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  "
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var ReactiveErrors = /*#__PURE__*/function () {
      function ReactiveErrors() {
        _classCallCheck(this, ReactiveErrors);
      }

      _createClass2(ReactiveErrors, null, [{
        key: "controlParentException",

        /**
         * @return {?}
         */
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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    ");
        }
        /**
         * @param {?} directiveName
         * @return {?}
         */

      }, {
        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 Angular v7.\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;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var SELECT_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return SelectControlValueAccessor;
      }),
      multi: true
    };
    /**
     * @param {?} id
     * @param {?} value
     * @return {?}
     */

    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);
    }
    /**
     * @param {?} valueString
     * @return {?}
     */


    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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       */
      function SelectControlValueAccessor(_renderer, _elementRef) {
        _classCallCheck(this, SelectControlValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        /**
         * \@internal
         */

        this._optionMap = new Map();
        /**
         * \@internal
         */

        this._idCounter = 0;
        /**
         * \@description
         * The registered callback function called when a change event occurs on the input element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};

        this._compareWith = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵlooseIdentical"];
      }
      /**
       * \@description
       * Tracks the option comparison algorithm for tracking identities when
       * checking for changes.
       * @param {?} fn
       * @return {?}
       */


      _createClass2(SelectControlValueAccessor, [{
        key: "writeValue",

        /**
         * Sets the "value" property on the input element. The "selectedIndex"
         * property is also set if an ID is provided on the option element.
         *
         * @param {?} value The checked value
         * @return {?}
         */
        value: function writeValue(value) {
          this.value = value;
          /** @type {?} */

          var id = this._getOptionId(value);

          if (id == null) {
            this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);
          }
          /** @type {?} */


          var valueString = _buildValueString(id, value);

          this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);
        }
        /**
         * \@description
         * Registers a function called when the control value changes.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          var _this346 = this;

          this.onChange =
          /**
          * @param {?} valueString
          * @return {?}
          */
          function (valueString) {
            _this346.value = _this346._getOptionValue(valueString);
            fn(_this346.value);
          };
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the select input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_registerOption",
        value: function _registerOption() {
          return (this._idCounter++).toString();
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_getOptionId",
        value: function _getOptionId(value) {
          for (var _i30 = 0, _Array$from = Array.from(this._optionMap.keys()); _i30 < _Array$from.length; _i30++) {
            var id = _Array$from[_i30];
            if (this._compareWith(this._optionMap.get(id), value)) return id;
          }

          return null;
        }
        /**
         * \@internal
         * @param {?} valueString
         * @return {?}
         */

      }, {
        key: "_getOptionValue",
        value: function _getOptionValue(valueString) {
          /** @type {?} */
          var id = _extractId(valueString);

          return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;
        }
      }, {
        key: "compareWith",
        set: function set(fn) {
          if (typeof fn !== 'function') {
            throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(fn)));
          }

          this._compareWith = fn;
        }
      }]);

      return SelectControlValueAccessor;
    }();

    SelectControlValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * \@description
     * Marks `<option>` as dynamic, so Angular can be notified when options change.
     *
     * @see `SelectControlValueAccessor`
     *
     * \@ngModule ReactiveFormsModule
     * \@ngModule FormsModule
     * \@publicApi
     */


    var NgSelectOption = /*#__PURE__*/function () {
      /**
       * @param {?} _element
       * @param {?} _renderer
       * @param {?} _select
       */
      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.
       * @param {?} value
       * @return {?}
       */


      _createClass2(NgSelectOption, [{
        key: "_setElementValue",

        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */
        value: function _setElementValue(value) {
          this._renderer.setProperty(this._element.nativeElement, 'value', value);
        }
        /**
         * \@description
         * Lifecycle method called before the directive's instance is destroyed. For internal use only.
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this._select) {
            this._select._optionMap["delete"](this.id);

            this._select.writeValue(this._select.value);
          }
        }
      }, {
        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.
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "value",
        set: function set(value) {
          this._setElementValue(value);

          if (this._select) this._select.writeValue(this._select.value);
        }
      }]);

      return NgSelectOption;
    }();

    NgSelectOption.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'option'
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var SELECT_MULTIPLE_VALUE_ACCESSOR = {
      provide: NG_VALUE_ACCESSOR,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return SelectMultipleControlValueAccessor;
      }),
      multi: true
    };
    /**
     * @param {?} id
     * @param {?} value
     * @return {?}
     */

    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);
    }
    /**
     * @param {?} valueString
     * @return {?}
     */


    function _extractId$1(valueString) {
      return valueString.split(':')[0];
    }
    /**
     * Mock interface for HTML Options
     * @record
     */


    function HTMLOption() {}

    if (false) {}
    /**
     * Mock interface for HTMLCollection
     * @abstract
     */


    var HTMLCollection = function HTMLCollection() {
      _classCallCheck(this, HTMLCollection);
    };

    if (false) {}
    /**
     * \@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 () {
      /**
       * @param {?} _renderer
       * @param {?} _elementRef
       */
      function SelectMultipleControlValueAccessor(_renderer, _elementRef) {
        _classCallCheck(this, SelectMultipleControlValueAccessor);

        this._renderer = _renderer;
        this._elementRef = _elementRef;
        /**
         * \@internal
         */

        this._optionMap = new Map();
        /**
         * \@internal
         */

        this._idCounter = 0;
        /**
         * \@description
         * The registered callback function called when a change event occurs on the input element.
         */

        this.onChange =
        /**
        * @param {?} _
        * @return {?}
        */
        function (_) {};
        /**
         * \@description
         * The registered callback function called when a blur event occurs on the input element.
         */


        this.onTouched =
        /**
        * @return {?}
        */
        function () {};

        this._compareWith = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵlooseIdentical"];
      }
      /**
       * \@description
       * Tracks the option comparison algorithm for tracking identities when
       * checking for changes.
       * @param {?} fn
       * @return {?}
       */


      _createClass2(SelectMultipleControlValueAccessor, [{
        key: "writeValue",

        /**
         * \@description
         * Sets the "value" property on one or of more
         * of the select's options.
         *
         * @param {?} value The value
         * @return {?}
         */
        value: function writeValue(value) {
          var _this347 = this;

          this.value = value;
          /** @type {?} */

          var optionSelectedStateSetter;

          if (Array.isArray(value)) {
            // convert values to ids

            /** @type {?} */
            var ids = value.map(
            /**
            * @param {?} v
            * @return {?}
            */
            function (v) {
              return _this347._getOptionId(v);
            });

            optionSelectedStateSetter =
            /**
            * @param {?} opt
            * @param {?} o
            * @return {?}
            */
            function optionSelectedStateSetter(opt, o) {
              opt._setSelected(ids.indexOf(o.toString()) > -1);
            };
          } else {
            optionSelectedStateSetter =
            /**
            * @param {?} opt
            * @param {?} o
            * @return {?}
            */
            function optionSelectedStateSetter(opt, o) {
              opt._setSelected(false);
            };
          }

          this._optionMap.forEach(optionSelectedStateSetter);
        }
        /**
         * \@description
         * Registers a function called when the control value changes
         * and writes an array of the selected options.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          var _this348 = this;

          this.onChange =
          /**
          * @param {?} _
          * @return {?}
          */
          function (_) {
            /** @type {?} */
            var selected = [];

            if (_.hasOwnProperty('selectedOptions')) {
              /** @type {?} */
              var options = _.selectedOptions;

              for (var i = 0; i < options.length; i++) {
                /** @type {?} */
                var opt = options.item(i);
                /** @type {?} */

                var val = _this348._getOptionValue(opt.value);

                selected.push(val);
              }
            } // Degrade on IE
            else {
                /** @type {?} */
                var _options2 =
                /** @type {?} */
                _.options;

                for (var _i31 = 0; _i31 < _options2.length; _i31++) {
                  /** @type {?} */
                  var _opt = _options2.item(_i31);

                  if (_opt.selected) {
                    /** @type {?} */
                    var _val = _this348._getOptionValue(_opt.value);

                    selected.push(_val);
                  }
                }
              }

            _this348.value = selected;
            fn(selected);
          };
        }
        /**
         * \@description
         * Registers a function called when the control is touched.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(fn) {
          this.onTouched = fn;
        }
        /**
         * Sets the "disabled" property on the select input element.
         *
         * @param {?} isDisabled The disabled value
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(isDisabled) {
          this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_registerOption",
        value: function _registerOption(value) {
          /** @type {?} */
          var id = (this._idCounter++).toString();

          this._optionMap.set(id, value);

          return id;
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_getOptionId",
        value: function _getOptionId(value) {
          for (var _i32 = 0, _Array$from2 = Array.from(this._optionMap.keys()); _i32 < _Array$from2.length; _i32++) {
            var id = _Array$from2[_i32];
            if (this._compareWith(
            /** @type {?} */
            this._optionMap.get(id)._value, value)) return id;
          }

          return null;
        }
        /**
         * \@internal
         * @param {?} valueString
         * @return {?}
         */

      }, {
        key: "_getOptionValue",
        value: function _getOptionValue(valueString) {
          /** @type {?} */
          var id = _extractId$1(valueString);

          return this._optionMap.has(id) ?
          /** @type {?} */
          this._optionMap.get(id)._value : valueString;
        }
      }, {
        key: "compareWith",
        set: function set(fn) {
          if (typeof fn !== 'function') {
            throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(fn)));
          }

          this._compareWith = fn;
        }
      }]);

      return SelectMultipleControlValueAccessor;
    }();

    SelectMultipleControlValueAccessor.decorators = [{
      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]
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * \@description
     * Marks `<option>` as dynamic, so Angular can be notified when options change.
     *
     * @see `SelectMultipleControlValueAccessor`
     *
     * \@ngModule ReactiveFormsModule
     * \@ngModule FormsModule
     * \@publicApi
     */


    var ɵNgSelectMultipleOption = /*#__PURE__*/function () {
      /**
       * @param {?} _element
       * @param {?} _renderer
       * @param {?} _select
       */
      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.
       * @param {?} value
       * @return {?}
       */


      _createClass2(ɵNgSelectMultipleOption, [{
        key: "_setElementValue",

        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */
        value: function _setElementValue(value) {
          this._renderer.setProperty(this._element.nativeElement, 'value', value);
        }
        /**
         * \@internal
         * @param {?} selected
         * @return {?}
         */

      }, {
        key: "_setSelected",
        value: function _setSelected(selected) {
          this._renderer.setProperty(this._element.nativeElement, 'selected', selected);
        }
        /**
         * \@description
         * Lifecycle method called before the directive's instance is destroyed. For internal use only.
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this._select) {
            this._select._optionMap["delete"](this.id);

            this._select.writeValue(this._select.value);
          }
        }
      }, {
        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.
         * @param {?} value
         * @return {?}
         */

      }, {
        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);
          }
        }
      }]);

      return ɵNgSelectMultipleOption;
    }();

    ɵNgSelectMultipleOption.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'option'
      }]
    }];
    /** @nocollapse */

    ɵ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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} name
     * @param {?} parent
     * @return {?}
     */


    function controlPath(name, parent) {
      return [].concat(_toConsumableArray(
      /** @type {?} */
      parent.path), [name]);
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function setUpControl(control, dir) {
      if (!control) _throwError(dir, 'Cannot find control with');
      if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');
      control.validator = Validators.compose([
      /** @type {?} */
      control.validator, dir.validator]);
      control.asyncValidator = Validators.composeAsync([
      /** @type {?} */
      control.asyncValidator, dir.asyncValidator]);

      /** @type {?} */
      dir.valueAccessor.writeValue(control.value);
      setUpViewChangePipeline(control, dir);
      setUpModelChangePipeline(control, dir);
      setUpBlurPipeline(control, dir);

      if (
      /** @type {?} */
      dir.valueAccessor.setDisabledState) {
        control.registerOnDisabledChange(
        /**
        * @param {?} isDisabled
        * @return {?}
        */
        function (isDisabled) {
          /** @type {?} */

          /** @type {?} */
          dir.valueAccessor.setDisabledState(isDisabled);
        });
      } // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4


      dir._rawValidators.forEach(
      /**
      * @param {?} validator
      * @return {?}
      */
      function (validator) {
        if (
        /** @type {?} */
        validator.registerOnValidatorChange)
        /** @type {?} */

        /** @type {?} */
        validator.registerOnValidatorChange(
        /**
        * @return {?}
        */
        function () {
          return control.updateValueAndValidity();
        });
      });

      dir._rawAsyncValidators.forEach(
      /**
      * @param {?} validator
      * @return {?}
      */
      function (validator) {
        if (
        /** @type {?} */
        validator.registerOnValidatorChange)
        /** @type {?} */

        /** @type {?} */
        validator.registerOnValidatorChange(
        /**
        * @return {?}
        */
        function () {
          return control.updateValueAndValidity();
        });
      });
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function cleanUpControl(control, dir) {
      /** @type {?} */
      dir.valueAccessor.registerOnChange(
      /**
      * @return {?}
      */
      function () {
        return _noControlError(dir);
      });

      /** @type {?} */
      dir.valueAccessor.registerOnTouched(
      /**
      * @return {?}
      */
      function () {
        return _noControlError(dir);
      });

      dir._rawValidators.forEach(
      /**
      * @param {?} validator
      * @return {?}
      */
      function (validator) {
        if (validator.registerOnValidatorChange) {
          validator.registerOnValidatorChange(null);
        }
      });

      dir._rawAsyncValidators.forEach(
      /**
      * @param {?} validator
      * @return {?}
      */
      function (validator) {
        if (validator.registerOnValidatorChange) {
          validator.registerOnValidatorChange(null);
        }
      });

      if (control) control._clearChangeFns();
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function setUpViewChangePipeline(control, dir) {
      /** @type {?} */
      dir.valueAccessor.registerOnChange(
      /**
      * @param {?} newValue
      * @return {?}
      */
      function (newValue) {
        control._pendingValue = newValue;
        control._pendingChange = true;
        control._pendingDirty = true;
        if (control.updateOn === 'change') updateControl(control, dir);
      });
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function setUpBlurPipeline(control, dir) {
      /** @type {?} */
      dir.valueAccessor.registerOnTouched(
      /**
      * @return {?}
      */
      function () {
        control._pendingTouched = true;
        if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);
        if (control.updateOn !== 'submit') control.markAsTouched();
      });
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function updateControl(control, dir) {
      if (control._pendingDirty) control.markAsDirty();
      control.setValue(control._pendingValue, {
        emitModelToViewChange: false
      });
      dir.viewToModelUpdate(control._pendingValue);
      control._pendingChange = false;
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function setUpModelChangePipeline(control, dir) {
      control.registerOnChange(
      /**
      * @param {?} newValue
      * @param {?} emitModelEvent
      * @return {?}
      */
      function (newValue, emitModelEvent) {
        // control -> view

        /** @type {?} */
        dir.valueAccessor.writeValue(newValue); // control -> ngModel

        if (emitModelEvent) dir.viewToModelUpdate(newValue);
      });
    }
    /**
     * @param {?} control
     * @param {?} dir
     * @return {?}
     */


    function setUpFormContainer(control, dir) {
      if (control == null) _throwError(dir, 'Cannot find control with');
      control.validator = Validators.compose([control.validator, dir.validator]);
      control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);
    }
    /**
     * @param {?} dir
     * @return {?}
     */


    function _noControlError(dir) {
      return _throwError(dir, 'There is no FormControl instance attached to form control element with');
    }
    /**
     * @param {?} dir
     * @param {?} message
     * @return {?}
     */


    function _throwError(dir, message) {
      /** @type {?} */
      var messageEnd;

      if (
      /** @type {?} */
      dir.path.length > 1) {
        messageEnd = "path: '".concat(
        /** @type {?} */
        dir.path.join(' -> '), "'");
      } else if (
      /** @type {?} */
      dir.path[0]) {
        messageEnd = "name: '".concat(dir.path, "'");
      } else {
        messageEnd = 'unspecified name attribute';
      }

      throw new Error("".concat(message, " ").concat(messageEnd));
    }
    /**
     * @param {?} validators
     * @return {?}
     */


    function composeValidators(validators) {
      return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;
    }
    /**
     * @param {?} validators
     * @return {?}
     */


    function composeAsyncValidators(validators) {
      return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) : null;
    }
    /**
     * @param {?} changes
     * @param {?} viewModel
     * @return {?}
     */


    function isPropertyUpdated(changes, viewModel) {
      if (!changes.hasOwnProperty('model')) return false;
      /** @type {?} */

      var change = changes['model'];
      if (change.isFirstChange()) return true;
      return !Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵlooseIdentical"])(viewModel, change.currentValue);
    }
    /** @type {?} */


    var BUILTIN_ACCESSORS = [CheckboxControlValueAccessor, RangeValueAccessor, NumberValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor];
    /**
     * @param {?} valueAccessor
     * @return {?}
     */

    function isBuiltInAccessor(valueAccessor) {
      return BUILTIN_ACCESSORS.some(
      /**
      * @param {?} a
      * @return {?}
      */
      function (a) {
        return valueAccessor.constructor === a;
      });
    }
    /**
     * @param {?} form
     * @param {?} directives
     * @return {?}
     */


    function syncPendingControls(form, directives) {
      form._syncPendingControls();

      directives.forEach(
      /**
      * @param {?} dir
      * @return {?}
      */
      function (dir) {
        /** @type {?} */
        var control =
        /** @type {?} */
        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

    /**
     * @param {?} dir
     * @param {?} valueAccessors
     * @return {?}
     */


    function selectValueAccessor(dir, valueAccessors) {
      if (!valueAccessors) return null;
      if (!Array.isArray(valueAccessors)) _throwError(dir, 'Value accessor was not provided as an array for form control with');
      /** @type {?} */

      var defaultAccessor = undefined;
      /** @type {?} */

      var builtinAccessor = undefined;
      /** @type {?} */

      var customAccessor = undefined;
      valueAccessors.forEach(
      /**
      * @param {?} v
      * @return {?}
      */
      function (v) {
        if (v.constructor === DefaultValueAccessor) {
          defaultAccessor = v;
        } else if (isBuiltInAccessor(v)) {
          if (builtinAccessor) _throwError(dir, 'More than one built-in value accessor matches form control with');
          builtinAccessor = v;
        } else {
          if (customAccessor) _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;

      _throwError(dir, 'No valid value accessor for form control with');

      return null;
    }
    /**
     * @template T
     * @param {?} list
     * @param {?} el
     * @return {?}
     */


    function removeDir(list, el) {
      /** @type {?} */
      var index = list.indexOf(el);
      if (index > -1) list.splice(index, 1);
    } // TODO(kara): remove after deprecation period

    /**
     * @param {?} name
     * @param {?} type
     * @param {?} instance
     * @param {?} warningConfig
     * @return {?}
     */


    function _ngModelWarning(name, type, instance, warningConfig) {
      if (!Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["isDevMode"])() || warningConfig === 'never') return;

      if ((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce || warningConfig === 'always' && !instance._ngModelWarningSent) {
        ReactiveErrors.ngModelWarning(name);
        type._ngModelWarningSentOnce = true;
        instance._ngModelWarningSent = true;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Reports that a FormControl is valid, meaning that no errors exist in the input value.
     *
     * @see `status`
     * @type {?}
     */


    var VALID = 'VALID';
    /**
     * Reports that a FormControl is invalid, meaning that an error exists in the input value.
     *
     * @see `status`
     * @type {?}
     */

    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`
     * @type {?}
     */

    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`
     * @type {?}
     */

    var DISABLED = 'DISABLED';
    /**
     * @param {?} control
     * @param {?} path
     * @param {?} delimiter
     * @return {?}
     */

    function _find(control, path, delimiter) {
      if (path == null) return null;

      if (!(path instanceof Array)) {
        path =
        /** @type {?} */
        path.split(delimiter);
      }

      if (path instanceof Array && path.length === 0) return null;
      return (
        /** @type {?} */
        path.reduce(
        /**
        * @param {?} v
        * @param {?} name
        * @return {?}
        */
        function (v, name) {
          if (v instanceof FormGroup) {
            return v.controls.hasOwnProperty(
            /** @type {?} */
            name) ? v.controls[name] : null;
          }

          if (v instanceof FormArray) {
            return v.at(
            /** @type {?} */
            name) || null;
          }

          return null;
        }, control)
      );
    }
    /**
     * @param {?=} validatorOrOpts
     * @return {?}
     */


    function coerceToValidator(validatorOrOpts) {
      /** @type {?} */
      var validator =
      /** @type {?} */
      isOptionsObj(validatorOrOpts) ?
      /** @type {?} */
      validatorOrOpts.validators : validatorOrOpts;
      return Array.isArray(validator) ? composeValidators(validator) : validator || null;
    }
    /**
     * @param {?=} asyncValidator
     * @param {?=} validatorOrOpts
     * @return {?}
     */


    function coerceToAsyncValidator(asyncValidator, validatorOrOpts) {
      /** @type {?} */
      var origAsyncValidator =
      /** @type {?} */
      isOptionsObj(validatorOrOpts) ?
      /** @type {?} */
      validatorOrOpts.asyncValidators : asyncValidator;
      return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) : origAsyncValidator || null;
    }
    /**
     * Interface for options provided to an `AbstractControl`.
     *
     * \@publicApi
     * @record
     */


    function AbstractControlOptions() {}

    if (false) {}
    /**
     * @param {?=} validatorOrOpts
     * @return {?}
     */


    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
     * @abstract
     */


    var AbstractControl = /*#__PURE__*/function () {
      /**
       * Initialize the AbstractControl instance.
       *
       * @param {?} validator The function that determines the synchronous validity of this control.
       * @param {?} asyncValidator The function that determines the asynchronous validity of this
       * control.
       */
      function AbstractControl(validator, asyncValidator) {
        _classCallCheck(this, AbstractControl);

        this.validator = validator;
        this.asyncValidator = asyncValidator;
        /**
         * \@internal
         */

        this._onCollectionChange =
        /**
        * @return {?}
        */
        function () {};
        /**
         * A control is `pristine` if the user has not yet changed
         * the value in the UI.
         *
         * @return 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 = [];
      }
      /**
       * The parent control.
       * @return {?}
       */


      _createClass2(AbstractControl, [{
        key: "setValidators",

        /**
         * 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.
         *
         * @param {?} newValidator
         * @return {?}
         */
        value: function setValidators(newValidator) {
          this.validator = 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.
         *
         * @param {?} newValidator
         * @return {?}
         */

      }, {
        key: "setAsyncValidators",
        value: function setAsyncValidators(newValidator) {
          this.asyncValidator = 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.
         *
         * @return {?}
         */

      }, {
        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.
         *
         * @return {?}
         */

      }, {
        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()` / `markAsDirty()` / `markAsPristine()`
         *
         * @param {?=} opts Configuration options that determine how the control propagates changes
         * and emits events events after marking is applied.
         * * `onlySelf`: When true, mark only this control. When false or not supplied,
         * marks all direct ancestors. Default is false.
         * @return {?}
         */

      }, {
        key: "markAsTouched",
        value: function markAsTouched() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.touched = true;

          if (this._parent && !opts.onlySelf) {
            this._parent.markAsTouched(opts);
          }
        }
        /**
         * Marks the control and all its descendant controls as `touched`.
         * @see `markAsTouched()`
         * @return {?}
         */

      }, {
        key: "markAllAsTouched",
        value: function markAllAsTouched() {
          this.markAsTouched({
            onlySelf: true
          });

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          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()` / `markAsDirty()` / `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.
         * @return {?}
         */

      }, {
        key: "markAsUntouched",
        value: function markAsUntouched() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.touched = false;
          this._pendingTouched = false;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          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()` / `markAsUntouched()` / `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.
         * @return {?}
         */

      }, {
        key: "markAsDirty",
        value: function markAsDirty() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          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()` / `markAsUntouched()` / `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..
         * @return {?}
         */

      }, {
        key: "markAsPristine",
        value: function markAsPristine() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.pristine = true;
          this._pendingDirty = false;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          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.
         *
         * @return {?}
         */

      }, {
        key: "markAsPending",
        value: function markAsPending() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.status = PENDING;

          if (opts.emitEvent !== false) {
            /** @type {?} */
            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.
         * @return {?}
         */

      }, {
        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.

          /** @type {?} */
          var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);

          /** @type {?} */
          this.status = DISABLED;

          /** @type {?} */
          this.errors = null;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            control.disable(Object.assign({}, opts, {
              onlySelf: true
            }));
          });

          this._updateValue();

          if (opts.emitEvent !== false) {
            /** @type {?} */
            this.valueChanges.emit(this.value);

            /** @type {?} */
            this.statusChanges.emit(this.status);
          }

          this._updateAncestors(Object.assign({}, opts, {
            skipPristineCheck: skipPristineCheck
          }));

          this._onDisabledChange.forEach(
          /**
          * @param {?} changeFn
          * @return {?}
          */
          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.
         * @return {?}
         */

      }, {
        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.

          /** @type {?} */
          var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);

          /** @type {?} */
          this.status = VALID;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            control.enable(Object.assign({}, opts, {
              onlySelf: true
            }));
          });

          this.updateValueAndValidity({
            onlySelf: true,
            emitEvent: opts.emitEvent
          });

          this._updateAncestors(Object.assign({}, opts, {
            skipPristineCheck: skipPristineCheck
          }));

          this._onDisabledChange.forEach(
          /**
          * @param {?} changeFn
          * @return {?}
          */
          function (changeFn) {
            return changeFn(false);
          });
        }
        /**
         * @private
         * @param {?} opts
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "updateValueAndValidity",
        value: function updateValueAndValidity() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          this._setInitialStatus();

          this._updateValue();

          if (this.enabled) {
            this._cancelExistingSubscription();

            /** @type {?} */
            this.errors = this._runValidator();

            /** @type {?} */
            this.status = this._calculateStatus();

            if (this.status === VALID || this.status === PENDING) {
              this._runAsyncValidator(opts.emitEvent);
            }
          }

          if (opts.emitEvent !== false) {
            /** @type {?} */
            this.valueChanges.emit(this.value);

            /** @type {?} */
            this.statusChanges.emit(this.status);
          }

          if (this._parent && !opts.onlySelf) {
            this._parent.updateValueAndValidity(opts);
          }
        }
        /**
         * \@internal
         * @param {?=} opts
         * @return {?}
         */

      }, {
        key: "_updateTreeValidity",
        value: function _updateTreeValidity() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
            emitEvent: true
          };

          this._forEachChild(
          /**
          * @param {?} ctrl
          * @return {?}
          */
          function (ctrl) {
            return ctrl._updateTreeValidity(opts);
          });

          this.updateValueAndValidity({
            onlySelf: true,
            emitEvent: opts.emitEvent
          });
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setInitialStatus",
        value: function _setInitialStatus() {
          /** @type {?} */
          this.status = this._allControlsDisabled() ? DISABLED : VALID;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_runValidator",
        value: function _runValidator() {
          return this.validator ? this.validator(this) : null;
        }
        /**
         * @private
         * @param {?=} emitEvent
         * @return {?}
         */

      }, {
        key: "_runAsyncValidator",
        value: function _runAsyncValidator(emitEvent) {
          var _this349 = this;

          if (this.asyncValidator) {
            /** @type {?} */
            this.status = PENDING;
            /** @type {?} */

            var obs = toObservable(this.asyncValidator(this));
            this._asyncValidationSubscription = obs.subscribe(
            /**
            * @param {?} errors
            * @return {?}
            */
            function (errors) {
              return _this349.setErrors(errors, {
                emitEvent: emitEvent
              });
            });
          }
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_cancelExistingSubscription",
        value: function _cancelExistingSubscription() {
          if (this._asyncValidationSubscription) {
            this._asyncValidationSubscription.unsubscribe();
          }
        }
        /**
         * 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);
         * ```
         * @param {?} errors
         * @param {?=} opts
         * @return {?}
         */

      }, {
        key: "setErrors",
        value: function setErrors(errors) {
          var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

          /** @type {?} */
          this.errors = errors;

          this._updateControlsErrors(opts.emitEvent !== false);
        }
        /**
         * Retrieves a child control given the control's name or path.
         *
         * \@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']);`
         * @param {?} path A dot-delimited string or array of string/number values that define the path to the
         * control.
         *
         * @return {?}
         */

      }, {
        key: "get",
        value: function get(path) {
          return _find(this, path, '.');
        }
        /**
         * \@description
         * Reports error data for the control with the given path.
         *
         * \@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'`
         *
         * @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.
         *
         * @return {?} error data for that particular error. If the control or error is not present,
         * null is returned.
         */

      }, {
        key: "getError",
        value: function getError(errorCode, path) {
          /** @type {?} */
          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.
         *
         * \@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.
         *
         * @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.
         *
         * @return {?} 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.
         * @return {?}
         */

      }, {
        key: "_updateControlsErrors",

        /**
         * \@internal
         * @param {?} emitEvent
         * @return {?}
         */
        value: function _updateControlsErrors(emitEvent) {
          /** @type {?} */
          this.status = this._calculateStatus();

          if (emitEvent) {
            /** @type {?} */
            this.statusChanges.emit(this.status);
          }

          if (this._parent) {
            this._parent._updateControlsErrors(emitEvent);
          }
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_initObservables",
        value: function _initObservables() {
          /** @type {?} */
          this.valueChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();

          /** @type {?} */
          this.statusChanges = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_calculateStatus",
        value: function _calculateStatus() {
          if (this._allControlsDisabled()) return DISABLED;
          if (this.errors) return INVALID;
          if (this._anyControlsHaveStatus(PENDING)) return PENDING;
          if (this._anyControlsHaveStatus(INVALID)) return INVALID;
          return VALID;
        }
        /**
         * \@internal
         * @param {?} status
         * @return {?}
         */

      }, {
        key: "_anyControlsHaveStatus",
        value: function _anyControlsHaveStatus(status) {
          return this._anyControls(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.status === status;
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_anyControlsDirty",
        value: function _anyControlsDirty() {
          return this._anyControls(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.dirty;
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_anyControlsTouched",
        value: function _anyControlsTouched() {
          return this._anyControls(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.touched;
          });
        }
        /**
         * \@internal
         * @param {?=} opts
         * @return {?}
         */

      }, {
        key: "_updatePristine",
        value: function _updatePristine() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.pristine = !this._anyControlsDirty();

          if (this._parent && !opts.onlySelf) {
            this._parent._updatePristine(opts);
          }
        }
        /**
         * \@internal
         * @param {?=} opts
         * @return {?}
         */

      }, {
        key: "_updateTouched",
        value: function _updateTouched() {
          var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

          /** @type {?} */
          this.touched = this._anyControlsTouched();

          if (this._parent && !opts.onlySelf) {
            this._parent._updateTouched(opts);
          }
        }
        /**
         * \@internal
         * @param {?} formState
         * @return {?}
         */

      }, {
        key: "_isBoxedValue",
        value: function _isBoxedValue(formState) {
          return typeof formState === 'object' && formState !== null && Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;
        }
        /**
         * \@internal
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "_registerOnCollectionChange",
        value: function _registerOnCollectionChange(fn) {
          this._onCollectionChange = fn;
        }
        /**
         * \@internal
         * @param {?=} opts
         * @return {?}
         */

      }, {
        key: "_setUpdateStrategy",
        value: function _setUpdateStrategy(opts) {
          if (isOptionsObj(opts) &&
          /** @type {?} */
          opts.updateOn != null) {
            this._updateOn =
            /** @type {?} */

            /** @type {?} */
            opts.updateOn;
          }
        }
        /**
         * Check to see if parent has been marked artificially dirty.
         *
         * \@internal
         * @private
         * @param {?=} onlySelf
         * @return {?}
         */

      }, {
        key: "_parentMarkedDirty",
        value: function _parentMarkedDirty(onlySelf) {
          /** @type {?} */
          var parentDirty = this._parent && this._parent.dirty;
          return !onlySelf && parentDirty && !this._parent._anyControlsDirty();
        }
      }, {
        key: "parent",
        get: function get() {
          return this._parent;
        }
        /**
         * A control is `valid` when its `status` is `VALID`.
         *
         * @see {\@link AbstractControl.status}
         *
         * @return {?} 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}
         *
         * @return {?} 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}
         *
         * @return {?} 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}
         *
         * @return {?} 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`.
         *
         * @see {\@link AbstractControl.status}
         *
         * @return {?} True if the control has any status other than 'DISABLED',
         * false if the status is 'DISABLED'.
         *
         */

      }, {
        key: "enabled",
        get: function get() {
          return this.status !== DISABLED;
        }
        /**
         * A control is `dirty` if the user has changed the value
         * in the UI.
         *
         * @return {?} 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.
         * @return {?}
         */

      }, {
        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'`
         * @return {?}
         */

      }, {
        key: "updateOn",
        get: function get() {
          return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';
        }
      }, {
        key: "root",
        get: function get() {
          /** @type {?} */
          var x = this;

          while (x._parent) {
            x = x._parent;
          }

          return x;
        }
      }]);

      return AbstractControl;
    }();

    if (false) {}
    /**
     * 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 `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 _this350;

        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);

        _this350 = _super127.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts));
        /**
         * \@internal
         */

        _this350._onChange = [];

        _this350._applyFormState(formState);

        _this350._setUpdateStrategy(validatorOrOpts);

        _this350.updateValueAndValidity({
          onlySelf: true,
          emitEvent: false
        });

        _this350._initObservables();

        return _this350;
      }
      /**
       * 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.
       *
       * @return {?}
       */


      _createClass2(FormControl, [{
        key: "setValue",
        value: function setValue(value) {
          var _this351 = this;

          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

          /** @type {?} */
          this.value = this._pendingValue = value;

          if (this._onChange.length && options.emitModelToViewChange !== false) {
            this._onChange.forEach(
            /**
            * @param {?} changeFn
            * @return {?}
            */
            function (changeFn) {
              return changeFn(_this351.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
         * @param {?} value
         * @param {?=} options
         * @return {?}
         */

      }, {
        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.
         *
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "_updateValue",
        value: function _updateValue() {}
        /**
         * \@internal
         * @param {?} condition
         * @return {?}
         */

      }, {
        key: "_anyControls",
        value: function _anyControls(condition) {
          return false;
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "registerOnChange",
        value: function registerOnChange(fn) {
          this._onChange.push(fn);
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_clearChangeFns",
        value: function _clearChangeFns() {
          this._onChange = [];
          this._onDisabledChange = [];

          this._onCollectionChange =
          /**
          * @return {?}
          */
          function () {};
        }
        /**
         * Register a listener for disabled events.
         *
         * @param {?} fn The method that is called when the disabled status changes.
         * @return {?}
         */

      }, {
        key: "registerOnDisabledChange",
        value: function registerOnDisabledChange(fn) {
          this._onDisabledChange.push(fn);
        }
        /**
         * \@internal
         * @param {?} cb
         * @return {?}
         */

      }, {
        key: "_forEachChild",
        value: function _forEachChild(cb) {}
        /**
         * \@internal
         * @return {?}
         */

      }, {
        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;
        }
        /**
         * @private
         * @param {?} formState
         * @return {?}
         */

      }, {
        key: "_applyFormState",
        value: function _applyFormState(formState) {
          if (this._isBoxedValue(formState)) {
            /** @type {?} */
            this.value = this._pendingValue = formState.value;
            formState.disabled ? this.disable({
              onlySelf: true,
              emitEvent: false
            }) : this.enable({
              onlySelf: true,
              emitEvent: false
            });
          } else {
            /** @type {?} */
            this.value = this._pendingValue = formState;
          }
        }
      }]);

      return FormControl;
    }(AbstractControl);

    if (false) {}
    /**
     * 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 _this352;

        _classCallCheck(this, FormGroup);

        _this352 = _super128.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts));
        _this352.controls = controls;

        _this352._initObservables();

        _this352._setUpdateStrategy(validatorOrOpts);

        _this352._setUpControls();

        _this352.updateValueAndValidity({
          onlySelf: true,
          emitEvent: false
        });

        return _this352;
      }
      /**
       * 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
       * @return {?}
       */


      _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
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "removeControl",
        value: function removeControl(name) {
          if (this.controls[name]) this.controls[name]._registerOnCollectionChange(
          /**
          * @return {?}
          */
          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
         * @return {?}
         */

      }, {
        key: "setControl",
        value: function setControl(name, control) {
          if (this.controls[name]) this.controls[name]._registerOnCollectionChange(
          /**
          * @return {?}
          */
          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
         *
         * @return {?} 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.
         * @return {?}
         */

      }, {
        key: "setValue",
        value: function setValue(value) {
          var _this353 = this;

          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

          this._checkAllValuesPresent(value);

          Object.keys(value).forEach(
          /**
          * @param {?} name
          * @return {?}
          */
          function (name) {
            _this353._throwIfControlMissing(name);

            _this353.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.
         * @return {?}
         */

      }, {
        key: "patchValue",
        value: function patchValue(value) {
          var _this354 = this;

          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
          Object.keys(value).forEach(
          /**
          * @param {?} name
          * @return {?}
          */
          function (name) {
            if (_this354.controls[name]) {
              _this354.controls[name].patchValue(value[name], {
                onlySelf: true,
                emitEvent: options.emitEvent
              });
            }
          });
          this.updateValueAndValidity(options);
        }
        /**
         * Resets the `FormGroup`, marks all descendants are marked `pristine` and `untouched`, and
         * 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.
         *
         * \@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(this.form.value);  // {first: 'name', last: 'last name'}
         * console.log(this.form.get('first').status);  // 'DISABLED'
         * ```
         * @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.
         *
         * @return {?}
         */

      }, {
        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(
          /**
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          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`.
         * @return {?}
         */

      }, {
        key: "getRawValue",
        value: function getRawValue() {
          return this._reduceChildren({},
          /**
          * @param {?} acc
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          function (acc, control, name) {
            acc[name] = control instanceof FormControl ? control.value :
            /** @type {?} */
            control.getRawValue();
            return acc;
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_syncPendingControls",
        value: function _syncPendingControls() {
          /** @type {?} */
          var subtreeUpdated = this._reduceChildren(false,
          /**
          * @param {?} updated
          * @param {?} child
          * @return {?}
          */
          function (updated, child) {
            return child._syncPendingControls() ? true : updated;
          });

          if (subtreeUpdated) this.updateValueAndValidity({
            onlySelf: true
          });
          return subtreeUpdated;
        }
        /**
         * \@internal
         * @param {?} name
         * @return {?}
         */

      }, {
        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
         * @param {?} cb
         * @return {?}
         */

      }, {
        key: "_forEachChild",
        value: function _forEachChild(cb) {
          var _this355 = this;

          Object.keys(this.controls).forEach(
          /**
          * @param {?} k
          * @return {?}
          */
          function (k) {
            return cb(_this355.controls[k], k);
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_setUpControls",
        value: function _setUpControls() {
          var _this356 = this;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            control.setParent(_this356);

            control._registerOnCollectionChange(_this356._onCollectionChange);
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_updateValue",
        value: function _updateValue() {
          /** @type {?} */
          this.value = this._reduceValue();
        }
        /**
         * \@internal
         * @param {?} condition
         * @return {?}
         */

      }, {
        key: "_anyControls",
        value: function _anyControls(condition) {
          var _this357 = this;

          /** @type {?} */
          var res = false;

          this._forEachChild(
          /**
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          function (control, name) {
            res = res || _this357.contains(name) && condition(control);
          });

          return res;
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_reduceValue",
        value: function _reduceValue() {
          var _this358 = this;

          return this._reduceChildren({},
          /**
          * @param {?} acc
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          function (acc, control, name) {
            if (control.enabled || _this358.disabled) {
              acc[name] = control.value;
            }

            return acc;
          });
        }
        /**
         * \@internal
         * @param {?} initValue
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "_reduceChildren",
        value: function _reduceChildren(initValue, fn) {
          /** @type {?} */
          var res = initValue;

          this._forEachChild(
          /**
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          function (control, name) {
            res = fn(res, control, name);
          });

          return res;
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_allControlsDisabled",
        value: function _allControlsDisabled() {
          for (var _i33 = 0, _Object$keys5 = Object.keys(this.controls); _i33 < _Object$keys5.length; _i33++) {
            var controlName = _Object$keys5[_i33];

            if (this.controls[controlName].enabled) {
              return false;
            }
          }

          return Object.keys(this.controls).length > 0 || this.disabled;
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_checkAllValuesPresent",
        value: function _checkAllValuesPresent(value) {
          this._forEachChild(
          /**
          * @param {?} control
          * @param {?} name
          * @return {?}
          */
          function (control, name) {
            if (value[name] === undefined) {
              throw new Error("Must supply a value for form control with name: '".concat(name, "'."));
            }
          });
        }
      }]);

      return FormGroup;
    }(AbstractControl);

    if (false) {}
    /**
     * 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 _this359;

        _classCallCheck(this, FormArray);

        _this359 = _super129.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts));
        _this359.controls = controls;

        _this359._initObservables();

        _this359._setUpdateStrategy(validatorOrOpts);

        _this359._setUpControls();

        _this359.updateValueAndValidity({
          onlySelf: true,
          emitEvent: false
        });

        return _this359;
      }
      /**
       * Get the `AbstractControl` at the given `index` in the array.
       *
       * @param {?} index Index in the array to retrieve the control
       * @return {?}
       */


      _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
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "removeAt",
        value: function removeAt(index) {
          if (this.controls[index]) this.controls[index]._registerOnCollectionChange(
          /**
          * @return {?}
          */
          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
         * @return {?}
         */

      }, {
        key: "setControl",
        value: function setControl(index, control) {
          if (this.controls[index]) this.controls[index]._registerOnCollectionChange(
          /**
          * @return {?}
          */
          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.
         * @return {?}
         */

      }, {
        key: "setValue",

        /**
         * 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.
         * @return {?}
         */
        value: function setValue(value) {
          var _this360 = this;

          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

          this._checkAllValuesPresent(value);

          value.forEach(
          /**
          * @param {?} newValue
          * @param {?} index
          * @return {?}
          */
          function (newValue, index) {
            _this360._throwIfControlMissing(index);

            _this360.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.
         * @return {?}
         */

      }, {
        key: "patchValue",
        value: function patchValue(value) {
          var _this361 = this;

          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
          value.forEach(
          /**
          * @param {?} newValue
          * @param {?} index
          * @return {?}
          */
          function (newValue, index) {
            if (_this361.at(index)) {
              _this361.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.
         * @return {?}
         */

      }, {
        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(
          /**
          * @param {?} control
          * @param {?} index
          * @return {?}
          */
          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.
         * @return {?}
         */

      }, {
        key: "getRawValue",
        value: function getRawValue() {
          return this.controls.map(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control instanceof FormControl ? control.value :
            /** @type {?} */
            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);
         * }
         * ```
         * @return {?}
         */

      }, {
        key: "clear",
        value: function clear() {
          if (this.controls.length < 1) return;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control._registerOnCollectionChange(
            /**
            * @return {?}
            */
            function () {});
          });

          this.controls.splice(0);
          this.updateValueAndValidity();
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_syncPendingControls",
        value: function _syncPendingControls() {
          /** @type {?} */
          var subtreeUpdated = this.controls.reduce(
          /**
          * @param {?} updated
          * @param {?} child
          * @return {?}
          */
          function (updated, child) {
            return child._syncPendingControls() ? true : updated;
          }, false);
          if (subtreeUpdated) this.updateValueAndValidity({
            onlySelf: true
          });
          return subtreeUpdated;
        }
        /**
         * \@internal
         * @param {?} index
         * @return {?}
         */

      }, {
        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
         * @param {?} cb
         * @return {?}
         */

      }, {
        key: "_forEachChild",
        value: function _forEachChild(cb) {
          this.controls.forEach(
          /**
          * @param {?} control
          * @param {?} index
          * @return {?}
          */
          function (control, index) {
            cb(control, index);
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_updateValue",
        value: function _updateValue() {
          var _this362 = this;

          /** @type {?} */
          this.value = this.controls.filter(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.enabled || _this362.disabled;
          }).map(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.value;
          });
        }
        /**
         * \@internal
         * @param {?} condition
         * @return {?}
         */

      }, {
        key: "_anyControls",
        value: function _anyControls(condition) {
          return this.controls.some(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return control.enabled && condition(control);
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_setUpControls",
        value: function _setUpControls() {
          var _this363 = this;

          this._forEachChild(
          /**
          * @param {?} control
          * @return {?}
          */
          function (control) {
            return _this363._registerControl(control);
          });
        }
        /**
         * \@internal
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_checkAllValuesPresent",
        value: function _checkAllValuesPresent(value) {
          this._forEachChild(
          /**
          * @param {?} control
          * @param {?} i
          * @return {?}
          */
          function (control, i) {
            if (value[i] === undefined) {
              throw new Error("Must supply a value for form control at index: ".concat(i, "."));
            }
          });
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_allControlsDisabled",
        value: function _allControlsDisabled() {
          var _iterator45 = _createForOfIteratorHelper(this.controls),
              _step45;

          try {
            for (_iterator45.s(); !(_step45 = _iterator45.n()).done;) {
              var control = _step45.value;
              if (control.enabled) return false;
            }
          } catch (err) {
            _iterator45.e(err);
          } finally {
            _iterator45.f();
          }

          return this.controls.length > 0 || this.disabled;
        }
        /**
         * @private
         * @param {?} control
         * @return {?}
         */

      }, {
        key: "_registerControl",
        value: function _registerControl(control) {
          control.setParent(this);

          control._registerOnCollectionChange(this._onCollectionChange);
        }
      }, {
        key: "length",
        get: function get() {
          return this.controls.length;
        }
      }]);

      return FormArray;
    }(AbstractControl);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var formDirectiveProvider = {
      provide: ControlContainer,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return NgForm;
      })
    };

    var ɵ0 =
    /**
    * @return {?}
    */
    function ɵ0() {
      return Promise.resolve(null);
    };
    /** @type {?} */


    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
     *
     * ### Migrating from deprecated ngForm selector
     *
     * Support for using `ngForm` element selector has been deprecated in Angular v6 and will be removed
     * in Angular v9.
     *
     * This has been deprecated to keep selectors consistent with other core Angular selectors,
     * as element selectors are typically written in kebab-case.
     *
     * Now deprecated:
     * ```html
     * <ngForm #myForm="ngForm">
     * ```
     *
     * After:
     * ```html
     * <ng-form #myForm="ngForm">
     * ```
     *
     * ### 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>
     * ```
     *
     * \@ngModule FormsModule
     * \@publicApi
     */

    var NgForm = /*#__PURE__*/function (_ControlContainer) {
      _inherits(NgForm, _ControlContainer);

      var _super130 = _createSuper(NgForm);

      /**
       * @param {?} validators
       * @param {?} asyncValidators
       */
      function NgForm(validators, asyncValidators) {
        var _this364;

        _classCallCheck(this, NgForm);

        _this364 = _super130.call(this);
        /**
         * \@description
         * Returns whether the form submission has been triggered.
         */

        _this364.submitted = false;
        _this364._directives = [];
        /**
         * \@description
         * Event emitter for the "ngSubmit" event
         */

        _this364.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        _this364.form = new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));
        return _this364;
      }
      /**
       * \@description
       * Lifecycle method called after the view is initialized. For internal use only.
       * @return {?}
       */


      _createClass2(NgForm, [{
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this._setUpdateStrategy();
        }
        /**
         * \@description
         * The directive instance.
         * @return {?}
         */

      }, {
        key: "addControl",

        /**
         * \@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.
         * @return {?}
         */
        value: function addControl(dir) {
          var _this365 = this;

          resolvedPromise.then(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var container = _this365._findContainer(dir.path);

            /** @type {?} */
            dir.control =
            /** @type {?} */
            container.registerControl(dir.name, dir.control);
            setUpControl(dir.control, dir);
            dir.control.updateValueAndValidity({
              emitEvent: false
            });

            _this365._directives.push(dir);
          });
        }
        /**
         * \@description
         * Retrieves the `FormControl` instance from the provided `NgModel` directive.
         *
         * @param {?} dir The `NgModel` directive instance.
         * @return {?}
         */

      }, {
        key: "getControl",
        value: function getControl(dir) {
          return (
            /** @type {?} */
            this.form.get(dir.path)
          );
        }
        /**
         * \@description
         * Removes the `NgModel` instance from the internal list of directives
         *
         * @param {?} dir The `NgModel` directive instance.
         * @return {?}
         */

      }, {
        key: "removeControl",
        value: function removeControl(dir) {
          var _this366 = this;

          resolvedPromise.then(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var container = _this366._findContainer(dir.path);

            if (container) {
              container.removeControl(dir.name);
            }

            removeDir(_this366._directives, dir);
          });
        }
        /**
         * \@description
         * Adds a new `NgModelGroup` directive instance to the form.
         *
         * @param {?} dir The `NgModelGroup` directive instance.
         * @return {?}
         */

      }, {
        key: "addFormGroup",
        value: function addFormGroup(dir) {
          var _this367 = this;

          resolvedPromise.then(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var container = _this367._findContainer(dir.path);
            /** @type {?} */


            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.
         * @return {?}
         */

      }, {
        key: "removeFormGroup",
        value: function removeFormGroup(dir) {
          var _this368 = this;

          resolvedPromise.then(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var container = _this368._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.
         * @return {?}
         */

      }, {
        key: "getFormGroup",
        value: function getFormGroup(dir) {
          return (
            /** @type {?} */
            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.
         * @return {?}
         */

      }, {
        key: "updateModel",
        value: function updateModel(dir, value) {
          var _this369 = this;

          resolvedPromise.then(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var ctrl =
            /** @type {?} */
            _this369.form.get(
            /** @type {?} */
            dir.path);

            ctrl.setValue(value);
          });
        }
        /**
         * \@description
         * Sets the value for this `FormGroup`.
         *
         * @param {?} value The new value
         * @return {?}
         */

      }, {
        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
         * @return {?}
         */

      }, {
        key: "onSubmit",
        value: function onSubmit($event) {
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "resetForm",
        value: function resetForm() {
          var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
          this.form.reset(value);

          /** @type {?} */
          this.submitted = false;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setUpdateStrategy",
        value: function _setUpdateStrategy() {
          if (this.options && this.options.updateOn != null) {
            this.form._updateOn = this.options.updateOn;
          }
        }
        /**
         * \@internal
         * @param {?} path
         * @return {?}
         */

      }, {
        key: "_findContainer",
        value: function _findContainer(path) {
          path.pop();
          return path.length ?
          /** @type {?} */
          this.form.get(path) : this.form;
        }
      }, {
        key: "formDirective",
        get: function get() {
          return this;
        }
        /**
         * \@description
         * The internal `FormGroup` instance.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return [];
        }
        /**
         * \@description
         * Returns a map of the controls in this group.
         * @return {?}
         */

      }, {
        key: "controls",
        get: function get() {
          return this.form.controls;
        }
      }]);

      return NgForm;
    }(ControlContainer);

    NgForm.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]',
        providers: [formDirectiveProvider],
        host: {
          '(submit)': 'onSubmit($event)',
          '(reset)': 'onReset()'
        },
        outputs: ['ngSubmit'],
        exportAs: 'ngForm'
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var TemplateDrivenErrors = /*#__PURE__*/function () {
      function TemplateDrivenErrors() {
        _classCallCheck(this, TemplateDrivenErrors);
      }

      _createClass2(TemplateDrivenErrors, null, [{
        key: "modelParentException",

        /**
         * @return {?}
         */
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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));
        }
        /**
         * @return {?}
         */

      }, {
        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}\">");
        }
        /**
         * @return {?}
         */

      }, {
        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 {?}
         */

      }, {
        key: "ngFormWarning",
        value: function ngFormWarning() {
          console.warn("\n    It looks like you're using 'ngForm'.\n\n    Support for using the 'ngForm' element selector has been deprecated in Angular v6 and will be removed\n    in Angular v9.\n\n    Use 'ng-form' instead.\n\n    Before:\n    <ngForm #myForm=\"ngForm\">\n\n    After:\n    <ng-form #myForm=\"ngForm\">\n    ");
        }
      }]);

      return TemplateDrivenErrors;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@description
     * `InjectionToken` to provide to turn off the warning when using 'ngForm' deprecated selector.
     * @type {?}
     */


    var NG_FORM_SELECTOR_WARNING = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgFormSelectorWarning');
    /**
     * This directive is solely used to display warnings when the deprecated `ngForm` selector is used.
     *
     * @deprecated in Angular v6 and will be removed in Angular v9.
     * \@ngModule FormsModule
     * \@publicApi
     */

    var NgFormSelectorWarning =
    /**
     * @param {?} ngFormWarning
     */
    function NgFormSelectorWarning(ngFormWarning) {
      _classCallCheck(this, NgFormSelectorWarning);

      if ((!ngFormWarning || ngFormWarning === 'once') && !NgFormSelectorWarning._ngFormWarning || ngFormWarning === 'always') {
        TemplateDrivenErrors.ngFormWarning();
        NgFormSelectorWarning._ngFormWarning = true;
      }
    };
    /**
     * Static property used to track whether the deprecation warning for this selector has been sent.
     * Used to support warning config of "once".
     *
     * \@internal
     */


    NgFormSelectorWarning._ngFormWarning = false;
    NgFormSelectorWarning.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'ngForm'
      }]
    }];
    /** @nocollapse */

    NgFormSelectorWarning.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"],
          args: [NG_FORM_SELECTOR_WARNING]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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",

        /**
         * \@description
         * An internal callback method triggered on the instance after the inputs are set.
         * Registers the group with its parent group.
         * @return {?}
         */
        value: function ngOnInit() {
          this._checkParentType();

          /** @type {?} */
          this.formDirective.addFormGroup(this);
        }
        /**
         * \@description
         * An internal callback method triggered before the instance is destroyed.
         * Removes the group from its parent group.
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this.formDirective) {
            this.formDirective.removeFormGroup(this);
          }
        }
        /**
         * \@description
         * The `FormGroup` bound to this directive.
         * @return {?}
         */

      }, {
        key: "_checkParentType",

        /**
         * \@internal
         * @return {?}
         */
        value: function _checkParentType() {}
      }, {
        key: "control",
        get: function get() {
          return (
            /** @type {?} */
            this.formDirective.getFormGroup(this)
          );
        }
        /**
         * \@description
         * The path to this group from the top-level directive.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return controlPath(this.name, this._parent);
        }
        /**
         * \@description
         * The top-level directive for this group if present, otherwise null.
         * @return {?}
         */

      }, {
        key: "formDirective",
        get: function get() {
          return this._parent ? this._parent.formDirective : null;
        }
        /**
         * \@description
         * The synchronous validators registered with this group.
         * @return {?}
         */

      }, {
        key: "validator",
        get: function get() {
          return composeValidators(this._validators);
        }
        /**
         * \@description
         * The async validators registered with this group.
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return composeAsyncValidators(this._asyncValidators);
        }
      }]);

      return AbstractFormGroupDirective;
    }(ControlContainer);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var modelGroupProvider = {
      provide: ControlContainer,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);

      /**
       * @param {?} parent
       * @param {?} validators
       * @param {?} asyncValidators
       */
      function NgModelGroup(parent, validators, asyncValidators) {
        var _this370;

        _classCallCheck(this, NgModelGroup);

        _this370 = _super132.call(this);
        _this370._parent = parent;
        _this370._validators = validators;
        _this370._asyncValidators = asyncValidators;
        return _this370;
      }
      /**
       * \@internal
       * @return {?}
       */


      _createClass2(NgModelGroup, [{
        key: "_checkParentType",
        value: function _checkParentType() {
          if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {
            TemplateDrivenErrors.modelGroupParentException();
          }
        }
      }]);

      return NgModelGroup;
    }(AbstractFormGroupDirective);

    NgModelGroup.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngModelGroup]',
        providers: [modelGroupProvider],
        exportAs: 'ngModelGroup'
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var formControlBinding = {
      provide: NgControl,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return NgModel;
      })
    };

    var ɵ0$1 =
    /**
    * @return {?}
    */
    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 and 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` have been changed.
     * - this is a general problem when using `exportAs` for directives!
     * @type {?}
     */


    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 value of the domain model in the component
     * class sets the value in the view. If you have a two-way binding with `[()]` syntax
     * (also known as 'banana-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 validity state),
     * export the directive into a local template variable using `ngModel` as the key (ex: `#myVar="ngModel"`).
     * You then access the control using the directive's `control` property,
     * but most properties used (like `valid` and `dirty`) fall through to the control anyway 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. The name attribute is used
     * within a custom form component, and the name `\@Input` property serves a different purpose.
     *
     * ```html
     * <form>
     *   <my-person-control name="Nancy" ngModel [ngModelOptions]="{name: 'user'}">
     *   </my-person-control>
     * </form>
     * <!-- form value: {user: ''} -->
     * ```
     *
     * \@ngModule FormsModule
     * \@publicApi
     */

    var NgModel = /*#__PURE__*/function (_NgControl) {
      _inherits(NgModel, _NgControl);

      var _super133 = _createSuper(NgModel);

      /**
       * @param {?} parent
       * @param {?} validators
       * @param {?} asyncValidators
       * @param {?} valueAccessors
       */
      function NgModel(parent, validators, asyncValidators, valueAccessors) {
        var _this371;

        _classCallCheck(this, NgModel);

        _this371 = _super133.call(this);
        _this371.control = new FormControl();
        /**
         * \@internal
         */

        _this371._registered = false;
        /**
         * \@description
         * Event emitter for producing the `ngModelChange` event after
         * the view model updates.
         */

        _this371.update = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        _this371._parent = parent;
        _this371._rawValidators = validators || [];
        _this371._rawAsyncValidators = asyncValidators || [];
        _this371.valueAccessor = selectValueAccessor(_assertThisInitialized(_this371), valueAccessors);
        return _this371;
      }
      /**
       * \@description
       * A lifecycle method called when the directive's inputs change. For internal use
       * only.
       *
       * @param {?} changes A object of key/value pairs for the set of changed inputs.
       * @return {?}
       */


      _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;
          }
        }
        /**
         * \@description
         * Lifecycle method called before the directive's instance is destroyed. For internal
         * use only.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "viewToModelUpdate",

        /**
         * \@description
         * Sets the new value for the view model and emits an `ngModelChange` event.
         *
         * @param {?} newValue The new value emitted by `ngModelChange`.
         * @return {?}
         */
        value: function viewToModelUpdate(newValue) {
          this.viewModel = newValue;
          this.update.emit(newValue);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setUpControl",
        value: function _setUpControl() {
          this._setUpdateStrategy();

          this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);
          this._registered = true;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setUpdateStrategy",
        value: function _setUpdateStrategy() {
          if (this.options && this.options.updateOn != null) {
            this.control._updateOn = this.options.updateOn;
          }
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_isStandalone",
        value: function _isStandalone() {
          return !this._parent || !!(this.options && this.options.standalone);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setUpStandalone",
        value: function _setUpStandalone() {
          setUpControl(this.control, this);
          this.control.updateValueAndValidity({
            emitEvent: false
          });
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_checkForErrors",
        value: function _checkForErrors() {
          if (!this._isStandalone()) {
            this._checkParentType();
          }

          this._checkName();
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_checkParentType",
        value: function _checkParentType() {
          if (!(this._parent instanceof NgModelGroup) && this._parent instanceof AbstractFormGroupDirective) {
            TemplateDrivenErrors.formGroupNameException();
          } else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {
            TemplateDrivenErrors.modelParentException();
          }
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_checkName",
        value: function _checkName() {
          if (this.options && this.options.name) this.name = this.options.name;

          if (!this._isStandalone() && !this.name) {
            TemplateDrivenErrors.missingNameException();
          }
        }
        /**
         * @private
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "_updateValue",
        value: function _updateValue(value) {
          var _this372 = this;

          resolvedPromise$1.then(
          /**
          * @return {?}
          */
          function () {
            _this372.control.setValue(value, {
              emitViewToModelChange: false
            });
          });
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_updateDisabled",
        value: function _updateDisabled(changes) {
          var _this373 = this;

          /** @type {?} */
          var disabledValue = changes['isDisabled'].currentValue;
          /** @type {?} */

          var isDisabled = disabledValue === '' || disabledValue && disabledValue !== 'false';
          resolvedPromise$1.then(
          /**
          * @return {?}
          */
          function () {
            if (isDisabled && !_this373.control.disabled) {
              _this373.control.disable();
            } else if (!isDisabled && _this373.control.disabled) {
              _this373.control.enable();
            }
          });
        }
      }, {
        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.
         * @return {?}
         */

      }, {
        key: "formDirective",
        get: function get() {
          return this._parent ? this._parent.formDirective : null;
        }
        /**
         * \@description
         * Synchronous validator function composed of all the synchronous validators
         * registered with this directive.
         * @return {?}
         */

      }, {
        key: "validator",
        get: function get() {
          return composeValidators(this._rawValidators);
        }
        /**
         * \@description
         * Async validator function composed of all the async validators registered with this
         * directive.
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return composeAsyncValidators(this._rawAsyncValidators);
        }
      }]);

      return NgModel;
    }(NgControl);

    NgModel.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[ngModel]:not([formControlName]):not([formControl])',
        providers: [formControlBinding],
        exportAs: 'ngModel'
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
        host: {
          'novalidate': ''
        }
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Token to provide to turn off the ngModel warning on formControl and formControlName.
     * @type {?}
     */

    var NG_MODEL_WITH_FORM_CONTROL_WARNING = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('NgModelWithFormControlWarning');
    /** @type {?} */

    var formControlBinding$1 = {
      provide: NgControl,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return FormControlDirective;
      })
    };
    /**
     * \@description
     * * Syncs a standalone `FormControl` instance to a form control element.
     *
     * @see [Reactive Forms Guide](guide/reactive-forms)
     * @see `FormControl`
     * @see `AbstractControl`
     *
     * \@usageNotes
     *
     * ### Registering a single form control
     *
     * The following examples shows how to register a standalone control and set its value.
     *
     * {\@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
     *
     * ### Use with ngModel
     *
     * Support for using the `ngModel` input property and `ngModelChange` event with reactive
     * form directives has been deprecated in Angular v6 and will be removed in Angular v7.
     *
     * Now deprecated:
     *
     * ```html
     * <input [formControl]="control" [(ngModel)]="value">
     * ```
     *
     * ```ts
     * this.value = 'some value';
     * ```
     *
     * This has been deprecated for a few reasons. First, developers have found this pattern
     * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's
     * an input/output property named `ngModel` on the reactive form directive that simply
     * approximates (some of) its behavior. Specifically, it allows getting/setting the value
     * and intercepting value events. However, some of `ngModel`'s other features - like
     * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,
     * which has understandably caused some confusion.
     *
     * In addition, this pattern mixes template-driven and reactive forms strategies, which
     * we generally don't recommend because it doesn't take advantage of the full benefits of
     * either strategy. Setting the value in the template violates the template-agnostic
     * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in
     * the class removes the convenience of defining forms in the template.
     *
     * To update your code before v7, you'll want to decide whether to stick with reactive form
     * directives (and get/set values using reactive forms patterns) or switch over to
     * template-driven directives.
     *
     * After (choice 1 - use reactive forms):
     *
     * ```html
     * <input [formControl]="control">
     * ```
     *
     * ```ts
     * this.control.setValue('some value');
     * ```
     *
     * After (choice 2 - use template-driven forms):
     *
     * ```html
     * <input [(ngModel)]="value">
     * ```
     *
     * ```ts
     * this.value = 'some value';
     * ```
     *
     * By default, when you use this pattern, you will see a deprecation warning once in dev
     * mode. You can choose to silence this warning by providing a config for
     * `ReactiveFormsModule` at import time:
     *
     * ```ts
     * imports: [
     *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});
     * ]
     * ```
     *
     * Alternatively, you can choose to surface a separate warning for each instance of this
     * pattern with a config value of `"always"`. This may help to track down where in the code
     * the pattern is being used as the code is being updated.
     *
     * \@ngModule ReactiveFormsModule
     * \@publicApi
     */

    var FormControlDirective = /*#__PURE__*/function (_NgControl2) {
      _inherits(FormControlDirective, _NgControl2);

      var _super134 = _createSuper(FormControlDirective);

      /**
       * @param {?} validators
       * @param {?} asyncValidators
       * @param {?} valueAccessors
       * @param {?} _ngModelWarningConfig
       */
      function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
        var _this374;

        _classCallCheck(this, FormControlDirective);

        _this374 = _super134.call(this);
        _this374._ngModelWarningConfig = _ngModelWarningConfig;
        /**
         * @deprecated as of v6
         */

        _this374.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
         */

        _this374._ngModelWarningSent = false;
        _this374._rawValidators = validators || [];
        _this374._rawAsyncValidators = asyncValidators || [];
        _this374.valueAccessor = selectValueAccessor(_assertThisInitialized(_this374), valueAccessors);
        return _this374;
      }
      /**
       * \@description
       * Triggers a warning that this input should not be used with reactive forms.
       * @param {?} isDisabled
       * @return {?}
       */


      _createClass2(FormControlDirective, [{
        key: "ngOnChanges",

        /**
         * \@description
         * A lifecycle method called when the directive's inputs change. For internal use
         * only.
         *
         * @param {?} changes A object of key/value pairs for the set of changed inputs.
         * @return {?}
         */
        value: function ngOnChanges(changes) {
          if (this._isControlChanged(changes)) {
            setUpControl(this.form, this);

            if (this.control.disabled &&
            /** @type {?} */
            this.valueAccessor.setDisabledState) {
              /** @type {?} */

              /** @type {?} */
              this.valueAccessor.setDisabledState(true);
            }

            this.form.updateValueAndValidity({
              emitEvent: false
            });
          }

          if (isPropertyUpdated(changes, this.viewModel)) {
            _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.
         * @return {?}
         */

      }, {
        key: "viewToModelUpdate",

        /**
         * \@description
         * Sets the new value for the view model and emits an `ngModelChange` event.
         *
         * @param {?} newValue The new value for the view model.
         * @return {?}
         */
        value: function viewToModelUpdate(newValue) {
          this.viewModel = newValue;
          this.update.emit(newValue);
        }
        /**
         * @private
         * @param {?} changes
         * @return {?}
         */

      }, {
        key: "_isControlChanged",
        value: function _isControlChanged(changes) {
          return changes.hasOwnProperty('form');
        }
      }, {
        key: "isDisabled",
        set: function set(isDisabled) {
          ReactiveErrors.disabledAttrWarning();
        }
      }, {
        key: "path",
        get: function get() {
          return [];
        }
        /**
         * \@description
         * Synchronous validator function composed of all the synchronous validators
         * registered with this directive.
         * @return {?}
         */

      }, {
        key: "validator",
        get: function get() {
          return composeValidators(this._rawValidators);
        }
        /**
         * \@description
         * Async validator function composed of all the async validators registered with this
         * directive.
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return composeAsyncValidators(this._rawAsyncValidators);
        }
        /**
         * \@description
         * The `FormControl` bound to this directive.
         * @return {?}
         */

      }, {
        key: "control",
        get: function get() {
          return this.form;
        }
      }]);

      return FormControlDirective;
    }(NgControl);
    /**
     * \@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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formControl]',
        providers: [formControlBinding$1],
        exportAs: 'ngForm'
      }]
    }];
    /** @nocollapse */

    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: undefined,
        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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var formDirectiveProvider$1 = {
      provide: ControlContainer,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);

      /**
       * @param {?} _validators
       * @param {?} _asyncValidators
       */
      function FormGroupDirective(_validators, _asyncValidators) {
        var _this375;

        _classCallCheck(this, FormGroupDirective);

        _this375 = _super135.call(this);
        _this375._validators = _validators;
        _this375._asyncValidators = _asyncValidators;
        /**
         * \@description
         * Reports whether the form submission has been triggered.
         */

        _this375.submitted = false;
        /**
         * \@description
         * Tracks the list of added `FormControlName` instances
         */

        _this375.directives = [];
        /**
         * \@description
         * Tracks the `FormGroup` bound to this directive.
         */

        _this375.form =
        /** @type {?} */
        null;
        /**
         * \@description
         * Emits an event when the form submission has been triggered.
         */

        _this375.ngSubmit = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        return _this375;
      }
      /**
       * \@description
       * A lifecycle method called when the directive's inputs change. For internal use only.
       *
       * @param {?} changes A object of key/value pairs for the set of changed inputs.
       * @return {?}
       */


      _createClass2(FormGroupDirective, [{
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          this._checkFormPresent();

          if (changes.hasOwnProperty('form')) {
            this._updateValidators();

            this._updateDomValue();

            this._updateRegistrations();
          }
        }
        /**
         * \@description
         * Returns this directive's instance.
         * @return {?}
         */

      }, {
        key: "addControl",

        /**
         * \@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.
         * @return {?}
         */
        value: function addControl(dir) {
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        key: "getControl",
        value: function getControl(dir) {
          return (
            /** @type {?} */
            this.form.get(dir.path)
          );
        }
        /**
         * \@description
         * Removes the `FormControlName` instance from the internal list of directives
         *
         * @param {?} dir The `FormControlName` directive instance.
         * @return {?}
         */

      }, {
        key: "removeControl",
        value: function removeControl(dir) {
          removeDir(this.directives, dir);
        }
        /**
         * Adds a new `FormGroupName` directive instance to the form.
         *
         * @param {?} dir The `FormGroupName` directive instance.
         * @return {?}
         */

      }, {
        key: "addFormGroup",
        value: function addFormGroup(dir) {
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        key: "removeFormGroup",
        value: function removeFormGroup(dir) {}
        /**
         * \@description
         * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance
         *
         * @param {?} dir The `FormGroupName` directive instance.
         * @return {?}
         */

      }, {
        key: "getFormGroup",
        value: function getFormGroup(dir) {
          return (
            /** @type {?} */
            this.form.get(dir.path)
          );
        }
        /**
         * Adds a new `FormArrayName` directive instance to the form.
         *
         * @param {?} dir The `FormArrayName` directive instance.
         * @return {?}
         */

      }, {
        key: "addFormArray",
        value: function addFormArray(dir) {
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        key: "removeFormArray",
        value: function removeFormArray(dir) {}
        /**
         * \@description
         * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.
         *
         * @param {?} dir The `FormArrayName` directive instance.
         * @return {?}
         */

      }, {
        key: "getFormArray",
        value: function getFormArray(dir) {
          return (
            /** @type {?} */
            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.
         * @return {?}
         */

      }, {
        key: "updateModel",
        value: function updateModel(dir, value) {
          /** @type {?} */
          var ctrl =
          /** @type {?} */
          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
         * @return {?}
         */

      }, {
        key: "onSubmit",
        value: function onSubmit($event) {
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "resetForm",
        value: function resetForm() {
          var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
          this.form.reset(value);

          /** @type {?} */
          this.submitted = false;
        }
        /**
         * \@internal
         * @return {?}
         */

      }, {
        key: "_updateDomValue",
        value: function _updateDomValue() {
          var _this376 = this;

          this.directives.forEach(
          /**
          * @param {?} dir
          * @return {?}
          */
          function (dir) {
            /** @type {?} */
            var newCtrl = _this376.form.get(dir.path);

            if (dir.control !== newCtrl) {
              cleanUpControl(dir.control, dir);
              if (newCtrl) setUpControl(newCtrl, dir);

              /** @type {?} */
              dir.control = newCtrl;
            }
          });

          this.form._updateTreeValidity({
            emitEvent: false
          });
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_updateRegistrations",
        value: function _updateRegistrations() {
          var _this377 = this;

          this.form._registerOnCollectionChange(
          /**
          * @return {?}
          */
          function () {
            return _this377._updateDomValue();
          });

          if (this._oldForm) this._oldForm._registerOnCollectionChange(
          /**
          * @return {?}
          */
          function () {});
          this._oldForm = this.form;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_updateValidators",
        value: function _updateValidators() {
          /** @type {?} */
          var sync = composeValidators(this._validators);
          this.form.validator = Validators.compose([
          /** @type {?} */
          this.form.validator,
          /** @type {?} */
          sync]);
          /** @type {?} */

          var async = composeAsyncValidators(this._asyncValidators);
          this.form.asyncValidator = Validators.composeAsync([
          /** @type {?} */
          this.form.asyncValidator,
          /** @type {?} */
          async]);
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_checkFormPresent",
        value: function _checkFormPresent() {
          if (!this.form) {
            ReactiveErrors.missingFormException();
          }
        }
      }, {
        key: "formDirective",
        get: function get() {
          return this;
        }
        /**
         * \@description
         * Returns the `FormGroup` bound to this directive.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return [];
        }
      }]);

      return FormGroupDirective;
    }(ControlContainer);

    FormGroupDirective.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formGroup]',
        providers: [formDirectiveProvider$1],
        host: {
          '(submit)': 'onSubmit($event)',
          '(reset)': 'onReset()'
        },
        exportAs: 'ngForm'
      }]
    }];
    /** @nocollapse */

    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"]
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var formGroupNameProvider = {
      provide: ControlContainer,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);

      /**
       * @param {?} parent
       * @param {?} validators
       * @param {?} asyncValidators
       */
      function FormGroupName(parent, validators, asyncValidators) {
        var _this378;

        _classCallCheck(this, FormGroupName);

        _this378 = _super136.call(this);
        _this378._parent = parent;
        _this378._validators = validators;
        _this378._asyncValidators = asyncValidators;
        return _this378;
      }
      /**
       * \@internal
       * @return {?}
       */


      _createClass2(FormGroupName, [{
        key: "_checkParentType",
        value: function _checkParentType() {
          if (_hasInvalidParent(this._parent)) {
            ReactiveErrors.groupParentException();
          }
        }
      }]);

      return FormGroupName;
    }(AbstractFormGroupDirective);

    FormGroupName.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formGroupName]',
        providers: [formGroupNameProvider]
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /** @type {?} */


    var formArrayNameProvider = {
      provide: ControlContainer,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);

      /**
       * @param {?} parent
       * @param {?} validators
       * @param {?} asyncValidators
       */
      function FormArrayName(parent, validators, asyncValidators) {
        var _this379;

        _classCallCheck(this, FormArrayName);

        _this379 = _super137.call(this);
        _this379._parent = parent;
        _this379._validators = validators;
        _this379._asyncValidators = asyncValidators;
        return _this379;
      }
      /**
       * \@description
       * 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.
       * @return {?}
       */


      _createClass2(FormArrayName, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          this._checkParentType();

          /** @type {?} */
          this.formDirective.addFormArray(this);
        }
        /**
         * \@description
         * A lifecycle method called before the directive's instance is destroyed. For internal use only.
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          if (this.formDirective) {
            this.formDirective.removeFormArray(this);
          }
        }
        /**
         * \@description
         * The `FormArray` bound to this directive.
         * @return {?}
         */

      }, {
        key: "_checkParentType",

        /**
         * @private
         * @return {?}
         */
        value: function _checkParentType() {
          if (_hasInvalidParent(this._parent)) {
            ReactiveErrors.arrayParentException();
          }
        }
      }, {
        key: "control",
        get: function get() {
          return (
            /** @type {?} */
            this.formDirective.getFormArray(this)
          );
        }
        /**
         * \@description
         * The top-level directive for this group if present, otherwise null.
         * @return {?}
         */

      }, {
        key: "formDirective",
        get: function get() {
          return this._parent ?
          /** @type {?} */
          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.
         * @return {?}
         */

      }, {
        key: "path",
        get: function get() {
          return controlPath(this.name, this._parent);
        }
        /**
         * \@description
         * Synchronous validator function composed of all the synchronous validators registered with this
         * directive.
         * @return {?}
         */

      }, {
        key: "validator",
        get: function get() {
          return composeValidators(this._validators);
        }
        /**
         * \@description
         * Async validator function composed of all the async validators registered with this directive.
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return composeAsyncValidators(this._asyncValidators);
        }
      }]);

      return FormArrayName;
    }(ControlContainer);

    FormArrayName.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formArrayName]',
        providers: [formArrayNameProvider]
      }]
    }];
    /** @nocollapse */

    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']
      }]
    };

    if (false) {}
    /**
     * @param {?} parent
     * @return {?}
     */


    function _hasInvalidParent(parent) {
      return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) && !(parent instanceof FormArrayName);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var controlNameBinding = {
      provide: NgControl,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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
     *
     * Support for using the `ngModel` input property and `ngModelChange` event with reactive
     * form directives has been deprecated in Angular v6 and will be removed in Angular v7.
     *
     * Now deprecated:
     *
     * ```html
     * <form [formGroup]="form">
     *   <input formControlName="first" [(ngModel)]="value">
     * </form>
     * ```
     *
     * ```ts
     * this.value = 'some value';
     * ```
     *
     * This has been deprecated for a few reasons. First, developers have found this pattern
     * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's
     * an input/output property named `ngModel` on the reactive form directive that simply
     * approximates (some of) its behavior. Specifically, it allows getting/setting the value
     * and intercepting value events. However, some of `ngModel`'s other features - like
     * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,
     * which has understandably caused some confusion.
     *
     * In addition, this pattern mixes template-driven and reactive forms strategies, which
     * we generally don't recommend because it doesn't take advantage of the full benefits of
     * either strategy. Setting the value in the template violates the template-agnostic
     * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in
     * the class removes the convenience of defining forms in the template.
     *
     * To update your code before v7, you'll want to decide whether to stick with reactive form
     * directives (and get/set values using reactive forms patterns) or switch over to
     * template-driven directives.
     *
     * After (choice 1 - use reactive forms):
     *
     * ```html
     * <form [formGroup]="form">
     *   <input formControlName="first">
     * </form>
     * ```
     *
     * ```ts
     * this.form.get('first').setValue('some value');
     * ```
     *
     * After (choice 2 - use template-driven forms):
     *
     * ```html
     * <input [(ngModel)]="value">
     * ```
     *
     * ```ts
     * this.value = 'some value';
     * ```
     *
     * By default, when you use this pattern, you will see a deprecation warning once in dev
     * mode. You can choose to silence this warning by providing a config for
     * `ReactiveFormsModule` at import time:
     *
     * ```ts
     * imports: [
     *   ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'})
     * ]
     * ```
     *
     * Alternatively, you can choose to surface a separate warning for each instance of this
     * pattern with a config value of `"always"`. This may help to track down where in the code
     * the pattern is being used as the code is being updated.
     *
     * \@ngModule ReactiveFormsModule
     * \@publicApi
     */

    var FormControlName = /*#__PURE__*/function (_NgControl3) {
      _inherits(FormControlName, _NgControl3);

      var _super138 = _createSuper(FormControlName);

      /**
       * @param {?} parent
       * @param {?} validators
       * @param {?} asyncValidators
       * @param {?} valueAccessors
       * @param {?} _ngModelWarningConfig
       */
      function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
        var _this380;

        _classCallCheck(this, FormControlName);

        _this380 = _super138.call(this);
        _this380._ngModelWarningConfig = _ngModelWarningConfig;
        _this380._added = false;
        /**
         * @deprecated as of v6
         */

        _this380.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
         */

        _this380._ngModelWarningSent = false;
        _this380._parent = parent;
        _this380._rawValidators = validators || [];
        _this380._rawAsyncValidators = asyncValidators || [];
        _this380.valueAccessor = selectValueAccessor(_assertThisInitialized(_this380), valueAccessors);
        return _this380;
      }
      /**
       * \@description
       * Triggers a warning that this input should not be used with reactive forms.
       * @param {?} isDisabled
       * @return {?}
       */


      _createClass2(FormControlName, [{
        key: "ngOnChanges",

        /**
         * \@description
         * A lifecycle method called when the directive's inputs change. For internal use only.
         *
         * @param {?} changes A object of key/value pairs for the set of changed inputs.
         * @return {?}
         */
        value: function ngOnChanges(changes) {
          if (!this._added) this._setUpControl();

          if (isPropertyUpdated(changes, this.viewModel)) {
            _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);

            this.viewModel = this.model;
            this.formDirective.updateModel(this, this.model);
          }
        }
        /**
         * \@description
         * Lifecycle method called before the directive's instance is destroyed. For internal use only.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "_checkParentType",

        /**
         * @private
         * @return {?}
         */
        value: function _checkParentType() {
          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();
          }
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_setUpControl",
        value: function _setUpControl() {
          this._checkParentType();

          /** @type {?} */
          this.control = this.formDirective.addControl(this);

          if (this.control.disabled &&
          /** @type {?} */
          this.valueAccessor.setDisabledState) {
            /** @type {?} */

            /** @type {?} */
            this.valueAccessor.setDisabledState(true);
          }

          this._added = true;
        }
      }, {
        key: "isDisabled",
        set: function set(isDisabled) {
          ReactiveErrors.disabledAttrWarning();
        }
      }, {
        key: "path",
        get: function get() {
          return controlPath(this.name,
          /** @type {?} */
          this._parent);
        }
        /**
         * \@description
         * The top-level directive for this group if present, otherwise null.
         * @return {?}
         */

      }, {
        key: "formDirective",
        get: function get() {
          return this._parent ? this._parent.formDirective : null;
        }
        /**
         * \@description
         * Synchronous validator function composed of all the synchronous validators
         * registered with this directive.
         * @return {?}
         */

      }, {
        key: "validator",
        get: function get() {
          return composeValidators(this._rawValidators);
        }
        /**
         * \@description
         * Async validator function composed of all the async validators registered with this
         * directive.
         * @return {?}
         */

      }, {
        key: "asyncValidator",
        get: function get() {
          return (
            /** @type {?} */
            composeAsyncValidators(this._rawAsyncValidators)
          );
        }
      }]);

      return FormControlName;
    }(NgControl);
    /**
     * \@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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[formControlName]',
        providers: [controlNameBinding]
      }]
    }];
    /** @nocollapse */

    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: undefined,
        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']
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@description
     * An interface implemented by classes that perform synchronous validation.
     *
     * \@usageNotes
     *
     * ### Provide a custom validator
     *
     * The following example implements the `Validator` interface to create a
     * validator directive with a custom error key.
     *
     * ```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
     * @record
     */


    function Validator() {}

    if (false) {}
    /**
     * \@description
     * An interface implemented by classes that perform asynchronous validation.
     *
     * \@usageNotes
     *
     * ### Provide a custom async validator directive
     *
     * The following example implements the `AsyncValidator` interface to create an
     * async validator directive with a custom error key.
     *
     * ```typescript
     * import { of as observableOf } from 'rxjs';
     *
     * \@Directive({
     *   selector: '[customAsyncValidator]',
     *   providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:
     * true}]
     * })
     * class CustomAsyncValidatorDirective implements AsyncValidator {
     *   validate(control: AbstractControl): Observable<ValidationErrors|null> {
     *     return observableOf({'custom': true});
     *   }
     * }
     * ```
     *
     * \@publicApi
     * @record
     */


    function AsyncValidator() {}

    if (false) {}
    /**
     * \@description
     * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */


    var REQUIRED_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      function () {
        return RequiredValidator;
      }),
      multi: true
    };
    /**
     * \@description
     * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */

    var CHECKBOX_REQUIRED_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);
      }

      _createClass2(RequiredValidator, [{
        key: "validate",

        /**
         * \@description
         * Method that validates whether the control is empty.
         * Returns the validation result if enabled, otherwise null.
         * @param {?} control
         * @return {?}
         */
        value: function validate(control) {
          return this.required ? Validators.required(control) : null;
        }
        /**
         * \@description
         * Registers a callback function to call when the validator inputs change.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnValidatorChange",
        value: function registerOnValidatorChange(fn) {
          this._onChange = fn;
        }
      }, {
        key: "required",

        /**
         * \@description
         * Tracks changes to the required attribute bound to this directive.
         * @return {?}
         */
        get: function get() {
          return this._required;
        }
        /**
         * @param {?} value
         * @return {?}
         */
        ,
        set: function set(value) {
          this._required = value != null && value !== false && "".concat(value) !== 'false';
          if (this._onChange) this._onChange();
        }
      }]);

      return RequiredValidator;
    }();

    RequiredValidator.decorators = [{
      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'
        }
      }]
    }];
    RequiredValidator.propDecorators = {
      required: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * 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",

        /**
         * \@description
         * Method that validates whether or not the checkbox has been checked.
         * Returns the validation result if enabled, otherwise null.
         * @param {?} control
         * @return {?}
         */
        value: function validate(control) {
          return this.required ? Validators.requiredTrue(control) : null;
        }
      }]);

      return CheckboxRequiredValidator;
    }(RequiredValidator);

    CheckboxRequiredValidator.decorators = [{
      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'
        }
      }]
    }];
    /**
     * \@description
     * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */

    var EMAIL_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);
      }

      _createClass2(EmailValidator, [{
        key: "validate",

        /**
         * \@description
         * Method that validates whether an email address is valid.
         * Returns the validation result if enabled, otherwise null.
         * @param {?} control
         * @return {?}
         */
        value: function validate(control) {
          return this._enabled ? Validators.email(control) : null;
        }
        /**
         * \@description
         * Registers a callback function to call when the validator inputs change.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnValidatorChange",
        value: function registerOnValidatorChange(fn) {
          this._onChange = fn;
        }
      }, {
        key: "email",

        /**
         * \@description
         * Tracks changes to the email attribute bound to this directive.
         * @param {?} value
         * @return {?}
         */
        set: function set(value) {
          this._enabled = value === '' || value === true || value === 'true';
          if (this._onChange) this._onChange();
        }
      }]);

      return EmailValidator;
    }();

    EmailValidator.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
      args: [{
        selector: '[email][formControlName],[email][formControl],[email][ngModel]',
        providers: [EMAIL_VALIDATOR]
      }]
    }];
    EmailValidator.propDecorators = {
      email: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * \@description
     * A function that receives a control and synchronously returns a map of
     * validation errors if present, otherwise null.
     *
     * \@publicApi
     * @record
     */


    function ValidatorFn() {}
    /**
     * \@description
     * A function that receives a control and returns a Promise or observable
     * that emits validation errors if present, otherwise null.
     *
     * \@publicApi
     * @record
     */


    function AsyncValidatorFn() {}
    /**
     * \@description
     * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */


    var MIN_LENGTH_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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` mult-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);
      }

      _createClass2(MinLengthValidator, [{
        key: "ngOnChanges",

        /**
         * \@description
         * A lifecycle method called when the directive's inputs change. For internal use
         * only.
         *
         * @param {?} changes A object of key/value pairs for the set of changed inputs.
         * @return {?}
         */
        value: function ngOnChanges(changes) {
          if ('minlength' in changes) {
            this._createValidator();

            if (this._onChange) this._onChange();
          }
        }
        /**
         * \@description
         * Method that validates whether the value meets a minimum length
         * requirement. Returns the validation result if enabled, otherwise null.
         * @param {?} control
         * @return {?}
         */

      }, {
        key: "validate",
        value: function validate(control) {
          return this.minlength == null ? null : this._validator(control);
        }
        /**
         * \@description
         * Registers a callback function to call when the validator inputs change.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnValidatorChange",
        value: function registerOnValidatorChange(fn) {
          this._onChange = fn;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_createValidator",
        value: function _createValidator() {
          this._validator = Validators.minLength(parseInt(this.minlength, 10));
        }
      }]);

      return MinLengthValidator;
    }();

    MinLengthValidator.decorators = [{
      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'
        }
      }]
    }];
    MinLengthValidator.propDecorators = {
      minlength: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * \@description
     * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */


    var MAX_LENGTH_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);
      }

      _createClass2(MaxLengthValidator, [{
        key: "ngOnChanges",

        /**
         * \@description
         * A lifecycle method called when the directive's inputs change. For internal use
         * only.
         *
         * @param {?} changes A object of key/value pairs for the set of changed inputs.
         * @return {?}
         */
        value: function ngOnChanges(changes) {
          if ('maxlength' in changes) {
            this._createValidator();

            if (this._onChange) this._onChange();
          }
        }
        /**
         * \@description
         * Method that validates whether the value exceeds
         * the maximum length requirement.
         * @param {?} control
         * @return {?}
         */

      }, {
        key: "validate",
        value: function validate(control) {
          return this.maxlength != null ? this._validator(control) : null;
        }
        /**
         * \@description
         * Registers a callback function to call when the validator inputs change.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnValidatorChange",
        value: function registerOnValidatorChange(fn) {
          this._onChange = fn;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_createValidator",
        value: function _createValidator() {
          this._validator = Validators.maxLength(parseInt(this.maxlength, 10));
        }
      }]);

      return MaxLengthValidator;
    }();

    MaxLengthValidator.decorators = [{
      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'
        }
      }]
    }];
    MaxLengthValidator.propDecorators = {
      maxlength: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * \@description
     * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.
     * @type {?}
     */


    var PATTERN_VALIDATOR = {
      provide: NG_VALIDATORS,
      useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(
      /**
      * @return {?}
      */
      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);
      }

      _createClass2(PatternValidator, [{
        key: "ngOnChanges",

        /**
         * \@description
         * A lifecycle method called when the directive's inputs change. For internal use
         * only.
         *
         * @param {?} changes A object of key/value pairs for the set of changed inputs.
         * @return {?}
         */
        value: function ngOnChanges(changes) {
          if ('pattern' in changes) {
            this._createValidator();

            if (this._onChange) this._onChange();
          }
        }
        /**
         * \@description
         * Method that validates whether the value matches the
         * the pattern requirement.
         * @param {?} control
         * @return {?}
         */

      }, {
        key: "validate",
        value: function validate(control) {
          return this._validator(control);
        }
        /**
         * \@description
         * Registers a callback function to call when the validator inputs change.
         *
         * @param {?} fn The callback function
         * @return {?}
         */

      }, {
        key: "registerOnValidatorChange",
        value: function registerOnValidatorChange(fn) {
          this._onChange = fn;
        }
        /**
         * @private
         * @return {?}
         */

      }, {
        key: "_createValidator",
        value: function _createValidator() {
          this._validator = Validators.pattern(this.pattern);
        }
      }]);

      return PatternValidator;
    }();

    PatternValidator.decorators = [{
      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'
        }
      }]
    }];
    PatternValidator.propDecorators = {
      pattern: [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
      }]
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var SHARED_FORM_DIRECTIVES = [ɵNgNoValidate, NgSelectOption, ɵNgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor, RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor, SelectMultipleControlValueAccessor, RadioControlValueAccessor, NgControlStatus, NgControlStatusGroup, RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, CheckboxRequiredValidator, EmailValidator];
    /** @type {?} */

    var TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm, NgFormSelectorWarning];
    /** @type {?} */

    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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        declarations: SHARED_FORM_DIRECTIVES,
        exports: SHARED_FORM_DIRECTIVES
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} options
     * @return {?}
     */

    function isAbstractControlOptions(options) {
      return (
        /** @type {?} */
        options.asyncValidators !== undefined ||
        /** @type {?} */
        options.validators !== undefined ||
        /** @type {?} */
        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",

        /**
         * \@description
         * Construct a new `FormGroup` instance.
         *
         * @param {?} controlsConfig A collection of child controls. The key for each child is the name
         * under which it is registered.
         *
         * @param {?=} options Configuration options object for the `FormGroup`. The object can
         * have two shapes:
         *
         * 1) `AbstractControlOptions` object (preferred), which consists of:
         * * `validators`: A synchronous validator function, or an array of validator functions
         * * `asyncValidators`: A single async validator or array of async validator functions
         * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' |
         * submit')
         *
         * 2) Legacy configuration object, which consists of:
         * * `validator`: A synchronous validator function, or an array of validator functions
         * * `asyncValidator`: A single async validator or array of async validator functions
         *
         * @return {?}
         */
        value: function group(controlsConfig) {
          var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

          /** @type {?} */
          var controls = this._reduceControls(controlsConfig);
          /** @type {?} */


          var validators = null;
          /** @type {?} */

          var asyncValidators = null;
          /** @type {?} */

          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.
         *
         * \@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>
         * @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.
         *
         * @return {?}
         */

      }, {
        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.
         * @return {?}
         */

      }, {
        key: "array",
        value: function array(controlsConfig, validatorOrOpts, asyncValidator) {
          var _this381 = this;

          /** @type {?} */
          var controls = controlsConfig.map(
          /**
          * @param {?} c
          * @return {?}
          */
          function (c) {
            return _this381._createControl(c);
          });
          return new FormArray(controls, validatorOrOpts, asyncValidator);
        }
        /**
         * \@internal
         * @param {?} controlsConfig
         * @return {?}
         */

      }, {
        key: "_reduceControls",
        value: function _reduceControls(controlsConfig) {
          var _this382 = this;

          /** @type {?} */
          var controls = {};
          Object.keys(controlsConfig).forEach(
          /**
          * @param {?} controlName
          * @return {?}
          */
          function (controlName) {
            controls[controlName] = _this382._createControl(controlsConfig[controlName]);
          });
          return controls;
        }
        /**
         * \@internal
         * @param {?} controlConfig
         * @return {?}
         */

      }, {
        key: "_createControl",
        value: function _createControl(controlConfig) {
          if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup || controlConfig instanceof FormArray) {
            return controlConfig;
          } else if (Array.isArray(controlConfig)) {
            /** @type {?} */
            var value = controlConfig[0];
            /** @type {?} */

            var validator = controlConfig.length > 1 ? controlConfig[1] : null;
            /** @type {?} */

            var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;
            return this.control(value, validator, asyncValidator);
          } else {
            return this.control(controlConfig);
          }
        }
      }]);

      return FormBuilder;
    }();

    FormBuilder.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @type {?}
     */

    var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('8.2.14');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Exports the required providers and directives for template-driven forms,
     * making them available for import by NgModules that import this module.
     *
     * @see [Forms Guide](/guide/forms)
     *
     * \@publicApi
     */

    var FormsModule = /*#__PURE__*/function () {
      function FormsModule() {
        _classCallCheck(this, FormsModule);
      }

      _createClass2(FormsModule, null, [{
        key: "withConfig",

        /**
         * \@description
         * Provides options for configuring the template-driven forms module.
         *
         * @param {?} opts An object of configuration options
         * * `warnOnDeprecatedNgFormSelector` Configures when to emit a warning when the deprecated
         * `ngForm` selector is used.
         * @return {?}
         */
        value: function withConfig(opts) {
          return {
            ngModule: FormsModule,
            providers: [{
              provide: NG_FORM_SELECTOR_WARNING,
              useValue: opts.warnOnDeprecatedNgFormSelector
            }]
          };
        }
      }]);

      return FormsModule;
    }();

    FormsModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        declarations: TEMPLATE_DRIVEN_DIRECTIVES,
        providers: [RadioControlRegistry],
        exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
      }]
    }];
    /**
     * Exports the required infrastructure and directives for reactive forms,
     * making them available for import by NgModules that import this module.
     * @see [Forms](guide/reactive-forms)
     *
     * @see [Reactive Forms Guide](/guide/reactive-forms)
     *
     * \@publicApi
     */

    var ReactiveFormsModule = /*#__PURE__*/function () {
      function ReactiveFormsModule() {
        _classCallCheck(this, ReactiveFormsModule);
      }

      _createClass2(ReactiveFormsModule, null, [{
        key: "withConfig",

        /**
         * \@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.
         * @return {?}
         */
        value: function withConfig(opts) {
          return {
            ngModule: ReactiveFormsModule,
            providers: [{
              provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,
              useValue: opts.warnOnNgModelWithFormControl
            }]
          };
        }
      }]);

      return ReactiveFormsModule;
    }();

    ReactiveFormsModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        declarations: [REACTIVE_DRIVEN_DIRECTIVES],
        providers: [FormBuilder, RadioControlRegistry],
        exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=forms.js.map

    /***/
  },

  /***/
  "./node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js":
  /*!*********************************************************************************************!*\
    !*** ./node_modules/@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.js ***!
    \*********************************************************************************************/

  /*! exports provided: ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a, VERSION, JitCompilerFactory, RESOURCE_CACHE_PROVIDER, platformBrowserDynamic, ɵCompilerImpl, ɵplatformCoreDynamic, ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ɵResourceLoaderImpl */

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

    __webpack_require__.r(__webpack_exports__);
    /* 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__, "VERSION", function () {
      return VERSION;
    });
    /* 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__, "platformBrowserDynamic", function () {
      return platformBrowserDynamic;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "ɵplatformCoreDynamic", function () {
      return platformCoreDynamic;
    });
    /* 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 import */


    var _angular_compiler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/compiler */
    "./node_modules/@angular/compiler/fesm2015/compiler.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/fesm2015/common.js");
    /* harmony import */


    var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/platform-browser */
    "./node_modules/@angular/platform-browser/fesm2015/platform-browser.js");
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var MODULE_SUFFIX = '';
    /** @type {?} */

    var builtinExternalReferences = createBuiltinExternalReferencesMap();

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

        this.reflectionCapabilities = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵReflectionCapabilities"]();
      }
      /**
       * @param {?} type
       * @param {?} cmpMetadata
       * @return {?}
       */


      _createClass2(JitReflector, [{
        key: "componentModuleUrl",
        value: function componentModuleUrl(type, cmpMetadata) {
          /** @type {?} */
          var moduleId = cmpMetadata.moduleId;

          if (typeof moduleId === 'string') {
            /** @type {?} */
            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));
        }
        /**
         * @param {?} typeOrFunc
         * @return {?}
         */

      }, {
        key: "parameters",
        value: function parameters(typeOrFunc) {
          return this.reflectionCapabilities.parameters(typeOrFunc);
        }
        /**
         * @param {?} typeOrFunc
         * @return {?}
         */

      }, {
        key: "tryAnnotations",
        value: function tryAnnotations(typeOrFunc) {
          return this.annotations(typeOrFunc);
        }
        /**
         * @param {?} typeOrFunc
         * @return {?}
         */

      }, {
        key: "annotations",
        value: function annotations(typeOrFunc) {
          return this.reflectionCapabilities.annotations(typeOrFunc);
        }
        /**
         * @param {?} typeOrFunc
         * @return {?}
         */

      }, {
        key: "shallowAnnotations",
        value: function shallowAnnotations(typeOrFunc) {
          throw new Error('Not supported in JIT mode');
        }
        /**
         * @param {?} typeOrFunc
         * @return {?}
         */

      }, {
        key: "propMetadata",
        value: function propMetadata(typeOrFunc) {
          return this.reflectionCapabilities.propMetadata(typeOrFunc);
        }
        /**
         * @param {?} type
         * @param {?} lcProperty
         * @return {?}
         */

      }, {
        key: "hasLifecycleHook",
        value: function hasLifecycleHook(type, lcProperty) {
          return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
        }
        /**
         * @param {?} type
         * @return {?}
         */

      }, {
        key: "guards",
        value: function guards(type) {
          return this.reflectionCapabilities.guards(type);
        }
        /**
         * @param {?} ref
         * @return {?}
         */

      }, {
        key: "resolveExternalReference",
        value: function resolveExternalReference(ref) {
          return builtinExternalReferences.get(ref) || ref.runtime;
        }
      }]);

      return JitReflector;
    }();

    if (false) {}
    /**
     * @return {?}
     */


    function createBuiltinExternalReferencesMap() {
      /** @type {?} */
      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"].Renderer, _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer"]);
      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;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var ERROR_COLLECTOR_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ErrorCollector');
    /**
     * A default provider for {\@link PACKAGE_ROOT_URL} that maps to '/'.
     * @type {?}
     */

    var DEFAULT_PACKAGE_URL_PROVIDER = {
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PACKAGE_ROOT_URL"],
      useValue: '/'
    };
    /** @type {?} */

    var _NO_RESOURCE_LOADER = {
      /**
       * @param {?} url
       * @return {?}
       */
      get: function get(url) {
        throw new Error("No ResourceLoader implementation has been provided. Can't read the url \"".concat(url, "\""));
      }
    };
    /** @type {?} */

    var baseHtmlParser = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HtmlParser');

    var CompilerImpl = /*#__PURE__*/function () {
      /**
       * @param {?} injector
       * @param {?} _metadataResolver
       * @param {?} templateParser
       * @param {?} styleCompiler
       * @param {?} viewCompiler
       * @param {?} ngModuleCompiler
       * @param {?} summaryResolver
       * @param {?} compileReflector
       * @param {?} jitEvaluator
       * @param {?} compilerConfig
       * @param {?} console
       */
      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;
      }
      /**
       * @private
       * @return {?}
       */


      _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
          }))];
        }
        /**
         * @template T
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "compileModuleSync",
        value: function compileModuleSync(moduleType) {
          return (
            /** @type {?} */
            this._delegate.compileModuleSync(moduleType)
          );
        }
        /**
         * @template T
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "compileModuleAsync",
        value: function compileModuleAsync(moduleType) {
          return (
            /** @type {?} */
            this._delegate.compileModuleAsync(moduleType)
          );
        }
        /**
         * @template T
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "compileModuleAndAllComponentsSync",
        value: function compileModuleAndAllComponentsSync(moduleType) {
          /** @type {?} */
          var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);

          return {
            ngModuleFactory:
            /** @type {?} */
            result.ngModuleFactory,
            componentFactories:
            /** @type {?} */
            result.componentFactories
          };
        }
        /**
         * @template T
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "compileModuleAndAllComponentsAsync",
        value: function compileModuleAndAllComponentsAsync(moduleType) {
          return this._delegate.compileModuleAndAllComponentsAsync(moduleType).then(
          /**
          * @param {?} result
          * @return {?}
          */
          function (result) {
            return {
              ngModuleFactory:
              /** @type {?} */
              result.ngModuleFactory,
              componentFactories:
              /** @type {?} */
              result.componentFactories
            };
          });
        }
        /**
         * @param {?} summaries
         * @return {?}
         */

      }, {
        key: "loadAotSummaries",
        value: function loadAotSummaries(summaries) {
          this._delegate.loadAotSummaries(summaries);
        }
        /**
         * @param {?} ref
         * @return {?}
         */

      }, {
        key: "hasAotSummary",
        value: function hasAotSummary(ref) {
          return this._delegate.hasAotSummary(ref);
        }
        /**
         * @template T
         * @param {?} component
         * @return {?}
         */

      }, {
        key: "getComponentFactory",
        value: function getComponentFactory(component) {
          return (
            /** @type {?} */
            this._delegate.getComponentFactory(component)
          );
        }
        /**
         * @return {?}
         */

      }, {
        key: "clearCache",
        value: function clearCache() {
          this._delegate.clearCache();
        }
        /**
         * @param {?} type
         * @return {?}
         */

      }, {
        key: "clearCacheFor",
        value: function clearCacheFor(type) {
          this._delegate.clearCacheFor(type);
        }
        /**
         * @param {?} moduleType
         * @return {?}
         */

      }, {
        key: "getModuleId",
        value: function getModuleId(moduleType) {
          /** @type {?} */
          var meta = this._metadataResolver.getNgModuleMetadata(moduleType);

          return meta && meta.id || undefined;
        }
      }]);

      return CompilerImpl;
    }();

    if (false) {}
    /**
     * A set of providers that provide `JitCompiler` and its dependencies to use for
     * template compilation.
     * @type {?}
     */


    var COMPILER_PROVIDERS =
    /** @type {?} */
    [{
      provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompileReflector"],
      useValue: new JitReflector()
    }, {
      provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
      useValue: _NO_RESOURCE_LOADER
    }, {
      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:
      /**
      * @param {?} parser
      * @param {?} translations
      * @param {?} format
      * @param {?} config
      * @param {?} console
      * @return {?}
      */
      function useFactory(parser, translations, format, config, console) {
        translations = translations || '';
        /** @type {?} */

        var missingTranslation = translations ?
        /** @type {?} */
        config.missingTranslation : _angular_core__WEBPACK_IMPORTED_MODULE_1__["MissingTranslationStrategy"].Ignore;
        return new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["I18NHtmlParser"](parser, translations, format, missingTranslation, console);
      },
      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: new _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"]()
    }, {
      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"]]
    }];
    /**
     * \@publicApi
     */

    var JitCompilerFactory = /*#__PURE__*/function () {
      /* @internal */

      /**
       * @param {?} defaultOptions
       */
      function JitCompilerFactory(defaultOptions) {
        _classCallCheck(this, JitCompilerFactory);

        /** @type {?} */
        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));
      }
      /**
       * @param {?=} options
       * @return {?}
       */


      _createClass2(JitCompilerFactory, [{
        key: "createCompiler",
        value: function createCompiler() {
          var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

          /** @type {?} */
          var opts = _mergeOptions(this._defaultOptions.concat(options));
          /** @type {?} */


          var injector = _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"].create([COMPILER_PROVIDERS, {
            provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["CompilerConfig"],
            useFactory:
            /**
            * @return {?}
            */
            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: []
          },
          /** @type {?} */
          opts.providers]);

          return injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]);
        }
      }]);

      return JitCompilerFactory;
    }();

    if (false) {}
    /**
     * @param {?} optionsArr
     * @return {?}
     */


    function _mergeOptions(optionsArr) {
      return {
        useJit: _lastDefined(optionsArr.map(
        /**
        * @param {?} options
        * @return {?}
        */
        function (options) {
          return options.useJit;
        })),
        defaultEncapsulation: _lastDefined(optionsArr.map(
        /**
        * @param {?} options
        * @return {?}
        */
        function (options) {
          return options.defaultEncapsulation;
        })),
        providers: _mergeArrays(optionsArr.map(
        /**
        * @param {?} options
        * @return {?}
        */
        function (options) {
          return (
            /** @type {?} */
            options.providers
          );
        })),
        missingTranslation: _lastDefined(optionsArr.map(
        /**
        * @param {?} options
        * @return {?}
        */
        function (options) {
          return options.missingTranslation;
        })),
        preserveWhitespaces: _lastDefined(optionsArr.map(
        /**
        * @param {?} options
        * @return {?}
        */
        function (options) {
          return options.preserveWhitespaces;
        }))
      };
    }
    /**
     * @template T
     * @param {?} args
     * @return {?}
     */


    function _lastDefined(args) {
      for (var i = args.length - 1; i >= 0; i--) {
        if (args[i] !== undefined) {
          return args[i];
        }
      }

      return undefined;
    }
    /**
     * @param {?} parts
     * @return {?}
     */


    function _mergeArrays(parts) {
      /** @type {?} */
      var result = [];
      parts.forEach(
      /**
      * @param {?} part
      * @return {?}
      */
      function (part) {
        return part && result.push.apply(result, _toConsumableArray(part));
      });
      return result;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0 = {};
    /**
     * A platform that included corePlatform and the compiler.
     *
     * \@publicApi
     * @type {?}
     */

    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,
      multi: true
    }, {
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["CompilerFactory"],
      useClass: JitCompilerFactory,
      deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["COMPILER_OPTIONS"]]
    }]);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var ResourceLoaderImpl = /*#__PURE__*/function (_angular_compiler__WE) {
      _inherits(ResourceLoaderImpl, _angular_compiler__WE);

      var _super140 = _createSuper(ResourceLoaderImpl);

      function ResourceLoaderImpl() {
        _classCallCheck(this, ResourceLoaderImpl);

        return _super140.apply(this, arguments);
      }

      _createClass2(ResourceLoaderImpl, [{
        key: "get",

        /**
         * @param {?} url
         * @return {?}
         */
        value: function get(url) {
          /** @type {?} */
          var resolve;
          /** @type {?} */

          var reject;
          /** @type {?} */

          var promise = new Promise(
          /**
          * @param {?} res
          * @param {?} rej
          * @return {?}
          */
          function (res, rej) {
            resolve = res;
            reject = rej;
          });
          /** @type {?} */

          var xhr = new XMLHttpRequest();
          xhr.open('GET', url, true);
          xhr.responseType = 'text';

          xhr.onload =
          /**
          * @return {?}
          */
          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)

            /** @type {?} */
            var response = xhr.response || xhr.responseText; // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)

            /** @type {?} */

            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 =
          /**
          * @return {?}
          */
          function () {
            reject("Failed to load ".concat(url));
          };

          xhr.send();
          return promise;
        }
      }]);

      return ResourceLoaderImpl;
    }(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]);

    ResourceLoaderImpl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var ɵ0$1 = {
      providers: [{
        provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
        useClass: ResourceLoaderImpl,
        deps: []
      }]
    },
        ɵ1 = _angular_common__WEBPACK_IMPORTED_MODULE_2__["ɵPLATFORM_BROWSER_ID"];
    /**
     * \@publicApi
     * @type {?}
     */

    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$1,
      multi: true
    }, {
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"],
      useValue: ɵ1
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * 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 _super141 = _createSuper(CachedResourceLoader);

      function CachedResourceLoader() {
        var _this383;

        _classCallCheck(this, CachedResourceLoader);

        _this383 = _super141.call(this);
        _this383._cache =
        /** @type {?} */
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"].$templateCache;

        if (_this383._cache == null) {
          throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');
        }

        return _this383;
      }
      /**
       * @param {?} url
       * @return {?}
       */


      _createClass2(CachedResourceLoader, [{
        key: "get",
        value: function get(url) {
          if (this._cache.hasOwnProperty(url)) {
            return Promise.resolve(this._cache[url]);
          } else {
            return (
              /** @type {?} */
              Promise.reject('CachedResourceLoader: Did not find cached template for ' + url)
            );
          }
        }
      }]);

      return CachedResourceLoader;
    }(_angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"]);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @type {?}
     */


    var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('8.2.14');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @type {?}
     */

    var RESOURCE_CACHE_PROVIDER = [{
      provide: _angular_compiler__WEBPACK_IMPORTED_MODULE_0__["ResourceLoader"],
      useClass: CachedResourceLoader,
      deps: []
    }];
    /**
     * \@publicApi
     * @type {?}
     */

    var platformBrowserDynamic = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=platform-browser-dynamic.js.map

    /***/
  },

  /***/
  "./node_modules/@angular/platform-browser/fesm2015/platform-browser.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/@angular/platform-browser/fesm2015/platform-browser.js ***!
    \*****************************************************************************/

  /*! exports provided: ɵangular_packages_platform_browser_platform_browser_c, ɵangular_packages_platform_browser_platform_browser_b, ɵangular_packages_platform_browser_platform_browser_a, ɵangular_packages_platform_browser_platform_browser_l, ɵangular_packages_platform_browser_platform_browser_d, ɵangular_packages_platform_browser_platform_browser_i, ɵangular_packages_platform_browser_platform_browser_h, ɵangular_packages_platform_browser_platform_browser_e, ɵangular_packages_platform_browser_platform_browser_f, ɵangular_packages_platform_browser_platform_browser_k, ɵangular_packages_platform_browser_platform_browser_j, ɵangular_packages_platform_browser_platform_browser_g, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, DomSanitizer, VERSION, ɵELEMENT_PROBE_PROVIDERS__POST_R3__, ɵBROWSER_SANITIZATION_PROVIDERS, ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, ɵinitDomAdapter, ɵBrowserDomAdapter, ɵBrowserPlatformLocation, ɵTRANSITION_ID, ɵBrowserGetTestability, ɵescapeHtml, ɵELEMENT_PROBE_PROVIDERS, ɵDomAdapter, ɵgetDOM, ɵsetRootDomAdapter, ɵDomRendererFactory2, ɵNAMESPACE_URIS, ɵflattenStyles, ɵshimContentAttribute, ɵshimHostAttribute, ɵDomEventsPlugin, ɵHammerGesturesPlugin, ɵKeyEventsPlugin, ɵDomSharedStylesHost, ɵSharedStylesHost, ɵDomSanitizerImpl */

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

    __webpack_require__.r(__webpack_exports__);
    /* 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_b", function () {
      return _document;
    });
    /* 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_l", function () {
      return GenericBrowserDomAdapter;
    });
    /* 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_i", function () {
      return SERVER_TRANSITION_PROVIDERS;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_h", function () {
      return appInitializerFactory;
    });
    /* 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_k", function () {
      return ELEMENT_PROBE_PROVIDERS__PRE_R3__;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_j", function () {
      return _createNgProbe;
    });
    /* 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__, "BrowserModule", function () {
      return BrowserModule;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "platformBrowser", function () {
      return platformBrowser;
    });
    /* 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__, "disableDebugTools", function () {
      return disableDebugTools;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "By", function () {
      return By;
    });
    /* 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__, "DomSanitizer", function () {
      return DomSanitizer;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "VERSION", function () {
      return VERSION;
    });
    /* 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__, "ɵBROWSER_SANITIZATION_PROVIDERS", function () {
      return BROWSER_SANITIZATION_PROVIDERS;
    });
    /* 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__, "ɵinitDomAdapter", function () {
      return initDomAdapter;
    });
    /* harmony export (binding) */


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵflattenStyles", function () {
      return flattenStyles;
    });
    /* 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 export (binding) */


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


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


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


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


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


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


    var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/fesm2015/common.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /**
     * @license Angular v8.2.14
     * (c) 2010-2019 Google LLC. https://angular.io/
     * License: MIT
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */


    var _DOM =
    /** @type {?} */
    null;
    /**
     * @return {?}
     */

    function getDOM() {
      return _DOM;
    }
    /**
     * @param {?} adapter
     * @return {?}
     */


    function setDOM(adapter) {
      _DOM = adapter;
    }
    /**
     * @param {?} adapter
     * @return {?}
     */


    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.
     * @abstract
     */


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

        this.resourceLoaderType =
        /** @type {?} */
        null;
      }
      /**
       * Maps attribute names to their corresponding property names for cases
       * where attribute name doesn't match property name.
       * @return {?}
       */


      _createClass2(DomAdapter, [{
        key: "attrToPropMap",
        get: function get() {
          return this._attrToPropMap;
        }
        /**
         * @param {?} value
         * @return {?}
         */
        ,
        set: function set(value) {
          this._attrToPropMap = value;
        }
      }]);

      return DomAdapter;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Provides DOM operations in any browser environment.
     *
     * \@security Tread carefully! Interacting with the DOM directly is dangerous and
     * can introduce XSS risks.
     * @abstract
     */


    var GenericBrowserDomAdapter = /*#__PURE__*/function (_DomAdapter) {
      _inherits(GenericBrowserDomAdapter, _DomAdapter);

      var _super142 = _createSuper(GenericBrowserDomAdapter);

      function GenericBrowserDomAdapter() {
        var _this384;

        _classCallCheck(this, GenericBrowserDomAdapter);

        _this384 = _super142.call(this);
        _this384._animationPrefix = null;
        _this384._transitionEnd = null;

        try {
          /** @type {?} */
          var element = _this384.createElement('div', document);

          if (_this384.getStyle(element, 'animationName') != null) {
            _this384._animationPrefix = '';
          } else {
            /** @type {?} */
            var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];

            for (var i = 0; i < domPrefixes.length; i++) {
              if (_this384.getStyle(element, domPrefixes[i] + 'AnimationName') != null) {
                _this384._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';
                break;
              }
            }
          }
          /** @type {?} */


          var transEndEventNames = {
            WebkitTransition: 'webkitTransitionEnd',
            MozTransition: 'transitionend',
            OTransition: 'oTransitionEnd otransitionend',
            transition: 'transitionend'
          };
          Object.keys(transEndEventNames).forEach(
          /**
          * @param {?} key
          * @return {?}
          */
          function (key) {
            if (_this384.getStyle(element, key) != null) {
              _this384._transitionEnd = transEndEventNames[key];
            }
          });
        } catch (_a) {
          _this384._animationPrefix = null;
          _this384._transitionEnd = null;
        }

        return _this384;
      }
      /**
       * @param {?} el
       * @return {?}
       */


      _createClass2(GenericBrowserDomAdapter, [{
        key: "getDistributedNodes",
        value: function getDistributedNodes(el) {
          return (
            /** @type {?} */
            el.getDistributedNodes()
          );
        }
        /**
         * @param {?} el
         * @param {?} baseUrl
         * @param {?} href
         * @return {?}
         */

      }, {
        key: "resolveAndSetHref",
        value: function resolveAndSetHref(el, baseUrl, href) {
          el.href = href == null ? baseUrl : baseUrl + '/../' + href;
        }
        /**
         * @return {?}
         */

      }, {
        key: "supportsDOMEvents",
        value: function supportsDOMEvents() {
          return true;
        }
        /**
         * @return {?}
         */

      }, {
        key: "supportsNativeShadowDOM",
        value: function supportsNativeShadowDOM() {
          return typeof
          /** @type {?} */
          document.body.createShadowRoot === 'function';
        }
        /**
         * @return {?}
         */

      }, {
        key: "getAnimationPrefix",
        value: function getAnimationPrefix() {
          return this._animationPrefix ? this._animationPrefix : '';
        }
        /**
         * @return {?}
         */

      }, {
        key: "getTransitionEnd",
        value: function getTransitionEnd() {
          return this._transitionEnd ? this._transitionEnd : '';
        }
        /**
         * @return {?}
         */

      }, {
        key: "supportsAnimation",
        value: function supportsAnimation() {
          return this._animationPrefix != null && this._transitionEnd != null;
        }
      }]);

      return GenericBrowserDomAdapter;
    }(DomAdapter);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var _attrToPropMap = {
      'class': 'className',
      'innerHtml': 'innerHTML',
      'readonly': 'readOnly',
      'tabindex': 'tabIndex'
    };
    /** @type {?} */

    var DOM_KEY_LOCATION_NUMPAD = 3; // Map to convert some key or keyIdentifier values to what will be returned by getEventKey

    /** @type {?} */

    var _keyMap = {
      // The following values are here for cross-browser compatibility and to match the W3C standard
      // cf http://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 ...

    /** @type {?} */

    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 =
    /**
    * @return {?}
    */
    function ɵ0() {
      if (_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node']) {
        return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node'].prototype.contains ||
        /**
        * @this {?}
        * @param {?} node
        * @return {?}
        */
        function (node) {
          return !!(this.compareDocumentPosition(node) & 16);
        };
      }

      return (
        /** @type {?} */
        undefined
      );
    };
    /** @type {?} */


    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 _super143 = _createSuper(BrowserDomAdapter);

      function BrowserDomAdapter() {
        _classCallCheck(this, BrowserDomAdapter);

        return _super143.apply(this, arguments);
      }

      _createClass2(BrowserDomAdapter, [{
        key: "parse",

        /**
         * @param {?} templateHtml
         * @return {?}
         */
        value: function parse(templateHtml) {
          throw new Error('parse not implemented');
        }
        /**
         * @return {?}
         */

      }, {
        key: "hasProperty",

        /**
         * @param {?} element
         * @param {?} name
         * @return {?}
         */
        value: function hasProperty(element, name) {
          return name in element;
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setProperty",
        value: function setProperty(el, name, value) {
          /** @type {?} */
          el[name] = value;
        }
        /**
         * @param {?} el
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getProperty",
        value: function getProperty(el, name) {
          return (
            /** @type {?} */
            el[name]
          );
        }
        /**
         * @param {?} el
         * @param {?} methodName
         * @param {?} args
         * @return {?}
         */

      }, {
        key: "invoke",
        value: function invoke(el, methodName, args) {
          /** @type {?} */
          el[methodName].apply(el, _toConsumableArray(args));
        } // TODO(tbosch): move this into a separate environment class once we have it

        /**
         * @param {?} error
         * @return {?}
         */

      }, {
        key: "logError",
        value: function logError(error) {
          if (window.console) {
            if (console.error) {
              console.error(error);
            } else {
              console.log(error);
            }
          }
        }
        /**
         * @param {?} error
         * @return {?}
         */

      }, {
        key: "log",
        value: function log(error) {
          if (window.console) {
            window.console.log && window.console.log(error);
          }
        }
        /**
         * @param {?} error
         * @return {?}
         */

      }, {
        key: "logGroup",
        value: function logGroup(error) {
          if (window.console) {
            window.console.group && window.console.group(error);
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "logGroupEnd",
        value: function logGroupEnd() {
          if (window.console) {
            window.console.groupEnd && window.console.groupEnd();
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "contains",

        /**
         * @param {?} nodeA
         * @param {?} nodeB
         * @return {?}
         */
        value: function contains(nodeA, nodeB) {
          return nodeContains.call(nodeA, nodeB);
        }
        /**
         * @param {?} el
         * @param {?} selector
         * @return {?}
         */

      }, {
        key: "querySelector",
        value: function querySelector(el, selector) {
          return el.querySelector(selector);
        }
        /**
         * @param {?} el
         * @param {?} selector
         * @return {?}
         */

      }, {
        key: "querySelectorAll",
        value: function querySelectorAll(el, selector) {
          return el.querySelectorAll(selector);
        }
        /**
         * @param {?} el
         * @param {?} evt
         * @param {?} listener
         * @return {?}
         */

      }, {
        key: "on",
        value: function on(el, evt, listener) {
          el.addEventListener(evt, listener, false);
        }
        /**
         * @param {?} el
         * @param {?} evt
         * @param {?} listener
         * @return {?}
         */

      }, {
        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 (
            /**
            * @return {?}
            */
            function () {
              el.removeEventListener(evt, listener, false);
            }
          );
        }
        /**
         * @param {?} el
         * @param {?} evt
         * @return {?}
         */

      }, {
        key: "dispatchEvent",
        value: function dispatchEvent(el, evt) {
          el.dispatchEvent(evt);
        }
        /**
         * @param {?} eventType
         * @return {?}
         */

      }, {
        key: "createMouseEvent",
        value: function createMouseEvent(eventType) {
          /** @type {?} */
          var evt = this.getDefaultDocument().createEvent('MouseEvent');
          evt.initEvent(eventType, true, true);
          return evt;
        }
        /**
         * @param {?} eventType
         * @return {?}
         */

      }, {
        key: "createEvent",
        value: function createEvent(eventType) {
          /** @type {?} */
          var evt = this.getDefaultDocument().createEvent('Event');
          evt.initEvent(eventType, true, true);
          return evt;
        }
        /**
         * @param {?} evt
         * @return {?}
         */

      }, {
        key: "preventDefault",
        value: function preventDefault(evt) {
          evt.preventDefault();
          evt.returnValue = false;
        }
        /**
         * @param {?} evt
         * @return {?}
         */

      }, {
        key: "isPrevented",
        value: function isPrevented(evt) {
          return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getInnerHTML",
        value: function getInnerHTML(el) {
          return el.innerHTML;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getTemplateContent",
        value: function getTemplateContent(el) {
          return 'content' in el && this.isTemplateElement(el) ?
          /** @type {?} */
          el.content : null;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getOuterHTML",
        value: function getOuterHTML(el) {
          return el.outerHTML;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "nodeName",
        value: function nodeName(node) {
          return node.nodeName;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "nodeValue",
        value: function nodeValue(node) {
          return node.nodeValue;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "type",
        value: function type(node) {
          return node.type;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "content",
        value: function content(node) {
          if (this.hasProperty(node, 'content')) {
            return (
              /** @type {?} */
              node.content
            );
          } else {
            return node;
          }
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "firstChild",
        value: function firstChild(el) {
          return el.firstChild;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "nextSibling",
        value: function nextSibling(el) {
          return el.nextSibling;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "parentElement",
        value: function parentElement(el) {
          return el.parentNode;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "childNodes",
        value: function childNodes(el) {
          return el.childNodes;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "childNodesAsList",
        value: function childNodesAsList(el) {
          /** @type {?} */
          var childNodes = el.childNodes;
          /** @type {?} */

          var res = new Array(childNodes.length);

          for (var i = 0; i < childNodes.length; i++) {
            res[i] = childNodes[i];
          }

          return res;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "clearNodes",
        value: function clearNodes(el) {
          while (el.firstChild) {
            el.removeChild(el.firstChild);
          }
        }
        /**
         * @param {?} el
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "appendChild",
        value: function appendChild(el, node) {
          el.appendChild(node);
        }
        /**
         * @param {?} el
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "removeChild",
        value: function removeChild(el, node) {
          el.removeChild(node);
        }
        /**
         * @param {?} el
         * @param {?} newChild
         * @param {?} oldChild
         * @return {?}
         */

      }, {
        key: "replaceChild",
        value: function replaceChild(el, newChild, oldChild) {
          el.replaceChild(newChild, oldChild);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "remove",
        value: function remove(node) {
          if (node.parentNode) {
            node.parentNode.removeChild(node);
          }

          return node;
        }
        /**
         * @param {?} parent
         * @param {?} ref
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(parent, ref, node) {
          parent.insertBefore(node, ref);
        }
        /**
         * @param {?} parent
         * @param {?} ref
         * @param {?} nodes
         * @return {?}
         */

      }, {
        key: "insertAllBefore",
        value: function insertAllBefore(parent, ref, nodes) {
          nodes.forEach(
          /**
          * @param {?} n
          * @return {?}
          */
          function (n) {
            return parent.insertBefore(n, ref);
          });
        }
        /**
         * @param {?} parent
         * @param {?} ref
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "insertAfter",
        value: function insertAfter(parent, ref, node) {
          parent.insertBefore(node, ref.nextSibling);
        }
        /**
         * @param {?} el
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setInnerHTML",
        value: function setInnerHTML(el, value) {
          el.innerHTML = value;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getText",
        value: function getText(el) {
          return el.textContent;
        }
        /**
         * @param {?} el
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setText",
        value: function setText(el, value) {
          el.textContent = value;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getValue",
        value: function getValue(el) {
          return el.value;
        }
        /**
         * @param {?} el
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setValue",
        value: function setValue(el, value) {
          el.value = value;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getChecked",
        value: function getChecked(el) {
          return el.checked;
        }
        /**
         * @param {?} el
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setChecked",
        value: function setChecked(el, value) {
          el.checked = value;
        }
        /**
         * @param {?} text
         * @return {?}
         */

      }, {
        key: "createComment",
        value: function createComment(text) {
          return this.getDefaultDocument().createComment(text);
        }
        /**
         * @param {?} html
         * @return {?}
         */

      }, {
        key: "createTemplate",
        value: function createTemplate(html) {
          /** @type {?} */
          var t = this.getDefaultDocument().createElement('template');
          t.innerHTML = html;
          return t;
        }
        /**
         * @param {?} tagName
         * @param {?=} doc
         * @return {?}
         */

      }, {
        key: "createElement",
        value: function createElement(tagName, doc) {
          doc = doc || this.getDefaultDocument();
          return doc.createElement(tagName);
        }
        /**
         * @param {?} ns
         * @param {?} tagName
         * @param {?=} doc
         * @return {?}
         */

      }, {
        key: "createElementNS",
        value: function createElementNS(ns, tagName, doc) {
          doc = doc || this.getDefaultDocument();
          return doc.createElementNS(ns, tagName);
        }
        /**
         * @param {?} text
         * @param {?=} doc
         * @return {?}
         */

      }, {
        key: "createTextNode",
        value: function createTextNode(text, doc) {
          doc = doc || this.getDefaultDocument();
          return doc.createTextNode(text);
        }
        /**
         * @param {?} attrName
         * @param {?} attrValue
         * @param {?=} doc
         * @return {?}
         */

      }, {
        key: "createScriptTag",
        value: function createScriptTag(attrName, attrValue, doc) {
          doc = doc || this.getDefaultDocument();
          /** @type {?} */

          var el =
          /** @type {?} */
          doc.createElement('SCRIPT');
          el.setAttribute(attrName, attrValue);
          return el;
        }
        /**
         * @param {?} css
         * @param {?=} doc
         * @return {?}
         */

      }, {
        key: "createStyleElement",
        value: function createStyleElement(css, doc) {
          doc = doc || this.getDefaultDocument();
          /** @type {?} */

          var style =
          /** @type {?} */
          doc.createElement('style');
          this.appendChild(style, this.createTextNode(css, doc));
          return style;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "createShadowRoot",
        value: function createShadowRoot(el) {
          return (
            /** @type {?} */
            el.createShadowRoot()
          );
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getShadowRoot",
        value: function getShadowRoot(el) {
          return (
            /** @type {?} */
            el.shadowRoot
          );
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getHost",
        value: function getHost(el) {
          return (
            /** @type {?} */
            el.host
          );
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "clone",
        value: function clone(node) {
          return node.cloneNode(true);
        }
        /**
         * @param {?} element
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getElementsByClassName",
        value: function getElementsByClassName(element, name) {
          return element.getElementsByClassName(name);
        }
        /**
         * @param {?} element
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getElementsByTagName",
        value: function getElementsByTagName(element, name) {
          return element.getElementsByTagName(name);
        }
        /**
         * @param {?} element
         * @return {?}
         */

      }, {
        key: "classList",
        value: function classList(element) {
          return Array.prototype.slice.call(element.classList, 0);
        }
        /**
         * @param {?} element
         * @param {?} className
         * @return {?}
         */

      }, {
        key: "addClass",
        value: function addClass(element, className) {
          element.classList.add(className);
        }
        /**
         * @param {?} element
         * @param {?} className
         * @return {?}
         */

      }, {
        key: "removeClass",
        value: function removeClass(element, className) {
          element.classList.remove(className);
        }
        /**
         * @param {?} element
         * @param {?} className
         * @return {?}
         */

      }, {
        key: "hasClass",
        value: function hasClass(element, className) {
          return element.classList.contains(className);
        }
        /**
         * @param {?} element
         * @param {?} styleName
         * @param {?} styleValue
         * @return {?}
         */

      }, {
        key: "setStyle",
        value: function setStyle(element, styleName, styleValue) {
          element.style[styleName] = styleValue;
        }
        /**
         * @param {?} element
         * @param {?} stylename
         * @return {?}
         */

      }, {
        key: "removeStyle",
        value: function removeStyle(element, stylename) {
          // IE requires '' instead of null
          // see https://github.com/angular/angular/issues/7916
          element.style[stylename] = '';
        }
        /**
         * @param {?} element
         * @param {?} stylename
         * @return {?}
         */

      }, {
        key: "getStyle",
        value: function getStyle(element, stylename) {
          return element.style[stylename];
        }
        /**
         * @param {?} element
         * @param {?} styleName
         * @param {?=} styleValue
         * @return {?}
         */

      }, {
        key: "hasStyle",
        value: function hasStyle(element, styleName, styleValue) {
          /** @type {?} */
          var value = this.getStyle(element, styleName) || '';
          return styleValue ? value == styleValue : value.length > 0;
        }
        /**
         * @param {?} element
         * @return {?}
         */

      }, {
        key: "tagName",
        value: function tagName(element) {
          return element.tagName;
        }
        /**
         * @param {?} element
         * @return {?}
         */

      }, {
        key: "attributeMap",
        value: function attributeMap(element) {
          /** @type {?} */
          var res = new Map();
          /** @type {?} */

          var elAttrs = element.attributes;

          for (var i = 0; i < elAttrs.length; i++) {
            /** @type {?} */
            var attrib = elAttrs.item(i);
            res.set(attrib.name, attrib.value);
          }

          return res;
        }
        /**
         * @param {?} element
         * @param {?} attribute
         * @return {?}
         */

      }, {
        key: "hasAttribute",
        value: function hasAttribute(element, attribute) {
          return element.hasAttribute(attribute);
        }
        /**
         * @param {?} element
         * @param {?} ns
         * @param {?} attribute
         * @return {?}
         */

      }, {
        key: "hasAttributeNS",
        value: function hasAttributeNS(element, ns, attribute) {
          return element.hasAttributeNS(ns, attribute);
        }
        /**
         * @param {?} element
         * @param {?} attribute
         * @return {?}
         */

      }, {
        key: "getAttribute",
        value: function getAttribute(element, attribute) {
          return element.getAttribute(attribute);
        }
        /**
         * @param {?} element
         * @param {?} ns
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getAttributeNS",
        value: function getAttributeNS(element, ns, name) {
          return element.getAttributeNS(ns, name);
        }
        /**
         * @param {?} element
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setAttribute",
        value: function setAttribute(element, name, value) {
          element.setAttribute(name, value);
        }
        /**
         * @param {?} element
         * @param {?} ns
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setAttributeNS",
        value: function setAttributeNS(element, ns, name, value) {
          element.setAttributeNS(ns, name, value);
        }
        /**
         * @param {?} element
         * @param {?} attribute
         * @return {?}
         */

      }, {
        key: "removeAttribute",
        value: function removeAttribute(element, attribute) {
          element.removeAttribute(attribute);
        }
        /**
         * @param {?} element
         * @param {?} ns
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "removeAttributeNS",
        value: function removeAttributeNS(element, ns, name) {
          element.removeAttributeNS(ns, name);
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "templateAwareRoot",
        value: function templateAwareRoot(el) {
          return this.isTemplateElement(el) ? this.content(el) : el;
        }
        /**
         * @return {?}
         */

      }, {
        key: "createHtmlDocument",
        value: function createHtmlDocument() {
          return document.implementation.createHTMLDocument('fakeTitle');
        }
        /**
         * @return {?}
         */

      }, {
        key: "getDefaultDocument",
        value: function getDefaultDocument() {
          return document;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getBoundingClientRect",
        value: function getBoundingClientRect(el) {
          try {
            return el.getBoundingClientRect();
          } catch (_a) {
            return {
              top: 0,
              bottom: 0,
              left: 0,
              right: 0,
              width: 0,
              height: 0
            };
          }
        }
        /**
         * @param {?} doc
         * @return {?}
         */

      }, {
        key: "getTitle",
        value: function getTitle(doc) {
          return doc.title;
        }
        /**
         * @param {?} doc
         * @param {?} newTitle
         * @return {?}
         */

      }, {
        key: "setTitle",
        value: function setTitle(doc, newTitle) {
          doc.title = newTitle || '';
        }
        /**
         * @param {?} n
         * @param {?} selector
         * @return {?}
         */

      }, {
        key: "elementMatches",
        value: function elementMatches(n, selector) {
          if (this.isElementNode(n)) {
            return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
          }

          return false;
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "isTemplateElement",
        value: function isTemplateElement(el) {
          return this.isElementNode(el) && el.nodeName === 'TEMPLATE';
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "isTextNode",
        value: function isTextNode(node) {
          return node.nodeType === Node.TEXT_NODE;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "isCommentNode",
        value: function isCommentNode(node) {
          return node.nodeType === Node.COMMENT_NODE;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "isElementNode",
        value: function isElementNode(node) {
          return node.nodeType === Node.ELEMENT_NODE;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "hasShadowRoot",
        value: function hasShadowRoot(node) {
          return node.shadowRoot != null && node instanceof HTMLElement;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "isShadowRoot",
        value: function isShadowRoot(node) {
          return node instanceof DocumentFragment;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "importIntoDoc",
        value: function importIntoDoc(node) {
          return document.importNode(this.templateAwareRoot(node), true);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "adoptNode",
        value: function adoptNode(node) {
          return document.adoptNode(node);
        }
        /**
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "getHref",
        value: function getHref(el) {
          return (
            /** @type {?} */
            el.getAttribute('href')
          );
        }
        /**
         * @param {?} event
         * @return {?}
         */

      }, {
        key: "getEventKey",
        value: function getEventKey(event) {
          /** @type {?} */
          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
            // http://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 =
                /** @type {?} */
                _chromeNumKeyPadMap[key];
              }
            }
          }

          return _keyMap[key] || key;
        }
        /**
         * @param {?} doc
         * @param {?} target
         * @return {?}
         */

      }, {
        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;
        }
        /**
         * @return {?}
         */

      }, {
        key: "getHistory",
        value: function getHistory() {
          return window.history;
        }
        /**
         * @return {?}
         */

      }, {
        key: "getLocation",
        value: function getLocation() {
          return window.location;
        }
        /**
         * @param {?} doc
         * @return {?}
         */

      }, {
        key: "getBaseHref",
        value: function getBaseHref(doc) {
          /** @type {?} */
          var href = getBaseElementHref();
          return href == null ? null : relativePath(href);
        }
        /**
         * @return {?}
         */

      }, {
        key: "resetBaseElement",
        value: function resetBaseElement() {
          baseElement = null;
        }
        /**
         * @return {?}
         */

      }, {
        key: "getUserAgent",
        value: function getUserAgent() {
          return window.navigator.userAgent;
        }
        /**
         * @param {?} element
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setData",
        value: function setData(element, name, value) {
          this.setAttribute(element, 'data-' + name, value);
        }
        /**
         * @param {?} element
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getData",
        value: function getData(element, name) {
          return this.getAttribute(element, 'data-' + name);
        }
        /**
         * @param {?} element
         * @return {?}
         */

      }, {
        key: "getComputedStyle",
        value: function (_getComputedStyle) {
          function getComputedStyle(_x) {
            return _getComputedStyle.apply(this, arguments);
          }

          getComputedStyle.toString = function () {
            return _getComputedStyle.toString();
          };

          return getComputedStyle;
        }(function (element) {
          return getComputedStyle(element);
        }) // TODO(tbosch): move this into a separate environment class once we have it

        /**
         * @return {?}
         */

      }, {
        key: "supportsWebAnimation",
        value: function supportsWebAnimation() {
          return typeof
          /** @type {?} */
          Element.prototype['animate'] === 'function';
        }
        /**
         * @return {?}
         */

      }, {
        key: "performanceNow",
        value: function performanceNow() {
          // performance.now() is not available in all browsers, see
          // http://caniuse.com/#search=performance.now
          return window.performance && window.performance.now ? window.performance.now() : new Date().getTime();
        }
        /**
         * @return {?}
         */

      }, {
        key: "supportsCookies",
        value: function supportsCookies() {
          return true;
        }
        /**
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "getCookie",
        value: function getCookie(name) {
          return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵparseCookieValue"])(document.cookie, name);
        }
        /**
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setCookie",
        value: function setCookie(name, value) {
          // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does
          // not clear other cookies.
          document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
        }
      }, {
        key: "attrToPropMap",
        get: function get() {
          return _attrToPropMap;
        }
      }], [{
        key: "makeCurrent",
        value: function makeCurrent() {
          setRootDomAdapter(new BrowserDomAdapter());
        }
      }]);

      return BrowserDomAdapter;
    }(GenericBrowserDomAdapter);
    /** @type {?} */


    var baseElement = null;
    /**
     * @return {?}
     */

    function getBaseElementHref() {
      if (!baseElement) {
        baseElement =
        /** @type {?} */
        document.querySelector('base');

        if (!baseElement) {
          return null;
        }
      }

      return baseElement.getAttribute('href');
    } // based on urlUtils.js in AngularJS 1

    /** @type {?} */


    var urlParsingNode;
    /**
     * @param {?} url
     * @return {?}
     */

    function relativePath(url) {
      if (!urlParsingNode) {
        urlParsingNode = document.createElement('a');
      }

      urlParsingNode.setAttribute('href', url);
      return urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?}
     */


    function supportsState() {
      return !!window.history.pushState;
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * `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 (_angular_common__WEBP) {
      _inherits(BrowserPlatformLocation, _angular_common__WEBP);

      var _super144 = _createSuper(BrowserPlatformLocation);

      /**
       * @param {?} _doc
       */
      function BrowserPlatformLocation(_doc) {
        var _this385;

        _classCallCheck(this, BrowserPlatformLocation);

        _this385 = _super144.call(this);
        _this385._doc = _doc;

        _this385._init();

        return _this385;
      } // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it

      /**
       * \@internal
       * @return {?}
       */


      _createClass2(BrowserPlatformLocation, [{
        key: "_init",
        value: function _init() {
          /** @type {?} */
          this.location = getDOM().getLocation();
          this._history = getDOM().getHistory();
        }
        /**
         * @return {?}
         */

      }, {
        key: "getBaseHrefFromDOM",
        value: function getBaseHrefFromDOM() {
          return (
            /** @type {?} */
            getDOM().getBaseHref(this._doc)
          );
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "onPopState",
        value: function onPopState(fn) {
          getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);
        }
        /**
         * @param {?} fn
         * @return {?}
         */

      }, {
        key: "onHashChange",
        value: function onHashChange(fn) {
          getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);
        }
        /**
         * @return {?}
         */

      }, {
        key: "pushState",

        /**
         * @param {?} state
         * @param {?} title
         * @param {?} url
         * @return {?}
         */
        value: function pushState(state, title, url) {
          if (supportsState()) {
            this._history.pushState(state, title, url);
          } else {
            this.location.hash = url;
          }
        }
        /**
         * @param {?} state
         * @param {?} title
         * @param {?} url
         * @return {?}
         */

      }, {
        key: "replaceState",
        value: function replaceState(state, title, url) {
          if (supportsState()) {
            this._history.replaceState(state, title, url);
          } else {
            this.location.hash = url;
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "forward",
        value: function forward() {
          this._history.forward();
        }
        /**
         * @return {?}
         */

      }, {
        key: "back",
        value: function back() {
          this._history.back();
        }
        /**
         * @return {?}
         */

      }, {
        key: "getState",
        value: function getState() {
          return this._history.state;
        }
      }, {
        key: "href",
        get: function get() {
          return this.location.href;
        }
        /**
         * @return {?}
         */

      }, {
        key: "protocol",
        get: function get() {
          return this.location.protocol;
        }
        /**
         * @return {?}
         */

      }, {
        key: "hostname",
        get: function get() {
          return this.location.hostname;
        }
        /**
         * @return {?}
         */

      }, {
        key: "port",
        get: function get() {
          return this.location.port;
        }
        /**
         * @return {?}
         */

      }, {
        key: "pathname",
        get: function get() {
          return this.location.pathname;
        }
        /**
         * @return {?}
         */
        ,

        /**
         * @param {?} newPath
         * @return {?}
         */
        set: function set(newPath) {
          this.location.pathname = newPath;
        }
      }, {
        key: "search",
        get: function get() {
          return this.location.search;
        }
        /**
         * @return {?}
         */

      }, {
        key: "hash",
        get: function get() {
          return this.location.hash;
        }
      }]);

      return BrowserPlatformLocation;
    }(_angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"]);

    BrowserPlatformLocation.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    BrowserPlatformLocation.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * An id that identifies a particular application being bootstrapped, that should
     * match across the client/server boundary.
     * @type {?}
     */


    var TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('TRANSITION_ID');
    /**
     * @param {?} transitionId
     * @param {?} document
     * @param {?} injector
     * @return {?}
     */

    function appInitializerFactory(transitionId, document, injector) {
      return (
        /**
        * @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(
          /**
          * @return {?}
          */
          function () {
            /** @type {?} */
            var dom = getDOM();
            /** @type {?} */

            var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, "style[ng-transition]"));
            styles.filter(
            /**
            * @param {?} el
            * @return {?}
            */
            function (el) {
              return dom.getAttribute(el, 'ng-transition') === transitionId;
            }).forEach(
            /**
            * @param {?} el
            * @return {?}
            */
            function (el) {
              return dom.remove(el);
            });
          });
        }
      );
    }
    /** @type {?} */


    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
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var BrowserGetTestability = /*#__PURE__*/function () {
      function BrowserGetTestability() {
        _classCallCheck(this, BrowserGetTestability);
      }

      _createClass2(BrowserGetTestability, [{
        key: "addToWindow",

        /**
         * @param {?} registry
         * @return {?}
         */
        value: function addToWindow(registry) {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAngularTestability'] =
          /**
          * @param {?} elem
          * @param {?=} findInAncestors
          * @return {?}
          */
          function (elem) {
            var findInAncestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

            /** @type {?} */
            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'] =
          /**
          * @return {?}
          */
          function () {
            return registry.getAllTestabilities();
          };

          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularRootElements'] =
          /**
          * @return {?}
          */
          function () {
            return registry.getAllRootElements();
          };
          /** @type {?} */


          var whenAllStable =
          /**
          * @param {?} callback
          * @return {?}
          */
          function whenAllStable(callback
          /** TODO #9100 */
          ) {
            /** @type {?} */
            var testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities']();
            /** @type {?} */


            var count = testabilities.length;
            /** @type {?} */

            var didWork = false;
            /** @type {?} */

            var decrement =
            /**
            * @param {?} didWork_
            * @return {?}
            */
            function decrement(didWork_
            /** TODO #9100 */
            ) {
              didWork = didWork || didWork_;
              count--;

              if (count == 0) {
                callback(didWork);
              }
            };

            testabilities.forEach(
            /**
            * @param {?} testability
            * @return {?}
            */
            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);
        }
        /**
         * @param {?} registry
         * @param {?} elem
         * @param {?} findInAncestors
         * @return {?}
         */

      }, {
        key: "findTestabilityInTree",
        value: function findTestabilityInTree(registry, elem, findInAncestors) {
          if (elem == null) {
            return null;
          }
          /** @type {?} */


          var t = registry.getTestability(elem);

          if (t != null) {
            return t;
          } else if (!findInAncestors) {
            return null;
          }

          if (getDOM().isShadowRoot(elem)) {
            return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);
          }

          return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);
        }
      }], [{
        key: "init",

        /**
         * @return {?}
         */
        value: function init() {
          Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["setTestabilityGetter"])(new BrowserGetTestability());
        }
      }]);

      return BrowserGetTestability;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    var CAMEL_CASE_REGEXP = /([A-Z])/g;
    /** @type {?} */

    var DASH_CASE_REGEXP = /-([a-z])/g;
    /**
     * @param {?} input
     * @return {?}
     */

    function camelCaseToDashCase(input) {
      return input.replace(CAMEL_CASE_REGEXP,
      /**
      * @param {...?} m
      * @return {?}
      */
      function () {
        for (var _len19 = arguments.length, m = new Array(_len19), _key20 = 0; _key20 < _len19; _key20++) {
          m[_key20] = arguments[_key20];
        }

        return '-' + m[1].toLowerCase();
      });
    }
    /**
     * @param {?} input
     * @return {?}
     */


    function dashCaseToCamelCase(input) {
      return input.replace(DASH_CASE_REGEXP,
      /**
      * @param {...?} m
      * @return {?}
      */
      function () {
        for (var _len20 = arguments.length, m = new Array(_len20), _key21 = 0; _key21 < _len20; _key21++) {
          m[_key21] = arguments[_key21];
        }

        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.
     * @return {?}
     */


    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....')`).

        /** @type {?} */
        var ng = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] =
        /** @type {?} */
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] || {};
        ng[name] = value;
      }
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$1 =
    /**
    * @return {?}
    */
    function ɵ0$1() {
      return {
        'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"],
        'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
      };
    };
    /** @type {?} */


    var CORE_TOKENS = ɵ0$1();
    /** @type {?} */

    var INSPECT_GLOBAL_NAME = 'probe';
    /** @type {?} */

    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.
     * @param {?} element
     * @return {?}
     */

    function inspectNativeElement(element) {
      return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["getDebugNode"])(element);
    }
    /**
     * @param {?} coreTokens
     * @return {?}
     */


    function _createNgProbe(coreTokens) {
      exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);
      exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));
      return (
        /**
        * @return {?}
        */
        function () {
          return inspectNativeElement;
        }
      );
    }
    /**
     * @param {?} tokens
     * @return {?}
     */


    function _ngProbeTokensToMap(tokens) {
      return tokens.reduce(
      /**
      * @param {?} prev
      * @param {?} t
      * @return {?}
      */
      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.
     * @type {?}
     */


    var ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];
    /**
     * Providers which support debugging Angular applications (e.g. via `ng.probe`).
     * @type {?}
     */

    var ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [{
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"],
      useFactory: _createNgProbe,
      deps: [[_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()]],
      multi: true
    }];
    /** @type {?} */

    var ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * The injection token for the event-manager plug-in service.
     *
     * \@publicApi
     * @type {?}
     */

    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.
       * @param {?} plugins
       * @param {?} _zone
       */
      function EventManager(plugins, _zone) {
        var _this386 = this;

        _classCallCheck(this, EventManager);

        this._zone = _zone;
        this._eventNameToPlugin = new Map();
        plugins.forEach(
        /**
        * @template THIS
        * @this {THIS}
        * @param {?} p
        * @return {THIS}
        */
        function (p) {
          return p.manager = _this386;
        });
        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.
       * @return {?} A callback function that can be used to remove the handler.
       */


      _createClass2(EventManager, [{
        key: "addEventListener",
        value: function addEventListener(element, eventName, handler) {
          /** @type {?} */
          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.
         * @return {?} A callback function that can be used to remove the handler.
         */

      }, {
        key: "addGlobalEventListener",
        value: function addGlobalEventListener(target, eventName, handler) {
          /** @type {?} */
          var plugin = this._findPluginFor(eventName);

          return plugin.addGlobalEventListener(target, eventName, handler);
        }
        /**
         * Retrieves the compilation zone in which event listeners are registered.
         * @return {?}
         */

      }, {
        key: "getZone",
        value: function getZone() {
          return this._zone;
        }
        /**
         * \@internal
         * @param {?} eventName
         * @return {?}
         */

      }, {
        key: "_findPluginFor",
        value: function _findPluginFor(eventName) {
          /** @type {?} */
          var plugin = this._eventNameToPlugin.get(eventName);

          if (plugin) {
            return plugin;
          }
          /** @type {?} */


          var plugins = this._plugins;

          for (var i = 0; i < plugins.length; i++) {
            /** @type {?} */
            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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    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"]
      }];
    };

    if (false) {}
    /**
     * @abstract
     */


    var EventManagerPlugin = /*#__PURE__*/function () {
      /**
       * @param {?} _doc
       */
      function EventManagerPlugin(_doc) {
        _classCallCheck(this, EventManagerPlugin);

        this._doc = _doc;
      }
      /**
       * @param {?} element
       * @param {?} eventName
       * @param {?} handler
       * @return {?}
       */


      _createClass2(EventManagerPlugin, [{
        key: "addGlobalEventListener",
        value: function addGlobalEventListener(element, eventName, handler) {
          /** @type {?} */
          var target = 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;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


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

        /**
         * \@internal
         */
        this._stylesSet = new Set();
      }
      /**
       * @param {?} styles
       * @return {?}
       */


      _createClass2(SharedStylesHost, [{
        key: "addStyles",
        value: function addStyles(styles) {
          var _this387 = this;

          /** @type {?} */
          var additions = new Set();
          styles.forEach(
          /**
          * @param {?} style
          * @return {?}
          */
          function (style) {
            if (!_this387._stylesSet.has(style)) {
              _this387._stylesSet.add(style);

              additions.add(style);
            }
          });
          this.onStylesAdded(additions);
        }
        /**
         * @param {?} additions
         * @return {?}
         */

      }, {
        key: "onStylesAdded",
        value: function onStylesAdded(additions) {}
        /**
         * @return {?}
         */

      }, {
        key: "getAllStyles",
        value: function getAllStyles() {
          return Array.from(this._stylesSet);
        }
      }]);

      return SharedStylesHost;
    }();

    SharedStylesHost.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];

    if (false) {}

    var DomSharedStylesHost = /*#__PURE__*/function (_SharedStylesHost) {
      _inherits(DomSharedStylesHost, _SharedStylesHost);

      var _super145 = _createSuper(DomSharedStylesHost);

      /**
       * @param {?} _doc
       */
      function DomSharedStylesHost(_doc) {
        var _this388;

        _classCallCheck(this, DomSharedStylesHost);

        _this388 = _super145.call(this);
        _this388._doc = _doc;
        _this388._hostNodes = new Set();
        _this388._styleNodes = new Set();

        _this388._hostNodes.add(_doc.head);

        return _this388;
      }
      /**
       * @private
       * @param {?} styles
       * @param {?} host
       * @return {?}
       */


      _createClass2(DomSharedStylesHost, [{
        key: "_addStylesToHost",
        value: function _addStylesToHost(styles, host) {
          var _this389 = this;

          styles.forEach(
          /**
          * @param {?} style
          * @return {?}
          */
          function (style) {
            /** @type {?} */
            var styleEl = _this389._doc.createElement('style');

            styleEl.textContent = style;

            _this389._styleNodes.add(host.appendChild(styleEl));
          });
        }
        /**
         * @param {?} hostNode
         * @return {?}
         */

      }, {
        key: "addHost",
        value: function addHost(hostNode) {
          this._addStylesToHost(this._stylesSet, hostNode);

          this._hostNodes.add(hostNode);
        }
        /**
         * @param {?} hostNode
         * @return {?}
         */

      }, {
        key: "removeHost",
        value: function removeHost(hostNode) {
          this._hostNodes["delete"](hostNode);
        }
        /**
         * @param {?} additions
         * @return {?}
         */

      }, {
        key: "onStylesAdded",
        value: function onStylesAdded(additions) {
          var _this390 = this;

          this._hostNodes.forEach(
          /**
          * @param {?} hostNode
          * @return {?}
          */
          function (hostNode) {
            return _this390._addStylesToHost(additions, hostNode);
          });
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this._styleNodes.forEach(
          /**
          * @param {?} styleNode
          * @return {?}
          */
          function (styleNode) {
            return getDOM().remove(styleNode);
          });
        }
      }]);

      return DomSharedStylesHost;
    }(SharedStylesHost);

    DomSharedStylesHost.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    DomSharedStylesHost.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    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/'
    };
    /** @type {?} */

    var COMPONENT_REGEX = /%COMP%/g;
    /** @type {?} */

    var COMPONENT_VARIABLE = '%COMP%';
    /** @type {?} */

    var HOST_ATTR = "_nghost-".concat(COMPONENT_VARIABLE);
    /** @type {?} */

    var CONTENT_ATTR = "_ngcontent-".concat(COMPONENT_VARIABLE);
    /**
     * @param {?} componentShortId
     * @return {?}
     */

    function shimContentAttribute(componentShortId) {
      return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
    }
    /**
     * @param {?} componentShortId
     * @return {?}
     */


    function shimHostAttribute(componentShortId) {
      return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
    }
    /**
     * @param {?} compId
     * @param {?} styles
     * @param {?} target
     * @return {?}
     */


    function flattenStyles(compId, styles, target) {
      for (var i = 0; i < styles.length; i++) {
        /** @type {?} */
        var style = styles[i];

        if (Array.isArray(style)) {
          flattenStyles(compId, style, target);
        } else {
          style = style.replace(COMPONENT_REGEX, compId);
          target.push(style);
        }
      }

      return target;
    }
    /**
     * @param {?} eventHandler
     * @return {?}
     */


    function decoratePreventDefault(eventHandler) {
      return (
        /**
        * @param {?} event
        * @return {?}
        */
        function (event) {
          /** @type {?} */
          var allowDefaultBehavior = eventHandler(event);

          if (allowDefaultBehavior === false) {
            // TODO(tbosch): move preventDefault into event plugins...
            event.preventDefault();
            event.returnValue = false;
          }
        }
      );
    }

    var DomRendererFactory2 = /*#__PURE__*/function () {
      /**
       * @param {?} eventManager
       * @param {?} sharedStylesHost
       * @param {?} appId
       */
      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);
      }
      /**
       * @param {?} element
       * @param {?} type
       * @return {?}
       */


      _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:
              {
                /** @type {?} */
                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);
                }

                /** @type {?} */
                renderer.applyToHost(element);
                return renderer;
              }

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Native:
            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].ShadowDom:
              return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);

            default:
              {
                if (!this.rendererByCompId.has(type.id)) {
                  /** @type {?} */
                  var styles = flattenStyles(type.id, type.styles, []);
                  this.sharedStylesHost.addStyles(styles);
                  this.rendererByCompId.set(type.id, this.defaultRenderer);
                }

                return this.defaultRenderer;
              }
          }
        }
        /**
         * @return {?}
         */

      }, {
        key: "begin",
        value: function begin() {}
        /**
         * @return {?}
         */

      }, {
        key: "end",
        value: function end() {}
      }]);

      return DomRendererFactory2;
    }();

    DomRendererFactory2.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    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"]]
        }]
      }];
    };

    if (false) {}

    var DefaultDomRenderer2 = /*#__PURE__*/function () {
      /**
       * @param {?} eventManager
       */
      function DefaultDomRenderer2(eventManager) {
        _classCallCheck(this, DefaultDomRenderer2);

        this.eventManager = eventManager;
        this.data = Object.create(null);
      }
      /**
       * @return {?}
       */


      _createClass2(DefaultDomRenderer2, [{
        key: "destroy",
        value: function destroy() {}
        /**
         * @param {?} name
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        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);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "createComment",
        value: function createComment(value) {
          return document.createComment(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "createText",
        value: function createText(value) {
          return document.createTextNode(value);
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @return {?}
         */

      }, {
        key: "appendChild",
        value: function appendChild(parent, newChild) {
          parent.appendChild(newChild);
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @param {?} refChild
         * @return {?}
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(parent, newChild, refChild) {
          if (parent) {
            parent.insertBefore(newChild, refChild);
          }
        }
        /**
         * @param {?} parent
         * @param {?} oldChild
         * @return {?}
         */

      }, {
        key: "removeChild",
        value: function removeChild(parent, oldChild) {
          if (parent) {
            parent.removeChild(oldChild);
          }
        }
        /**
         * @param {?} selectorOrNode
         * @param {?=} preserveContent
         * @return {?}
         */

      }, {
        key: "selectRootElement",
        value: function selectRootElement(selectorOrNode, preserveContent) {
          /** @type {?} */
          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;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "parentNode",
        value: function parentNode(node) {
          return node.parentNode;
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "nextSibling",
        value: function nextSibling(node) {
          return node.nextSibling;
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?} value
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        key: "setAttribute",
        value: function setAttribute(el, name, value, namespace) {
          if (namespace) {
            name = namespace + ':' + name; // TODO(benlesh): Ivy may cause issues here because it's passing around
            // full URIs for namespaces, therefore this lookup will fail.

            /** @type {?} */

            var namespaceUri = NAMESPACE_URIS[namespace];

            if (namespaceUri) {
              el.setAttributeNS(namespaceUri, name, value);
            } else {
              el.setAttribute(name, value);
            }
          } else {
            el.setAttribute(name, value);
          }
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?=} namespace
         * @return {?}
         */

      }, {
        key: "removeAttribute",
        value: function removeAttribute(el, name, namespace) {
          if (namespace) {
            // TODO(benlesh): Ivy may cause issues here because it's passing around
            // full URIs for namespaces, therefore this lookup will fail.

            /** @type {?} */
            var namespaceUri = NAMESPACE_URIS[namespace];

            if (namespaceUri) {
              el.removeAttributeNS(namespaceUri, name);
            } else {
              // TODO(benlesh): 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);
          }
        }
        /**
         * @param {?} el
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "addClass",
        value: function addClass(el, name) {
          el.classList.add(name);
        }
        /**
         * @param {?} el
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "removeClass",
        value: function removeClass(el, name) {
          el.classList.remove(name);
        }
        /**
         * @param {?} el
         * @param {?} style
         * @param {?} value
         * @param {?} flags
         * @return {?}
         */

      }, {
        key: "setStyle",
        value: function setStyle(el, style, value, flags) {
          if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) {
            el.style.setProperty(style, value, !!(flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important) ? 'important' : '');
          } else {
            el.style[style] = value;
          }
        }
        /**
         * @param {?} el
         * @param {?} style
         * @param {?} flags
         * @return {?}
         */

      }, {
        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] = '';
          }
        }
        /**
         * @param {?} el
         * @param {?} name
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setProperty",
        value: function setProperty(el, name, value) {
          checkNoSyntheticProp(name, 'property');
          el[name] = value;
        }
        /**
         * @param {?} node
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "setValue",
        value: function setValue(node, value) {
          node.nodeValue = value;
        }
        /**
         * @param {?} target
         * @param {?} event
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "listen",
        value: function listen(target, event, callback) {
          checkNoSyntheticProp(event, 'listener');

          if (typeof target === 'string') {
            return (
              /** @type {?} */
              this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback))
            );
          }

          return (
            /** @type {?} */

            /** @type {?} */
            this.eventManager.addEventListener(target, event, decoratePreventDefault(callback))
          );
        }
      }]);

      return DefaultDomRenderer2;
    }();

    if (false) {}

    var ɵ0$2 =
    /**
    * @return {?}
    */
    function ɵ0$2() {
      return '@'.charCodeAt(0);
    };
    /** @type {?} */


    var AT_CHARCODE = ɵ0$2();
    /**
     * @param {?} name
     * @param {?} nameKind
     * @return {?}
     */

    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 _super146 = _createSuper(EmulatedEncapsulationDomRenderer2);

      /**
       * @param {?} eventManager
       * @param {?} sharedStylesHost
       * @param {?} component
       * @param {?} appId
       */
      function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {
        var _this391;

        _classCallCheck(this, EmulatedEncapsulationDomRenderer2);

        _this391 = _super146.call(this, eventManager);
        _this391.component = component;
        /** @type {?} */

        var styles = flattenStyles(appId + '-' + component.id, component.styles, []);
        sharedStylesHost.addStyles(styles);
        _this391.contentAttr = shimContentAttribute(appId + '-' + component.id);
        _this391.hostAttr = shimHostAttribute(appId + '-' + component.id);
        return _this391;
      }
      /**
       * @param {?} element
       * @return {?}
       */


      _createClass2(EmulatedEncapsulationDomRenderer2, [{
        key: "applyToHost",
        value: function applyToHost(element) {
          _get(_getPrototypeOf(EmulatedEncapsulationDomRenderer2.prototype), "setAttribute", this).call(this, element, this.hostAttr, '');
        }
        /**
         * @param {?} parent
         * @param {?} name
         * @return {?}
         */

      }, {
        key: "createElement",
        value: function createElement(parent, name) {
          /** @type {?} */
          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);

    if (false) {}

    var ShadowDomRenderer = /*#__PURE__*/function (_DefaultDomRenderer2) {
      _inherits(ShadowDomRenderer, _DefaultDomRenderer2);

      var _super147 = _createSuper(ShadowDomRenderer);

      /**
       * @param {?} eventManager
       * @param {?} sharedStylesHost
       * @param {?} hostEl
       * @param {?} component
       */
      function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
        var _this392;

        _classCallCheck(this, ShadowDomRenderer);

        _this392 = _super147.call(this, eventManager);
        _this392.sharedStylesHost = sharedStylesHost;
        _this392.hostEl = hostEl;
        _this392.component = component;

        if (component.encapsulation === _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].ShadowDom) {
          _this392.shadowRoot =
          /** @type {?} */
          hostEl.attachShadow({
            mode: 'open'
          });
        } else {
          _this392.shadowRoot =
          /** @type {?} */
          hostEl.createShadowRoot();
        }

        _this392.sharedStylesHost.addHost(_this392.shadowRoot);
        /** @type {?} */


        var styles = flattenStyles(component.id, component.styles, []);

        for (var i = 0; i < styles.length; i++) {
          /** @type {?} */
          var styleEl = document.createElement('style');
          styleEl.textContent = styles[i];

          _this392.shadowRoot.appendChild(styleEl);
        }

        return _this392;
      }
      /**
       * @private
       * @param {?} node
       * @return {?}
       */


      _createClass2(ShadowDomRenderer, [{
        key: "nodeOrShadowRoot",
        value: function nodeOrShadowRoot(node) {
          return node === this.hostEl ? this.shadowRoot : node;
        }
        /**
         * @return {?}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.sharedStylesHost.removeHost(this.shadowRoot);
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @return {?}
         */

      }, {
        key: "appendChild",
        value: function appendChild(parent, newChild) {
          return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "appendChild", this).call(this, this.nodeOrShadowRoot(parent), newChild);
        }
        /**
         * @param {?} parent
         * @param {?} newChild
         * @param {?} refChild
         * @return {?}
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(parent, newChild, refChild) {
          return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "insertBefore", this).call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
        }
        /**
         * @param {?} parent
         * @param {?} oldChild
         * @return {?}
         */

      }, {
        key: "removeChild",
        value: function removeChild(parent, oldChild) {
          return _get(_getPrototypeOf(ShadowDomRenderer.prototype), "removeChild", this).call(this, this.nodeOrShadowRoot(parent), oldChild);
        }
        /**
         * @param {?} node
         * @return {?}
         */

      }, {
        key: "parentNode",
        value: function parentNode(node) {
          return this.nodeOrShadowRoot(_get(_getPrototypeOf(ShadowDomRenderer.prototype), "parentNode", this).call(this, this.nodeOrShadowRoot(node)));
        }
      }]);

      return ShadowDomRenderer;
    }(DefaultDomRenderer2);

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$3 =
    /**
    * @return {?}
    */
    function ɵ0$3() {
      return typeof Zone !== 'undefined' &&
      /** @type {?} */
      Zone['__symbol__'] ||
      /**
      * @param {?} v
      * @return {?}
      */
      function (v) {
        return '__zone_symbol__' + v;
      };
    };
    /**
     * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'
     * since Angular can do much more
     * efficient bookkeeping than Zone can, because we have additional information. This speeds up
     * addEventListener by 3x.
     * @type {?}
     */


    var __symbol__ = ɵ0$3();
    /** @type {?} */


    var ADD_EVENT_LISTENER = __symbol__('addEventListener');
    /** @type {?} */


    var REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');
    /** @type {?} */


    var symbolNames = {};
    /** @type {?} */

    var FALSE = 'FALSE';
    /** @type {?} */

    var ANGULAR = 'ANGULAR';
    /** @type {?} */

    var NATIVE_ADD_LISTENER = 'addEventListener';
    /** @type {?} */

    var NATIVE_REMOVE_LISTENER = 'removeEventListener'; // use the same symbol string which is used in zone.js

    /** @type {?} */

    var stopSymbol = '__zone_symbol__propagationStopped';
    /** @type {?} */

    var stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';

    var ɵ1 =
    /**
    * @return {?}
    */
    function ɵ1() {
      /** @type {?} */
      var blackListedEvents = typeof Zone !== 'undefined' &&
      /** @type {?} */
      Zone[__symbol__('BLACK_LISTED_EVENTS')];

      if (blackListedEvents) {
        /** @type {?} */
        var res = {};
        blackListedEvents.forEach(
        /**
        * @param {?} eventName
        * @return {?}
        */
        function (eventName) {
          res[eventName] = eventName;
        });
        return res;
      }

      return undefined;
    };
    /** @type {?} */


    var blackListedMap = ɵ1();
    /** @type {?} */

    var isBlackListedEvent =
    /**
    * @param {?} eventName
    * @return {?}
    */
    function isBlackListedEvent(eventName) {
      if (!blackListedMap) {
        return false;
      }

      return blackListedMap.hasOwnProperty(eventName);
    };

    var ɵ2 = isBlackListedEvent;
    /**
     * @record
     */

    function TaskData() {}

    if (false) {} // a global listener to handle all dom event,
    // so we do not need to create a closure every time

    /** @type {?} */


    var globalListener =
    /**
    * @this {?}
    * @param {?} event
    * @return {?}
    */
    function globalListener(event) {
      /** @type {?} */
      var symbolName = symbolNames[event.type];

      if (!symbolName) {
        return;
      }
      /** @type {?} */


      var taskDatas = this[symbolName];

      if (!taskDatas) {
        return;
      }
      /** @type {?} */


      var args = [event];

      if (taskDatas.length === 1) {
        // if taskDatas only have one element, just invoke it

        /** @type {?} */
        var taskData = taskDatas[0];

        if (taskData.zone !== Zone.current) {
          // only use Zone.run when Zone.current not equals to stored zone
          return taskData.zone.run(taskData.handler, this, args);
        } else {
          return taskData.handler.apply(this, args);
        }
      } else {
        // copy tasks as a snapshot to avoid event handlers remove
        // itself or others

        /** @type {?} */
        var copiedTasks = taskDatas.slice();

        for (var i = 0; i < copiedTasks.length; i++) {
          // if other listener call event.stopImmediatePropagation
          // just break
          if (
          /** @type {?} */
          event[stopSymbol] === true) {
            break;
          }
          /** @type {?} */


          var _taskData = copiedTasks[i];

          if (_taskData.zone !== Zone.current) {
            // only use Zone.run when Zone.current not equals to stored zone
            _taskData.zone.run(_taskData.handler, this, args);
          } else {
            _taskData.handler.apply(this, args);
          }
        }
      }
    };

    var ɵ3 = globalListener;

    var DomEventsPlugin = /*#__PURE__*/function (_EventManagerPlugin) {
      _inherits(DomEventsPlugin, _EventManagerPlugin);

      var _super148 = _createSuper(DomEventsPlugin);

      /**
       * @param {?} doc
       * @param {?} ngZone
       * @param {?} platformId
       */
      function DomEventsPlugin(doc, ngZone, platformId) {
        var _this393;

        _classCallCheck(this, DomEventsPlugin);

        _this393 = _super148.call(this, doc);
        _this393.ngZone = ngZone;

        if (!platformId || !Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["isPlatformServer"])(platformId)) {
          _this393.patchEvent();
        }

        return _this393;
      }
      /**
       * @private
       * @return {?}
       */


      _createClass2(DomEventsPlugin, [{
        key: "patchEvent",
        value: function patchEvent() {
          if (typeof Event === 'undefined' || !Event || !Event.prototype) {
            return;
          }

          if (
          /** @type {?} */
          Event.prototype[stopMethodSymbol]) {
            // already patched by zone.js
            return;
          }
          /** @type {?} */


          var delegate =
          /** @type {?} */
          Event.prototype[stopMethodSymbol] = Event.prototype.stopImmediatePropagation;

          Event.prototype.stopImmediatePropagation =
          /**
          * @this {?}
          * @return {?}
          */
          function () {
            if (this) {
              this[stopSymbol] = true;
            } // We should call native delegate in case in some environment part of
            // the application will not use the patched Event. Also we cast the
            // "arguments" to any since "stopImmediatePropagation" technically does not
            // accept any arguments, but we don't know what developers pass through the
            // function and we want to not break these calls.


            delegate && delegate.apply(this,
            /** @type {?} */
            arguments);
          };
        } // This plugin should come last in the list of plugins, because it accepts all
        // events.

        /**
         * @param {?} eventName
         * @return {?}
         */

      }, {
        key: "supports",
        value: function supports(eventName) {
          return true;
        }
        /**
         * @param {?} element
         * @param {?} eventName
         * @param {?} handler
         * @return {?}
         */

      }, {
        key: "addEventListener",
        value: function addEventListener(element, eventName, handler) {
          var _this394 = this;

          /**
           * This code is about to add a listener to the DOM. If Zone.js is present, than
           * `addEventListener` has been patched. The patched code adds overhead in both
           * memory and speed (3x slower) than native. For this reason if we detect that
           * Zone.js is present we use a simple version of zone aware addEventListener instead.
           * The result is faster registration and the zone will be restored.
           * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask
           * will not be invoked
           * We also do manual zone restoration in element.ts renderEventHandlerClosure method.
           *
           * NOTE: it is possible that the element is from different iframe, and so we
           * have to check before we execute the method.
           * @type {?}
           */
          var self = this;
          /** @type {?} */

          var zoneJsLoaded = element[ADD_EVENT_LISTENER];
          /** @type {?} */

          var callback =
          /** @type {?} */
          handler; // if zonejs is loaded and current zone is not ngZone
          // we keep Zone.current on target for later restoration.

          if (zoneJsLoaded && (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone() || isBlackListedEvent(eventName))) {
            /** @type {?} */
            var symbolName = symbolNames[eventName];

            if (!symbolName) {
              symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);
            }
            /** @type {?} */


            var taskDatas =
            /** @type {?} */
            element[symbolName];
            /** @type {?} */

            var globalListenerRegistered = taskDatas && taskDatas.length > 0;

            if (!taskDatas) {
              taskDatas =
              /** @type {?} */
              element[symbolName] = [];
            }
            /** @type {?} */


            var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;

            if (taskDatas.length === 0) {
              taskDatas.push({
                zone: zone,
                handler: callback
              });
            } else {
              /** @type {?} */
              var callbackRegistered = false;

              for (var i = 0; i < taskDatas.length; i++) {
                if (taskDatas[i].handler === callback) {
                  callbackRegistered = true;
                  break;
                }
              }

              if (!callbackRegistered) {
                taskDatas.push({
                  zone: zone,
                  handler: callback
                });
              }
            }

            if (!globalListenerRegistered) {
              element[ADD_EVENT_LISTENER](eventName, globalListener, false);
            }
          } else {
            element[NATIVE_ADD_LISTENER](eventName, callback, false);
          }

          return (
            /**
            * @return {?}
            */
            function () {
              return _this394.removeEventListener(element, eventName, callback);
            }
          );
        }
        /**
         * @param {?} target
         * @param {?} eventName
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "removeEventListener",
        value: function removeEventListener(target, eventName, callback) {
          /** @type {?} */
          var underlyingRemove = target[REMOVE_EVENT_LISTENER]; // zone.js not loaded, use native removeEventListener

          if (!underlyingRemove) {
            return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
          }
          /** @type {?} */


          var symbolName = symbolNames[eventName];
          /** @type {?} */

          var taskDatas = symbolName && target[symbolName];

          if (!taskDatas) {
            // addEventListener not using patched version
            // just call native removeEventListener
            return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
          } // fix issue 20532, should be able to remove
          // listener which was added inside of ngZone

          /** @type {?} */


          var found = false;

          for (var i = 0; i < taskDatas.length; i++) {
            // remove listener from taskDatas if the callback equals
            if (taskDatas[i].handler === callback) {
              found = true;
              taskDatas.splice(i, 1);
              break;
            }
          }

          if (found) {
            if (taskDatas.length === 0) {
              // all listeners are removed, we can remove the globalListener from target
              underlyingRemove.apply(target, [eventName, globalListener, false]);
            }
          } else {
            // not found in taskDatas, the callback may be added inside of ngZone
            // use native remove listener to remove the callback
            target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);
          }
        }
      }]);

      return DomEventsPlugin;
    }(EventManagerPlugin);

    DomEventsPlugin.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    DomEventsPlugin.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
      }, {
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Supported HammerJS recognizer event names.
     * @type {?}
     */


    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](http://hammerjs.github.io/) support to Angular.
     * @see `HammerGestureConfig`
     *
     * \@publicApi
     * @type {?}
     */

    var HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerGestureConfig');
    /**
     * Injection token used to provide a {\@link HammerLoader} to Angular.
     *
     * \@publicApi
     * @type {?}
     */

    var HAMMER_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerLoader');
    /**
     * @record
     */

    function HammerInstance() {}

    if (false) {}
    /**
     * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
     * 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](http://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](http://hammerjs.github.io/).
         *
         */

        this.overrides = {};
      }
      /**
       * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
       * and attaches it to a given HTML element.
       * @param {?} element The element that will recognize gestures.
       * @return {?} A HammerJS event-manager object.
       */


      _createClass2(HammerGestureConfig, [{
        key: "buildHammer",
        value: function buildHammer(element) {
          /** @type {?} */
          var mc = new
          /** @type {?} */
          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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];

    if (false) {}

    var HammerGesturesPlugin = /*#__PURE__*/function (_EventManagerPlugin2) {
      _inherits(HammerGesturesPlugin, _EventManagerPlugin2);

      var _super149 = _createSuper(HammerGesturesPlugin);

      /**
       * @param {?} doc
       * @param {?} _config
       * @param {?} console
       * @param {?=} loader
       */
      function HammerGesturesPlugin(doc, _config, console, loader) {
        var _this395;

        _classCallCheck(this, HammerGesturesPlugin);

        _this395 = _super149.call(this, doc);
        _this395._config = _config;
        _this395.console = console;
        _this395.loader = loader;
        return _this395;
      }
      /**
       * @param {?} eventName
       * @return {?}
       */


      _createClass2(HammerGesturesPlugin, [{
        key: "supports",
        value: function supports(eventName) {
          if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
            return false;
          }

          if (!
          /** @type {?} */
          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;
        }
        /**
         * @param {?} element
         * @param {?} eventName
         * @param {?} handler
         * @return {?}
         */

      }, {
        key: "addEventListener",
        value: function addEventListener(element, eventName, handler) {
          var _this396 = this;

          /** @type {?} */
          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 (!
          /** @type {?} */
          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.

            /** @type {?} */
            var cancelRegistration = false;
            /** @type {?} */

            var deregister =
            /**
            * @return {?}
            */
            function deregister() {
              cancelRegistration = true;
            };

            this.loader().then(
            /**
            * @return {?}
            */
            function () {
              // If Hammer isn't actually loaded when the custom loader resolves, give up.
              if (!
              /** @type {?} */
              window.Hammer) {
                _this396.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");

                deregister =
                /**
                * @return {?}
                */
                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 = _this396.addEventListener(element, eventName, handler);
              }
            })["catch"](
            /**
            * @return {?}
            */
            function () {
              _this396.console.warn("The \"".concat(eventName, "\" event cannot be bound because the custom ") + "Hammer.JS loader failed.");

              deregister =
              /**
              * @return {?}
              */
              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 (
              /**
              * @return {?}
              */
              function () {
                deregister();
              }
            );
          }

          return zone.runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            // Creating the manager bind events, must be done outside of angular

            /** @type {?} */
            var mc = _this396._config.buildHammer(element);
            /** @type {?} */


            var callback =
            /**
            * @param {?} eventObj
            * @return {?}
            */
            function callback(eventObj) {
              zone.runGuarded(
              /**
              * @return {?}
              */
              function () {
                handler(eventObj);
              });
            };

            mc.on(eventName, callback);
            return (
              /**
              * @return {?}
              */
              function () {
                mc.off(eventName, callback); // destroy mc to prevent memory leak

                if (typeof mc.destroy === 'function') {
                  mc.destroy();
                }
              }
            );
          });
        }
        /**
         * @param {?} eventName
         * @return {?}
         */

      }, {
        key: "isCustomEvent",
        value: function isCustomEvent(eventName) {
          return this._config.events.indexOf(eventName) > -1;
        }
      }]);

      return HammerGesturesPlugin;
    }(EventManagerPlugin);

    HammerGesturesPlugin.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    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]
        }]
      }];
    };

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Defines supported modifiers for key events.
     * @type {?}
     */


    var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];

    var ɵ0$4 =
    /**
    * @param {?} event
    * @return {?}
    */
    function ɵ0$4(event) {
      return event.altKey;
    },
        ɵ1$1 =
    /**
    * @param {?} event
    * @return {?}
    */
    function ɵ1$1(event) {
      return event.ctrlKey;
    },
        ɵ2$1 =
    /**
    * @param {?} event
    * @return {?}
    */
    function ɵ2$1(event) {
      return event.metaKey;
    },
        ɵ3$1 =
    /**
    * @param {?} event
    * @return {?}
    */
    function ɵ3$1(event) {
      return event.shiftKey;
    };
    /**
     * Retrieves modifiers from key-event objects.
     * @type {?}
     */


    var MODIFIER_KEY_GETTERS = {
      'alt': ɵ0$4,
      'control': ɵ1$1,
      'meta': ɵ2$1,
      'shift': ɵ3$1
    };
    /**
     * \@publicApi
     * A browser plug-in that provides support for handling of key events in Angular.
     */

    var KeyEventsPlugin = /*#__PURE__*/function (_EventManagerPlugin3) {
      _inherits(KeyEventsPlugin, _EventManagerPlugin3);

      var _super150 = _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 _super150.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.
         * @return {?} The key event that was registered.
         */

      }, {
        key: "addEventListener",
        value: function addEventListener(element, eventName, handler) {
          /** @type {?} */
          var parsedEvent =
          /** @type {?} */
          KeyEventsPlugin.parseEventName(eventName);
          /** @type {?} */

          var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
          return this.manager.getZone().runOutsideAngular(
          /**
          * @return {?}
          */
          function () {
            return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
          });
        }
        /**
         * @param {?} eventName
         * @return {?}
         */

      }], [{
        key: "parseEventName",
        value: function parseEventName(eventName) {
          /** @type {?} */
          var parts = eventName.toLowerCase().split('.');
          /** @type {?} */

          var domEventName = parts.shift();

          if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {
            return null;
          }
          /** @type {?} */


          var key = KeyEventsPlugin._normalizeKey(
          /** @type {?} */
          parts.pop());
          /** @type {?} */


          var fullKey = '';
          MODIFIER_KEYS.forEach(
          /**
          * @param {?} modifierName
          * @return {?}
          */
          function (modifierName) {
            /** @type {?} */
            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;
          }
          /** @type {?} */


          var result = {};
          result['domEventName'] = domEventName;
          result['fullKey'] = fullKey;
          return result;
        }
        /**
         * @param {?} event
         * @return {?}
         */

      }, {
        key: "getEventFullKey",
        value: function getEventFullKey(event) {
          /** @type {?} */
          var fullKey = '';
          /** @type {?} */

          var key = getDOM().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(
          /**
          * @param {?} modifierName
          * @return {?}
          */
          function (modifierName) {
            if (modifierName != key) {
              /** @type {?} */
              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.
         * @return {?} A callback function.
         */

      }, {
        key: "eventCallback",
        value: function eventCallback(fullKey, handler, zone) {
          return (
            /**
            * @param {?} event
            * @return {?}
            */
            function (event
            /** TODO #9100 */
            ) {
              if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
                zone.runGuarded(
                /**
                * @return {?}
                */
                function () {
                  return handler(event);
                });
              }
            }
          );
        }
        /**
         * \@internal
         * @param {?} keyName
         * @return {?}
         */

      }, {
        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.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    KeyEventsPlugin.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Marker interface for a value that's safe to use in a particular context.
     *
     * \@publicApi
     * @record
     */


    function SafeValue() {}
    /**
     * Marker interface for a value that's safe to use as HTML.
     *
     * \@publicApi
     * @record
     */


    function SafeHtml() {}
    /**
     * Marker interface for a value that's safe to use as style (CSS).
     *
     * \@publicApi
     * @record
     */


    function SafeStyle() {}
    /**
     * Marker interface for a value that's safe to use as JavaScript.
     *
     * \@publicApi
     * @record
     */


    function SafeScript() {}
    /**
     * Marker interface for a value that's safe to use as a URL linking to a document.
     *
     * \@publicApi
     * @record
     */


    function SafeUrl() {}
    /**
     * Marker interface for a value that's safe to use as a URL to load executable code from.
     *
     * \@publicApi
     * @record
     */


    function SafeResourceUrl() {}
    /**
     * 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](http://g.co/ng/security).
     *
     * \@publicApi
     * @abstract
     */


    var DomSanitizer = function DomSanitizer() {
      _classCallCheck(this, DomSanitizer);
    };

    if (false) {}

    var DomSanitizerImpl = /*#__PURE__*/function (_DomSanitizer) {
      _inherits(DomSanitizerImpl, _DomSanitizer);

      var _super151 = _createSuper(DomSanitizerImpl);

      /**
       * @param {?} _doc
       */
      function DomSanitizerImpl(_doc) {
        var _this397;

        _classCallCheck(this, DomSanitizerImpl);

        _this397 = _super151.call(this);
        _this397._doc = _doc;
        return _this397;
      }
      /**
       * @param {?} ctx
       * @param {?} value
       * @return {?}
       */


      _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 (
                /** @type {?} */
                value
              );

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].HTML:
              if (value instanceof SafeHtmlImpl) return value.changingThisBreaksApplicationSecurity;
              this.checkNotSafeValue(value, 'HTML');
              return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeHtml"])(this._doc, String(value));

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].STYLE:
              if (value instanceof SafeStyleImpl) return value.changingThisBreaksApplicationSecurity;
              this.checkNotSafeValue(value, 'Style');
              return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeStyle"])(
              /** @type {?} */
              value);

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].SCRIPT:
              if (value instanceof SafeScriptImpl) return value.changingThisBreaksApplicationSecurity;
              this.checkNotSafeValue(value, 'Script');
              throw new Error('unsafe value used in a script context');

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].URL:
              if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {
                // Allow resource URLs in URL contexts, they are strictly more trusted.
                return value.changingThisBreaksApplicationSecurity;
              }

              this.checkNotSafeValue(value, 'URL');
              return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeUrl"])(String(value));

            case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].RESOURCE_URL:
              if (value instanceof SafeResourceUrlImpl) {
                return value.changingThisBreaksApplicationSecurity;
              }

              this.checkNotSafeValue(value, 'ResourceURL');
              throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');

            default:
              throw new Error("Unexpected SecurityContext ".concat(ctx, " (see http://g.co/ng/security#xss)"));
          }
        }
        /**
         * @private
         * @param {?} value
         * @param {?} expectedType
         * @return {?}
         */

      }, {
        key: "checkNotSafeValue",
        value: function checkNotSafeValue(value, expectedType) {
          if (value instanceof SafeValueImpl) {
            throw new Error("Required a safe ".concat(expectedType, ", got a ").concat(value.getTypeName(), " ") + "(see http://g.co/ng/security#xss)");
          }
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "bypassSecurityTrustHtml",
        value: function bypassSecurityTrustHtml(value) {
          return new SafeHtmlImpl(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "bypassSecurityTrustStyle",
        value: function bypassSecurityTrustStyle(value) {
          return new SafeStyleImpl(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "bypassSecurityTrustScript",
        value: function bypassSecurityTrustScript(value) {
          return new SafeScriptImpl(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "bypassSecurityTrustUrl",
        value: function bypassSecurityTrustUrl(value) {
          return new SafeUrlImpl(value);
        }
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "bypassSecurityTrustResourceUrl",
        value: function bypassSecurityTrustResourceUrl(value) {
          return new SafeResourceUrlImpl(value);
        }
      }]);

      return DomSanitizerImpl;
    }(DomSanitizer);

    DomSanitizerImpl.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];
    /** @nocollapse */

    DomSanitizerImpl.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };

    if (false) {}
    /**
     * @abstract
     */


    var SafeValueImpl = /*#__PURE__*/function () {
      /**
       * @param {?} changingThisBreaksApplicationSecurity
       */
      function SafeValueImpl(changingThisBreaksApplicationSecurity) {
        _classCallCheck(this, SafeValueImpl);

        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; // empty
      }
      /**
       * @return {?}
       */


      _createClass2(SafeValueImpl, [{
        key: "toString",
        value: function toString() {
          return "SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity) + " (see http://g.co/ng/security#xss)";
        }
      }]);

      return SafeValueImpl;
    }();

    if (false) {}

    var SafeHtmlImpl = /*#__PURE__*/function (_SafeValueImpl) {
      _inherits(SafeHtmlImpl, _SafeValueImpl);

      var _super152 = _createSuper(SafeHtmlImpl);

      function SafeHtmlImpl() {
        _classCallCheck(this, SafeHtmlImpl);

        return _super152.apply(this, arguments);
      }

      _createClass2(SafeHtmlImpl, [{
        key: "getTypeName",

        /**
         * @return {?}
         */
        value: function getTypeName() {
          return 'HTML';
        }
      }]);

      return SafeHtmlImpl;
    }(SafeValueImpl);

    var SafeStyleImpl = /*#__PURE__*/function (_SafeValueImpl2) {
      _inherits(SafeStyleImpl, _SafeValueImpl2);

      var _super153 = _createSuper(SafeStyleImpl);

      function SafeStyleImpl() {
        _classCallCheck(this, SafeStyleImpl);

        return _super153.apply(this, arguments);
      }

      _createClass2(SafeStyleImpl, [{
        key: "getTypeName",

        /**
         * @return {?}
         */
        value: function getTypeName() {
          return 'Style';
        }
      }]);

      return SafeStyleImpl;
    }(SafeValueImpl);

    var SafeScriptImpl = /*#__PURE__*/function (_SafeValueImpl3) {
      _inherits(SafeScriptImpl, _SafeValueImpl3);

      var _super154 = _createSuper(SafeScriptImpl);

      function SafeScriptImpl() {
        _classCallCheck(this, SafeScriptImpl);

        return _super154.apply(this, arguments);
      }

      _createClass2(SafeScriptImpl, [{
        key: "getTypeName",

        /**
         * @return {?}
         */
        value: function getTypeName() {
          return 'Script';
        }
      }]);

      return SafeScriptImpl;
    }(SafeValueImpl);

    var SafeUrlImpl = /*#__PURE__*/function (_SafeValueImpl4) {
      _inherits(SafeUrlImpl, _SafeValueImpl4);

      var _super155 = _createSuper(SafeUrlImpl);

      function SafeUrlImpl() {
        _classCallCheck(this, SafeUrlImpl);

        return _super155.apply(this, arguments);
      }

      _createClass2(SafeUrlImpl, [{
        key: "getTypeName",

        /**
         * @return {?}
         */
        value: function getTypeName() {
          return 'URL';
        }
      }]);

      return SafeUrlImpl;
    }(SafeValueImpl);

    var SafeResourceUrlImpl = /*#__PURE__*/function (_SafeValueImpl5) {
      _inherits(SafeResourceUrlImpl, _SafeValueImpl5);

      var _super156 = _createSuper(SafeResourceUrlImpl);

      function SafeResourceUrlImpl() {
        _classCallCheck(this, SafeResourceUrlImpl);

        return _super156.apply(this, arguments);
      }

      _createClass2(SafeResourceUrlImpl, [{
        key: "getTypeName",

        /**
         * @return {?}
         */
        value: function getTypeName() {
          return 'ResourceURL';
        }
      }]);

      return SafeResourceUrlImpl;
    }(SafeValueImpl);
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */


    var ɵ0$5 = _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵPLATFORM_BROWSER_ID"];
    /** @type {?} */

    var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"],
      useValue: ɵ0$5
    }, {
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_INITIALIZER"],
      useValue: initDomAdapter,
      multi: true
    }, {
      provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"],
      useClass: BrowserPlatformLocation,
      deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
    }, {
      provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],
      useFactory: _document,
      deps: []
    }];
    /**
     * \@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](http://g.co/ng/security).
     * \@publicApi
     * @type {?}
     */

    var BROWSER_SANITIZATION_PROVIDERS = [{
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Sanitizer"],
      useExisting: DomSanitizer
    }, {
      provide: DomSanitizer,
      useClass: DomSanitizerImpl,
      deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
    }];
    /**
     * \@publicApi
     * @type {?}
     */

    var platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
    /**
     * @return {?}
     */

    function initDomAdapter() {
      BrowserDomAdapter.makeCurrent();
      BrowserGetTestability.init();
    }
    /**
     * @return {?}
     */


    function errorHandler() {
      return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"]();
    }
    /**
     * @return {?}
     */


    function _document() {
      return document;
    }
    /** @type {?} */


    var BROWSER_MODULE_PROVIDERS = [BROWSER_SANITIZATION_PROVIDERS, {
      provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵAPP_ROOT"],
      useValue: true
    }, {
      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"]]
    }, {
      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: []
    }, {
      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 () {
      /**
       * @param {?} parentModule
       */
      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.
       * @return {?} 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.decorators = [{
      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"]]
      }]
    }];
    /** @nocollapse */

    BrowserModule.ctorParameters = function () {
      return [{
        type: undefined,
        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]
        }]
      }];
    };
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Factory to create Meta service.
     * @return {?}
     */


    function createMeta() {
      return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
    }
    /**
     * A service that can be used to get and add meta tags.
     *
     * \@publicApi
     */


    var Meta = /*#__PURE__*/function () {
      /**
       * @param {?} _doc
       */
      function Meta(_doc) {
        _classCallCheck(this, Meta);

        this._doc = _doc;
        this._dom = getDOM();
      }
      /**
       * @param {?} tag
       * @param {?=} forceCreation
       * @return {?}
       */


      _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);
        }
        /**
         * @param {?} tags
         * @param {?=} forceCreation
         * @return {?}
         */

      }, {
        key: "addTags",
        value: function addTags(tags) {
          var _this398 = this;

          var forceCreation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
          if (!tags) return [];
          return tags.reduce(
          /**
          * @param {?} result
          * @param {?} tag
          * @return {?}
          */
          function (result, tag) {
            if (tag) {
              result.push(_this398._getOrCreateElement(tag, forceCreation));
            }

            return result;
          }, []);
        }
        /**
         * @param {?} attrSelector
         * @return {?}
         */

      }, {
        key: "getTag",
        value: function getTag(attrSelector) {
          if (!attrSelector) return null;
          return this._dom.querySelector(this._doc, "meta[".concat(attrSelector, "]")) || null;
        }
        /**
         * @param {?} attrSelector
         * @return {?}
         */

      }, {
        key: "getTags",
        value: function getTags(attrSelector) {
          if (!attrSelector) return [];
          /** @type {?} */

          var list
          /*NodeList*/
          = this._dom.querySelectorAll(this._doc, "meta[".concat(attrSelector, "]"));

          return list ? [].slice.call(list) : [];
        }
        /**
         * @param {?} tag
         * @param {?=} selector
         * @return {?}
         */

      }, {
        key: "updateTag",
        value: function updateTag(tag, selector) {
          if (!tag) return null;
          selector = selector || this._parseSelector(tag);
          /** @type {?} */

          var meta =
          /** @type {?} */
          this.getTag(selector);

          if (meta) {
            return this._setMetaElementAttributes(tag, meta);
          }

          return this._getOrCreateElement(tag, true);
        }
        /**
         * @param {?} attrSelector
         * @return {?}
         */

      }, {
        key: "removeTag",
        value: function removeTag(attrSelector) {
          this.removeTagElement(
          /** @type {?} */
          this.getTag(attrSelector));
        }
        /**
         * @param {?} meta
         * @return {?}
         */

      }, {
        key: "removeTagElement",
        value: function removeTagElement(meta) {
          if (meta) {
            this._dom.remove(meta);
          }
        }
        /**
         * @private
         * @param {?} meta
         * @param {?=} forceCreation
         * @return {?}
         */

      }, {
        key: "_getOrCreateElement",
        value: function _getOrCreateElement(meta) {
          var forceCreation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

          if (!forceCreation) {
            /** @type {?} */
            var selector = this._parseSelector(meta);
            /** @type {?} */


            var elem =
            /** @type {?} */
            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;
          }
          /** @type {?} */


          var element =
          /** @type {?} */
          this._dom.createElement('meta');

          this._setMetaElementAttributes(meta, element);
          /** @type {?} */


          var head = this._dom.getElementsByTagName(this._doc, 'head')[0];

          this._dom.appendChild(head, element);

          return element;
        }
        /**
         * @private
         * @param {?} tag
         * @param {?} el
         * @return {?}
         */

      }, {
        key: "_setMetaElementAttributes",
        value: function _setMetaElementAttributes(tag, el) {
          var _this399 = this;

          Object.keys(tag).forEach(
          /**
          * @param {?} prop
          * @return {?}
          */
          function (prop) {
            return _this399._dom.setAttribute(el, prop, tag[prop]);
          });
          return el;
        }
        /**
         * @private
         * @param {?} tag
         * @return {?}
         */

      }, {
        key: "_parseSelector",
        value: function _parseSelector(tag) {
          /** @type {?} */
          var attr = tag.name ? 'name' : 'property';
          return "".concat(attr, "=\"").concat(tag[attr], "\"");
        }
        /**
         * @private
         * @param {?} tag
         * @param {?} elem
         * @return {?}
         */

      }, {
        key: "_containsAttributes",
        value: function _containsAttributes(tag, elem) {
          var _this400 = this;

          return Object.keys(tag).every(
          /**
          * @param {?} key
          * @return {?}
          */
          function (key) {
            return _this400._dom.getAttribute(elem, key) === tag[key];
          });
        }
      }]);

      return Meta;
    }();

    Meta.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
      args: [{
        providedIn: 'root',
        useFactory: createMeta,
        deps: []
      }]
    }];
    /** @nocollapse */

    Meta.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };
    /** @nocollapse */


    Meta.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
      factory: createMeta,
      token: Meta,
      providedIn: "root"
    });

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Factory to create Title service.
     * @return {?}
     */


    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 () {
      /**
       * @param {?} _doc
       */
      function Title(_doc) {
        _classCallCheck(this, Title);

        this._doc = _doc;
      }
      /**
       * Get the title of the current HTML document.
       * @return {?}
       */


      _createClass2(Title, [{
        key: "getTitle",
        value: function getTitle() {
          return getDOM().getTitle(this._doc);
        }
        /**
         * Set the title of the current HTML document.
         * @param {?} newTitle
         * @return {?}
         */

      }, {
        key: "setTitle",
        value: function setTitle(newTitle) {
          getDOM().setTitle(this._doc, newTitle);
        }
      }]);

      return Title;
    }();

    Title.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
      args: [{
        providedIn: 'root',
        useFactory: createTitle,
        deps: []
      }]
    }];
    /** @nocollapse */

    Title.ctorParameters = function () {
      return [{
        type: undefined,
        decorators: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
          args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
        }]
      }];
    };
    /** @nocollapse */


    Title.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({
      factory: createTitle,
      token: Title,
      providedIn: "root"
    });

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @license
     * Copyright Google Inc. All Rights Reserved.
     *
     * Use 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 {?} */


    var win = typeof window !== 'undefined' && window ||
    /** @type {?} */
    {};
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    var ChangeDetectionPerfRecord =
    /**
     * @param {?} msPerTick
     * @param {?} numTicks
     */
    function ChangeDetectionPerfRecord(msPerTick, numTicks) {
      _classCallCheck(this, ChangeDetectionPerfRecord);

      this.msPerTick = msPerTick;
      this.numTicks = numTicks;
    };

    if (false) {}
    /**
     * Entry point for all Angular profiling-related debug tools. This object
     * corresponds to the `ng.profiler` in the dev console.
     */


    var AngularProfiler = /*#__PURE__*/function () {
      /**
       * @param {?} ref
       */
      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})
       * ```
       * @param {?} config
       * @return {?}
       */


      _createClass2(AngularProfiler, [{
        key: "timeChangeDetection",
        value: function timeChangeDetection(config) {
          /** @type {?} */
          var record = config && config['record'];
          /** @type {?} */

          var profileName = 'Change Detection'; // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened

          /** @type {?} */

          var isProfilerAvailable = win.console.profile != null;

          if (record && isProfilerAvailable) {
            win.console.profile(profileName);
          }
          /** @type {?} */


          var start = getDOM().performanceNow();
          /** @type {?} */

          var numTicks = 0;

          while (numTicks < 5 || getDOM().performanceNow() - start < 500) {
            this.appRef.tick();
            numTicks++;
          }
          /** @type {?} */


          var end = getDOM().performanceNow();

          if (record && isProfilerAvailable) {
            win.console.profileEnd(profileName);
          }
          /** @type {?} */


          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;
    }();

    if (false) {}
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /** @type {?} */


    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
     * @template T
     * @param {?} ref
     * @return {?}
     */

    function enableDebugTools(ref) {
      exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
      return ref;
    }
    /**
     * Disables Angular tools.
     *
     * \@publicApi
     * @return {?}
     */


    function disableDebugTools() {
      exportNgVar(PROFILER_GLOBAL_NAME, null);
    }
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @param {?} text
     * @return {?}
     */


    function escapeHtml(text) {
      /** @type {?} */
      var escapedText = {
        '&': '&a;',
        '"': '&q;',
        '\'': '&s;',
        '<': '&l;',
        '>': '&g;'
      };
      return text.replace(/[&"'<>]/g,
      /**
      * @param {?} s
      * @return {?}
      */
      function (s) {
        return escapedText[s];
      });
    }
    /**
     * @param {?} text
     * @return {?}
     */


    function unescapeHtml(text) {
      /** @type {?} */
      var unescapedText = {
        '&a;': '&',
        '&q;': '"',
        '&s;': '\'',
        '&l;': '<',
        '&g;': '>'
      };
      return text.replace(/&[^;]+;/g,
      /**
      * @param {?} s
      * @return {?}
      */
      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
     * @template T
     * @param {?} key
     * @return {?}
     */


    function makeStateKey(key) {
      return (
        /** @type {?} */
        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 deserialzied in a
     * non-lossy manner.
     *
     * \@publicApi
     */


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

        this.store = {};
        this.onSerializeCallbacks = {};
      }
      /**
       * \@internal
       * @param {?} initState
       * @return {?}
       */


      _createClass2(TransferState, [{
        key: "get",

        /**
         * Get the value corresponding to a key. Return `defaultValue` if key is not found.
         * @template T
         * @param {?} key
         * @param {?} defaultValue
         * @return {?}
         */
        value: function get(key, defaultValue) {
          return this.store[key] !== undefined ?
          /** @type {?} */
          this.store[key] : defaultValue;
        }
        /**
         * Set the value corresponding to a key.
         * @template T
         * @param {?} key
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "set",
        value: function set(key, value) {
          this.store[key] = value;
        }
        /**
         * Remove a key from the store.
         * @template T
         * @param {?} key
         * @return {?}
         */

      }, {
        key: "remove",
        value: function remove(key) {
          delete this.store[key];
        }
        /**
         * Test whether a key exists in the store.
         * @template T
         * @param {?} key
         * @return {?}
         */

      }, {
        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.
         * @template T
         * @param {?} key
         * @param {?} callback
         * @return {?}
         */

      }, {
        key: "onSerialize",
        value: function onSerialize(key, callback) {
          this.onSerializeCallbacks[key] = callback;
        }
        /**
         * Serialize the current state of the store to JSON.
         * @return {?}
         */

      }, {
        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) {
          /** @type {?} */
          var transferState = new TransferState();
          transferState.store = initState;
          return transferState;
        }
      }]);

      return TransferState;
    }();

    TransferState.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"]
    }];

    if (false) {}
    /**
     * @param {?} doc
     * @param {?} appId
     * @return {?}
     */


    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'.

      /** @type {?} */
      var script = doc.getElementById(appId + '-state');
      /** @type {?} */

      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.decorators = [{
      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"]]
        }]
      }]
    }];
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Predicates for use with {\@link DebugElement}'s query functions.
     *
     * \@publicApi
     */

    var By = /*#__PURE__*/function () {
      function By() {
        _classCallCheck(this, By);
      }

      _createClass2(By, null, [{
        key: "all",

        /**
         * Match all nodes.
         *
         * \@usageNotes
         * ### Example
         *
         * {\@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
         * @return {?}
         */
        value: function all() {
          return (
            /**
            * @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'}
         * @param {?} selector
         * @return {?}
         */

      }, {
        key: "css",
        value: function css(selector) {
          return (
            /**
            * @param {?} debugElement
            * @return {?}
            */
            function (debugElement) {
              return debugElement.nativeElement != null ? getDOM().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'}
         * @param {?} type
         * @return {?}
         */

      }, {
        key: "directive",
        value: function directive(type) {
          return (
            /**
            * @param {?} debugNode
            * @return {?}
            */
            function (debugNode) {
              return (
                /** @type {?} */
                debugNode.providerTokens.indexOf(type) !== -1
              );
            }
          );
        }
      }]);

      return By;
    }();
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * \@publicApi
     * @type {?}
     */


    var VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('8.2.14');
    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */

    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=platform-browser.js.map

    /***/
  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/index.js":
  /*!************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/index.js ***!
    \************************************************************/

  /*! exports provided: ComplexBase, ArrayBase, ComponentBase, FormBase, applyMixins, ComponentMixins, registerEvents, clearTemplate, setValue, compile, Template */

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

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var _src_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./src/index */
    "./node_modules/@syncfusion/ej2-angular-base/src/index.js");
    /* harmony reexport (safe) */


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "Template", function () {
      return _src_index__WEBPACK_IMPORTED_MODULE_0__["Template"];
    });
    /**
     * index
     */

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/complex-array-base.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/complex-array-base.js ***!
    \*****************************************************************************/

  /*! exports provided: ComplexBase, ArrayBase */

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

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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./util */
    "./node_modules/@syncfusion/ej2-angular-base/src/util.js");

    var ComplexBase =
    /** @class */
    function () {
      function ComplexBase() {
        this.hasChanges = false;
        this.propCollection = {};
        this.dataSource = {};
        this.tags = [];
        this.tagObjects = [];
      }

      ComplexBase.prototype.ngOnInit = function () {
        this.registeredTemplate = {};

        for (var _i = 0, _a = this.tags; _i < _a.length; _i++) {
          var tag = _a[_i];
          var objInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), this);

          if (objInstance) {
            this.tagObjects.push({
              instance: objInstance,
              name: tag
            });
          }
        }

        var templateProperties = Object.keys(this);
        templateProperties = templateProperties.filter(function (val) {
          return /Ref$/i.test(val);
        });

        for (var _b = 0, templateProperties_1 = templateProperties; _b < templateProperties_1.length; _b++) {
          var tempName = templateProperties_1[_b];
          var propName = tempName.replace('Ref', '');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(propName.replace('_', '.'), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(propName, this), this.propCollection);
        } // Angular 9 compatibility to overcome ngOnchange not get triggered issue
        // To Update properties to "this.propCollection"


        var propList = Object.keys(this);
        /* istanbul ignore next */

        if (this.directivePropList) {
          for (var k = 0; k < this.directivePropList.length; k++) {
            var dirPropName = this.directivePropList[k];

            if (propList.indexOf(dirPropName) !== -1) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(dirPropName, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(dirPropName, this), this.propCollection);
            }
          }

          this.hasChanges = true;
        }
      };

      ComplexBase.prototype.registerEvents = function (eventList) {
        Object(_util__WEBPACK_IMPORTED_MODULE_1__["registerEvents"])(eventList, this, true);
      };

      ComplexBase.prototype.ngOnChanges = function (changes) {
        for (var _i = 0, _a = Object.keys(changes); _i < _a.length; _i++) {
          var propName = _a[_i];
          var changedVal = changes[propName];
          this.propCollection[propName] = changedVal.currentValue;
        }

        this.isUpdated = false;
        this.hasChanges = true;
      };
      /* istanbul ignore next */


      ComplexBase.prototype.clearTemplate = function (templateNames) {
        Object(_util__WEBPACK_IMPORTED_MODULE_1__["clearTemplate"])(this, templateNames);
      };

      ComplexBase.prototype.getProperties = function () {
        /* istanbul ignore next */
        for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {
          var tagObject = _a[_i];
          this.propCollection[tagObject.name] = tagObject.instance.getProperties();
        }

        return this.propCollection;
      };

      ComplexBase.prototype.isChanged = function () {
        var result = this.hasChanges;
        /* istanbul ignore next */

        for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {
          var item = _a[_i];
          result = result || item.instance.hasChanges;
        }

        return result;
      };

      ComplexBase.prototype.ngAfterContentChecked = function () {
        this.hasChanges = this.isChanged();
        var templateProperties = Object.keys(this);
        templateProperties = templateProperties.filter(function (val) {
          return /Ref$/i.test(val);
        }); // For angular 9 compatibility
        // ngOnchange hook not get triggered for copmplex directive
        // Due to this, we have manually set template properties v alues once we get template property reference

        for (var _i = 0, templateProperties_2 = templateProperties; _i < templateProperties_2.length; _i++) {
          var tempName = templateProperties_2[_i];
          var propName = tempName.replace('Ref', '');
          var val = {};
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(propName.replace('_', '.'), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(propName, this), this.propCollection);
        }
      };

      ComplexBase.prototype.ngAfterViewChecked = function () {
        /* istanbul ignore next */
        if (this.isUpdated) {
          this.hasChanges = false;
        }
      };

      return ComplexBase;
    }();

    var ArrayBase =
    /** @class */
    function () {
      function ArrayBase(propertyName) {
        this.list = [];
        this.hasChanges = false;
        this.propertyName = propertyName;
      }

      ArrayBase.prototype.ngOnInit = function () {
        this.isInitChanges = true;
      };

      ArrayBase.prototype.ngAfterContentInit = function () {
        var _this = this;

        var index = 0;
        /* istanbul ignore next */

        this.list = this.children.map(function (child) {
          child.index = index++;
          child.property = _this.propertyName;
          return child;
        });
        this.hasChanges = true;
      };

      ArrayBase.prototype.getProperties = function () {
        var onlyProp = [];

        for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
          var item = _a[_i];
          onlyProp.push(item.getProperties());
        }

        return onlyProp;
      };

      ArrayBase.prototype.isChanged = function () {
        var _this = this;

        var result = false;
        var index = 0;
        var isSourceChanged = false; // tslint:disable-next-line

        var childrenDataSource = this.children.map(function (child) {
          return child;
        });
        /* istanbul ignore next */

        if (this.list.length === this.children.length) {
          for (var i = 0; i < this.list.length; i++) {
            var propList = Object.keys(this.list[i]);

            if (this.list[i].directivePropList) {
              for (var k = 0; k < this.list[i].directivePropList.length; k++) {
                var dirPropName = this.list[i].directivePropList[k];

                if (propList.indexOf(dirPropName) !== -1) {
                  var tempList = this.list[i];

                  if (JSON.stringify(tempList[dirPropName]) !== JSON.stringify(tempList.propCollection[dirPropName])) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(dirPropName, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(dirPropName, this.list[i]), this.list[i].propCollection);
                    this.list[i].hasChanges = true;
                    this.list[i].isUpdated = false;
                  }
                }
              }
            }

            if (this.list[i].propCollection.dataSource) {
              if (this.list[i].dataSource && this.list[i].propCollection.dataSource !== this.list[i].dataSource) {
                this.list[i].propCollection.dataSource = this.list[i].dataSource;
                this.list[i].hasChanges = true;
              }

              isSourceChanged = JSON.stringify(this.list[i].propCollection.dataSource) !== JSON.stringify(childrenDataSource[i].propCollection.dataSource);
            } else {
              // tslint:disable-next-line
              var keys = Object.keys(this.list[i].propCollection);

              for (var j = 0; j < keys.length; j++) {
                if (this.list[i].propCollection[keys[j]] && this.list[i].propCollection[keys[j]].constructor.name === 'TemplateRef_') {
                  isSourceChanged = true;
                  break;
                }
              }
            }
          }
        }

        this.hasNewChildren = this.list.length !== this.children.length || isSourceChanged ? true : null;

        if (this.hasNewChildren) {
          this.list = this.children.map(function (child) {
            child.index = index++;
            child.property = _this.propertyName;
            return child;
          });
        }
        /* istanbul ignore end */


        for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
          var item = _a[_i];
          result = result || item.hasChanges;
        }

        return !!this.list.length && result;
      };

      ArrayBase.prototype.clearTemplate = function (templateNames) {
        var _this = this;
        /* istanbul ignore next */


        for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
          var item = _a[_i];
          item.clearTemplate(templateNames && templateNames.map(function (val) {
            return new RegExp(_this.propertyName).test(val) ? val.replace(_this.propertyName + '.', '') : val;
          }));
        }
      };

      ArrayBase.prototype.ngAfterContentChecked = function () {
        this.hasChanges = this.isChanged();

        for (var i = 0; i < this.list.length; i++) {
          this.list[i].isUpdated = true;
        }
      };

      ArrayBase.prototype.ngAfterViewInit = function () {
        this.isInitChanges = false;
      };

      return ArrayBase;
    }();
    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/component-base.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/component-base.js ***!
    \*************************************************************************/

  /*! exports provided: ComponentBase */

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

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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /* harmony import */


    var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./util */
    "./node_modules/@syncfusion/ej2-angular-base/src/util.js");
    /**
     * Angular Component Base Module
     */


    var SVG_REG = /^svg|^path|^g/;

    var ComponentBase =
    /** @class */
    function () {
      function ComponentBase() {
        this.isProtectedOnChange = true;
      }

      ComponentBase.prototype.saveChanges = function (key, newValue, oldValue) {
        if (this.isProtectedOnChange) {
          return;
        }

        this.oldProperties[key] = oldValue;
        this.changedProperties[key] = newValue;
        this.finalUpdate(); // tslint:disable-next-line:no-any

        var changeTime = setTimeout(this.dataBind.bind(this));

        var clearUpdate = function clearUpdate() {
          clearTimeout(changeTime);
        };

        this.finalUpdate = clearUpdate;
      };

      ; // tslint:disable-next-line:no-any

      ComponentBase.prototype.ngOnInit = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempOnThis = isTempRef || this;
        tempOnThis.registeredTemplate = {};
        tempOnThis.ngBoundedEvents = {};
        tempOnThis.isAngular = true;
        /* istanbul ignore next */

        if (isTempRef) {
          this.tags = isTempRef.tags;
        }

        tempOnThis.tags = this.tags || [];
        tempOnThis.complexTemplate = this.complexTemplate || [];
        tempOnThis.tagObjects = [];
        tempOnThis.ngAttr = this.getAngularAttr(tempOnThis.element);
        /* istanbul ignore next */

        tempOnThis.createElement = function (tagName, prop) {
          //tslint:disable-next-line
          var ele = tempOnThis.srenderer ? tempOnThis.srenderer.createElement(tagName) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])(tagName);

          if (typeof prop === 'undefined') {
            return ele;
          }

          ele.innerHTML = prop.innerHTML ? prop.innerHTML : '';

          if (prop.className !== undefined) {
            ele.className = prop.className;
          }

          if (prop.id !== undefined) {
            ele.id = prop.id;
          }

          if (prop.styles !== undefined) {
            ele.setAttribute('style', prop.styles);
          }

          if (tempOnThis.ngAttr !== undefined) {
            ele.setAttribute(tempOnThis.ngAttr, '');
          }

          if (prop.attrs !== undefined) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(ele, prop.attrs);
          }

          return ele;
        };

        for (var _i = 0, _a = tempOnThis.tags; _i < _a.length; _i++) {
          var tag = _a[_i];
          var tagObject = {
            instance: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tempOnThis),
            name: tag
          };
          tempOnThis.tagObjects.push(tagObject);
        }

        var complexTemplates = Object.keys(tempOnThis);
        complexTemplates = complexTemplates.filter(function (val) {
          return /Ref$/i.test(val) && /\_/i.test(val);
        });

        for (var _b = 0, complexTemplates_1 = complexTemplates; _b < complexTemplates_1.length; _b++) {
          var tempName = complexTemplates_1[_b];
          var propName = tempName.replace('Ref', '');
          var val = {};
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(propName.replace('_', '.'), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(propName, tempOnThis), val);
          tempOnThis.setProperties(val, true);
        }
      };

      ComponentBase.prototype.getAngularAttr = function (ele) {
        var attributes = ele.attributes;
        var length = attributes.length;
        var ngAr;

        for (var i = 0; i < length; i++) {
          /* istanbul ignore next */
          if (/_ngcontent/g.test(attributes[i].name)) {
            ngAr = attributes[i].name;
          }
        }

        return ngAr;
      };

      ; // tslint:disable-next-line:no-any

      ComponentBase.prototype.ngAfterViewInit = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempAfterViewThis = isTempRef || this;
        var regExp = /ejs-tab|ejs-accordion/g;
        /* istanbul ignore next */

        if (regExp.test(tempAfterViewThis.ngEle.nativeElement.outerHTML)) {
          tempAfterViewThis.ngEle.nativeElement.style.visibility = 'hidden';
        }
        /**
         * Root level template properties are not getting rendered,
         * Due to ngonchanges not get triggered.
         * so that we have set template value for root level template properties,
         * for example: refer below syntax
         * ```html
         * <ejs-grid>
         * <e-column></e-column>
         * <ng-template #editSettingsTemplate></ng-template>
         * </ejs-grid>
         * ```
         */


        var templateProperties = Object.keys(tempAfterViewThis);
        templateProperties = templateProperties.filter(function (val) {
          return /Ref$/i.test(val);
        });

        for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {
          var tempName = templateProperties_1[_i];
          var propName = tempName.replace('Ref', '');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(propName.replace('_', '.'), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);
        } // Used setTimeout for template binding
        // Refer Link: https://github.com/angular/angular/issues/6005


        setTimeout(function () {
          /* istanbul ignore else  */
          if (typeof window !== 'undefined') {
            tempAfterViewThis.appendTo(tempAfterViewThis.element);
            tempAfterViewThis.ngEle.nativeElement.style.visibility = '';
          }
        });
      }; // tslint:disable-next-line:no-any


      ComponentBase.prototype.ngOnDestroy = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempOnDestroyThis = isTempRef || this;
        /* istanbul ignore else  */

        if (typeof window !== 'undefined' && tempOnDestroyThis.element.classList.contains('e-control')) {
          tempOnDestroyThis.destroy();
          tempOnDestroyThis.clearTemplate(null);
        }
      }; //tslint:disable-next-line


      ComponentBase.prototype.clearTemplate = function (templateNames, index) {
        Object(_util__WEBPACK_IMPORTED_MODULE_2__["clearTemplate"])(this, templateNames, index);
      };

      ; // tslint:disable-next-line:no-any

      ComponentBase.prototype.ngAfterContentChecked = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempAfterContentThis = isTempRef || this;

        for (var _i = 0, _a = tempAfterContentThis.tagObjects; _i < _a.length; _i++) {
          var tagObject = _a[_i];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(tagObject.instance) && (tagObject.instance.isInitChanges || tagObject.instance.hasChanges || tagObject.instance.hasNewChildren)) {
            if (tagObject.instance.isInitChanges) {
              var propObj = {}; // For angular 9 compatibility
              // Not able to get complex directive properties reference ni Onint hook
              // So we have constructed property here and used

              var complexDirProps = void 0;
              var list = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('instance.list', tagObject);

              if (list && list.length) {
                complexDirProps = list[0].directivePropList;
              }

              var skip = true;

              if (tempAfterContentThis.getModuleName && tempAfterContentThis.getModuleName() === 'gantt') {
                skip = false;
              }

              if (complexDirProps && skip && complexDirProps.indexOf(tagObject.instance.propertyName) === -1) {
                var compDirPropList = Object.keys(tagObject.instance.list[0].propCollection);

                for (var h = 0; h < tagObject.instance.list.length; h++) {
                  tagObject.instance.list[h].propCollection[tagObject.instance.propertyName] = [];
                  var obj = {};

                  for (var k = 0; k < compDirPropList.length; k++) {
                    var complexPropName = compDirPropList[k];
                    obj[complexPropName] = tagObject.instance.list[h].propCollection[complexPropName];
                  }

                  for (var i = 0; i < tagObject.instance.list[h].tags.length; i++) {
                    var tag = tagObject.instance.list[h].tags[i];
                    var childObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list[h]);

                    if (childObj) {
                      var innerchildObj = tagObject.instance.list[h]['child' + tag.substring(0, 1).toUpperCase() + tag.substring(1)];

                      if (innerchildObj) {
                        for (var j = 0; j < innerchildObj.list.length; j++) {
                          var innerTag = innerchildObj.list[0].tags[0];

                          if (innerTag) {
                            var innerchildTag = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child' + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchildObj.list[j]);

                            if (innerchildTag) {
                              innerchildObj.list[j].tagObjects.push({
                                instance: innerchildTag,
                                name: innerTag
                              });
                            }
                          }
                        }
                      }

                      tagObject.instance.list[h].tagObjects.push({
                        instance: childObj,
                        name: tag
                      });
                    }
                  }

                  tagObject.instance.list[h].propCollection[tagObject.instance.propertyName].push(obj);
                }
              } // End angular 9 compatibility


              propObj[tagObject.name] = tagObject.instance.getProperties();
              tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);
            } else {
              /* istanbul ignore next */
              var oldProbLength = tempAfterContentThis[tagObject.name].length;
              var newPropLendgth = tagObject.instance.list.length;

              if (oldProbLength !== newPropLendgth) {
                tempAfterContentThis[tagObject.name] = tagObject.instance.list;
              }

              for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {
                var list = _c[_b];
                var curIndex = tagObject.instance.list.indexOf(list);
                var curChild = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(tagObject.name, tempAfterContentThis)[curIndex];

                if (curChild !== undefined && curChild.setProperties !== undefined) {
                  if (tempAfterContentThis.getModuleName() === 'DashboardLayout') {
                    curChild.setProperties(list.getProperties(), true);
                  } else {
                    curChild.setProperties(list.getProperties());
                  }
                }

                list.isUpdated = true;
              }
            }
          }
        }
      };

      ComponentBase.prototype.registerEvents = function (eventList) {
        Object(_util__WEBPACK_IMPORTED_MODULE_2__["registerEvents"])(eventList, this);
      };

      ComponentBase.prototype.twoWaySetter = function (newVal, prop) {
        var oldVal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, this.properties);

        if (oldVal === newVal) {
          return;
        }

        this.saveChanges(prop, newVal, oldVal);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newVal) ? null : newVal, this.properties);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop + 'Change', this).emit(newVal);
      };

      ComponentBase.prototype.addTwoWay = function (propList) {
        var _this = this;

        var _loop_1 = function _loop_1(prop) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, this_1);
          Object.defineProperty(this_1, prop, {
            get: function get() {
              return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, _this.properties);
            },
            set: function set(newVal) {
              return _this.twoWaySetter(newVal, prop);
            }
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop + 'Change', new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](), this_1);
        };

        var this_1 = this;

        for (var _i = 0, propList_1 = propList; _i < propList_1.length; _i++) {
          var prop = propList_1[_i];

          _loop_1(prop);
        }
      };

      ComponentBase.prototype.addEventListener = function (eventName, handler) {
        var eventObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(eventName, this);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(eventObj)) {
          if (!this.ngBoundedEvents[eventName]) {
            this.ngBoundedEvents[eventName] = new Map();
          }

          this.ngBoundedEvents[eventName].set(handler, eventObj.subscribe(handler));
        }
      };

      ComponentBase.prototype.removeEventListener = function (eventName, handler) {
        var eventObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(eventName, this);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(eventObj)) {
          this.ngBoundedEvents[eventName].get(handler).unsubscribe();
        }
      };

      ComponentBase.prototype.trigger = function (eventName, eventArgs, success) {
        var eventObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(eventName, this);
        var prevDetection = this.isProtectedOnChange;
        this.isProtectedOnChange = false;

        if (eventArgs) {
          eventArgs.name = eventName;
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(eventObj)) {
          eventObj.next(eventArgs);
        }

        var localEventObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('local' + eventName.charAt(0).toUpperCase() + eventName.slice(1), this);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(localEventObj)) {
          localEventObj.call(this, eventArgs);
        }

        this.isProtectedOnChange = prevDetection;
        /* istanbul ignore else  */

        if (success) {
          success.call(this, eventArgs);
        }
      };

      return ComponentBase;
    }();
    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/form-base.js":
  /*!********************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/form-base.js ***!
    \********************************************************************/

  /*! exports provided: FormBase */

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

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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /**
     * Angular Form Base Module
     */


    var FormBase =
    /** @class */
    function () {
      function FormBase() {}

      FormBase.prototype.propagateChange = function (_) {
        return;
      };

      FormBase.prototype.propagateTouch = function () {
        return;
      };

      FormBase.prototype.localChange = function (e) {
        //tslint:disable-next-line
        var value = e.checked === undefined ? e.value : e.checked;
        this.objCheck = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isObject"])(value);

        if (this.objCheck === true) {
          this.duplicateValue = JSON.stringify(value);
          this.duplicateAngularValue = JSON.stringify(this.angularValue);

          if (this.duplicateValue !== this.duplicateAngularValue && this.propagateChange !== undefined && value !== undefined) {
            // Update angular from our control
            this.propagateChange(value);
            this.angularValue = value;
          }
        } else {
          if (value !== this.angularValue && this.propagateChange !== undefined && value !== undefined) {
            // While reset form using reset() method ng-dirty not get updated, so while value is empty just update angularValue only
            if (value !== '' && value !== null) {
              // Update angular from our control
              this.propagateChange(value);
              this.angularValue = value;
            } else {
              //tslint:disable-next-line
              var optionalValue = value;
              this.propagateChange(optionalValue);
              this.angularValue = value;
            }
          }
        }
      };

      FormBase.prototype.registerOnChange = function (registerFunction) {
        this.propagateChange = registerFunction;
      };

      FormBase.prototype.registerOnTouched = function (registerFunction) {
        this.propagateTouch = registerFunction;
      };

      FormBase.prototype.twoWaySetter = function (newVal, prop) {
        var oldVal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, this.properties);
        var ele = this.inputElement || this.element;

        if (oldVal === newVal && (ele.value === undefined || ele.value === '')) {
          return;
        }

        this.saveChanges(prop, newVal, oldVal);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newVal) ? null : newVal, this.properties);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop + 'Change', this).emit(newVal);
      }; // tslint:disable-next-line:no-any


      FormBase.prototype.ngAfterViewInit = function (isTempRef) {
        // tslint:disable-next-line:no-any
        var tempFormAfterViewThis = isTempRef || this; // Used setTimeout for template binding
        // Refer Link: https://github.com/angular/angular/issues/6005
        // Removed setTimeout, Because we have called markForCheck() method in Angular Template Compiler
        // setTimeout(() => {

        /* istanbul ignore else */

        if (typeof window !== 'undefined') {
          tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);
          var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;
          ele.addEventListener('focus', tempFormAfterViewThis.ngOnFocus.bind(tempFormAfterViewThis));
          ele.addEventListener('blur', tempFormAfterViewThis.ngOnBlur.bind(tempFormAfterViewThis));
        } // });

      };

      FormBase.prototype.setDisabledState = function (disabled) {
        this.enabled = !disabled;
        this.disabled = disabled;
      };

      FormBase.prototype.writeValue = function (value) {
        var regExp = /ejs-radiobutton/g; //update control value from angular

        if (this.checked === undefined) {
          this.value = value;
        } else {
          // To resolve boolean type formControl value is not working for radio button control.

          /* istanbul ignore next */
          if (typeof value === 'boolean') {
            if (this.ngEle && regExp.test(this.ngEle.nativeElement.outerHTML)) {
              this.checked = value === this.value;
            } else {
              this.checked = value;
            }
          } else {
            this.checked = value === this.value;
          }
        }

        this.angularValue = value;

        if (value === null) {
          return;
        } // When binding Html textbox value to syncfusion textbox, change event triggered dynamically.
        // To prevent change event, trigger change in component side based on `preventChange` value


        this.preventChange = true;
      };

      FormBase.prototype.ngOnFocus = function (e) {
        /* istanbul ignore else */
        if (this.skipFromEvent !== true) {
          this.focus.emit(e);
        }
      };

      FormBase.prototype.ngOnBlur = function (e) {
        this.propagateTouch();
        /* istanbul ignore else */

        if (this.skipFromEvent !== true) {
          this.blur.emit(e);
        }
      };

      FormBase.isFormBase = true;
      return FormBase;
    }();
    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/index.js":
  /*!****************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/index.js ***!
    \****************************************************************/

  /*! exports provided: ComplexBase, ArrayBase, ComponentBase, FormBase, applyMixins, ComponentMixins, registerEvents, clearTemplate, setValue, compile, Template */

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

    __webpack_require__.r(__webpack_exports__);
    /* harmony import */


    var _complex_array_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./complex-array-base */
    "./node_modules/@syncfusion/ej2-angular-base/src/complex-array-base.js");
    /* harmony reexport (safe) */


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


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


    var _component_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./component-base */
    "./node_modules/@syncfusion/ej2-angular-base/src/component-base.js");
    /* harmony reexport (safe) */


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


    var _form_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./form-base */
    "./node_modules/@syncfusion/ej2-angular-base/src/form-base.js");
    /* harmony reexport (safe) */


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


    var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./util */
    "./node_modules/@syncfusion/ej2-angular-base/src/util.js");
    /* harmony reexport (safe) */


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


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


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


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


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


    var _template__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./template */
    "./node_modules/@syncfusion/ej2-angular-base/src/template.js");
    /* harmony reexport (safe) */


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


    __webpack_require__.d(__webpack_exports__, "Template", function () {
      return _template__WEBPACK_IMPORTED_MODULE_4__["Template"];
    });
    /**
     * Index
     */

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/template.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/template.js ***!
    \*******************************************************************/

  /*! exports provided: compile, Template */

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

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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");

    var stringCompiler = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getTemplateEngine"])();
    /**
     * Angular Template Compiler
     */

    function compile(templateEle, helper) {
      if (typeof templateEle === 'string') {
        return stringCompiler(templateEle, helper);
      } else {
        var contRef_1 = templateEle.elementRef.nativeElement._viewContainerRef;
        var pName_1 = templateEle.elementRef.nativeElement.propName; //tslint:disable-next-line        

        return function (data, component, propName) {
          var context = {
            $implicit: data
          };
          /* istanbul ignore next */

          var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;
          var viewRef = conRef.createEmbeddedView(templateEle, context);
          viewRef.markForCheck();
          /* istanbul ignore next */

          var viewCollection = component ? component.registeredTemplate : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('currentInstance.registeredTemplate', conRef);
          propName = propName ? propName : pName_1;

          if (typeof viewCollection[propName] === 'undefined') {
            viewCollection[propName] = [];
          }

          viewCollection[propName].push(viewRef);
          return viewRef.rootNodes;
        };
      }
    }
    /**
     * Property decorator for angular.
     */


    function Template(defaultValue) {
      return function (target, key) {
        var propertyDescriptor = {
          set: setter(key),
          get: getter(key, defaultValue),
          enumerable: true,
          configurable: true
        };
        Object.defineProperty(target, key, propertyDescriptor);
      };
    }

    function setter(key) {
      return function (val) {
        if (val === undefined) {
          return;
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(key + 'Ref', val, this);

        if (typeof val !== 'string') {
          val.elementRef.nativeElement._viewContainerRef = this.viewContainerRef;
          val.elementRef.nativeElement.propName = key;
        } else {
          if (this.saveChanges) {
            this.saveChanges(key, val, undefined);
            this.dataBind();
          }
        }
      };
    }

    function getter(key, defaultValue) {
      return function () {
        /* istanbul ignore next */
        return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(key + 'Ref', this) || defaultValue;
      };
    } //tslint:disable-next-line


    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setTemplateEngine"])({
      compile: compile
    });
    /***/
  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-base/src/util.js":
  /*!***************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-base/src/util.js ***!
    \***************************************************************/

  /*! exports provided: applyMixins, ComponentMixins, registerEvents, clearTemplate, setValue */

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

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


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


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


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


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


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


    var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /* harmony import */


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /**
     * Angular Utility Module
     */

    /* tslint:disable */


    function applyMixins(derivedClass, baseClass) {
      baseClass.forEach(function (baseClass) {
        Object.getOwnPropertyNames(baseClass.prototype).forEach(function (name) {
          if (!derivedClass.prototype.hasOwnProperty(name) || baseClass.isFormBase) {
            derivedClass.prototype[name] = baseClass.prototype[name];
          }
        });
      });
    }
    /* tslint:disable */


    function ComponentMixins(baseClass) {
      return function (derivedClass) {
        applyMixins(derivedClass, baseClass);
      };
    }
    /**
     * @private
     */


    function registerEvents(eventList, obj, direct) {
      var ngEventsEmitter = {};

      if (eventList && eventList.length) {
        for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {
          var event_1 = eventList_1[_i];

          if (direct === true) {
            obj.propCollection[event_1] = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](false);
            obj[event_1] = obj.propCollection[event_1];
          } else {
            ngEventsEmitter[event_1] = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](false);
          }
        }

        if (direct !== true) {
          obj.setProperties(ngEventsEmitter, true);
        }
      }
    }
    /**
     * @private
     */


    function clearTemplate(_this, templateNames, index) {
      var regTemplates = Object.keys(_this.registeredTemplate);

      if (regTemplates.length) {
        /* istanbul ignore next */
        var regProperties = templateNames && templateNames.filter(function (val) {
          return /\./g.test(val) ? false : true;
        });

        for (var _i = 0, _a = regProperties && regProperties || regTemplates; _i < _a.length; _i++) {
          var registeredTemplate = _a[_i];
          /* istanbul ignore next */

          if (index && index.length) {
            for (var e = 0; e < index.length; e++) {
              for (var m = 0; m < _this.registeredTemplate.template.length; m++) {
                var value = _this.registeredTemplate.template[m].rootNodes[0];

                if (value === index[e]) {
                  var rt = _this.registeredTemplate[registeredTemplate];
                  rt[m].destroy();
                }
              }
            }
          } else {
            for (var _b = 0, _c = _this.registeredTemplate[registeredTemplate]; _b < _c.length; _b++) {
              var rt = _c[_b];

              if (!rt.destroyed) {
                if (rt._view) {
                  var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_1__["isNullOrUndefined"])(pNode)) {
                    for (var m = 0; m < rt.rootNodes.length; m++) {
                      pNode.appendChild(rt.rootNodes[m]);
                    }
                  }
                }

                rt.destroy();
              }
            }
          }

          delete _this.registeredTemplate[registeredTemplate];
        }
      }

      var _loop_1 = function _loop_1(tagObject) {
        if (tagObject.instance) {
          /* istanbul ignore next */
          tagObject.instance.clearTemplate(templateNames && templateNames.filter(function (val) {
            return new RegExp(tagObject.name).test(val) ? true : false;
          }));
        }
      };

      for (var _d = 0, _e = _this.tagObjects; _d < _e.length; _d++) {
        var tagObject = _e[_d];

        _loop_1(tagObject);
      }
    }
    /**
     * To set value for the nameSpace in desired object.
     * @param {string} nameSpace - String value to the get the inner object
     * @param {any} value - Value that you need to set.
     * @param {any} obj - Object to get the inner object value.
     * @return {void}
     * @private
     */


    function setValue(nameSpace, value, object) {
      var keys = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
      /* istanbul ignore next */

      var fromObj = object || {};

      for (var i = 0; i < keys.length; i++) {
        var key = keys[i];

        if (i + 1 === keys.length) {
          fromObj[key] = value === undefined ? {} : value;
        } else if (fromObj[key] === undefined) {
          fromObj[key] = {};
        }

        fromObj = fromObj[key];
      }

      return fromObj;
    }
    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-angular-dropdowns/@syncfusion/ej2-angular-dropdowns.js":
  /*!*********************************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-angular-dropdowns/@syncfusion/ej2-angular-dropdowns.js ***!
    \*********************************************************************************************/

  /*! exports provided: DropDownListComponent, DropDownListModule, DropDownListAllModule, ComboBoxComponent, ComboBoxModule, ComboBoxAllModule, AutoCompleteComponent, AutoCompleteModule, AutoCompleteAllModule, MultiSelectComponent, MultiSelectModule, MultiSelectAllModule, CheckBoxSelectionService, ListBoxComponent, ListBoxModule, ListBoxAllModule, DropDownTreeComponent, DropDownTreeModule, DropDownTreeAllModule, ɵe, ɵf, ɵc, ɵd, ɵa, ɵb, ɵk, ɵl, ɵi, ɵj, ɵg, ɵh, incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, SelectionSettings, ToolbarSettings, ListBox */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵe", function () {
      return inputs$2;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵf", function () {
      return outputs$2;
    });
    /* harmony export (binding) */


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ɵk", function () {
      return inputs$5;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵl", function () {
      return outputs$5;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵi", function () {
      return inputs$4;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ɵj", function () {
      return outputs$4;
    });
    /* harmony export (binding) */


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


    __webpack_require__.d(__webpack_exports__, "ɵh", function () {
      return outputs$3;
    });
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/fesm2015/core.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/fesm2015/forms.js");
    /* harmony import */


    var _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-angular-base */
    "./node_modules/@syncfusion/ej2-angular-base/index.js");
    /* harmony import */


    var _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @syncfusion/ej2-dropdowns */
    "./node_modules/@syncfusion/ej2-dropdowns/dist/es6/ej2-dropdowns.es2015.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/fesm2015/common.js");
    /* harmony reexport (safe) */


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "ListBox", function () {
      return _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["ListBox"];
    });

    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var __metadata = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs = ['actionFailureTemplate', 'allowFiltering', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'sortOrder', 'text', 'value', 'valueTemplate', 'width', 'zIndex'];
    var outputs = ['actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select', 'valueChange'];
    var twoWays = ['value'];
    /**
     * The DropDownList component contains a list of predefined values, from which the user can choose a single value.
     * ```html
     * <ejs-dropdownlist></ejs-dropdownlist>
     * ```
     */

    var DropDownListComponent = DropDownListComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd) {
      _inherits(DropDownListComponent, _syncfusion_ej2_dropd);

      var _super157 = _createSuper(DropDownListComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function DropDownListComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this401;

        _classCallCheck(this, DropDownListComponent);

        _this401 = _super157.call(this);
        _this401.ngEle = ngEle;
        _this401.srenderer = srenderer;
        _this401.viewContainerRef = viewContainerRef;
        _this401.injector = injector;
        _this401.skipFromEvent = true;
        _this401.element = _this401.ngEle.nativeElement;
        _this401.injectedModules = _this401.injectedModules || [];

        _this401.registerEvents(outputs);

        _this401.addTwoWay.call(_assertThisInitialized(_this401), twoWays);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this401), _this401.viewContainerRef);
        _this401.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this401.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this401;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(DropDownListComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return DropDownListComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["DropDownList"]);

    DropDownListComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-dropdownlist',
        inputs: inputs,
        outputs: outputs,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return DropDownListComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownListComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    DropDownListComponent.propDecorators = {
      'footerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['footerTemplate']
      }],
      'headerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['headerTemplate']
      }],
      'valueTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['valueTemplate']
      }],
      'groupTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['groupTemplate']
      }],
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }],
      'noRecordsTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['noRecordsTemplate']
      }],
      'actionFailureTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['actionFailureTemplate']
      }]
    };

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata("design:type", Object)], DropDownListComponent.prototype, "footerTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata("design:type", Object)], DropDownListComponent.prototype, "headerTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata("design:type", Object)], DropDownListComponent.prototype, "valueTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata("design:type", Object)], DropDownListComponent.prototype, "groupTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata("design:type", Object)], DropDownListComponent.prototype, "itemTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('No records found'), __metadata("design:type", Object)], DropDownListComponent.prototype, "noRecordsTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('Request failed'), __metadata("design:type", Object)], DropDownListComponent.prototype, "actionFailureTemplate", void 0);

    DropDownListComponent = DropDownListComponent_1 = __decorate([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], DropDownListComponent);
    var DropDownListComponent_1;
    /**
     * NgModule definition for the DropDownList component.
     */

    var DropDownListModule = function DropDownListModule() {
      _classCallCheck(this, DropDownListModule);
    };

    DropDownListModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [DropDownListComponent],
        exports: [DropDownListComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownListModule.ctorParameters = function () {
      return [];
    };
    /**
     * NgModule definition for the DropDownList component with providers.
     */


    var DropDownListAllModule = function DropDownListAllModule() {
      _classCallCheck(this, DropDownListAllModule);
    };

    DropDownListAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], DropDownListModule],
        exports: [DropDownListModule],
        providers: []
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownListAllModule.ctorParameters = function () {
      return [];
    };

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var __metadata$1 = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs$1 = ['actionFailureTemplate', 'allowCustom', 'allowFiltering', 'autofill', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'sortOrder', 'text', 'value', 'valueTemplate', 'width', 'zIndex'];
    var outputs$1 = ['actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'customValueSpecifier', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select', 'valueChange'];
    var twoWays$1 = ['value'];
    /**
     * The ComboBox component allows the user to type a value or choose an option from the list of predefined options.
     * ```html
     * <ejs-combobox></ejs-combobox>
     * ```
     */

    var ComboBoxComponent = ComboBoxComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd2) {
      _inherits(ComboBoxComponent, _syncfusion_ej2_dropd2);

      var _super158 = _createSuper(ComboBoxComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function ComboBoxComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this402;

        _classCallCheck(this, ComboBoxComponent);

        _this402 = _super158.call(this);
        _this402.ngEle = ngEle;
        _this402.srenderer = srenderer;
        _this402.viewContainerRef = viewContainerRef;
        _this402.injector = injector;
        _this402.skipFromEvent = true;
        _this402.element = _this402.ngEle.nativeElement;
        _this402.injectedModules = _this402.injectedModules || [];

        _this402.registerEvents(outputs$1);

        _this402.addTwoWay.call(_assertThisInitialized(_this402), twoWays$1);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this402), _this402.viewContainerRef);
        _this402.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this402.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this402;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(ComboBoxComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return ComboBoxComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["ComboBox"]);

    ComboBoxComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-combobox',
        inputs: inputs$1,
        outputs: outputs$1,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return ComboBoxComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    ComboBoxComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    ComboBoxComponent.propDecorators = {
      'footerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['footerTemplate']
      }],
      'headerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['headerTemplate']
      }],
      'groupTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['groupTemplate']
      }],
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }],
      'noRecordsTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['noRecordsTemplate']
      }],
      'actionFailureTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['actionFailureTemplate']
      }]
    };

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "footerTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "headerTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "groupTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "itemTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('No records found'), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "noRecordsTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('Request failed'), __metadata$1("design:type", Object)], ComboBoxComponent.prototype, "actionFailureTemplate", void 0);

    ComboBoxComponent = ComboBoxComponent_1 = __decorate$1([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata$1("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], ComboBoxComponent);
    var ComboBoxComponent_1;
    /**
     * NgModule definition for the ComboBox component.
     */

    var ComboBoxModule = function ComboBoxModule() {
      _classCallCheck(this, ComboBoxModule);
    };

    ComboBoxModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [ComboBoxComponent],
        exports: [ComboBoxComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    ComboBoxModule.ctorParameters = function () {
      return [];
    };
    /**
     * NgModule definition for the ComboBox component with providers.
     */


    var ComboBoxAllModule = function ComboBoxAllModule() {
      _classCallCheck(this, ComboBoxAllModule);
    };

    ComboBoxAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], ComboBoxModule],
        exports: [ComboBoxModule],
        providers: []
      }]
    }];
    /**
     * @nocollapse
     */

    ComboBoxAllModule.ctorParameters = function () {
      return [];
    };

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var __metadata$2 = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs$2 = ['actionFailureTemplate', 'allowCustom', 'allowFiltering', 'autofill', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'highlight', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'minLength', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'showPopupButton', 'sortOrder', 'suggestionCount', 'text', 'value', 'valueTemplate', 'width', 'zIndex'];
    var outputs$2 = ['actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'customValueSpecifier', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select', 'valueChange'];
    var twoWays$2 = ['value'];
    /**
     * The AutoComplete component provides the matched suggestion list when type into the input, from which the user can select one.
     * ```html
     * <ejs-autocomplete></ejs-autocomplete>
     * ```
     */

    var AutoCompleteComponent = AutoCompleteComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd3) {
      _inherits(AutoCompleteComponent, _syncfusion_ej2_dropd3);

      var _super159 = _createSuper(AutoCompleteComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function AutoCompleteComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this403;

        _classCallCheck(this, AutoCompleteComponent);

        _this403 = _super159.call(this);
        _this403.ngEle = ngEle;
        _this403.srenderer = srenderer;
        _this403.viewContainerRef = viewContainerRef;
        _this403.injector = injector;
        _this403.skipFromEvent = true;
        _this403.element = _this403.ngEle.nativeElement;
        _this403.injectedModules = _this403.injectedModules || [];

        _this403.registerEvents(outputs$2);

        _this403.addTwoWay.call(_assertThisInitialized(_this403), twoWays$2);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this403), _this403.viewContainerRef);
        _this403.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this403.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this403;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(AutoCompleteComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return AutoCompleteComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["AutoComplete"]);

    AutoCompleteComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-autocomplete',
        inputs: inputs$2,
        outputs: outputs$2,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return AutoCompleteComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    AutoCompleteComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    AutoCompleteComponent.propDecorators = {
      'footerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['footerTemplate']
      }],
      'headerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['headerTemplate']
      }],
      'groupTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['groupTemplate']
      }],
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }],
      'noRecordsTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['noRecordsTemplate']
      }],
      'actionFailureTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['actionFailureTemplate']
      }]
    };

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "footerTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "headerTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "groupTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "itemTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('No records found'), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "noRecordsTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('Request failed'), __metadata$2("design:type", Object)], AutoCompleteComponent.prototype, "actionFailureTemplate", void 0);

    AutoCompleteComponent = AutoCompleteComponent_1 = __decorate$2([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata$2("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], AutoCompleteComponent);
    var AutoCompleteComponent_1;
    /**
     * NgModule definition for the AutoComplete component.
     */

    var AutoCompleteModule = function AutoCompleteModule() {
      _classCallCheck(this, AutoCompleteModule);
    };

    AutoCompleteModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [AutoCompleteComponent],
        exports: [AutoCompleteComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    AutoCompleteModule.ctorParameters = function () {
      return [];
    };
    /**
     * NgModule definition for the AutoComplete component with providers.
     */


    var AutoCompleteAllModule = function AutoCompleteAllModule() {
      _classCallCheck(this, AutoCompleteAllModule);
    };

    AutoCompleteAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], AutoCompleteModule],
        exports: [AutoCompleteModule],
        providers: []
      }]
    }];
    /**
     * @nocollapse
     */

    AutoCompleteAllModule.ctorParameters = function () {
      return [];
    };

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };

    var __metadata$3 = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs$3 = ['actionFailureTemplate', 'allowCustomValue', 'allowFiltering', 'changeOnBlur', 'closePopupOnSelect', 'cssClass', 'dataSource', 'delimiterChar', 'enableGroupCheckBox', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableSelectionOrder', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'hideSelectedItem', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'maximumSelectionLength', 'mode', 'noRecordsTemplate', 'openOnClick', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'selectAllText', 'showClearButton', 'showDropDownIcon', 'showSelectAll', 'sortOrder', 'text', 'unSelectAllText', 'value', 'valueTemplate', 'width', 'zIndex'];
    var outputs$3 = ['actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'chipSelection', 'close', 'created', 'customValueSelection', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'removed', 'removing', 'select', 'selectedAll', 'tagging', 'valueChange'];
    var twoWays$3 = ['value'];
    /**
     * The MultiSelect allows the user to pick a values from the predefined list of values.
     * ```html
     * <ejs-multiselect></ejs-multiselect>
     * ```
     */

    var MultiSelectComponent = MultiSelectComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd4) {
      _inherits(MultiSelectComponent, _syncfusion_ej2_dropd4);

      var _super160 = _createSuper(MultiSelectComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function MultiSelectComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this404;

        _classCallCheck(this, MultiSelectComponent);

        _this404 = _super160.call(this);
        _this404.ngEle = ngEle;
        _this404.srenderer = srenderer;
        _this404.viewContainerRef = viewContainerRef;
        _this404.injector = injector;
        _this404.skipFromEvent = true;
        _this404.element = _this404.ngEle.nativeElement;
        _this404.injectedModules = _this404.injectedModules || [];

        try {
          var mod = _this404.injector.get('DropDownsCheckBoxSelection');

          if (_this404.injectedModules.indexOf(mod) === -1) {
            _this404.injectedModules.push(mod);
          }
        } catch (_a) {}

        _this404.registerEvents(outputs$3);

        _this404.addTwoWay.call(_assertThisInitialized(_this404), twoWays$3);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this404), _this404.viewContainerRef);
        _this404.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this404.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this404;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(MultiSelectComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return MultiSelectComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["MultiSelect"]);

    MultiSelectComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-multiselect',
        inputs: inputs$3,
        outputs: outputs$3,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return MultiSelectComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    MultiSelectComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    MultiSelectComponent.propDecorators = {
      'footerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['footerTemplate']
      }],
      'headerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['headerTemplate']
      }],
      'valueTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['valueTemplate']
      }],
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }],
      'noRecordsTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['noRecordsTemplate']
      }],
      'actionFailureTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['actionFailureTemplate']
      }]
    };

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "footerTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "headerTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "valueTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "itemTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('No records found'), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "noRecordsTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('Request failed'), __metadata$3("design:type", Object)], MultiSelectComponent.prototype, "actionFailureTemplate", void 0);

    MultiSelectComponent = MultiSelectComponent_1 = __decorate$3([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata$3("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], MultiSelectComponent);
    var MultiSelectComponent_1;
    /**
     * NgModule definition for the MultiSelect component.
     */

    var MultiSelectModule = function MultiSelectModule() {
      _classCallCheck(this, MultiSelectModule);
    };

    MultiSelectModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [MultiSelectComponent],
        exports: [MultiSelectComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    MultiSelectModule.ctorParameters = function () {
      return [];
    };

    var CheckBoxSelectionService = {
      provide: 'DropDownsCheckBoxSelection',
      useValue: _syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["CheckBoxSelection"]
    };
    /**
     * NgModule definition for the MultiSelect component with providers.
     */

    var MultiSelectAllModule = function MultiSelectAllModule() {
      _classCallCheck(this, MultiSelectAllModule);
    };

    MultiSelectAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], MultiSelectModule],
        exports: [MultiSelectModule],
        providers: [CheckBoxSelectionService]
      }]
    }];
    /**
     * @nocollapse
     */

    MultiSelectAllModule.ctorParameters = function () {
      return [];
    };

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    };

    var __metadata$4 = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs$4 = ['actionFailureTemplate', 'allowDragAndDrop', 'allowFiltering', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'groupTemplate', 'height', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'maximumSelectionLength', 'noRecordsTemplate', 'query', 'scope', 'selectionSettings', 'sortOrder', 'toolbarSettings', 'value', 'zIndex'];
    var outputs$4 = ['focus', 'blur', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeDrop', 'beforeItemRender', 'change', 'created', 'dataBound', 'destroyed', 'drag', 'dragStart', 'drop', 'filtering', 'select', 'valueChange'];
    var twoWays$4 = ['value'];
    /**
     * The ListBox allows the user to select values from the predefined list of values.
     * ```html
     * <ejs-listbox [dataSource]='data'></ejs-listbox>
     * ```
     */

    var ListBoxComponent = ListBoxComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd5) {
      _inherits(ListBoxComponent, _syncfusion_ej2_dropd5);

      var _super161 = _createSuper(ListBoxComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function ListBoxComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this405;

        _classCallCheck(this, ListBoxComponent);

        _this405 = _super161.call(this);
        _this405.ngEle = ngEle;
        _this405.srenderer = srenderer;
        _this405.viewContainerRef = viewContainerRef;
        _this405.injector = injector;
        _this405.element = _this405.ngEle.nativeElement;
        _this405.injectedModules = _this405.injectedModules || [];

        try {
          var mod = _this405.injector.get('DropDownsCheckBoxSelection');

          if (_this405.injectedModules.indexOf(mod) === -1) {
            _this405.injectedModules.push(mod);
          }
        } catch (_a) {}

        _this405.registerEvents(outputs$4);

        _this405.addTwoWay.call(_assertThisInitialized(_this405), twoWays$4);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this405), _this405.viewContainerRef);
        _this405.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this405.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this405;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(ListBoxComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return ListBoxComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["ListBox"]);

    ListBoxComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-listbox',
        inputs: inputs$4,
        outputs: outputs$4,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return ListBoxComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    ListBoxComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    ListBoxComponent.propDecorators = {
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }]
    };

    __decorate$4([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$4("design:type", Object)], ListBoxComponent.prototype, "itemTemplate", void 0);

    ListBoxComponent = ListBoxComponent_1 = __decorate$4([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata$4("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], ListBoxComponent);
    var ListBoxComponent_1;
    /**
     * NgModule definition for the ListBox component.
     */

    var ListBoxModule = function ListBoxModule() {
      _classCallCheck(this, ListBoxModule);
    };

    ListBoxModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [ListBoxComponent],
        exports: [ListBoxComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    ListBoxModule.ctorParameters = function () {
      return [];
    };
    /**
     * NgModule definition for the ListBox component with providers.
     */


    var ListBoxAllModule = function ListBoxAllModule() {
      _classCallCheck(this, ListBoxAllModule);
    };

    ListBoxAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], ListBoxModule],
        exports: [ListBoxModule],
        providers: []
      }]
    }];
    /**
     * @nocollapse
     */

    ListBoxAllModule.ctorParameters = function () {
      return [];
    };

    var __decorate$5 = undefined && undefined.__decorate || function (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;
    };

    var __metadata$5 = undefined && undefined.__metadata || function (k, v) {
      if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };

    var inputs$5 = ['actionFailureTemplate', 'allowFiltering', 'allowMultiSelection', 'changeOnBlur', 'cssClass', 'delimiterChar', 'enablePersistence', 'enableRtl', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'mode', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'readonly', 'selectAllText', 'showCheckBox', 'showClearButton', 'showDropDownIcon', 'showSelectAll', 'sortOrder', 'text', 'treeSettings', 'unSelectAllText', 'value', 'width', 'wrapText', 'zIndex'];
    var outputs$5 = ['actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'dataBound', 'destroyed', 'filtering', 'focus', 'keyPress', 'open', 'select', 'valueChange'];
    var twoWays$5 = ['value'];
    /**
     * The DropDownTree component contains a list of predefined values from which you can choose a single or multiple values.
     * ```html
     * <ejs-dropdowntree></ejs-dropdowntree>
     * ```
     */

    var DropDownTreeComponent = DropDownTreeComponent_1 = /*#__PURE__*/function (_syncfusion_ej2_dropd6) {
      _inherits(DropDownTreeComponent, _syncfusion_ej2_dropd6);

      var _super162 = _createSuper(DropDownTreeComponent);

      /**
       * @param {?} ngEle
       * @param {?} srenderer
       * @param {?} viewContainerRef
       * @param {?} injector
       */
      function DropDownTreeComponent(ngEle, srenderer, viewContainerRef, injector) {
        var _this406;

        _classCallCheck(this, DropDownTreeComponent);

        _this406 = _super162.call(this);
        _this406.ngEle = ngEle;
        _this406.srenderer = srenderer;
        _this406.viewContainerRef = viewContainerRef;
        _this406.injector = injector;
        _this406.skipFromEvent = true;
        _this406.element = _this406.ngEle.nativeElement;
        _this406.injectedModules = _this406.injectedModules || [];

        _this406.registerEvents(outputs$5);

        _this406.addTwoWay.call(_assertThisInitialized(_this406), twoWays$5);

        Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["setValue"])('currentInstance', _assertThisInitialized(_this406), _this406.viewContainerRef);
        _this406.formContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]();
        _this406.formCompContext = new _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"]();
        return _this406;
      }
      /**
       * @param {?} registerFunction
       * @return {?}
       */


      _createClass2(DropDownTreeComponent, [{
        key: "registerOnChange",
        value: function registerOnChange(registerFunction) {}
        /**
         * @param {?} registerFunction
         * @return {?}
         */

      }, {
        key: "registerOnTouched",
        value: function registerOnTouched(registerFunction) {}
        /**
         * @param {?} value
         * @return {?}
         */

      }, {
        key: "writeValue",
        value: function writeValue(value) {}
        /**
         * @param {?} disabled
         * @return {?}
         */

      }, {
        key: "setDisabledState",
        value: function setDisabledState(disabled) {}
        /**
         * @return {?}
         */

      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          this.formCompContext.ngOnInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterViewInit",
        value: function ngAfterViewInit() {
          this.formContext.ngAfterViewInit(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.formCompContext.ngOnDestroy(this);
        }
        /**
         * @return {?}
         */

      }, {
        key: "ngAfterContentChecked",
        value: function ngAfterContentChecked() {
          this.formCompContext.ngAfterContentChecked(this);
        }
      }]);

      return DropDownTreeComponent;
    }(_syncfusion_ej2_dropdowns__WEBPACK_IMPORTED_MODULE_3__["DropDownTree"]);

    DropDownTreeComponent.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"],
      args: [{
        selector: 'ejs-dropdowntree',
        inputs: inputs$5,
        outputs: outputs$5,
        template: '',
        changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectionStrategy"].OnPush,
        providers: [{
          provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
          useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function () {
            return DropDownTreeComponent_1;
          }),
          multi: true
        }],
        queries: {}
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownTreeComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]
      }, {
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]
      }];
    };

    DropDownTreeComponent.propDecorators = {
      'footerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['footerTemplate']
      }],
      'headerTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['headerTemplate']
      }],
      'itemTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['itemTemplate']
      }],
      'noRecordsTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['noRecordsTemplate']
      }],
      'actionFailureTemplate': [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"],
        args: ['actionFailureTemplate']
      }]
    };

    __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$5("design:type", Object)], DropDownTreeComponent.prototype, "footerTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$5("design:type", Object)], DropDownTreeComponent.prototype, "headerTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])(), __metadata$5("design:type", Object)], DropDownTreeComponent.prototype, "itemTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('No records found'), __metadata$5("design:type", Object)], DropDownTreeComponent.prototype, "noRecordsTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["Template"])('Request failed'), __metadata$5("design:type", Object)], DropDownTreeComponent.prototype, "actionFailureTemplate", void 0);

    DropDownTreeComponent = DropDownTreeComponent_1 = __decorate$5([Object(_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentMixins"])([_syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["ComponentBase"], _syncfusion_ej2_angular_base__WEBPACK_IMPORTED_MODULE_2__["FormBase"]]), __metadata$5("design:paramtypes", [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"]])], DropDownTreeComponent);
    var DropDownTreeComponent_1;
    /**
     * NgModule definition for the DropDownTree component.
     */

    var DropDownTreeModule = function DropDownTreeModule() {
      _classCallCheck(this, DropDownTreeModule);
    };

    DropDownTreeModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"]],
        declarations: [DropDownTreeComponent],
        exports: [DropDownTreeComponent]
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownTreeModule.ctorParameters = function () {
      return [];
    };
    /**
     * NgModule definition for the DropDownTree component with providers.
     */


    var DropDownTreeAllModule = function DropDownTreeAllModule() {
      _classCallCheck(this, DropDownTreeAllModule);
    };

    DropDownTreeAllModule.decorators = [{
      type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
      args: [{
        imports: [_angular_common__WEBPACK_IMPORTED_MODULE_4__["CommonModule"], DropDownTreeModule],
        exports: [DropDownTreeModule],
        providers: []
      }]
    }];
    /**
     * @nocollapse
     */

    DropDownTreeAllModule.ctorParameters = function () {
      return [];
    };
    /**
     * Generated bundle index. Do not edit.
     */
    //# sourceMappingURL=ej2-angular-dropdowns.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js ***!
    \***********************************************************************/

  /*! exports provided: blazorCultureFormats, IntlBase, Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, Base, getComponent, removeChildInstance, Browser, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

    var instances = 'ej2_instances';
    var uid = 0;
    var isBlazorPlatform = false;
    /**
     * Function to check whether the platform is blazor or not.
     * @return {boolean} result
     * @private
     */

    function disableBlazorMode() {
      isBlazorPlatform = false;
    }
    /**
     * Create Instance from constructor function with desired parameters.
     * @param {Function} classFunction - Class function to which need to create instance
     * @param {any[]} params - Parameters need to passed while creating instance
     * @return {any}
     * @private
     */


    function createInstance(classFunction, params) {
      var arrayParam = params;
      arrayParam.unshift(undefined);
      return new (Function.prototype.bind.apply(classFunction, arrayParam))();
    }
    /**
     * To run a callback function immediately after the browser has completed other operations.
     * @param {Function} handler - callback function to be triggered.
     * @return {Function}
     * @private
     */


    function setImmediate(handler) {
      var unbind;
      var num = new Uint16Array(5);
      var intCrypto = window.msCrypto || window.crypto;
      intCrypto.getRandomValues(num);
      var secret = 'ej2' + combineArray(num);

      var messageHandler = function messageHandler(event) {
        if (event.source === window && typeof event.data === 'string' && event.data.length <= 32 && event.data === secret) {
          handler();
          unbind();
        }
      };

      window.addEventListener('message', messageHandler, false);
      window.postMessage(secret, '*');
      return unbind = function unbind() {
        window.removeEventListener('message', messageHandler);
        handler = messageHandler = secret = undefined;
      };
    }
    /**
     * To get nameSpace value from the desired object.
     * @param {string} nameSpace - String value to the get the inner object
     * @param {any} obj - Object to get the inner object value.
     * @return {any}
     * @private
     */


    function getValue(nameSpace, obj) {
      /* tslint:disable no-any */
      var value = obj;
      var splits = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');

      for (var i = 0; i < splits.length && !isUndefined(value); i++) {
        value = value[splits[i]];
      }

      return value;
    }
    /**
     * To set value for the nameSpace in desired object.
     * @param {string} nameSpace - String value to the get the inner object
     * @param {any} value - Value that you need to set.
     * @param {any} obj - Object to get the inner object value.
     * @return {void}
     * @private
     */


    function setValue(nameSpace, value, obj) {
      var keys = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
      var start = obj || {};
      var fromObj = start;
      var i;
      var length = keys.length;
      var key;

      for (i = 0; i < length; i++) {
        key = keys[i];

        if (i + 1 === length) {
          fromObj[key] = value === undefined ? {} : value;
        } else if (isNullOrUndefined(fromObj[key])) {
          fromObj[key] = {};
        }

        fromObj = fromObj[key];
      }

      return start;
    }
    /**
     * Delete an item from Object
     * @param {any} obj - Object in which we need to delete an item.
     * @param {string} params - String value to the get the inner object
     * @return {void}
     * @private
     */


    function deleteObject(obj, key) {
      delete obj[key];
    }
    /**
     * Check weather the given argument is only object.
     * @param {any} obj - Object which is need to check.
     * @return {boolean}
     * @private
     */


    function isObject(obj) {
      var objCon = {};
      return !isNullOrUndefined(obj) && obj.constructor === objCon.constructor;
    }
    /**
     * To get enum value by giving the string.
     * @param {any} enumObject - Enum object.
     * @param {string} enumValue - Enum value to be searched
     * @return {any}
     * @private
     */


    function getEnumValue(enumObject, enumValue) {
      return enumObject[enumValue];
    }
    /**
     * Merge the source object into destination object.
     * @param {any} source - source object which is going to merge with destination object
     * @param {any} destination - object need to be merged
     * @return {void}
     * @private
     */


    function merge(source, destination) {
      if (!isNullOrUndefined(destination)) {
        var temrObj = source;
        var tempProp = destination;

        var _keys2 = Object.keys(destination);

        var deepmerge = 'deepMerge';

        for (var _i34 = 0, _keys3 = _keys2; _i34 < _keys3.length; _i34++) {
          var key = _keys3[_i34];

          if (!isNullOrUndefined(temrObj[deepmerge]) && temrObj[deepmerge].indexOf(key) !== -1 && (isObject(tempProp[key]) || Array.isArray(tempProp[key]))) {
            extend(temrObj[key], temrObj[key], tempProp[key], true);
          } else {
            temrObj[key] = tempProp[key];
          }
        }
      }
    }
    /**
     * Extend the two object with newer one.
     * @param {any} copied - Resultant object after merged
     * @param {Object} first - First object need to merge
     * @param {Object} second - Second object need to merge
     * @return {Object}
     * @private
     */


    function extend(copied, first, second, deep) {
      var _arguments = arguments;
      var result = copied && typeof copied === 'object' ? copied : {};
      var length = arguments.length;

      if (deep) {
        length = length - 1;
      }

      var _loop7 = function _loop7(i) {
        if (!_arguments[i]) {
          return "continue";
        }

        var obj1 = _arguments[i];
        Object.keys(obj1).forEach(function (key) {
          var src = result[key];
          var copy = obj1[key];
          var clone;
          var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && copy.length !== src.length;
          var blazorEventExtend = isBlazor() ? !(src instanceof Event) && !isArrayChanged : true;

          if (deep && blazorEventExtend && (isObject(copy) || Array.isArray(copy))) {
            if (isObject(copy)) {
              clone = src ? src : {};

              if (Array.isArray(clone) && clone.hasOwnProperty('isComplexArray')) {
                extend(clone, {}, copy, deep);
              } else {
                result[key] = extend(clone, {}, copy, deep);
              }
            } else {
              /* istanbul ignore next */
              clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];
              result[key] = extend([], clone, copy, deep);
            }
          } else {
            result[key] = copy;
          }
        });
      };

      for (var i = 1; i < length; i++) {
        var _ret = _loop7(i);

        if (_ret === "continue") continue;
      }

      return result;
    }
    /**
     * To check whether the object is null or undefined.
     * @param {Object} value - To check the object is null or undefined
     * @return {boolean}
     * @private
     */


    function isNullOrUndefined(value) {
      return value === undefined || value === null;
    }
    /**
     * To check whether the object is undefined.
     * @param {Object} value - To check the object is undefined
     * @return {boolean}
     * @private
     */


    function isUndefined(value) {
      return 'undefined' === typeof value;
    }
    /**
     * To return the generated unique name
     * @param {string} definedName - To concatenate the unique id to provided name
     * @return {string}
     * @private
     */


    function getUniqueID(definedName) {
      return definedName + '_' + uid++;
    }
    /**
     * It limits the rate at which a function can fire. The function will fire only once every provided second instead of as quickly.
     * @param {Function} eventFunction - Specifies the function to run when the event occurs
     * @param {number} delay - A number that specifies the milliseconds for function delay call option
     * @return {Function}
     * @private
     */


    function debounce(eventFunction, delay) {
      var out; // tslint:disable-next-line

      return function () {
        var _this407 = this;

        var args = arguments;

        var later = function later() {
          out = null;
          return eventFunction.apply(_this407, args);
        };

        clearTimeout(out);
        out = setTimeout(later, delay);
      };
    } // Added since lint ignored after added '//tslint:disable-next-line' 

    /* tslint:disable:no-any */

    /**
     * To convert the object to string for query url
     * @param  {Object} data
     * @returns string
     * @private
     */


    function queryParams(data) {
      var array = [];
      var keys = Object.keys(data);

      for (var _i35 = 0, _keys4 = keys; _i35 < _keys4.length; _i35++) {
        var key = _keys4[_i35];
        array.push(encodeURIComponent(key) + '=' + encodeURIComponent('' + data[key]));
      }

      return array.join('&');
    }
    /**
     * To check whether the given array contains object.
     * @param {T[]} value- Specifies the T type array to be checked.
     * @private
     */


    function isObjectArray(value) {
      var parser = Object.prototype.toString;

      if (parser.call(value) === '[object Array]') {
        if (parser.call(value[0]) === '[object Object]') {
          return true;
        }
      }

      return false;
    }
    /**
     * To check whether the  child element is descendant to parent element or parent and child are same element.
     * @param{Element} - Specifies the child element to compare with parent.
     * @param{Element} - Specifies the parent element.
     * @return boolean
     * @private
     */


    function compareElementParent(child, parent) {
      var node = child;

      if (node === parent) {
        return true;
      } else if (node === document || !node) {
        return false;
      } else {
        return compareElementParent(node.parentNode, parent);
      }
    }
    /**
     * To throw custom error message.
     * @param{string} - Specifies the error message to be thrown.
     * @private
     */


    function throwError(message) {
      try {
        throw new Error(message);
      } catch (e) {
        throw e.message + '\n' + e.stack;
      }
    }
    /**
     * This function is used to print given element
     * @param{Element} element - Specifies the print content element.
     * @param{Window} printWindow - Specifies the print window.
     * @private
     */


    function print(element, printWindow) {
      var div = document.createElement('div');
      var links = [].slice.call(document.getElementsByTagName('head')[0].querySelectorAll('base, link, style'));
      var reference = '';

      if (isNullOrUndefined(printWindow)) {
        printWindow = window.open('', 'print', 'height=452,width=1024,tabbar=no');
      }

      div.appendChild(element.cloneNode(true));

      for (var i = 0, _len21 = links.length; i < _len21; i++) {
        reference += links[i].outerHTML;
      }

      printWindow.document.write('<!DOCTYPE html> <html><head>' + reference + '</head><body>' + div.innerHTML + '<script> (function() { window.ready = true; })(); </script>' + '</body></html>');
      printWindow.document.close();
      printWindow.focus(); // tslint:disable-next-line

      var interval = setInterval(function () {
        if (printWindow.ready) {
          printWindow.print();
          printWindow.close();
          clearInterval(interval);
        }
      }, 500);
      return printWindow;
    }
    /**
     * Function to normalize the units applied to the element.
     * @param  {number|string} value
     * @return {string} result
     * @private
     */


    function formatUnit(value) {
      var result = value + '';

      if (result === 'auto' || result.indexOf('%') !== -1 || result.indexOf('px') !== -1) {
        return result;
      }

      return result + 'px';
    }
    /**
     * Function to check whether the platform is blazor or not.
     * @return {boolean} result
     * @private
     */


    function enableBlazorMode() {
      isBlazorPlatform = true;
    }
    /**
     * Function to check whether the platform is blazor or not.
     * @return {boolean} result
     * @private
     */


    function isBlazor() {
      return isBlazorPlatform;
    }
    /**
     * Function to convert xPath to DOM element in blazor platform
     * @return {HTMLElement} result
     * @param {HTMLElement | object} element
     * @private
     */


    function getElement(element) {
      var xPath = 'xPath';

      if (!(element instanceof Node) && isBlazor() && !isNullOrUndefined(element[xPath])) {
        return document.evaluate(element[xPath], document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
      }

      return element;
    }
    /**
     * Function to fetch the Instances of a HTML element for the given component.
     * @param {string | HTMLElement} element
     * @param {any} component
     * @return {Object} inst
     * @private
     */
    // tslint:disable-next-line


    function getInstance(element, component) {
      // tslint:disable-next-line:no-any
      var elem = typeof element === 'string' ? document.querySelector(element) : element;

      if (elem[instances]) {
        var _iterator46 = _createForOfIteratorHelper(elem[instances]),
            _step46;

        try {
          for (_iterator46.s(); !(_step46 = _iterator46.n()).done;) {
            var inst = _step46.value;

            if (inst instanceof component) {
              return inst;
            }
          }
        } catch (err) {
          _iterator46.e(err);
        } finally {
          _iterator46.f();
        }
      }

      return null;
    }
    /**
     * Function to add instances for the given element.
     * @param {string | HTMLElement} element
     * @param {Object} instance
     * @return {void}
     * @private
     */


    function addInstance(element, instance) {
      // tslint:disable-next-line:no-any
      var elem = typeof element === 'string' ? document.querySelector(element) : element;

      if (elem[instances]) {
        elem[instances].push(instance);
      } else {
        elem[instances] = [instance];
      }
    }
    /**
     * Function to generate the unique id.
     * @return {any}
     * @private
     */
    // tslint:disable-next-line:no-any


    function uniqueID() {
      // tslint:disable-next-line:no-any
      if (typeof window === 'undefined') {
        return;
      } // tslint:disable-next-line:no-any


      var num = new Uint16Array(5);
      var intCrypto = window.msCrypto || window.crypto;
      return intCrypto.getRandomValues(num);
    }

    function combineArray(num) {
      var ret = '';

      for (var i = 0; i < 5; i++) {
        ret += (i ? ',' : '') + num[i];
      }

      return ret;
    }
    /**
     * Parser
     */


    var defaultNumberingSystem = {
      'latn': {
        '_digits': '0123456789',
        '_type': 'numeric'
      }
    };
    var defaultNumberSymbols = {
      'decimal': '.',
      'group': ',',
      'percentSign': '%',
      'plusSign': '+',
      'minusSign': '-',
      'infinity': '∞',
      'nan': 'NaN',
      'exponential': 'E'
    };
    var latnNumberSystem = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
    /**
     * Interface for parser base
     * @private
     */

    var ParserBase = /*#__PURE__*/function () {
      function ParserBase() {
        _classCallCheck(this, ParserBase);
      }

      _createClass2(ParserBase, null, [{
        key: "getMainObject",

        /**
         * Returns the cldr object for the culture specifies
         * @param {Object} obj - Specifies the object from which culture object to be acquired.
         * @param {string} cName - Specifies the culture name.
         * @returns {Object}
         */
        value: function getMainObject(obj, cName) {
          var value = isBlazor() ? cName : 'main.' + cName;
          return getValue(value, obj);
        }
        /**
         * Returns the numbering system object from given cldr data.
         * @param {Object} obj - Specifies the object from which number system is acquired.
         * @returns {Object}
         */

      }, {
        key: "getNumberingSystem",
        value: function getNumberingSystem(obj) {
          return getValue('supplemental.numberingSystems', obj) || this.numberingSystems;
        }
        /**
         * Returns the reverse of given object keys or keys specified.
         * @param {Object} prop - Specifies the object to be reversed.
         * @param {number[]} keys - Optional parameter specifies the custom keyList for reversal.
         * @returns {Object}
         */

      }, {
        key: "reverseObject",
        value: function reverseObject(prop, keys) {
          var propKeys = keys || Object.keys(prop);
          var res = {};

          var _iterator47 = _createForOfIteratorHelper(propKeys),
              _step47;

          try {
            for (_iterator47.s(); !(_step47 = _iterator47.n()).done;) {
              var key = _step47.value;

              /* tslint:disable no-any */
              if (!res.hasOwnProperty(prop[key])) {
                res[prop[key]] = key;
              }
            }
          } catch (err) {
            _iterator47.e(err);
          } finally {
            _iterator47.f();
          }

          return res;
        }
        /**
         * Returns the symbol regex by skipping the escape sequence.
         * @param {string[]} props - Specifies the array values to be skipped.
         * @returns {RegExp}
         */

      }, {
        key: "getSymbolRegex",
        value: function getSymbolRegex(props) {
          var regexStr = props.map(function (str) {
            return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1');
          }).join('|');
          return new RegExp(regexStr, 'g');
        }
      }, {
        key: "getSymbolMatch",
        value: function getSymbolMatch(prop) {
          var matchKeys = Object.keys(defaultNumberSymbols);
          var ret = {};

          for (var _i36 = 0, _matchKeys = matchKeys; _i36 < _matchKeys.length; _i36++) {
            var key = _matchKeys[_i36];
            ret[prop[key]] = defaultNumberSymbols[key];
          }

          return ret;
        }
        /**
         * Returns regex string for provided value
         * @param {string} val
         * @returns {string}
         */

      }, {
        key: "constructRegex",
        value: function constructRegex(val) {
          var len = val.length;
          var ret = '';

          for (var i = 0; i < len; i++) {
            if (i !== len - 1) {
              ret += val[i] + '|';
            } else {
              ret += val[i];
            }
          }

          return ret;
        }
        /**
         * Returns the replaced value of matching regex and obj mapper.
         * @param {string} value - Specifies the  values to be replaced.
         * @param {RegExp} regex - Specifies the  regex to search.
         * @param {Object} obj - Specifies the  object matcher to be replace value parts.
         * @returns {string}
         */

      }, {
        key: "convertValueParts",
        value: function convertValueParts(value, regex, obj) {
          return value.replace(regex, function (str) {
            return obj[str];
          });
        }
        /**
         * Returns default numbering system object for formatting from cldr data
         * @param {Object} obj
         * @returns {NumericObject}
         */

      }, {
        key: "getDefaultNumberingSystem",
        value: function getDefaultNumberingSystem(obj) {
          var ret = {};
          ret.obj = getValue('numbers', obj);
          ret.nSystem = getValue('defaultNumberingSystem', ret.obj);
          return ret;
        }
        /**
         * Returns the replaced value of matching regex and obj mapper.
         */

      }, {
        key: "getCurrentNumericOptions",
        value: function getCurrentNumericOptions(curObj, numberSystem, needSymbols, blazorMode) {
          var ret = {};
          var cur = this.getDefaultNumberingSystem(curObj);

          if (!isUndefined(cur.nSystem) || blazorMode) {
            var digits = blazorMode ? getValue('obj.mapperDigits', cur) : getValue(cur.nSystem + '._digits', numberSystem);

            if (!isUndefined(digits)) {
              ret.numericPair = this.reverseObject(digits, latnNumberSystem);
              ret.numberParseRegex = new RegExp(this.constructRegex(digits), 'g');
              ret.numericRegex = '[' + digits[0] + '-' + digits[9] + ']';

              if (needSymbols) {
                ret.numericRegex = digits[0] + '-' + digits[9];
                ret.symbolNumberSystem = getValue(blazorMode ? 'numberSymbols' : 'symbols-numberSystem-' + cur.nSystem, cur.obj);
                ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem);
                ret.numberSystem = cur.nSystem;
              }
            }
          }

          return ret;
        }
        /**
         * Returns number mapper object for the provided cldr data
         * @param {Object} curObj
         * @param {Object} numberSystem
         * @param {boolean} isNumber
         * @returns {NumberMapper}
         */

      }, {
        key: "getNumberMapper",
        value: function getNumberMapper(curObj, numberSystem, isNumber) {
          var ret = {
            mapper: {}
          };
          var cur = this.getDefaultNumberingSystem(curObj);

          if (!isUndefined(cur.nSystem)) {
            ret.numberSystem = cur.nSystem;
            ret.numberSymbols = getValue('symbols-numberSystem-' + cur.nSystem, cur.obj);
            ret.timeSeparator = getValue('timeSeparator', ret.numberSymbols);
            var digits = getValue(cur.nSystem + '._digits', numberSystem);

            if (!isUndefined(digits)) {
              var _iterator48 = _createForOfIteratorHelper(latnNumberSystem),
                  _step48;

              try {
                for (_iterator48.s(); !(_step48 = _iterator48.n()).done;) {
                  var i = _step48.value;
                  ret.mapper[i] = digits[i];
                }
              } catch (err) {
                _iterator48.e(err);
              } finally {
                _iterator48.f();
              }
            }
          }

          return ret;
        }
      }]);

      return ParserBase;
    }();

    ParserBase.nPair = 'numericPair';
    ParserBase.nRegex = 'numericRegex';
    ParserBase.numberingSystems = defaultNumberingSystem;
    /**
     * @private
     */

    var blazorCurrencyData = {
      'DJF': 'Fdj',
      'ERN': 'Nfk',
      'ETB': 'Br',
      'NAD': '$',
      'ZAR': 'R',
      'XAF': 'FCFA',
      'GHS': 'GH₵',
      'XDR': 'XDR',
      'AED': 'د.إ.‏',
      'BHD': 'د.ب.‏',
      'DZD': 'د.ج.‏',
      'EGP': 'ج.م.‏',
      'ILS': '₪',
      'IQD': 'د.ع.‏',
      'JOD': 'د.ا.‏',
      'KMF': 'CF',
      'KWD': 'د.ك.‏',
      'LBP': 'ل.ل.‏',
      'LYD': 'د.ل.‏',
      'MAD': 'د.م.‏',
      'MRU': 'أ.م.',
      'OMR': 'ر.ع.‏',
      'QAR': 'ر.ق.‏',
      'SAR': 'ر.س.‏',
      'SDG': 'ج.س.',
      'SOS': 'S',
      'SSP': '£',
      'SYP': 'ل.س.‏',
      'TND': 'د.ت.‏',
      'YER': 'ر.ي.‏',
      'CLP': '$',
      'INR': '₹',
      'TZS': 'TSh',
      'EUR': '€',
      'AZN': '₼',
      'RUB': '₽',
      'BYN': 'Br',
      'ZMW': 'K',
      'BGN': 'лв.',
      'NGN': '₦',
      'XOF': 'CFA',
      'BDT': '৳',
      'CNY': '¥',
      'BAM': 'КМ',
      'UGX': 'USh',
      'USD': '$',
      'CZK': 'Kč',
      'GBP': '£',
      'DKK': 'kr.',
      'KES': 'Ksh',
      'CHF': 'CHF',
      'MVR': 'ރ.',
      'BTN': 'Nu.',
      'XCD': 'EC$',
      'AUD': '$',
      'BBD': '$',
      'BIF': 'FBu',
      'BMD': '$',
      'BSD': '$',
      'BWP': 'P',
      'BZD': '$',
      'CAD': '$',
      'NZD': '$',
      'FJD': '$',
      'FKP': '£',
      'GIP': '£',
      'GMD': 'D',
      'GYD': '$',
      'HKD': '$',
      'IDR': 'Rp',
      'JMD': '$',
      'KYD': '$',
      'LRD': '$',
      'MGA': 'Ar',
      'MOP': 'MOP$',
      'MUR': 'Rs',
      'MWK': 'MK',
      'MYR': 'RM',
      'PGK': 'K',
      'PHP': '₱',
      'PKR': 'Rs',
      'RWF': 'RF',
      'SBD': '$',
      'SCR': 'SR',
      'SEK': 'kr',
      'SGD': '$',
      'SHP': '£',
      'SLL': 'Le',
      'ANG': 'NAf.',
      'SZL': 'E',
      'TOP': 'T$',
      'TTD': '$',
      'VUV': 'VT',
      'WST': 'WS$',
      'ARS': '$',
      'BOB': 'Bs',
      'BRL': 'R$',
      'COP': '$',
      'CRC': '₡',
      'CUP': '$',
      'DOP': '$',
      'GTQ': 'Q',
      'HNL': 'L',
      'MXN': '$',
      'NIO': 'C$',
      'PAB': 'B/.',
      'PEN': 'S/',
      'PYG': '₲',
      'UYU': '$',
      'VES': 'Bs.S',
      'IRR': 'ريال',
      'GNF': 'FG',
      'CDF': 'FC',
      'HTG': 'G',
      'XPF': 'FCFP',
      'HRK': 'kn',
      'HUF': 'Ft',
      'AMD': '֏',
      'ISK': 'kr',
      'JPY': '¥',
      'GEL': '₾',
      'CVE': '​',
      'KZT': '₸',
      'KHR': '៛',
      'KPW': '₩',
      'KRW': '₩',
      'KGS': 'сом',
      'AOA': 'Kz',
      'LAK': '₭',
      'MZN': 'MTn',
      'MKD': 'ден',
      'MNT': '₮',
      'BND': '$',
      'MMK': 'K',
      'NOK': 'kr',
      'NPR': 'रु',
      'AWG': 'Afl.',
      'SRD': '$',
      'PLN': 'zł',
      'AFN': '؋',
      'STN': 'Db',
      'MDL': 'L',
      'RON': 'lei',
      'UAH': '₴',
      'LKR': 'රු.',
      'ALL': 'Lekë',
      'RSD': 'дин.',
      'TJS': 'смн',
      'THB': '฿',
      'TMT': 'm.',
      'TRY': '₺',
      'UZS': 'сўм',
      'VND': '₫',
      'TWD': 'NT$'
    };

    function getBlazorCurrencySymbol(currencyCode) {
      return getValue(currencyCode || '', blazorCurrencyData);
    }
    /***
     * Hijri parser
     */


    var HijriParser;

    (function (HijriParser) {
      /* tslint:disable */
      var dateCorrection = [28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68000, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
      /* tslint:enable */

      function getHijriDate(gDate) {
        var day = gDate.getDate();
        var month = gDate.getMonth();
        var year = gDate.getFullYear();
        var tMonth = month + 1;
        var tYear = year;

        if (tMonth < 3) {
          tYear -= 1;
          tMonth += 12;
        }

        var yPrefix = Math.floor(tYear / 100.);
        var julilanOffset = yPrefix - Math.floor(yPrefix / 4.) - 2;
        var julianNumber = Math.floor(365.25 * (tYear + 4716)) + Math.floor(30.6001 * (tMonth + 1)) + day - julilanOffset - 1524;
        yPrefix = Math.floor((julianNumber - 1867216.25) / 36524.25);
        julilanOffset = yPrefix - Math.floor(yPrefix / 4.) + 1;
        var b = julianNumber + julilanOffset + 1524;
        var c = Math.floor((b - 122.1) / 365.25);
        var d = Math.floor(365.25 * c);
        var tempMonth = Math.floor((b - d) / 30.6001);
        day = b - d - Math.floor(30.6001 * tempMonth);
        month = Math.floor((b - d) / 20.6001);

        if (month > 13) {
          c += 1;
          month -= 12;
        }

        month -= 1;
        year = c - 4716;
        var modifiedJulianDate = julianNumber - 2400000; // date calculation for year after 2077

        var iyear = 10631. / 30.;
        var z = julianNumber - 1948084;
        var cyc = Math.floor(z / 10631.);
        z = z - 10631 * cyc;
        var j = Math.floor((z - 0.1335) / iyear);
        var iy = 30 * cyc + j;
        z = z - Math.floor(j * iyear + 0.1335);
        var im = Math.floor((z + 28.5001) / 29.5);
        /* istanbul ignore next */

        if (im === 13) {
          im = 12;
        }

        var tempDay = z - Math.floor(29.5001 * im - 29);
        var i = 0;

        for (; i < dateCorrection.length; i++) {
          if (dateCorrection[i] > modifiedJulianDate) {
            break;
          }
        }

        var iln = i + 16260;
        var ii = Math.floor((iln - 1) / 12);
        var hYear = ii + 1;
        var hmonth = iln - 12 * ii;
        var hDate = modifiedJulianDate - dateCorrection[i - 1] + 1;

        if ((hDate + '').length > 2) {
          hDate = tempDay;
          hmonth = im;
          hYear = iy;
        }

        return {
          year: hYear,
          month: hmonth,
          date: hDate
        };
      }

      HijriParser.getHijriDate = getHijriDate;

      function toGregorian(year, month, day) {
        var iy = year;
        var im = month;
        var id = day;
        var ii = iy - 1;
        var iln = ii * 12 + 1 + (im - 1);
        var i = iln - 16260;
        var mcjdn = id + dateCorrection[i - 1] - 1;
        var julianDate = mcjdn + 2400000;
        var z = Math.floor(julianDate + 0.5);
        var a = Math.floor((z - 1867216.25) / 36524.25);
        a = z + 1 + a - Math.floor(a / 4);
        var b = a + 1524;
        var c = Math.floor((b - 122.1) / 365.25);
        var d = Math.floor(365.25 * c);
        var e = Math.floor((b - d) / 30.6001);
        var gDay = b - d - Math.floor(e * 30.6001);
        var gMonth = e - (e > 13.5 ? 13 : 1);
        var gYear = c - (gMonth > 2.5 ? 4716 : 4715);
        /* istanbul ignore next */

        if (gYear <= 0) {
          gMonth--;
        } // No year zero


        return new Date(gYear + '/' + gMonth + '/' + gDay);
      }

      HijriParser.toGregorian = toGregorian;
    })(HijriParser || (HijriParser = {}));

    var abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi;
    var standalone = 'stand-alone';
    var weekdayKey = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
    var timeSetter = {
      m: 'getMinutes',
      h: 'getHours',
      H: 'getHours',
      s: 'getSeconds',
      d: 'getDate',
      f: 'getMilliseconds'
    };
    var datePartMatcher = {
      'M': 'month',
      'd': 'day',
      'E': 'weekday',
      'c': 'weekday',
      'y': 'year',
      'm': 'minute',
      'h': 'hour',
      'H': 'hour',
      's': 'second',
      'L': 'month',
      'a': 'designator',
      'z': 'timeZone',
      'Z': 'timeZone',
      'G': 'era',
      'f': 'milliseconds'
    };
    var timeSeparator = 'timeSeparator';
    /* tslint:disable no-any */

    /**
     * Date Format is a framework provides support for date formatting.
     * @private
     */

    var DateFormat = /*#__PURE__*/function () {
      function DateFormat() {
        _classCallCheck(this, DateFormat);
      }

      _createClass2(DateFormat, null, [{
        key: "dateFormat",

        /**
         * Returns the formatter function for given skeleton.
         * @param {string} -  Specifies the culture name to be which formatting.
         * @param {DateFormatOptions} - Specific the format in which date  will format.
         * @param {cldr} - Specifies the global cldr data collection.
         * @return Function.
         */
        value: function dateFormat(culture, option, cldr) {
          var _this408 = this;

          var dependable = IntlBase.getDependables(cldr, culture, option.calendar);
          var numObject = getValue('parserObject.numbers', dependable);
          var dateObject = dependable.dateObject;
          var formatOptions = {
            isIslamic: IntlBase.islamicRegex.test(option.calendar)
          };

          if (isBlazor() && option.isServerRendered) {
            option = IntlBase.compareBlazorDateFormats(option, culture);
          }

          var resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : '');
          formatOptions.dateSeperator = isBlazor() ? getValue('dateSeperator', dateObject) : IntlBase.getDateSeparator(dependable.dateObject);

          if (isUndefined(resPattern)) {
            throwError('Format options or type given must be invalid');
          } else {
            resPattern = IntlBase.ConvertDateToWeekFormat(resPattern);

            if (isBlazor()) {
              resPattern = resPattern.replace(/tt/, 'a');
            }

            formatOptions.pattern = resPattern;
            formatOptions.numMapper = isBlazor() ? extend({}, numObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
            var patternMatch = resPattern.match(abbreviateRegexGlobal) || [];

            var _iterator49 = _createForOfIteratorHelper(patternMatch),
                _step49;

            try {
              for (_iterator49.s(); !(_step49 = _iterator49.n()).done;) {
                var str = _step49.value;
                var _len22 = str.length;
                var _char7 = str[0];

                if (_char7 === 'K') {
                  _char7 = 'h';
                }
                /* tslint:disable no-any */


                switch (_char7) {
                  case 'E':
                  case 'c':
                    if (isBlazor()) {
                      formatOptions.weekday = getValue('days.' + IntlBase.monthIndex[_len22], dateObject);
                    } else {
                      formatOptions.weekday = dependable.dateObject[IntlBase.days][standalone][IntlBase.monthIndex[_len22]];
                    }

                    break;

                  case 'M':
                  case 'L':
                    if (isBlazor()) {
                      formatOptions.month = getValue('months.' + IntlBase.monthIndex[_len22], dateObject);
                    } else {
                      formatOptions.month = dependable.dateObject[IntlBase.month][standalone][IntlBase.monthIndex[_len22]];
                    }

                    break;

                  case 'a':
                    formatOptions.designator = isBlazor() ? getValue('dayPeriods', dateObject) : getValue('dayPeriods.format.wide', dateObject);
                    break;

                  case 'G':
                    var eText = _len22 <= 3 ? 'eraAbbr' : _len22 === 4 ? 'eraNames' : 'eraNarrow';
                    formatOptions.era = isBlazor() ? getValue('eras', dateObject) : getValue('eras.' + eText, dependable.dateObject);
                    break;

                  case 'z':
                    formatOptions.timeZone = getValue('dates.timeZoneNames', dependable.parserObject);
                    break;
                }
              }
            } catch (err) {
              _iterator49.e(err);
            } finally {
              _iterator49.f();
            }
          }

          return function (value) {
            if (isNaN(value.getDate())) {
              return null;
            }

            return _this408.intDateFormatter(value, formatOptions);
          };
        }
        /**
         * Returns formatted date string based on options passed.
         * @param {Date} value
         * @param {FormatOptions} options
         */
        // tslint:disable-next-line:max-func-body-length

      }, {
        key: "intDateFormatter",
        value: function intDateFormatter(value, options) {
          var pattern = options.pattern;
          var ret = '';
          var matches = pattern.match(IntlBase.dateParseRegex);
          var dObject = this.getCurrentDateValue(value, options.isIslamic);

          var _iterator50 = _createForOfIteratorHelper(matches),
              _step50;

          try {
            for (_iterator50.s(); !(_step50 = _iterator50.n()).done;) {
              var match = _step50.value;
              var length = match.length;
              var _char8 = match[0];

              if (_char8 === 'K') {
                _char8 = 'h';
              }

              var curval = void 0;
              var curvalstr = '';
              var isNumber = void 0;
              var processNumber = void 0;
              var curstr = '';

              switch (_char8) {
                case 'M':
                case 'L':
                  curval = dObject.month;

                  if (length > 2) {
                    ret += options.month[curval];
                  } else {
                    isNumber = true;
                  }

                  break;

                case 'E':
                case 'c':
                  ret += options.weekday[weekdayKey[value.getDay()]];
                  break;

                case 'H':
                case 'h':
                case 'm':
                case 's':
                case 'd':
                case 'f':
                  isNumber = true;

                  if (_char8 === 'd') {
                    curval = dObject.date;
                  } else if (_char8 === 'f') {
                    isNumber = false;
                    processNumber = true;
                    curvalstr = value[timeSetter[_char8]]().toString();
                    curvalstr = curvalstr.substring(0, length);
                    var curlength = curvalstr.length;

                    if (length !== curlength) {
                      if (length > 3) {
                        continue;
                      }

                      for (var i = 0; i < length - curlength; i++) {
                        curvalstr = '0' + curvalstr.toString();
                      }
                    }

                    curstr += curvalstr;
                  } else {
                    curval = value[timeSetter[_char8]]();
                  }

                  if (_char8 === 'h') {
                    curval = curval % 12 || 12;
                  }

                  break;

                case 'y':
                  processNumber = true;
                  curstr += dObject.year;

                  if (length === 2) {
                    curstr = curstr.substr(curstr.length - 2);
                  }

                  break;

                case 'a':
                  var desig = value.getHours() < 12 ? 'am' : 'pm';
                  ret += options.designator[desig];
                  break;

                case 'G':
                  var dec = value.getFullYear() < 0 ? 0 : 1;
                  var retu = options.era[dec];

                  if (isNullOrUndefined(retu)) {
                    retu = options.era[dec ? 0 : 1];
                  }

                  ret += retu || '';
                  break;

                case '\'':
                  ret += match === '\'\'' ? '\'' : match.replace(/\'/g, '');
                  break;

                case 'z':
                  var timezone = value.getTimezoneOffset();

                  var _pattern2 = length < 4 ? '+H;-H' : options.timeZone.hourFormat;

                  _pattern2 = _pattern2.replace(/:/g, options.numMapper.timeSeparator);

                  if (timezone === 0) {
                    ret += options.timeZone.gmtZeroFormat;
                  } else {
                    processNumber = true;
                    curstr = this.getTimeZoneValue(timezone, _pattern2);
                  }

                  curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
                  break;

                case ':':
                  ret += options.numMapper.numberSymbols[timeSeparator];
                  /* tslint:enable no-any */

                  break;

                case '/':
                  ret += options.dateSeperator;
                  break;

                case 'W':
                  isNumber = true;
                  curval = IntlBase.getWeekOfYear(value);
                  break;

                default:
                  ret += match;
              }

              if (isNumber) {
                processNumber = true;
                curstr = this.checkTwodigitNumber(curval, length);
              }

              if (processNumber) {
                ret += ParserBase.convertValueParts(curstr, IntlBase.latnParseRegex, options.numMapper.mapper);
              }
            }
          } catch (err) {
            _iterator50.e(err);
          } finally {
            _iterator50.f();
          }

          return ret;
        }
      }, {
        key: "getCurrentDateValue",
        value: function getCurrentDateValue(value, isIslamic) {
          if (isIslamic) {
            return HijriParser.getHijriDate(value);
          }

          return {
            year: value.getFullYear(),
            month: value.getMonth() + 1,
            date: value.getDate()
          };
        }
        /**
         * Returns two digit numbers for given value and length
         */

      }, {
        key: "checkTwodigitNumber",
        value: function checkTwodigitNumber(val, len) {
          var ret = val + '';

          if (len === 2 && ret.length !== 2) {
            return '0' + ret;
          }

          return ret;
        }
        /**
         * Returns the value of the Time Zone.
         * @param {number} tVal
         * @param {string} pattern
         * @private
         */

      }, {
        key: "getTimeZoneValue",
        value: function getTimeZoneValue(tVal, pattern) {
          var _this409 = this;

          var splt = pattern.split(';');
          var curPattern = splt[tVal > 0 ? 1 : 0];
          var no = Math.abs(tVal);
          return curPattern = curPattern.replace(/HH?|mm/g, function (str) {
            var len = str.length;
            var ishour = str.indexOf('H') !== -1;
            return _this409.checkTwodigitNumber(Math.floor(ishour ? no / 60 : no % 60), len);
          });
        }
      }]);

      return DateFormat;
    }();

    var errorText = {
      'ms': 'minimumSignificantDigits',
      'ls': 'maximumSignificantDigits',
      'mf': 'minimumFractionDigits',
      'lf': 'maximumFractionDigits'
    };
    var percentSign = 'percentSign';
    var minusSign = 'minusSign';
    var mapper$1 = ['infinity', 'nan', 'group', 'decimal', 'exponential'];
    /**
     * Module for number formatting.
     * @private
     */

    var NumberFormat = /*#__PURE__*/function () {
      function NumberFormat() {
        _classCallCheck(this, NumberFormat);
      }

      _createClass2(NumberFormat, null, [{
        key: "numberFormatter",

        /**
         * Returns the formatter function for given skeleton.
         * @param {string} culture -  Specifies the culture name to be which formatting.
         * @param {NumberFormatOptions} option - Specific the format in which number  will format.
         * @param {Object} object- Specifies the global cldr data collection.
         * @return Function.
         */
        value: function numberFormatter(culture, option, cldr) {
          var _this410 = this;

          var fOptions = extend({}, option);
          var cOptions = {};
          var dOptions = {};
          var symbolPattern;
          var dependable = IntlBase.getDependables(cldr, culture, '', true);
          var numObject = dependable.numericObject;
          dOptions.numberMapper = isBlazor() ? extend({}, numObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true);
          dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : IntlBase.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);
          /* tslint:disable no-any */

          dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) : dOptions.numberMapper.numberSymbols[percentSign];
          dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) : dOptions.numberMapper.numberSymbols[minusSign];
          var symbols = dOptions.numberMapper.numberSymbols;

          if (option.format && !IntlBase.formatRegex.test(option.format)) {
            cOptions = IntlBase.customFormat(option.format, dOptions, dependable.numericObject);
          } else {
            extend(fOptions, IntlBase.getProperNumericSkeleton(option.format || 'N'));
            fOptions.isCurrency = fOptions.type === 'currency';
            fOptions.isPercent = fOptions.type === 'percent';

            if (!isBlazor()) {
              symbolPattern = IntlBase.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount);
            }

            fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, true);
            this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, false, true);

            if (!isUndefined(fOptions.fractionDigits)) {
              fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits;
            }

            if (isUndefined(fOptions.useGrouping)) {
              fOptions.useGrouping = true;
            }

            if (fOptions.isCurrency && !isBlazor()) {
              symbolPattern = symbolPattern.replace(/\u00A4/g, IntlBase.defaultCurrency);
            }

            if (!isBlazor()) {
              var split = symbolPattern.split(';');
              cOptions.nData = IntlBase.getFormatData(split[1] || '-' + split[0], true, dOptions.currencySymbol);
              cOptions.pData = IntlBase.getFormatData(split[0], false, dOptions.currencySymbol);

              if (fOptions.useGrouping) {
                fOptions.groupSeparator = symbols[mapper$1[2]];
                fOptions.groupData = this.getGroupingDetails(split[0]);
              }
            } else {
              cOptions.nData = extend({}, {}, getValue(fOptions.type + 'nData', numObject));
              cOptions.pData = extend({}, {}, getValue(fOptions.type + 'pData', numObject));

              if (fOptions.type === 'currency' && option.currency) {
                IntlBase.replaceBlazorCurrency([cOptions.pData, cOptions.nData], dOptions.currencySymbol, option.currency);
              }
            }

            var minFrac = isUndefined(fOptions.minimumFractionDigits);

            if (minFrac) {
              fOptions.minimumFractionDigits = cOptions.nData.minimumFraction;
            }

            if (isUndefined(fOptions.maximumFractionDigits)) {
              var mval = cOptions.nData.maximumFraction;
              fOptions.maximumFractionDigits = isUndefined(mval) && fOptions.isPercent ? 0 : mval;
            }

            var mfrac = fOptions.minimumFractionDigits;
            var lfrac = fOptions.maximumFractionDigits;

            if (!isUndefined(mfrac) && !isUndefined(lfrac)) {
              if (mfrac > lfrac) {
                fOptions.maximumFractionDigits = mfrac;
              }
            }
          }

          extend(cOptions.nData, fOptions);
          extend(cOptions.pData, fOptions);
          return function (value) {
            if (isNaN(value)) {
              return symbols[mapper$1[1]];
            } else if (!isFinite(value)) {
              return symbols[mapper$1[0]];
            }

            return _this410.intNumberFormatter(value, cOptions, dOptions);
          };
        }
        /**
         * Returns grouping details for the pattern provided
         * @param {string} pattern
         * @returns {GroupDetails}
         */

      }, {
        key: "getGroupingDetails",
        value: function getGroupingDetails(pattern) {
          var ret = {};
          var match = pattern.match(IntlBase.negativeDataRegex);

          if (match && match[4]) {
            var _pattern3 = match[4];

            var p = _pattern3.lastIndexOf(',');

            if (p !== -1) {
              var temp = _pattern3.split('.')[0];

              ret.primary = temp.length - p - 1;

              var s = _pattern3.lastIndexOf(',', p - 1);

              if (s !== -1) {
                ret.secondary = p - 1 - s;
              }
            }
          }

          return ret;
        }
        /**
         * Returns if the provided integer range is valid.
         * @param {number} val1
         * @param {number} val2
         * @param {boolean} checkbothExist
         * @param {boolean} isFraction
         * @returns {boolean}
         */

      }, {
        key: "checkValueRange",
        value: function checkValueRange(val1, val2, checkbothExist, isFraction) {
          var decide = isFraction ? 'f' : 's';
          var dint = 0;
          var str1 = errorText['l' + decide];
          var str2 = errorText['m' + decide];

          if (!isUndefined(val1)) {
            this.checkRange(val1, str1, isFraction);
            dint++;
          }

          if (!isUndefined(val2)) {
            this.checkRange(val2, str2, isFraction);
            dint++;
          }

          if (dint === 2) {
            if (val1 < val2) {
              throwError(str2 + 'specified must be less than the' + str1);
            } else {
              return true;
            }
          } else if (checkbothExist && dint === 1) {
            throwError('Both' + str2 + 'and' + str2 + 'must be present');
          }

          return false;
        }
        /**
         * Check if the provided fraction range is valid
         * @param {number} val
         * @param {string} text
         * @param {boolean} isFraction
         * @returns {void}
         */

      }, {
        key: "checkRange",
        value: function checkRange(val, text, isFraction) {
          var range = isFraction ? [0, 20] : [1, 21];

          if (val < range[0] || val > range[1]) {
            throwError(text + 'value must be within the range' + range[0] + 'to' + range[1]);
          }
        }
        /**
         * Returns formatted numeric string for provided formatting options
         * @param {number} value
         * @param {base.GenericFormatOptions} fOptions
         * @param {CommonOptions} dOptions
         * @returns {string}
         */

      }, {
        key: "intNumberFormatter",
        value: function intNumberFormatter(value, fOptions, dOptions) {
          var curData;

          if (isUndefined(fOptions.nData.type)) {
            return undefined;
          } else {
            if (value < 0) {
              value = value * -1;
              curData = fOptions.nData;
            } else if (value === 0) {
              curData = fOptions.zeroData || fOptions.pData;
            } else {
              curData = fOptions.pData;
            }

            var fValue = '';

            if (curData.isPercent) {
              value = value * 100;
            }

            if (curData.groupOne) {
              fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);
            } else {
              fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits);

              if (curData.minimumIntegerDigits) {
                fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
              }
            }

            if (curData.type === 'scientific') {
              fValue = value.toExponential(curData.maximumFractionDigits);
              fValue = fValue.replace('e', dOptions.numberMapper.numberSymbols[mapper$1[4]]);
            }

            fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper$1[3]]);

            if (curData.useGrouping) {
              fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper$1[3]] || '.', curData.groupData.secondary);
            }

            fValue = ParserBase.convertValueParts(fValue, IntlBase.latnParseRegex, dOptions.numberMapper.mapper);

            if (curData.nlead === 'N/A') {
              return curData.nlead;
            } else {
              return curData.nlead + fValue + curData.nend;
            }
          }
        }
        /**
         * Returns significant digits processed numeric string
         * @param {number} value
         * @param {number} min
         * @param {number} max
         * @returns {string}
         */

      }, {
        key: "processSignificantDigits",
        value: function processSignificantDigits(value, min, max) {
          var temp = value + '';
          var tn;
          var length = temp.length;

          if (length < min) {
            return value.toPrecision(min);
          } else {
            temp = value.toPrecision(max);
            tn = +temp;
            return tn + '';
          }
        }
        /**
         * Returns grouped numeric string
         * @param {string} val
         * @param {number} level1
         * @param {string} sep
         * @param {string} decimalSymbol
         * @param {number} level2
         * @returns {string}
         */

      }, {
        key: "groupNumbers",
        value: function groupNumbers(val, level1, sep, decimalSymbol, level2) {
          var flag = !isNullOrUndefined(level2) && level2 !== 0;
          var split = val.split(decimalSymbol);
          var prefix = split[0];
          var length = prefix.length;
          var str = '';

          while (length > level1) {
            str = prefix.slice(length - level1, length) + (str.length ? sep + str : '');
            length -= level1;

            if (flag) {
              level1 = level2;
              flag = false;
            }
          }

          split[0] = prefix.slice(0, length) + (str.length ? sep : '') + str;
          return split.join(decimalSymbol);
        }
        /**
         * Returns fraction processed numeric string
         * @param {number} value
         * @param {number} min
         * @param {number} max
         * @returns {string}
         */

      }, {
        key: "processFraction",
        value: function processFraction(value, min, max) {
          var temp = (value + '').split('.')[1];
          var length = temp ? temp.length : 0;

          if (min && length < min) {
            var ret = '';

            if (length === 0) {
              ret = value.toFixed(min);
            } else {
              ret += value;

              for (var j = 0; j < min - length; j++) {
                ret += '0';
              }

              return ret;
            }

            return value.toFixed(min);
          } else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
            return value.toFixed(max);
          }

          return value + '';
        }
        /**
         * Returns integer processed numeric string
         * @param {string} value
         * @param {number} min
         * @returns {string}
         */

      }, {
        key: "processMinimumIntegers",
        value: function processMinimumIntegers(value, min) {
          var temp = value.split('.');
          var lead = temp[0];
          var len = lead.length;

          if (len < min) {
            for (var i = 0; i < min - len; i++) {
              lead = '0' + lead;
            }

            temp[0] = lead;
          }

          return temp.join('.');
        }
      }]);

      return NumberFormat;
    }();

    var standalone$1 = 'stand-alone';
    var latnRegex$1 = /^[0-9]*$/;
    var timeSetter$1 = {
      minute: 'setMinutes',
      hour: 'setHours',
      second: 'setSeconds',
      day: 'setDate',
      month: 'setMonth',
      milliseconds: 'setMilliseconds'
    };
    var month = 'months';
    /* tslint:disable no-any */

    /**
     * Date Parser.
     * @private
     */

    var DateParser = /*#__PURE__*/function () {
      function DateParser() {
        _classCallCheck(this, DateParser);
      }

      _createClass2(DateParser, null, [{
        key: "dateParser",

        /**
         * Returns the parser function for given skeleton.
         * @param {string} -  Specifies the culture name to be which formatting.
         * @param {DateFormatOptions} - Specific the format in which string date  will be parsed.
         * @param {cldr} - Specifies the global cldr data collection.
         *  @return Function.
         */
        // tslint:disable-next-line:max-func-body-length
        value: function dateParser(culture, option, cldr) {
          var _this411 = this;

          var dependable = IntlBase.getDependables(cldr, culture, option.calendar); // tslint:disable-next-line

          var numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), false, isBlazor());
          var parseOptions = {};

          if (isBlazor() && option.isServerRendered) {
            option = IntlBase.compareBlazorDateFormats(option, culture);
          }

          var resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type, false, isBlazor() ? culture : '');
          var regexString = '';
          var hourOnly;

          if (isUndefined(resPattern)) {
            throwError('Format options or type given must be invalid');
          } else {
            resPattern = IntlBase.ConvertDateToWeekFormat(resPattern);
            parseOptions = {
              isIslamic: IntlBase.islamicRegex.test(option.calendar),
              pattern: resPattern,
              evalposition: {},
              culture: culture
            };
            var patternMatch = resPattern.match(IntlBase.dateParseRegex) || [];
            var length = patternMatch.length;
            var gmtCorrection = 0;
            var zCorrectTemp = 0;
            var isgmtTraversed = false;
            var nRegx = numOptions.numericRegex; // tslint:disable-next-line

            var numMapper = isBlazor() ? dependable.parserObject.numbers : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));

            for (var i = 0; i < length; i++) {
              var str = patternMatch[i];
              var _len23 = str.length;

              var _char9 = str[0] === 'K' ? 'h' : str[0];

              var isNumber = void 0;
              var canUpdate = void 0; // tslint:disable-next-line

              var charKey = datePartMatcher[_char9];
              var optional = _len23 === 2 ? '' : '?';

              if (isgmtTraversed) {
                gmtCorrection = zCorrectTemp;
                isgmtTraversed = false;
              }

              switch (_char9) {
                case 'E':
                case 'c':
                  // tslint:disable
                  var weekData = void 0;

                  if (isBlazor()) {
                    weekData = getValue('days.' + IntlBase.monthIndex[_len23], dependable.dateObject);
                  } else {
                    weekData = dependable.dateObject[IntlBase.days][standalone$1][IntlBase.monthIndex[_len23]];
                  }

                  var weekObject = ParserBase.reverseObject(weekData); // tslint:enable

                  regexString += '(' + Object.keys(weekObject).join('|') + ')';
                  break;

                case 'M':
                case 'L':
                case 'd':
                case 'm':
                case 's':
                case 'h':
                case 'H':
                case 'f':
                  canUpdate = true;

                  if ((_char9 === 'M' || _char9 === 'L') && _len23 > 2) {
                    var monthData = void 0;

                    if (isBlazor()) {
                      /* tslint:disable no-any */
                      monthData = getValue('months.' + IntlBase.monthIndex[_len23], dependable.dateObject);
                    } else {
                      /* tslint:disable no-any */
                      monthData = dependable.dateObject[month][standalone$1][IntlBase.monthIndex[_len23]];
                    } // tslint:disable-next-line


                    parseOptions[charKey] = ParserBase.reverseObject(monthData);
                    /* tslint:disable no-any */

                    regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
                  } else if (_char9 === 'f') {
                    if (_len23 > 3) {
                      continue;
                    }

                    isNumber = true;
                    regexString += '(' + nRegx + nRegx + '?' + nRegx + '?' + ')';
                  } else {
                    isNumber = true;
                    regexString += '(' + nRegx + nRegx + optional + ')';
                  }

                  if (_char9 === 'h') {
                    parseOptions.hour12 = true;
                  }

                  break;

                case 'W':
                  var opt = _len23 === 1 ? '?' : '';
                  regexString += '(' + nRegx + opt + nRegx + ')';
                  break;

                case 'y':
                  canUpdate = isNumber = true;

                  if (_len23 === 2) {
                    regexString += '(' + nRegx + nRegx + ')';
                  } else {
                    regexString += '(' + nRegx + '{' + _len23 + ',})';
                  }

                  break;

                case 'a':
                  canUpdate = true;
                  var periodValur = isBlazor() ? getValue('dayPeriods', dependable.dateObject) : getValue('dayPeriods.format.wide', dependable.dateObject);
                  parseOptions[charKey] = ParserBase.reverseObject(periodValur);
                  regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + ')';
                  break;

                case 'G':
                  canUpdate = true;
                  var eText = _len23 <= 3 ? 'eraAbbr' : _len23 === 4 ? 'eraNames' : 'eraNarrow';
                  parseOptions[charKey] = ParserBase.reverseObject(isBlazor() ? getValue('eras', dependable.dateObject) : getValue('eras.' + eText, dependable.dateObject));
                  regexString += '(' + Object.keys(parseOptions[charKey]).join('|') + '?)';
                  break;

                case 'z':
                  var tval = new Date().getTimezoneOffset();
                  canUpdate = tval !== 0;
                  parseOptions[charKey] = getValue('dates.timeZoneNames', dependable.parserObject);
                  var tzone = parseOptions[charKey];
                  hourOnly = _len23 < 4;
                  var hpattern = hourOnly ? '+H;-H' : tzone.hourFormat;
                  hpattern = hpattern.replace(/:/g, numMapper.timeSeparator);
                  regexString += '(' + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ')?';
                  isgmtTraversed = true;
                  zCorrectTemp = hourOnly ? 6 : 12;
                  break;

                case '\'':
                  var iString = str.replace(/\'/g, '');
                  regexString += '(' + iString + ')?';
                  break;

                default:
                  regexString += '([\\D])';
                  break;
              }

              if (canUpdate) {
                parseOptions.evalposition[charKey] = {
                  isNumber: isNumber,
                  pos: i + 1 + gmtCorrection,
                  hourOnly: hourOnly
                };
              }

              if (i === length - 1 && !isNullOrUndefined(regexString)) {
                parseOptions.parserRegex = new RegExp('^' + regexString + '$', 'i');
              }
            }
          }

          return function (value) {
            var parsedDateParts = _this411.internalDateParse(value, parseOptions, numOptions);

            if (isNullOrUndefined(parsedDateParts) || !Object.keys(parsedDateParts).length) {
              return null;
            }

            if (parseOptions.isIslamic) {
              var dobj = {};
              var tYear = parsedDateParts.year;
              var tDate = parsedDateParts.day;
              var tMonth = parsedDateParts.month;
              var ystrig = tYear ? tYear + '' : '';
              var is2DigitYear = ystrig.length === 2;

              if (!tYear || !tMonth || !tDate || is2DigitYear) {
                dobj = HijriParser.getHijriDate(new Date());
              }

              if (is2DigitYear) {
                tYear = parseInt((dobj.year + '').slice(0, 2) + ystrig, 10);
              } // tslint:disable-next-line


              var dateObject = HijriParser.toGregorian(tYear || dobj.year, tMonth || dobj.month, tDate || dobj.date);
              parsedDateParts.year = dateObject.getFullYear();
              parsedDateParts.month = dateObject.getMonth() + 1;
              parsedDateParts.day = dateObject.getDate();
            }

            return _this411.getDateObject(parsedDateParts);
          };
        }
        /* tslint:disable */

        /**
         * Returns date object for provided date options
         * @param {DateParts} options
         * @param {Date} value
         * @returns {Date}
         */

      }, {
        key: "getDateObject",
        value: function getDateObject(options, value) {
          var res = value || new Date();
          res.setMilliseconds(0);
          var tKeys = ['hour', 'minute', 'second', 'milliseconds', 'month', 'day'];
          var y = options.year;
          var desig = options.designator;
          var tzone = options.timeZone;

          if (!isUndefined(y)) {
            var _len24 = (y + '').length;

            if (_len24 <= 2) {
              var century = Math.floor(res.getFullYear() / 100) * 100;
              y += century;
            }

            res.setFullYear(y);
          }

          for (var _i37 = 0, _tKeys = tKeys; _i37 < _tKeys.length; _i37++) {
            var key = _tKeys[_i37];
            var tValue = options[key];

            if (isUndefined(tValue) && key === "day") {
              res.setDate(1);
            }

            if (!isUndefined(tValue)) {
              if (key === 'month') {
                tValue -= 1;

                if (tValue < 0 || tValue > 11) {
                  return new Date('invalid');
                }

                var pDate = res.getDate();
                res.setDate(1);
                res[timeSetter$1[key]](tValue);
                var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
                res.setDate(pDate < lDate ? pDate : lDate);
              } else {
                if (key === 'day') {
                  var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();

                  if (tValue < 1 || tValue > lastDay) {
                    return null;
                  }
                }

                res[timeSetter$1[key]](tValue);
              }
            }
          }

          if (!isUndefined(desig)) {
            var hour = res.getHours();

            if (desig === 'pm') {
              res.setHours(hour + (hour === 12 ? 0 : 12));
            } else if (hour === 12) {
              res.setHours(0);
            }
          }

          if (!isUndefined(tzone)) {
            var tzValue = tzone - res.getTimezoneOffset();

            if (tzValue !== 0) {
              res.setMinutes(res.getMinutes() + tzValue);
            }
          }

          return res;
        }
        /**
         * Returns date parsing options for provided value along with parse and numeric options
         * @param {string} value
         * @param {ParseOptions} parseOptions
         * @param {NumericOptions} num
         * @returns {DateParts}
         */

      }, {
        key: "internalDateParse",
        value: function internalDateParse(value, parseOptions, num) {
          var matches = value.match(parseOptions.parserRegex);
          var retOptions = {
            'hour': 0,
            'minute': 0,
            'second': 0
          };
          var nRegx = num.numericRegex;

          if (isNullOrUndefined(matches)) {
            return null;
          } else {
            var props = Object.keys(parseOptions.evalposition);

            for (var _i38 = 0, _props = props; _i38 < _props.length; _i38++) {
              var prop = _props[_i38];
              var curObject = parseOptions.evalposition[prop];
              var matchString = matches[curObject.pos];

              if (curObject.isNumber) {
                retOptions[prop] = this.internalNumberParser(matchString, num);
              } else {
                if (prop === 'timeZone' && !isUndefined(matchString)) {
                  var pos = curObject.pos;
                  var val = void 0;
                  var tmatch = matches[pos + 1];
                  var flag = !isUndefined(tmatch);

                  if (curObject.hourOnly) {
                    val = this.getZoneValue(flag, tmatch, matches[pos + 4], num) * 60;
                  } else {
                    val = this.getZoneValue(flag, tmatch, matches[pos + 7], num) * 60;
                    val += this.getZoneValue(flag, matches[pos + 4], matches[pos + 10], num);
                  }

                  if (!isNullOrUndefined(val)) {
                    retOptions[prop] = val;
                  }
                } else {
                  matchString = prop === 'month' && !parseOptions.isIslamic && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US') ? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
                  retOptions[prop] = parseOptions[prop][matchString];
                }
              }
            }

            if (parseOptions.hour12) {
              retOptions.hour12 = true;
            }
          }

          return retOptions;
        }
        /**
         * Returns parsed number for provided Numeric string and Numeric Options
         * @param {string} value
         * @param {NumericOptions} option
         * @returns {number}
         */

      }, {
        key: "internalNumberParser",
        value: function internalNumberParser(value, option) {
          value = ParserBase.convertValueParts(value, option.numberParseRegex, option.numericPair);

          if (latnRegex$1.test(value)) {
            return +value;
          }

          return null;
        }
        /**
         * Returns parsed time zone RegExp for provided hour format and time zone
         * @param {string} hourFormat
         * @param {base.TimeZoneOptions} tZone
         * @param {string} nRegex
         * @returns {string}
         */

      }, {
        key: "parseTimeZoneRegx",
        value: function parseTimeZoneRegx(hourFormat, tZone, nRegex) {
          var pattern = tZone.gmtFormat;
          var ret;
          var cRegex = '(' + nRegex + ')' + '(' + nRegex + ')';
          var splitStr;
          ret = hourFormat.replace('+', '\\+');

          if (hourFormat.indexOf('HH') !== -1) {
            ret = ret.replace(/HH|mm/g, '(' + cRegex + ')');
          } else {
            ret = ret.replace(/H|m/g, '(' + cRegex + '?)');
          }

          splitStr = ret.split(';').map(function (str) {
            return pattern.replace('{0}', str);
          });
          ret = splitStr.join('|') + '|' + tZone.gmtZeroFormat;
          return ret;
        }
        /**
         * Returns zone based value.
         * @param {boolean} flag
         * @param {string} val1
         * @param {string} val2
         * @param {NumericOptions} num
         * @returns {number}
         */

      }, {
        key: "getZoneValue",
        value: function getZoneValue(flag, val1, val2, num) {
          var ival = flag ? val1 : val2;

          if (!ival) {
            return 0;
          }

          var value = this.internalNumberParser(ival, num);

          if (flag) {
            return -value;
          }

          return value;
        }
      }]);

      return DateParser;
    }();
    /* tslint:enable */


    var parseRegex = /^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/;
    var groupRegex = /,/g;
    var keys = ['minusSign', 'infinity'];
    /**
     * Module for Number Parser.
     * @private
     */

    var NumberParser = /*#__PURE__*/function () {
      function NumberParser() {
        _classCallCheck(this, NumberParser);
      }

      _createClass2(NumberParser, null, [{
        key: "numberParser",

        /**
         * Returns the parser function for given skeleton.
         * @param {string} -  Specifies the culture name to be which formatting.
         * @param {NumberFormatOptions} - Specific the format in which number  will parsed.
         * @param {cldr} - Specifies the global cldr data collection.
         * @return Function.
         */
        value: function numberParser(culture, option, cldr) {
          var _this412 = this;

          var dependable = IntlBase.getDependables(cldr, culture, '', true);
          var parseOptions = {
            custom: true
          };
          var numOptions;

          if (IntlBase.formatRegex.test(option.format) || !option.format) {
            extend(parseOptions, IntlBase.getProperNumericSkeleton(option.format || 'N'));
            parseOptions.custom = false;
          } else {
            extend(parseOptions, IntlBase.customFormat(option.format, null, null));
          }

          var numbers = getValue('numbers', dependable.parserObject);
          numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true, isBlazor());
          parseOptions.symbolRegex = ParserBase.getSymbolRegex(Object.keys(numOptions.symbolMatch)); // tslint:disable-next-line:no-any

          parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
          var symbolpattern;

          if (!isBlazor()) {
            symbolpattern = IntlBase.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);

            if (symbolpattern) {
              symbolpattern = symbolpattern.replace(/\u00A4/g, IntlBase.defaultCurrency);
              var split = symbolpattern.split(';');
              parseOptions.nData = IntlBase.getFormatData(split[1] || '-' + split[0], true, '');
              parseOptions.pData = IntlBase.getFormatData(split[0], true, '');
            }
          } else {
            parseOptions.nData = extend({}, {}, getValue(parseOptions.type + 'nData', numbers));
            parseOptions.pData = extend({}, {}, getValue(parseOptions.type + 'pData', numbers));

            if (parseOptions.type === 'currency' && option.currency) {
              IntlBase.replaceBlazorCurrency([parseOptions.pData, parseOptions.nData], getValue('currencySymbol', numbers), option.currency);
            }
          }

          return function (value) {
            return _this412.getParsedNumber(value, parseOptions, numOptions);
          };
        }
        /**
         * Returns parsed number for the provided formatting options
         * @param {string} value
         * @param {NumericParts} options
         * @param {NumericOptions} numOptions
         * @returns {number}
         */

      }, {
        key: "getParsedNumber",
        value: function getParsedNumber(value, options, numOptions) {
          var isNegative;
          var isPercent;
          var tempValue;
          var lead;
          var end;
          var ret;

          if (value.indexOf(options.infinity) !== -1) {
            return Infinity;
          } else {
            value = ParserBase.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
            value = ParserBase.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);

            if (value.indexOf('.') === 0) {
              value = '0' + value;
            }

            var _matches = value.match(parseRegex);

            if (isNullOrUndefined(_matches)) {
              return NaN;
            }

            lead = _matches[1];
            tempValue = _matches[2];
            var exponent = _matches[5];
            end = _matches[6];
            isNegative = options.custom ? lead === options.nData.nlead && end === options.nData.nend : lead.indexOf(options.nData.nlead) !== -1 && end.indexOf(options.nData.nend) !== -1;
            isPercent = isNegative ? options.nData.isPercent : options.pData.isPercent;
            tempValue = tempValue.replace(groupRegex, '');

            if (exponent) {
              tempValue += exponent;
            }

            ret = +tempValue;

            if (options.type === 'percent' || isPercent) {
              ret = ret / 100;
            }

            if (options.custom || options.fractionDigits) {
              ret = parseFloat(ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.fractionDigits));
            }

            if (isNegative) {
              ret *= -1;
            }

            return ret;
          }
        }
      }]);

      return NumberParser;
    }();

    var Observer = /*#__PURE__*/function () {
      function Observer(context) {
        _classCallCheck(this, Observer);

        this.ranArray = [];
        this.boundedEvents = {};

        if (isNullOrUndefined(context)) {
          return;
        }

        this.context = context;
      }

      _createClass2(Observer, [{
        key: "on",

        /**
         * To attach handler for given property in current context.
         * @param {string} property - specifies the name of the event.
         * @param {Function} handler - Specifies the handler function to be called while event notified.
         * @param {Object} context - Specifies the context binded to the handler.
         * @param {string} id - specifies the random generated id.
         * @return {void}
         */
        value: function on(property, handler, context, id) {
          if (isNullOrUndefined(handler)) {
            return;
          }

          var cntxt = context || this.context;

          if (this.notExist(property)) {
            this.boundedEvents[property] = [{
              handler: handler,
              context: cntxt
            }];
            return;
          }

          if (!isNullOrUndefined(id)) {
            if (this.ranArray.indexOf(id) === -1) {
              this.ranArray.push(id);
              this.boundedEvents[property].push({
                handler: handler,
                context: cntxt,
                id: id
              });
            }
          } else if (!this.isHandlerPresent(this.boundedEvents[property], handler)) {
            this.boundedEvents[property].push({
              handler: handler,
              context: cntxt
            });
          }
        }
        /**
         * To remove handlers from a event attached using on() function.
         * @param {string} eventName - specifies the name of the event.
         * @param {Function} handler - Optional argument specifies the handler function to be called while event notified.
         * @param {string} id - specifies the random generated id.
         * @return {void}
         */

      }, {
        key: "off",
        value: function off(property, handler, id) {
          if (this.notExist(property)) {
            return;
          }

          var curObject = getValue(property, this.boundedEvents);

          if (handler) {
            for (var i = 0; i < curObject.length; i++) {
              if (id) {
                if (curObject[i].id === id) {
                  curObject.splice(i, 1);
                  var indexLocation = this.ranArray.indexOf(id);

                  if (indexLocation !== -1) {
                    this.ranArray.splice(indexLocation, 1);
                  }

                  break;
                }
              } else if (handler === curObject[i].handler) {
                curObject.splice(i, 1);
                break;
              }
            }
          } else {
            delete this.boundedEvents[property];
          }
        }
        /**
         * To notify the handlers in the specified event.
         * @param {string} property - Specifies the event to be notify.
         * @param {Object} args - Additional parameters to pass while calling the handler.
         * @param {Function} successHandler - this function will invoke after event successfully triggered
         * @param {Function} errorHandler - this function will invoke after event if it was failure to call.
         * @return {void}
         */

      }, {
        key: "notify",
        value: function notify(property, argument, successHandler, errorHandler) {
          if (this.notExist(property)) {
            if (successHandler) {
              successHandler.call(this, argument);
            }

            return;
          }

          if (argument) {
            argument.name = property;
          }

          var blazor = 'Blazor';
          var curObject = getValue(property, this.boundedEvents).slice(0);

          if (window[blazor]) {
            return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
          } else {
            var _iterator51 = _createForOfIteratorHelper(curObject),
                _step51;

            try {
              for (_iterator51.s(); !(_step51 = _iterator51.n()).done;) {
                var cur = _step51.value;
                cur.handler.call(cur.context, argument);
              }
            } catch (err) {
              _iterator51.e(err);
            } finally {
              _iterator51.f();
            }

            if (successHandler) {
              successHandler.call(this, argument);
            }
          }
        }
      }, {
        key: "blazorCallback",
        value: function blazorCallback(objs, argument, successHandler, errorHandler, index) {
          var _this413 = this;

          var isTrigger = index === objs.length - 1;

          if (index < objs.length) {
            var obj = objs[index];
            var promise = obj.handler.call(obj.context, argument);

            if (promise && typeof promise.then === 'function') {
              if (!successHandler) {
                return promise;
              }

              promise.then(function (data) {
                data = typeof data === 'string' && _this413.isJson(data) ? JSON.parse(data, _this413.dateReviver) : data;
                extend(argument, argument, data, true);

                if (successHandler && isTrigger) {
                  successHandler.call(obj.context, argument);
                } else {
                  return _this413.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
                }
              })["catch"](function (data) {
                if (errorHandler) {
                  errorHandler.call(obj.context, typeof data === 'string' && _this413.isJson(data) ? JSON.parse(data, _this413.dateReviver) : data);
                }
              });
            } else if (successHandler && isTrigger) {
              successHandler.call(obj.context, argument);
            } else {
              return this.blazorCallback(objs, argument, successHandler, errorHandler, index + 1);
            }
          }
        } // tslint:disable-next-line:no-any

      }, {
        key: "dateReviver",
        value: function dateReviver(key, value) {
          var dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;

          if (isBlazor && typeof value === 'string' && value.match(dPattern) !== null) {
            return new Date(value);
          }

          return value;
        }
      }, {
        key: "isJson",
        value: function isJson(value) {
          try {
            JSON.parse(value);
          } catch (e) {
            return false;
          }

          return true;
        }
        /**
         * To destroy handlers in the event
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.boundedEvents = this.context = undefined;
        }
        /**
         * Returns if the property exists.
         */

      }, {
        key: "notExist",
        value: function notExist(prop) {
          return this.boundedEvents.hasOwnProperty(prop) === false || this.boundedEvents[prop].length <= 0;
        }
        /**
         * Returns if the handler is present.
         */

      }, {
        key: "isHandlerPresent",
        value: function isHandlerPresent(boundedEvents, handler) {
          var _iterator52 = _createForOfIteratorHelper(boundedEvents),
              _step52;

          try {
            for (_iterator52.s(); !(_step52 = _iterator52.n()).done;) {
              var cur = _step52.value;

              if (cur.handler === handler) {
                return true;
              }
            }
          } catch (err) {
            _iterator52.e(err);
          } finally {
            _iterator52.f();
          }

          return false;
        }
      }]);

      return Observer;
    }();
    /**
     * Specifies the observer used for external change detection.
     */


    var onIntlChange = new Observer();
    /**
     * Specifies the default rtl status for EJ2 components.
     */

    var rightToLeft = false;
    /**
     * Specifies the CLDR data loaded for internationalization functionalities.
     * @private
     */

    var cldrData = {};
    /**
     * Specifies the default culture value to be considered.
     * @private
     */

    var defaultCulture = 'en-US';
    /**
     * Specifies default currency code to be considered
     * @private
     */

    var defaultCurrencyCode = 'USD';
    var mapper = ['numericObject', 'dateObject'];
    /**
     * Internationalization class provides support to parse and format the number and date object to the desired format.
     * ```typescript
     * // To set the culture globally
     * setCulture('en-GB');
     *
     * // To set currency code globally
     * setCurrencyCode('EUR');
     *
     * //Load cldr data
     * loadCldr(gregorainData);
     * loadCldr(timeZoneData);
     * loadCldr(numbersData);
     * loadCldr(numberSystemData);
     *
     * // To use formatter in component side
     * let Intl:Internationalization = new Internationalization();
     *
     * // Date formatting
     * let dateFormatter: Function = Intl.getDateFormat({skeleton:'long',type:'dateTime'});
     * dateFormatter(new Date('11/2/2016'));
     * dateFormatter(new Date('25/2/2030'));
     * Intl.formatDate(new Date(),{skeleton:'E'});
     *
     * //Number formatting
     * let numberFormatter: Function = Intl.getNumberFormat({skeleton:'C5'})
     * numberFormatter(24563334);
     * Intl.formatNumber(123123,{skeleton:'p2'});
     *
     * // Date parser
     * let dateParser: Function = Intl.getDateParser({skeleton:'short',type:'time'});
     * dateParser('10:30 PM');
     * Intl.parseDate('10',{skeleton:'H'});
     * ```
     */

    var Internationalization = /*#__PURE__*/function () {
      function Internationalization(cultureName) {
        _classCallCheck(this, Internationalization);

        if (cultureName) {
          this.culture = cultureName;
        }
      }
      /**
       * Returns the format function for given options.
       * @param {DateFormatOptions} options - Specifies the format options in which the format function will return.
       * @returns {Function}
       */


      _createClass2(Internationalization, [{
        key: "getDateFormat",
        value: function getDateFormat(options) {
          return DateFormat.dateFormat(this.getCulture(), options || {
            type: 'date',
            skeleton: 'short'
          }, cldrData);
        }
        /**
         * Returns the format function for given options.
         * @param {NumberFormatOptions} options - Specifies the format options in which the format function will return.
         * @returns {Function}
         */

      }, {
        key: "getNumberFormat",
        value: function getNumberFormat(options) {
          if (options && !options.currency) {
            options.currency = defaultCurrencyCode;
          }

          if (isBlazor() && options && !options.format) {
            options.minimumFractionDigits = 0;
          }

          return NumberFormat.numberFormatter(this.getCulture(), options || {}, cldrData);
        }
        /**
         * Returns the parser function for given options.
         * @param {DateFormatOptions} options - Specifies the format options in which the parser function will return.
         * @returns {Function}
         */

      }, {
        key: "getDateParser",
        value: function getDateParser(options) {
          return DateParser.dateParser(this.getCulture(), options || {
            skeleton: 'short',
            type: 'date'
          }, cldrData);
        }
        /**
         * Returns the parser function for given options.
         * @param {NumberFormatOptions} options - Specifies the format options in which the parser function will return.
         * @returns {Function}
         */

      }, {
        key: "getNumberParser",
        value: function getNumberParser(options) {
          if (isBlazor() && options && !options.format) {
            options.minimumFractionDigits = 0;
          }

          return NumberParser.numberParser(this.getCulture(), options || {
            format: 'N'
          }, cldrData);
        }
        /**
         * Returns the formatted string based on format options.
         * @param {Number} value - Specifies the number to format.
         * @param {NumberFormatOptions} option - Specifies the format options in which the number will be formatted.
         * @returns {string}
         */

      }, {
        key: "formatNumber",
        value: function formatNumber(value, option) {
          return this.getNumberFormat(option)(value);
        }
        /**
         * Returns the formatted date string based on format options.
         * @param {Number} value - Specifies the number to format.
         * @param {DateFormatOptions} option - Specifies the format options in which the number will be formatted.
         * @returns {string}
         */

      }, {
        key: "formatDate",
        value: function formatDate(value, option) {
          return this.getDateFormat(option)(value);
        }
        /**
         * Returns the date object for given date string and options.
         * @param {string} value - Specifies the string to parse.
         * @param {DateFormatOptions} option - Specifies the parse options in which the date string will be parsed.
         * @returns {Date}
         */

      }, {
        key: "parseDate",
        value: function parseDate(value, option) {
          return this.getDateParser(option)(value);
        }
        /**
         * Returns the number object from the given string value and options.
         * @param {string} value - Specifies the string to parse.
         * @param {NumberFormatOptions} option - Specifies the parse options in which the  string number  will be parsed.
         * @returns {number}
         */

      }, {
        key: "parseNumber",
        value: function parseNumber(value, option) {
          return this.getNumberParser(option)(value);
        }
        /**
         * Returns Native Date Time Pattern
         * @param {DateFormatOptions} option - Specifies the parse options for resultant date time pattern.
         * @param {boolean} isExcelFormat - Specifies format value to be converted to excel pattern.
         * @returns {string}
         * @private
         */

      }, {
        key: "getDatePattern",
        value: function getDatePattern(option, isExcelFormat) {
          return IntlBase.getActualDateTimeFormat(this.getCulture(), option, cldrData, isExcelFormat);
        }
        /**
         * Returns Native Number Pattern
         * @param {NumberFormatOptions} option - Specifies the parse options for resultant number pattern.
         * @returns {string}
         * @private
         */

      }, {
        key: "getNumberPattern",
        value: function getNumberPattern(option, isExcel) {
          return IntlBase.getActualNumberFormat(this.getCulture(), option, cldrData, isExcel);
        }
        /**
         * Returns the First Day of the Week
         * @returns {number}
         */

      }, {
        key: "getFirstDayOfWeek",
        value: function getFirstDayOfWeek() {
          return IntlBase.getWeekData(this.getCulture(), cldrData);
        }
      }, {
        key: "getCulture",
        value: function getCulture() {
          return this.culture || defaultCulture;
        }
      }]);

      return Internationalization;
    }();
    /**
     * Set the default culture to all EJ2 components
     * @param {string} cultureName - Specifies the culture name to be set as default culture.
     */


    function setCulture(cultureName) {
      defaultCulture = cultureName;
      onIntlChange.notify('notifyExternalChange', {
        'locale': defaultCulture
      });
    }
    /**
     * Set the default currency code to all EJ2 components
     * @param {string} currencyCode Specifies the culture name to be set as default culture.
     * @returns {void}
     */


    function setCurrencyCode(currencyCode) {
      defaultCurrencyCode = currencyCode;
      onIntlChange.notify('notifyExternalChange', {
        'currencyCode': defaultCurrencyCode
      });
    }
    /**
     * Load the CLDR data into context
     * @param {Object[]} obj Specifies the CLDR data's to be used for formatting and parser.
     * @returns {void}
     */


    function loadCldr() {
      for (var _len25 = arguments.length, data = new Array(_len25), _key22 = 0; _key22 < _len25; _key22++) {
        data[_key22] = arguments[_key22];
      }

      for (var _i39 = 0, _data2 = data; _i39 < _data2.length; _i39++) {
        var obj = _data2[_i39];
        extend(cldrData, obj, {}, true);
      }
    }
    /**
     * To enable or disable RTL functionality for all components globally.
     * @param {boolean} status - Optional argument Specifies the status value to enable or disable rtl option.
     * @returns {void}
     */


    function enableRtl() {
      var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      rightToLeft = status;
      onIntlChange.notify('notifyExternalChange', {
        enableRtl: rightToLeft
      });
    }
    /**
     * To get the numeric CLDR object for given culture
     * @param {string} locale - Specifies the locale for which numericObject to be returned.
     * @ignore
     * @private
     */


    function getNumericObject(locale, type) {
      /* tslint:disable no-any */
      var numObject = IntlBase.getDependables(cldrData, locale, '', true)[mapper[0]];
      var dateObject = IntlBase.getDependables(cldrData, locale, '')[mapper[1]];
      var numSystem = getValue('defaultNumberingSystem', numObject);
      var symbPattern = isBlazor() ? getValue('numberSymbols', numObject) : getValue('symbols-numberSystem-' + numSystem, numObject);
      var pattern = IntlBase.getSymbolPattern(type || 'decimal', numSystem, numObject, false);
      return extend(symbPattern, IntlBase.getFormatData(pattern, true, '', true), {
        'dateSeparator': IntlBase.getDateSeparator(dateObject)
      });
    }
    /**
     * To get the numeric CLDR  number base object for given culture
     * @param {string} locale - Specifies the locale for which numericObject to be returned.
     * @param {string} currency - Specifies the currency for which numericObject to be returned.
     * @ignore
     * @private
     */


    function getNumberDependable(locale, currency) {
      var numObject = IntlBase.getDependables(cldrData, locale, '', true);
      return IntlBase.getCurrencySymbol(numObject.numericObject, currency);
    }
    /**
     * To get the default date CLDR object.
     * @ignore
     * @private
     */


    function getDefaultDateObject(mode) {
      return IntlBase.getDependables(cldrData, '', mode, false)[mapper[1]];
    }

    var blazorCultureFormats = {
      'en-US': {
        'd': 'M/d/y',
        'D': 'EEEE, MMMM d, y',
        'f': 'EEEE, MMMM d, y h:mm a',
        'F': 'EEEE, MMMM d, y h:mm:s a',
        'g': 'M/d/y h:mm a',
        'G': 'M/d/yyyy h:mm:ss tt',
        'm': 'MMMM d',
        'M': 'MMMM d',
        'r': 'ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'',
        'R': 'ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'',
        's': 'yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss',
        't': 'h:mm tt',
        'T': 'h:m:s tt',
        'u': 'yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'',
        'U': 'dddd, MMMM d, yyyy h:mm:ss tt',
        'y': 'MMMM yyyy',
        'Y': 'MMMM yyyy'
      }
    };
    /**
     * Date base common constants and function for date parser and formatter.
     */

    var IntlBase;

    (function (IntlBase) {
      // tslint:disable-next-line:max-line-length
      IntlBase.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
      IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
      IntlBase.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
      var fractionRegex = /[0-9]/g;
      IntlBase.defaultCurrency = '$';
      var mapper = ['infinity', 'nan', 'group', 'decimal'];
      var patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g;
      var patternMatch = {
        'G': '',
        'M': 'm',
        'L': 'm',
        'H': 'h',
        'c': 'd',
        '\'': '"',
        ' a': ' AM/PM',
        'yy': 'yy',
        'y': 'yyyy',
        'EEEE': 'dddd',
        'E': 'ddd'
      };
      IntlBase.dateConverterMapper = /dddd|ddd/ig;
      var defaultFirstDay = 'sun';
      IntlBase.islamicRegex = /^islamic/;
      var firstDayMapper = {
        'sun': 0,
        'mon': 1,
        'tue': 2,
        'wed': 3,
        'thu': 4,
        'fri': 5,
        'sat': 6
      };
      IntlBase.formatRegex = /(^[ncpae]{1})([0-1]?[0-9]|20)?$/i;
      IntlBase.currencyFormatRegex = /(^[ca]{1})([0-1]?[0-9]|20)?$/i;
      IntlBase.curWithoutNumberRegex = /(c|a)$/ig;
      var typeMapper = {
        '$': 'isCurrency',
        '%': 'isPercent',
        '-': 'isNegative',
        0: 'nlead',
        1: 'nend'
      };
      IntlBase.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
      IntlBase.basicPatterns = ['short', 'medium', 'long', 'full'];
      /* tslint:disable:quotemark */

      IntlBase.defaultObject = {
        'dates': {
          'calendars': {
            'gregorian': {
              'months': {
                'stand-alone': {
                  'abbreviated': {
                    '1': 'Jan',
                    '2': 'Feb',
                    '3': 'Mar',
                    '4': 'Apr',
                    '5': 'May',
                    '6': 'Jun',
                    '7': 'Jul',
                    '8': 'Aug',
                    '9': 'Sep',
                    '10': 'Oct',
                    '11': 'Nov',
                    '12': 'Dec'
                  },
                  'narrow': {
                    '1': 'J',
                    '2': 'F',
                    '3': 'M',
                    '4': 'A',
                    '5': 'M',
                    '6': 'J',
                    '7': 'J',
                    '8': 'A',
                    '9': 'S',
                    '10': 'O',
                    '11': 'N',
                    '12': 'D'
                  },
                  'wide': {
                    '1': 'January',
                    '2': 'February',
                    '3': 'March',
                    '4': 'April',
                    '5': 'May',
                    '6': 'June',
                    '7': 'July',
                    '8': 'August',
                    '9': 'September',
                    '10': 'October',
                    '11': 'November',
                    '12': 'December'
                  }
                }
              },
              "days": {
                "stand-alone": {
                  "abbreviated": {
                    "sun": "Sun",
                    "mon": "Mon",
                    "tue": "Tue",
                    "wed": "Wed",
                    "thu": "Thu",
                    "fri": "Fri",
                    "sat": "Sat"
                  },
                  "narrow": {
                    "sun": "S",
                    "mon": "M",
                    "tue": "T",
                    "wed": "W",
                    "thu": "T",
                    "fri": "F",
                    "sat": "S"
                  },
                  "short": {
                    "sun": "Su",
                    "mon": "Mo",
                    "tue": "Tu",
                    "wed": "We",
                    "thu": "Th",
                    "fri": "Fr",
                    "sat": "Sa"
                  },
                  "wide": {
                    "sun": "Sunday",
                    "mon": "Monday",
                    "tue": "Tuesday",
                    "wed": "Wednesday",
                    "thu": "Thursday",
                    "fri": "Friday",
                    "sat": "Saturday"
                  }
                }
              },
              "dayPeriods": {
                "format": {
                  "wide": {
                    "am": "AM",
                    "pm": "PM"
                  }
                }
              },
              'eras': {
                'eraNames': {
                  '0': 'Before Christ',
                  '0-alt-variant': 'Before Common Era',
                  '1': 'Anno Domini',
                  "1-alt-variant": "Common Era"
                },
                'eraAbbr': {
                  '0': 'BC',
                  '0-alt-variant': 'BCE',
                  '1': 'AD',
                  '1-alt-variant': 'CE'
                },
                'eraNarrow': {
                  '0': 'B',
                  '0-alt-variant': 'BCE',
                  '1': 'A',
                  '1-alt-variant': 'CE'
                }
              },
              'dateFormats': {
                'full': 'EEEE, MMMM d, y',
                'long': 'MMMM d, y',
                'medium': 'MMM d, y',
                'short': 'M/d/yy'
              },
              'timeFormats': {
                'full': 'h:mm:ss a zzzz',
                'long': 'h:mm:ss a z',
                'medium': 'h:mm:ss a',
                'short': 'h:mm a'
              },
              'dateTimeFormats': {
                'full': "{1} 'at' {0}",
                'long': "{1} 'at' {0}",
                'medium': '{1}, {0}',
                'short': '{1}, {0}',
                'availableFormats': {
                  'd': 'd',
                  'E': 'ccc',
                  'Ed': 'd E',
                  'Ehm': 'E h:mm a',
                  'EHm': 'E HH:mm',
                  'Ehms': 'E h:mm:ss a',
                  'EHms': 'E HH:mm:ss',
                  'Gy': 'y G',
                  'GyMMM': 'MMM y G',
                  'GyMMMd': 'MMM d, y G',
                  'GyMMMEd': 'E, MMM d, y G',
                  'h': 'h a',
                  'H': 'HH',
                  'hm': 'h:mm a',
                  'Hm': 'HH:mm',
                  'hms': 'h:mm:ss a',
                  'Hms': 'HH:mm:ss',
                  'hmsv': 'h:mm:ss a v',
                  'Hmsv': 'HH:mm:ss v',
                  'hmv': 'h:mm a v',
                  'Hmv': 'HH:mm v',
                  'M': 'L',
                  'Md': 'M/d',
                  'MEd': 'E, M/d',
                  'MMM': 'LLL',
                  'MMMd': 'MMM d',
                  'MMMEd': 'E, MMM d',
                  'MMMMd': 'MMMM d',
                  'ms': 'mm:ss',
                  'y': 'y',
                  'yM': 'M/y',
                  'yMd': 'M/d/y',
                  'yMEd': 'E, M/d/y',
                  'yMMM': 'MMM y',
                  'yMMMd': 'MMM d, y',
                  'yMMMEd': 'E, MMM d, y',
                  'yMMMM': 'MMMM y'
                }
              }
            },
            "islamic": {
              "months": {
                "stand-alone": {
                  "abbreviated": {
                    "1": "Muh.",
                    "2": "Saf.",
                    "3": "Rab. I",
                    "4": "Rab. II",
                    "5": "Jum. I",
                    "6": "Jum. II",
                    "7": "Raj.",
                    "8": "Sha.",
                    "9": "Ram.",
                    "10": "Shaw.",
                    "11": "Dhuʻl-Q.",
                    "12": "Dhuʻl-H."
                  },
                  "narrow": {
                    "1": "1",
                    "2": "2",
                    "3": "3",
                    "4": "4",
                    "5": "5",
                    "6": "6",
                    "7": "7",
                    "8": "8",
                    "9": "9",
                    "10": "10",
                    "11": "11",
                    "12": "12"
                  },
                  "wide": {
                    "1": "Muharram",
                    "2": "Safar",
                    "3": "Rabiʻ I",
                    "4": "Rabiʻ II",
                    "5": "Jumada I",
                    "6": "Jumada II",
                    "7": "Rajab",
                    "8": "Shaʻban",
                    "9": "Ramadan",
                    "10": "Shawwal",
                    "11": "Dhuʻl-Qiʻdah",
                    "12": "Dhuʻl-Hijjah"
                  }
                }
              },
              "days": {
                "stand-alone": {
                  "abbreviated": {
                    "sun": "Sun",
                    "mon": "Mon",
                    "tue": "Tue",
                    "wed": "Wed",
                    "thu": "Thu",
                    "fri": "Fri",
                    "sat": "Sat"
                  },
                  "narrow": {
                    "sun": "S",
                    "mon": "M",
                    "tue": "T",
                    "wed": "W",
                    "thu": "T",
                    "fri": "F",
                    "sat": "S"
                  },
                  "short": {
                    "sun": "Su",
                    "mon": "Mo",
                    "tue": "Tu",
                    "wed": "We",
                    "thu": "Th",
                    "fri": "Fr",
                    "sat": "Sa"
                  },
                  "wide": {
                    "sun": "Sunday",
                    "mon": "Monday",
                    "tue": "Tuesday",
                    "wed": "Wednesday",
                    "thu": "Thursday",
                    "fri": "Friday",
                    "sat": "Saturday"
                  }
                }
              },
              "dayPeriods": {
                "format": {
                  "wide": {
                    "am": "AM",
                    "pm": "PM"
                  }
                }
              },
              "eras": {
                "eraNames": {
                  "0": "AH"
                },
                "eraAbbr": {
                  "0": "AH"
                },
                "eraNarrow": {
                  "0": "AH"
                }
              },
              "dateFormats": {
                "full": "EEEE, MMMM d, y G",
                "long": "MMMM d, y G",
                "medium": "MMM d, y G",
                "short": "M/d/y GGGGG"
              },
              "timeFormats": {
                "full": "h:mm:ss a zzzz",
                "long": "h:mm:ss a z",
                "medium": "h:mm:ss a",
                "short": "h:mm a"
              },
              "dateTimeFormats": {
                "full": "{1} 'at' {0}",
                "long": "{1} 'at' {0}",
                "medium": "{1}, {0}",
                "short": "{1}, {0}",
                "availableFormats": {
                  "d": "d",
                  "E": "ccc",
                  "Ed": "d E",
                  "Ehm": "E h:mm a",
                  "EHm": "E HH:mm",
                  "Ehms": "E h:mm:ss a",
                  "EHms": "E HH:mm:ss",
                  "Gy": "y G",
                  "GyMMM": "MMM y G",
                  "GyMMMd": "MMM d, y G",
                  "GyMMMEd": "E, MMM d, y G",
                  "h": "h a",
                  "H": "HH",
                  "hm": "h:mm a",
                  "Hm": "HH:mm",
                  "hms": "h:mm:ss a",
                  "Hms": "HH:mm:ss",
                  "M": "L",
                  "Md": "M/d",
                  "MEd": "E, M/d",
                  "MMM": "LLL",
                  "MMMd": "MMM d",
                  "MMMEd": "E, MMM d",
                  "MMMMd": "MMMM d",
                  "ms": "mm:ss",
                  "y": "y G",
                  "yyyy": "y G",
                  "yyyyM": "M/y GGGGG",
                  "yyyyMd": "M/d/y GGGGG",
                  "yyyyMEd": "E, M/d/y GGGGG",
                  "yyyyMMM": "MMM y G",
                  "yyyyMMMd": "MMM d, y G",
                  "yyyyMMMEd": "E, MMM d, y G",
                  "yyyyMMMM": "MMMM y G",
                  "yyyyQQQ": "QQQ y G",
                  "yyyyQQQQ": "QQQQ y G"
                }
              }
            }
          },
          'timeZoneNames': {
            "hourFormat": "+HH:mm;-HH:mm",
            "gmtFormat": "GMT{0}",
            "gmtZeroFormat": "GMT"
          }
        },
        'numbers': {
          'currencies': {
            'USD': {
              'displayName': 'US Dollar',
              'symbol': '$',
              'symbol-alt-narrow': '$'
            },
            'EUR': {
              'displayName': 'Euro',
              'symbol': '€',
              'symbol-alt-narrow': '€'
            },
            'GBP': {
              'displayName': 'British Pound',
              'symbol-alt-narrow': '£'
            }
          },
          'defaultNumberingSystem': 'latn',
          'minimumGroupingDigits': '1',
          'symbols-numberSystem-latn': {
            'decimal': '.',
            'group': ',',
            'list': ';',
            'percentSign': '%',
            'plusSign': '+',
            'minusSign': '-',
            'exponential': 'E',
            'superscriptingExponent': '×',
            'perMille': '‰',
            'infinity': '∞',
            'nan': 'NaN',
            'timeSeparator': ':'
          },
          'decimalFormats-numberSystem-latn': {
            'standard': '#,##0.###'
          },
          'percentFormats-numberSystem-latn': {
            'standard': '#,##0%'
          },
          'currencyFormats-numberSystem-latn': {
            'standard': '¤#,##0.00',
            'accounting': '¤#,##0.00;(¤#,##0.00)'
          },
          'scientificFormats-numberSystem-latn': {
            'standard': '#E0'
          }
        }
      };
      IntlBase.blazorDefaultObject = {
        "numbers": {
          "mapper": {
            "0": "0",
            "1": "1",
            "2": "2",
            "3": "3",
            "4": "4",
            "5": "5",
            "6": "6",
            "7": "7",
            "8": "8",
            "9": "9"
          },
          "mapperDigits": "0123456789",
          "numberSymbols": {
            "decimal": ".",
            "group": ",",
            "plusSign": "+",
            "minusSign": "-",
            "percentSign": "%",
            "nan": "NaN",
            "timeSeparator": ":",
            "infinity": "∞"
          },
          "timeSeparator": ":",
          "currencySymbol": "$",
          "currencypData": {
            "nlead": "$",
            "nend": "",
            "groupSeparator": ",",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          },
          "percentpData": {
            "nlead": "",
            "nend": "%",
            "groupSeparator": ",",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          },
          "percentnData": {
            "nlead": "-",
            "nend": "%",
            "groupSeparator": ",",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          },
          "currencynData": {
            "nlead": "($",
            "nend": ")",
            "groupSeparator": ",",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          },
          "decimalnData": {
            "nlead": "-",
            "nend": "",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          },
          "decimalpData": {
            "nlead": "",
            "nend": "",
            "groupData": {
              "primary": 3
            },
            "maximumFraction": 2,
            "minimumFraction": 2
          }
        },
        "dates": {
          "dayPeriods": {
            "am": "AM",
            "pm": "PM"
          },
          "dateSeperator": "/",
          "days": {
            "abbreviated": {
              "sun": "Sun",
              "mon": "Mon",
              "tue": "Tue",
              "wed": "Wed",
              "thu": "Thu",
              "fri": "Fri",
              "sat": "Sat"
            },
            "short": {
              "sun": "Su",
              "mon": "Mo",
              "tue": "Tu",
              "wed": "We",
              "thu": "Th",
              "fri": "Fr",
              "sat": "Sa"
            },
            "wide": {
              "sun": "Sunday",
              "mon": "Monday",
              "tue": "Tuesday",
              "wed": "Wednesday",
              "thu": "Thursday",
              "fri": "Friday",
              "sat": "Saturday"
            }
          },
          "months": {
            "abbreviated": {
              "1": "Jan",
              "2": "Feb",
              "3": "Mar",
              "4": "Apr",
              "5": "May",
              "6": "Jun",
              "7": "Jul",
              "8": "Aug",
              "9": "Sep",
              "10": "Oct",
              "11": "Nov",
              "12": "Dec"
            },
            "wide": {
              "1": "January",
              "2": "February",
              "3": "March",
              "4": "April",
              "5": "May",
              "6": "June",
              "7": "July",
              "8": "August",
              "9": "September",
              "10": "October",
              "11": "November",
              "12": "December"
            }
          },
          "eras": {
            "1": "AD"
          }
        }
      };
      /* tslint:enable:quotemark */

      IntlBase.monthIndex = {
        3: 'abbreviated',
        4: 'wide',
        5: 'narrow',
        1: 'abbreviated'
      };
      /**
       *
       */

      IntlBase.month = 'months';
      IntlBase.days = 'days';
      /**
       * Default numerber Object
       */

      IntlBase.patternMatcher = {
        C: 'currency',
        P: 'percent',
        N: 'decimal',
        A: 'currency',
        E: 'scientific'
      };
      /**
       * Returns the resultant pattern based on the skeleton, dateObject and the type provided
       * @private
       * @param {string} skeleton
       * @param {Object} dateObject
       * @param {string} type
       * @returns {string}
       */

      function getResultantPattern(skeleton, dateObject, type, isIslamic, blazorCulture) {
        var resPattern;
        var iType = type || 'date';

        if (blazorCulture) {
          resPattern = compareBlazorDateFormats({
            skeleton: skeleton
          }, blazorCulture).format || compareBlazorDateFormats({
            skeleton: 'd'
          }, 'en-US').format;
        } else {
          if (IntlBase.basicPatterns.indexOf(skeleton) !== -1) {
            resPattern = getValue(iType + 'Formats.' + skeleton, dateObject);

            if (iType === 'dateTime') {
              var dPattern = getValue('dateFormats.' + skeleton, dateObject);
              var tPattern = getValue('timeFormats.' + skeleton, dateObject);
              resPattern = resPattern.replace('{1}', dPattern).replace('{0}', tPattern);
            }
          } else {
            resPattern = getValue('dateTimeFormats.availableFormats.' + skeleton, dateObject);
          }

          if (isUndefined(resPattern) && skeleton === 'yMd') {
            resPattern = 'M/d/y';
          }
        }

        return resPattern;
      }

      IntlBase.getResultantPattern = getResultantPattern;
      /**
       * Returns the dependable object for provided cldr data and culture
       * @private
       * @param {Object} cldr
       * @param {string} culture
       * @param {boolean} isNumber
       * @returns {Dependables}
       */

      function getDependables(cldr, culture, mode, isNumber) {
        var ret = {};
        var calendartype = mode || 'gregorian';
        ret.parserObject = ParserBase.getMainObject(cldr, culture) || (isBlazor() ? IntlBase.blazorDefaultObject : IntlBase.defaultObject);

        if (isNumber) {
          ret.numericObject = getValue('numbers', ret.parserObject);
        } else {
          var dateString = isBlazor() ? 'dates' : 'dates.calendars.' + calendartype;
          ret.dateObject = getValue(dateString, ret.parserObject);
        }

        return ret;
      }

      IntlBase.getDependables = getDependables;
      /**
       * Returns the symbol pattern for provided parameters
       * @private
       * @param {string} type
       * @param {string} numSystem
       * @param {Object} obj
       * @param {boolean} isAccount
       * @returns {string}
       */

      function getSymbolPattern(type, numSystem, obj, isAccount) {
        return getValue(type + 'Formats-numberSystem-' + numSystem + (isAccount ? '.accounting' : '.standard'), obj) || (isAccount ? getValue(type + 'Formats-numberSystem-' + numSystem + '.standard', obj) : '');
      }

      IntlBase.getSymbolPattern = getSymbolPattern;

      function ConvertDateToWeekFormat(format) {
        var convertMapper = format.match(IntlBase.dateConverterMapper);

        if (convertMapper && isBlazor()) {
          var tempString = convertMapper[0].length === 3 ? 'EEE' : 'EEEE';
          return format.replace(IntlBase.dateConverterMapper, tempString);
        }

        return format;
      }

      IntlBase.ConvertDateToWeekFormat = ConvertDateToWeekFormat;

      function compareBlazorDateFormats(formatOptions, culture) {
        var format = formatOptions.format || formatOptions.skeleton;
        var curFormatMapper = getValue((culture || 'en-US') + '.' + format, blazorCultureFormats);

        if (!curFormatMapper) {
          curFormatMapper = getValue('en-US.' + format, blazorCultureFormats);
        }

        if (curFormatMapper) {
          curFormatMapper = ConvertDateToWeekFormat(curFormatMapper);
          formatOptions.format = curFormatMapper.replace(/tt/, 'a');
        }

        return formatOptions;
      }

      IntlBase.compareBlazorDateFormats = compareBlazorDateFormats;
      /**
       * Returns proper numeric skeleton
       * @private
       * @param {string} skeleton
       * @returns {NumericSkeleton}
       */

      function getProperNumericSkeleton(skeleton) {
        var matches = skeleton.match(IntlBase.formatRegex);
        var ret = {};
        var pattern = matches[1].toUpperCase();
        ret.isAccount = pattern === 'A';
        /* tslint:disable no-any */

        ret.type = IntlBase.patternMatcher[pattern];

        if (skeleton.length > 1) {
          ret.fractionDigits = parseInt(matches[2], 10);
        }

        return ret;
      }

      IntlBase.getProperNumericSkeleton = getProperNumericSkeleton;
      /**
       * Returns format data for number formatting like minimum fraction, maximum fraction, etc..,
       * @private
       * @param {string} pattern
       * @param {boolean} needFraction
       * @param {string} cSymbol
       * @param {boolean} fractionOnly
       * @returns {NegativeData}
       */

      function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
        var nData = fractionOnly ? {} : {
          nlead: '',
          nend: ''
        };
        var match = pattern.match(IntlBase.customRegex);

        if (match) {
          if (!fractionOnly) {
            nData.nlead = changeCurrencySymbol(match[1], cSymbol);
            nData.nend = changeCurrencySymbol(match[10], cSymbol);
            nData.groupPattern = match[4];
          }

          var fraction = match[7];

          if (fraction && needFraction) {
            var fmatch = fraction.match(fractionRegex);

            if (!isNullOrUndefined(fmatch)) {
              nData.minimumFraction = fmatch.length;
            } else {
              nData.minimumFraction = 0;
            }

            nData.maximumFraction = fraction.length - 1;
          }
        }

        return nData;
      }

      IntlBase.getFormatData = getFormatData;
      /**
       * Changes currency symbol
       * @private
       * @param {string} val
       * @param {string} sym
       * @returns {string}
       */

      function changeCurrencySymbol(val, sym) {
        if (val) {
          return val.replace(IntlBase.defaultCurrency, sym);
        }

        return '';
      }
      /**
       * Returns currency symbol based on currency code
       * @private
       * @param {Object} numericObject
       * @param {string} currencyCode
       * @returns {string}
       */


      function getCurrencySymbol(numericObject, currencyCode, altSymbol) {
        var symbol = altSymbol ? '.' + altSymbol : '.symbol';
        var getCurrency = getValue('currencies.' + currencyCode + symbol, numericObject) || getValue('currencies.' + currencyCode + '.symbol-alt-narrow', numericObject) || '$';
        return getCurrency;
      }

      IntlBase.getCurrencySymbol = getCurrencySymbol;
      /**
       * Returns formatting options for custom number format
       * @private
       * @param {string} format
       * @param {CommonOptions} dOptions
       * @param {Dependables} obj
       * @returns {GenericFormatOptions}
       */

      function customFormat(format, dOptions, obj) {
        var options = {};
        var formatSplit = format.split(';');
        var data = ['pData', 'nData', 'zeroData'];

        for (var i = 0; i < formatSplit.length; i++) {
          options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);
        }

        if (isNullOrUndefined(options.nData)) {
          options.nData = extend({}, options.pData);
          options.nData.nlead = isNullOrUndefined(dOptions) ? '-' + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead;
        }

        return options;
      }

      IntlBase.customFormat = customFormat;
      /**
       * Returns custom formatting options
       * @private
       * @param {string} format
       * @param {CommonOptions} dOptions
       * @param {Object} numObject
       * @returns {NegativeData}
       */

      function customNumberFormat(format, dOptions, numObject) {
        var cOptions = {
          type: 'decimal',
          minimumFractionDigits: 0,
          maximumFractionDigits: 0
        };
        var pattern = format.match(IntlBase.customRegex);

        if (isNullOrUndefined(pattern) || pattern[5] === '' && format !== 'N/A') {
          cOptions.type = undefined;
          return cOptions;
        }

        cOptions.nlead = pattern[1];
        cOptions.nend = pattern[10];
        var integerPart = pattern[6];
        cOptions.useGrouping = integerPart.indexOf(',') !== -1;
        integerPart = integerPart.replace(/,/g, '');
        var fractionPart = pattern[7];

        if (integerPart.indexOf('0') !== -1) {
          cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf('0');
        }

        if (!isNullOrUndefined(fractionPart)) {
          cOptions.minimumFractionDigits = fractionPart.lastIndexOf('0');
          cOptions.maximumFractionDigits = fractionPart.lastIndexOf('#');

          if (cOptions.minimumFractionDigits === -1) {
            cOptions.minimumFractionDigits = 0;
          }

          if (cOptions.maximumFractionDigits === -1 || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) {
            cOptions.maximumFractionDigits = cOptions.minimumFractionDigits;
          }
        }

        if (!isNullOrUndefined(dOptions)) {
          extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '$', dOptions.currencySymbol));

          if (!cOptions.isCurrency) {
            extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', dOptions.percentSymbol));
          }
        } else {
          extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', '%'));
        }

        if (!isNullOrUndefined(numObject)) {
          var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, false);

          if (cOptions.useGrouping) {
            cOptions.groupSeparator = dOptions.numberMapper.numberSymbols[mapper[2]];
            cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(';')[0]);
          }

          cOptions.nlead = cOptions.nlead.replace(/\'/g, '');
          cOptions.nend = cOptions.nend.replace(/\'/g, '');
        }

        return cOptions;
      }
      /**
       * Returns formatting options for currency or percent type
       * @private
       * @param {string[]} parts
       * @param {string} actual
       * @param {string} symbol
       * @returns {NegativeData}
       */


      function isCurrencyPercent(parts, actual, symbol) {
        var options = {
          nlead: parts[0],
          nend: parts[1]
        };

        for (var i = 0; i < 2; i++) {
          var part = parts[i];
          var loc = part.indexOf(actual);

          if (loc !== -1 && (loc < part.indexOf('\'') || loc > part.lastIndexOf('\''))) {
            options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
            options[typeMapper[actual]] = true;
            options.type = options.isCurrency ? 'currency' : 'percent';
            break;
          }
        }

        return options;
      }

      IntlBase.isCurrencyPercent = isCurrencyPercent;
      /**
       * Returns culture based date separator
       * @private
       * @param {Object} dateObj
       * @returns {string}
       */

      function getDateSeparator(dateObj) {
        var value = (getValue('dateFormats.short', dateObj) || '').match(/[d‏M‏]([^d‏M])[d‏M‏]/i);
        return value ? value[1] : '/';
      }

      IntlBase.getDateSeparator = getDateSeparator;
      /**
       * Returns Native Date Time pattern
       * @private
       * @param {string} culture
       * @param {DateFormatOptions} options
       * @param {Object} cldr
       * @returns {string}
       */

      function getActualDateTimeFormat(culture, options, cldr, isExcelFormat) {
        var dependable = getDependables(cldr, culture, options.calendar);

        if (isBlazor()) {
          options = compareBlazorDateFormats(options, culture);
        }

        var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);

        if (isExcelFormat) {
          actualPattern = actualPattern.replace(patternRegex, function (pattern) {
            return patternMatch[pattern];
          });

          if (actualPattern.indexOf('z') !== -1) {
            var tLength = actualPattern.match(/z/g).length;
            var timeZonePattern;
            var _options3 = {
              'timeZone': {}
            };
            _options3.numMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
            _options3.timeZone = getValue('dates.timeZoneNames', dependable.parserObject);
            var value = new Date();
            var timezone = value.getTimezoneOffset();
            var pattern = tLength < 4 ? '+H;-H' : _options3.timeZone.hourFormat;
            pattern = pattern.replace(/:/g, _options3.numMapper.timeSeparator);

            if (timezone === 0) {
              timeZonePattern = _options3.timeZone.gmtZeroFormat;
            } else {
              timeZonePattern = DateFormat.getTimeZoneValue(timezone, pattern);
              timeZonePattern = _options3.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern);
            }

            actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
          }

          actualPattern = actualPattern.replace(/ $/, '');
        }

        return actualPattern;
      }

      IntlBase.getActualDateTimeFormat = getActualDateTimeFormat; // tslint:disable-next-line:no-any

      function processSymbol(actual, option) {
        if (actual.indexOf(',') !== -1) {
          // tslint:disable-next-line:no-any
          var split = actual.split(',');
          actual = split[0] + getValue('numberMapper.numberSymbols.group', option) + split[1].replace('.', getValue('numberMapper.numberSymbols.decimal', option));
        } else {
          actual = actual.replace('.', getValue('numberMapper.numberSymbols.decimal', option));
        }

        return actual;
      }
      /**
       * Returns Native Number pattern
       * @private
       * @param {string} culture
       * @param {NumberFormatOptions} options
       * @param {Object} cldr
       * @returns {string}
       */


      function getActualNumberFormat(culture, options, cldr, isExcel) {
        var dependable = getDependables(cldr, culture, '', true);
        var parseOptions = {
          custom: true
        };
        var numrericObject = dependable.numericObject;
        var minFrac;
        var curObj = {};
        var curMatch = (options.format || '').match(IntlBase.currencyFormatRegex);
        var type = IntlBase.formatRegex.test(options.format) ? getProperNumericSkeleton(options.format || 'N') : {};
        var dOptions = {};

        if (curMatch) {
          dOptions.numberMapper = isBlazor() ? extend({}, dependable.numericObject) : ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), true);
          var curCode = isBlazor() ? getValue('currencySymbol', dependable.numericObject) : getCurrencySymbol(dependable.numericObject, options.currency || defaultCurrencyCode, options.altSymbol);
          var symbolPattern = getSymbolPattern('currency', dOptions.numberMapper.numberSystem, dependable.numericObject, /a/i.test(options.format));
          symbolPattern = symbolPattern.replace(/\u00A4/g, curCode);
          var split = symbolPattern.split(';');
          curObj.hasNegativePattern = isBlazor() ? true : split.length > 1;
          curObj.nData = isBlazor() ? getValue(type.type + 'nData', numrericObject) : getFormatData(split[1] || '-' + split[0], true, curCode);
          curObj.pData = isBlazor() ? getValue(type.type + 'pData', numrericObject) : getFormatData(split[0], false, curCode);

          if (!curMatch[2] && !options.minimumFractionDigits && !options.maximumFractionDigits) {
            minFrac = getFormatData(symbolPattern.split(';')[0], true, '', true).minimumFraction;
          }
        }

        var actualPattern;

        if (IntlBase.formatRegex.test(options.format) || !options.format) {
          extend(parseOptions, getProperNumericSkeleton(options.format || 'N'));
          parseOptions.custom = false;
          actualPattern = '###0';

          if (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) {
            var defaultMinimum = 0;

            if (parseOptions.fractionDigits) {
              options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits;
            }

            actualPattern = fractionDigitsPattern(actualPattern, minFrac || parseOptions.fractionDigits || options.minimumFractionDigits || defaultMinimum, options.maximumFractionDigits || defaultMinimum);
          }

          if (options.minimumIntegerDigits) {
            actualPattern = minimumIntegerPattern(actualPattern, options.minimumIntegerDigits);
          }

          if (options.useGrouping) {
            actualPattern = groupingPattern(actualPattern);
          }

          if (parseOptions.type === 'currency' || parseOptions.type && isBlazor()) {
            if (isBlazor() && parseOptions.type !== 'currency') {
              curObj.pData = getValue(parseOptions.type + 'pData', numrericObject);
              curObj.nData = getValue(parseOptions.type + 'nData', numrericObject);
            }

            var cPattern = actualPattern;
            actualPattern = curObj.pData.nlead + cPattern + curObj.pData.nend;

            if (curObj.hasNegativePattern || isBlazor()) {
              actualPattern += ';' + curObj.nData.nlead + cPattern + curObj.nData.nend;
            }
          }

          if (parseOptions.type === 'percent' && !isBlazor()) {
            actualPattern += ' %';
          }
        } else {
          actualPattern = options.format.replace(/\'/g, '"');
        }

        if (Object.keys(dOptions).length > 0) {
          actualPattern = !isExcel ? processSymbol(actualPattern, dOptions) : actualPattern;
        }

        return actualPattern;
      }

      IntlBase.getActualNumberFormat = getActualNumberFormat;

      function fractionDigitsPattern(pattern, minDigits, maxDigits) {
        pattern += '.';

        for (var a = 0; a < minDigits; a++) {
          pattern += '0';
        }

        if (minDigits < maxDigits) {
          var diff = maxDigits - minDigits;

          for (var b = 0; b < diff; b++) {
            pattern += '#';
          }
        }

        return pattern;
      }

      function minimumIntegerPattern(pattern, digits) {
        var temp = pattern.split('.');
        var integer = '';

        for (var x = 0; x < digits; x++) {
          integer += '0';
        }

        return temp[1] ? integer + '.' + temp[1] : integer;
      }

      function groupingPattern(pattern) {
        var temp = pattern.split('.');
        var integer = temp[0];
        var no = 3 - integer.length % 3;
        var hash = no && no === 1 ? '#' : no === 2 ? '##' : '';
        integer = hash + integer;
        pattern = '';

        for (var x = integer.length - 1; x > 0; x = x - 3) {
          pattern = ',' + integer[x - 2] + integer[x - 1] + integer[x] + pattern;
        }

        pattern = pattern.slice(1);
        return temp[1] ? pattern + '.' + temp[1] : pattern;
      }

      function getWeekData(culture, cldr) {
        var firstDay = defaultFirstDay;
        var mapper = getValue('supplemental.weekData.firstDay', cldr);
        var iCulture = culture;

        if (/en-/.test(iCulture)) {
          iCulture = iCulture.slice(3);
        }

        iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);

        if (mapper) {
          firstDay = mapper[iCulture] || defaultFirstDay;
        }

        return firstDayMapper[firstDay];
      }

      IntlBase.getWeekData = getWeekData;
      /**
       * @private
       * @param pData
       * @param aCurrency
       * @param rCurrency
       */

      function replaceBlazorCurrency(pData, aCurrency, rCurrency) {
        var iCurrency = getBlazorCurrencySymbol(rCurrency);

        if (aCurrency !== iCurrency) {
          var _iterator53 = _createForOfIteratorHelper(pData),
              _step53;

          try {
            for (_iterator53.s(); !(_step53 = _iterator53.n()).done;) {
              var data = _step53.value;
              data.nend = data.nend.replace(aCurrency, iCurrency);
              data.nlead = data.nlead.replace(aCurrency, iCurrency);
            }
          } catch (err) {
            _iterator53.e(err);
          } finally {
            _iterator53.f();
          }
        }
      }

      IntlBase.replaceBlazorCurrency = replaceBlazorCurrency;
      /**
       * @private
       */

      function getWeekOfYear(date) {
        var newYear = new Date(date.getFullYear(), 0, 1);
        var day = newYear.getDay();
        var weeknum;
        day = day >= 0 ? day : day + 7;
        var daynum = Math.floor((date.getTime() - newYear.getTime() - (date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 60000) / 86400000) + 1;

        if (day < 4) {
          weeknum = Math.floor((daynum + day - 1) / 7) + 1;

          if (weeknum > 52) {
            var nYear = new Date(this.getFullYear() + 1, 0, 1);
            var nday = nYear.getDay();
            nday = nday >= 0 ? nday : nday + 7;
            weeknum = nday < 4 ? 1 : 53;
          }
        } else {
          weeknum = Math.floor((daynum + day - 1) / 7);
        }

        return weeknum;
      }

      IntlBase.getWeekOfYear = getWeekOfYear;
    })(IntlBase || (IntlBase = {}));

    var headerRegex = /^(.*?):[ \t]*([^\r\n]*)$/gm;
    var defaultType = 'GET';
    /**
     * Ajax class provides ability to make asynchronous HTTP request to the server
     * ```typescript
     *   var ajax = new Ajax("index.html", "GET", true);
     *   ajax.send().then(
     *               function (value) {
     *                   console.log(value);
     *               },
     *               function (reason) {
     *                   console.log(reason);
     *               });
     * ```
     */

    var Ajax = /*#__PURE__*/function () {
      /**
       * Constructor for Ajax class
       * @param  {string|Object} options?
       * @param  {string} type?
       * @param  {boolean} async?
       * @returns defaultType
       */
      function Ajax(options, type, async, contentType) {
        _classCallCheck(this, Ajax);

        /**
         * A boolean value indicating whether the request should be sent asynchronous or not.
         * @default true
         */
        this.mode = true;
        /**
         * A boolean value indicating whether to ignore the promise reject.
         * @private
         * @default true
         */

        this.emitError = true;
        this.options = {};

        if (typeof options === 'string') {
          this.url = options;
          this.type = type ? type.toUpperCase() : defaultType;
          this.mode = !isNullOrUndefined(async) ? async : true;
        } else if (typeof options === 'object') {
          this.options = options;
          merge(this, this.options);
        }

        this.type = this.type ? this.type.toUpperCase() : defaultType;
        this.contentType = this.contentType !== undefined ? this.contentType : contentType;
      }
      /**
       * Send the request to server.
       * @param {any} data - To send the user data
       * @return {Promise}
       */


      _createClass2(Ajax, [{
        key: "send",
        value: function send(data) {
          var _this414 = this;

          this.data = isNullOrUndefined(data) ? this.data : data;
          var eventArgs = {
            cancel: false,
            httpRequest: null
          };
          var promise = new Promise(function (resolve, reject) {
            _this414.httpRequest = new XMLHttpRequest();

            _this414.httpRequest.onreadystatechange = function () {
              _this414.stateChange(resolve, reject);
            };

            if (!isNullOrUndefined(_this414.onLoad)) {
              _this414.httpRequest.onload = _this414.onLoad;
            }

            if (!isNullOrUndefined(_this414.onProgress)) {
              _this414.httpRequest.onprogress = _this414.onProgress;
            }
            /* istanbul ignore next */


            if (!isNullOrUndefined(_this414.onAbort)) {
              _this414.httpRequest.onabort = _this414.onAbort;
            }
            /* istanbul ignore next */


            if (!isNullOrUndefined(_this414.onError)) {
              _this414.httpRequest.onerror = _this414.onError;
            } //** Upload Events **/

            /* istanbul ignore next */


            if (!isNullOrUndefined(_this414.onUploadProgress)) {
              _this414.httpRequest.upload.onprogress = _this414.onUploadProgress;
            }

            _this414.httpRequest.open(_this414.type, _this414.url, _this414.mode); // Set default headers


            if (!isNullOrUndefined(_this414.data) && _this414.contentType !== null) {
              _this414.httpRequest.setRequestHeader('Content-Type', _this414.contentType || 'application/json; charset=utf-8');
            }

            if (_this414.beforeSend) {
              eventArgs.httpRequest = _this414.httpRequest;

              _this414.beforeSend(eventArgs);
            }

            if (!eventArgs.cancel) {
              _this414.httpRequest.send(!isNullOrUndefined(_this414.data) ? _this414.data : null);
            }
          });
          return promise;
        }
      }, {
        key: "successHandler",
        value: function successHandler(data) {
          if (this.onSuccess) {
            this.onSuccess(data, this);
          }

          return data;
        }
      }, {
        key: "failureHandler",
        value: function failureHandler(reason) {
          if (this.onFailure) {
            this.onFailure(this.httpRequest);
          }

          return reason;
        }
      }, {
        key: "stateChange",
        value: function stateChange(resolve, reject) {
          var data = this.httpRequest.responseText;

          if (this.dataType && this.dataType.toLowerCase() === 'json') {
            if (data === '') {
              data = undefined;
            } else {
              try {
                data = JSON.parse(data);
              } catch (error) {// no exception handle
              }
            }
          }

          if (this.httpRequest.readyState === 4) {
            //success range should be 200 to 299
            if (this.httpRequest.status >= 200 && this.httpRequest.status <= 299 || this.httpRequest.status === 304) {
              resolve(this.successHandler(data));
            } else {
              if (this.emitError) {
                reject(new Error(this.failureHandler(this.httpRequest.statusText)));
              } else {
                resolve();
              }
            }
          }
        }
        /**
         * To get the response header from XMLHttpRequest
         * @param  {string} key Key to search in the response header
         * @returns {string}
         */

      }, {
        key: "getResponseHeader",
        value: function getResponseHeader(key) {
          var responseHeaders;
          var header;
          responseHeaders = {};
          var headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());

          while (headers) {
            responseHeaders[headers[1].toLowerCase()] = headers[2];
            headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
          }

          header = responseHeaders[key.toLowerCase()];
          return isNullOrUndefined(header) ? null : header;
        }
      }]);

      return Ajax;
    }();

    var REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
    var REGX_IE = /msie|trident/i;
    var REGX_IE11 = /Trident\/7\./;
    var REGX_IOS = /(ipad|iphone|ipod touch)/i;
    var REGX_IOS7 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i;
    var REGX_ANDROID = /android/i;
    var REGX_WINDOWS = /trident|windows phone|edge/i;
    var REGX_VERSION = /(version)[ \/]([\w.]+)/i;
    var REGX_BROWSER = {
      OPERA: /(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,
      EDGE: /(edge)(?:.*version|)[ \/]([\w.]+)/i,
      CHROME: /(chrome|crios)[ \/]([\w.]+)/i,
      PANTHOMEJS: /(phantomjs)[ \/]([\w.]+)/i,
      SAFARI: /(safari)[ \/]([\w.]+)/i,
      WEBKIT: /(webkit)[ \/]([\w.]+)/i,
      MSIE: /(msie|trident) ([\w.]+)/i,
      MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
    };
    /* istanbul ignore else  */

    if (typeof window !== 'undefined') {
      window.browserDetails = window.browserDetails || {};
    }
    /**
     * Get configuration details for Browser
     * @private
     */


    var Browser = /*#__PURE__*/function () {
      function Browser() {
        _classCallCheck(this, Browser);
      }

      _createClass2(Browser, null, [{
        key: "extractBrowserDetail",
        value: function extractBrowserDetail() {
          var browserInfo = {
            culture: {}
          };
          var keys = Object.keys(REGX_BROWSER);
          var clientInfo = [];

          for (var _i40 = 0, _keys5 = keys; _i40 < _keys5.length; _i40++) {
            var key = _keys5[_i40];
            clientInfo = Browser.userAgent.match(REGX_BROWSER[key]);

            if (clientInfo) {
              browserInfo.name = clientInfo[1].toLowerCase() === 'opr' ? 'opera' : clientInfo[1].toLowerCase();
              browserInfo.name = clientInfo[1].toLowerCase() === 'crios' ? 'chrome' : browserInfo.name;
              browserInfo.version = clientInfo[2];
              browserInfo.culture.name = browserInfo.culture.language = navigator.language;

              if (!!Browser.userAgent.match(REGX_IE11)) {
                browserInfo.name = 'msie';
                break;
              }

              var version = Browser.userAgent.match(REGX_VERSION);

              if (browserInfo.name === 'safari' && version) {
                browserInfo.version = version[2];
              }

              break;
            }
          }

          return browserInfo;
        }
        /**
         * To get events from the browser
         * @param {string} event - type of event triggered.
         * @returns {Boolean}
         */

      }, {
        key: "getEvent",
        value: function getEvent(event) {
          // tslint:disable-next-line:no-any
          var events = {
            start: {
              isPointer: 'pointerdown',
              isTouch: 'touchstart',
              isDevice: 'mousedown'
            },
            move: {
              isPointer: 'pointermove',
              isTouch: 'touchmove',
              isDevice: 'mousemove'
            },
            end: {
              isPointer: 'pointerup',
              isTouch: 'touchend',
              isDevice: 'mouseup'
            },
            cancel: {
              isPointer: 'pointercancel',
              isTouch: 'touchcancel',
              isDevice: 'mouseleave'
            }
          };
          return Browser.isPointer ? events[event].isPointer : Browser.isTouch ? events[event].isTouch + (!Browser.isDevice ? ' ' + events[event].isDevice : '') : events[event].isDevice;
        }
        /**
         * To get the Touch start event from browser
         * @returns {string}
         */

      }, {
        key: "getTouchStartEvent",
        value: function getTouchStartEvent() {
          return Browser.getEvent('start');
        }
        /**
         * To get the Touch end event from browser
         * @returns {string}
         */

      }, {
        key: "getTouchEndEvent",
        value: function getTouchEndEvent() {
          return Browser.getEvent('end');
        }
        /**
         * To get the Touch move event from browser
         * @returns {string}
         */

      }, {
        key: "getTouchMoveEvent",
        value: function getTouchMoveEvent() {
          return Browser.getEvent('move');
        }
        /**
         * To cancel the touch event from browser
         * @returns {string}
         */

      }, {
        key: "getTouchCancelEvent",
        value: function getTouchCancelEvent() {
          return Browser.getEvent('cancel');
        }
        /**
         * To get the value based on provided key and regX
         * @param {string} key
         * @param {RegExp} regX
         * @returns {Object}
         */

      }, {
        key: "getValue",
        value: function getValue(key, regX) {
          var browserDetails = window.browserDetails;

          if ('undefined' === typeof browserDetails[key]) {
            return browserDetails[key] = regX.test(Browser.userAgent);
          }

          return browserDetails[key];
        } //Properties 

        /**
         * Property specifies the userAgent of the browser. Default userAgent value is based on the browser.
         * Also we can set our own userAgent.
         */

      }, {
        key: "userAgent",
        set: function set(uA) {
          Browser.uA = uA;
          window.browserDetails = {};
        },
        get: function get() {
          return Browser.uA;
        } //Read Only Properties

        /**
         * Property is to get the browser information like Name, Version and Language
         * @returns BrowserInfo
         */

      }, {
        key: "info",
        get: function get() {
          if (isUndefined(window.browserDetails.info)) {
            return window.browserDetails.info = Browser.extractBrowserDetail();
          }

          return window.browserDetails.info;
        }
        /**
         * Property is to get whether the userAgent is based IE.
         */

      }, {
        key: "isIE",
        get: function get() {
          return Browser.getValue('isIE', REGX_IE);
        }
        /**
         * Property is to get whether the browser has touch support.
         */

      }, {
        key: "isTouch",
        get: function get() {
          if (isUndefined(window.browserDetails.isTouch)) {
            return window.browserDetails.isTouch = 'ontouchstart' in window.navigator || window && window.navigator && window.navigator.maxTouchPoints > 0 || 'ontouchstart' in window;
          }

          return window.browserDetails.isTouch;
        }
        /**
         * Property is to get whether the browser has Pointer support.
         */

      }, {
        key: "isPointer",
        get: function get() {
          if (isUndefined(window.browserDetails.isPointer)) {
            return window.browserDetails.isPointer = 'pointerEnabled' in window.navigator;
          }

          return window.browserDetails.isPointer;
        }
        /**
         * Property is to get whether the browser has MSPointer support.
         */

      }, {
        key: "isMSPointer",
        get: function get() {
          if (isUndefined(window.browserDetails.isMSPointer)) {
            return window.browserDetails.isMSPointer = 'msPointerEnabled' in window.navigator;
          }

          return window.browserDetails.isMSPointer;
        }
        /**
         * Property is to get whether the userAgent is device based.
         */

      }, {
        key: "isDevice",
        get: function get() {
          return Browser.getValue('isDevice', REGX_MOBILE);
        }
        /**
         * Property is to get whether the userAgent is IOS.
         */

      }, {
        key: "isIos",
        get: function get() {
          return Browser.getValue('isIos', REGX_IOS);
        }
        /**
         * Property is to get whether the userAgent is Ios7.
         */

      }, {
        key: "isIos7",
        get: function get() {
          return Browser.getValue('isIos7', REGX_IOS7);
        }
        /**
         * Property is to get whether the userAgent is Android.
         */

      }, {
        key: "isAndroid",
        get: function get() {
          return Browser.getValue('isAndroid', REGX_ANDROID);
        }
        /**
         * Property is to identify whether application ran in web view.
         */

      }, {
        key: "isWebView",
        get: function get() {
          if (isUndefined(window.browserDetails.isWebView)) {
            window.browserDetails.isWebView = !(isUndefined(window.cordova) && isUndefined(window.PhoneGap) && isUndefined(window.phonegap) && window.forge !== 'object');
            return window.browserDetails.isWebView;
          }

          return window.browserDetails.isWebView;
        }
        /**
         * Property is to get whether the userAgent is Windows.
         */

      }, {
        key: "isWindows",
        get: function get() {
          return Browser.getValue('isWindows', REGX_WINDOWS);
        }
        /**
         * Property is to get the touch start event. It returns event name based on browser.
         */

      }, {
        key: "touchStartEvent",
        get: function get() {
          if (isUndefined(window.browserDetails.touchStartEvent)) {
            return window.browserDetails.touchStartEvent = Browser.getTouchStartEvent();
          }

          return window.browserDetails.touchStartEvent;
        }
        /**
         * Property is to get the touch move event. It returns event name based on browser.
         */

      }, {
        key: "touchMoveEvent",
        get: function get() {
          if (isUndefined(window.browserDetails.touchMoveEvent)) {
            return window.browserDetails.touchMoveEvent = Browser.getTouchMoveEvent();
          }

          return window.browserDetails.touchMoveEvent;
        }
        /**
         * Property is to get the touch end event. It returns event name based on browser.
         */

      }, {
        key: "touchEndEvent",
        get: function get() {
          if (isUndefined(window.browserDetails.touchEndEvent)) {
            return window.browserDetails.touchEndEvent = Browser.getTouchEndEvent();
          }

          return window.browserDetails.touchEndEvent;
        }
        /**
         * Property is to cancel the touch end event.
         */

      }, {
        key: "touchCancelEvent",
        get: function get() {
          if (isUndefined(window.browserDetails.touchCancelEvent)) {
            return window.browserDetails.touchCancelEvent = Browser.getTouchCancelEvent();
          }

          return window.browserDetails.touchCancelEvent;
        }
      }]);

      return Browser;
    }();
    /* istanbul ignore next */


    Browser.uA = typeof navigator !== 'undefined' ? navigator.userAgent : '';
    /**
     * EventHandler class provides option to add, remove, clear and trigger events to a HTML DOM element
     * @private
     * ```html
     * <div id="Eventdiv">  </div>
     * <script>
     *   let node: HTMLElement = document.querySelector("#Eventdiv");
     *   EventHandler.addEventListener(node, "click", function(){
     *       // click handler function code
     *   });
     *   EventHandler.addEventListener(node, "onmouseover", function(){
     *       // mouseover handler function code
     *   });
     *   EventHandler.removeEventListener(node, "click", function(){
     *       // click handler function code
     *   });
     *   eventObj.clearEvents();
     * </script>
     * ```
     */

    var EventHandler = /*#__PURE__*/function () {
      function EventHandler() {
        _classCallCheck(this, EventHandler);
      }

      _createClass2(EventHandler, null, [{
        key: "addOrGetEventData",
        // to get the event data based on element
        value: function addOrGetEventData(element) {
          if ('__eventList' in element) {
            return element.__eventList.events;
          } else {
            element.__eventList = {};
            return element.__eventList.events = [];
          }
        }
        /**
         * Add an event to the specified DOM element.
         * @param {any} element - Target HTML DOM element
         * @param {string} eventName - A string that specifies the name of the event
         * @param {Function} listener - Specifies the function to run when the event occurs
         * @param {Object} bindTo - A object that binds 'this' variable in the event handler
         * @param {number} debounce - Specifies at what interval given event listener should be triggered.
         * @return {Function}
         */

      }, {
        key: "add",
        value: function add(element, eventName, listener, bindTo, intDebounce) {
          var eventData = EventHandler.addOrGetEventData(element);
          var debounceListener;

          if (intDebounce) {
            debounceListener = debounce(listener, intDebounce);
          } else {
            debounceListener = listener;
          }

          if (bindTo) {
            debounceListener = debounceListener.bind(bindTo);
          }

          var event = eventName.split(' ');

          for (var i = 0; i < event.length; i++) {
            eventData.push({
              name: event[i],
              listener: listener,
              debounce: debounceListener
            });

            if (Browser.isIE) {
              element.addEventListener(event[i], debounceListener);
            } else {
              element.addEventListener(event[i], debounceListener, {
                passive: false
              });
            }
          }

          return debounceListener;
        }
        /**
         * Remove an event listener that has been attached before.
         * @param {any} element - Specifies the target html element to remove the event
         * @param {string} eventName - A string that specifies the name of the event to remove
         * @param {Function} listener - Specifies the function to remove
         * @return {void}
         */

      }, {
        key: "remove",
        value: function remove(element, eventName, listener) {
          var eventData = EventHandler.addOrGetEventData(element);
          var event = eventName.split(' ');

          var _loop8 = function _loop8(j) {
            var index = -1;
            var debounceListener = void 0;

            if (eventData && eventData.length !== 0) {
              eventData.some(function (x, i) {
                return x.name === event[j] && x.listener === listener ? (index = i, debounceListener = x.debounce, true) : false;
              });
            }

            if (index !== -1) {
              eventData.splice(index, 1);
            }

            if (debounceListener) {
              element.removeEventListener(event[j], debounceListener);
            }
          };

          for (var j = 0; j < event.length; j++) {
            _loop8(j);
          }
        }
        /**
         * Clear all the event listeners that has been previously attached to the element.
         * @param {any} element - Specifies the target html element to clear the events
         * @return {void}
         */

      }, {
        key: "clearEvents",
        value: function clearEvents(element) {
          var eventData;
          var copyData;
          eventData = EventHandler.addOrGetEventData(element);
          copyData = extend([], copyData, eventData);

          for (var i = 0; i < copyData.length; i++) {
            element.removeEventListener(copyData[i].name, copyData[i].debounce);
            eventData.shift();
          }
        }
        /**
         * Trigger particular event of the element.
         * @param {any} element - Specifies the target html element to trigger the events
         * @param {string} eventName - Specifies the event to trigger for the specified element.
         * Can be a custom event, or any of the standard events.
         * @param {any} eventProp - Additional parameters to pass on to the event properties
         * @return {void}
         */

      }, {
        key: "trigger",
        value: function trigger(element, eventName, eventProp) {
          var eventData = EventHandler.addOrGetEventData(element);

          var _iterator54 = _createForOfIteratorHelper(eventData),
              _step54;

          try {
            for (_iterator54.s(); !(_step54 = _iterator54.n()).done;) {
              var _event = _step54.value;

              if (_event.name === eventName) {
                _event.debounce.call(this, eventProp);
              }
            }
          } catch (err) {
            _iterator54.e(err);
          } finally {
            _iterator54.f();
          }
        }
      }]);

      return EventHandler;
    }();
    /**
     * Template Engine
     */


    var LINES = new RegExp('\\n|\\r|\\s\\s+', 'g');
    var QUOTES = new RegExp(/'|"/g);
    var IF_STMT = new RegExp('if ?\\(');
    var ELSEIF_STMT = new RegExp('else if ?\\(');
    var ELSE_STMT = new RegExp('else');
    var FOR_STMT = new RegExp('for ?\\(');
    var IF_OR_FOR = new RegExp('(\/if|\/for)');
    var CALL_FUNCTION = new RegExp('\\((.*)\\)', '');
    var NOT_NUMBER = new RegExp('^[0-9]+$', 'g');
    var WORD = new RegExp('[\\w"\'.\\s+]+', 'g');
    var DBL_QUOTED_STR = new RegExp('"(.*?)"', 'g');
    var WORDIF = new RegExp('[\\w"\'@#$.\\s+]+', 'g');
    var exp = new RegExp('\\${([^}]*)}', 'g'); // let cachedTemplate: Object = {};

    var ARR_OBJ = /^\..*/gm;
    var SINGLE_SLASH = /\\/gi;
    var DOUBLE_SLASH = /\\\\/gi;
    var WORDFUNC = new RegExp('[\\w"\'@#$.\\s+]+', 'g');
    var WINDOWFUNC = /\window\./gm;
    /**
     * The function to set regular expression for template expression string.
     * @param  {RegExp} value - Value expression.
     * @private
     */
    // /**
    //  * To render the template string from the given data.
    //  * @param  {string} template - String Template.
    //  * @param  {Object[]|JSON} data - DataSource for the template.
    //  * @param  {Object} helper? - custom helper object.
    //  */
    // export function template(template: string, data: JSON, helper?: Object): string {
    //     let hash: string = hashCode(template);
    //     let tmpl: Function;
    //     if (!cachedTemplate[hash]) {
    //         tmpl = cachedTemplate[hash] = compile(template, helper);
    //     } else {
    //         tmpl = cachedTemplate[hash];
    //     }
    //     return tmpl(data);
    // }

    /**
     * Compile the template string into template function.
     * @param  {string} template - The template string which is going to convert.
     * @param  {Object} helper? - Helper functions as an object.
     * @private
     */

    function compile$1(template, helper) {
      var argName = 'data';
      var evalExpResult = evalExp(template, argName, helper);
      var fnCode = "var str=\"".concat(evalExpResult, "\"; return str;"); // tslint:disable-next-line:no-function-constructor-with-string-args

      var fn = new Function(argName, fnCode);
      return fn.bind(helper);
    } // function used to evaluate the function expression


    function evalExp(str, nameSpace, helper) {
      var varCOunt = 0;
      /**
       * Variable containing Local Keys
       */

      var localKeys = [];
      var isClass = str.match(/class="([^\"]+|)\s{2}/g);
      var singleSpace = '';

      if (isClass) {
        isClass.forEach(function (value) {
          singleSpace = value.replace(/\s\s+/g, ' ');
          str = str.replace(value, singleSpace);
        });
      }

      return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp, function (match, cnt, offset, matchStr) {
        var SPECIAL_CHAR = /\@|\#|\$/gm;
        var matches = cnt.match(CALL_FUNCTION); // matches to detect any function calls

        if (matches) {
          var rlStr = matches[1];

          if (ELSEIF_STMT.test(cnt)) {
            //handling else-if condition
            cnt = '";} ' + cnt.replace(matches[1], rlStr.replace(WORD, function (str) {
              str = str.trim();
              return addNameSpace(str, !QUOTES.test(str) && localKeys.indexOf(str) === -1, nameSpace, localKeys);
            })) + '{ \n str = str + "';
          } else if (IF_STMT.test(cnt)) {
            //handling if condition
            cnt = '"; ' + cnt.replace(matches[1], rlStr.replace(WORDIF, function (strs) {
              return HandleSpecialCharArrObj(strs, nameSpace, localKeys);
            })) + '{ \n str = str + "';
          } else if (FOR_STMT.test(cnt)) {
            //handling for condition
            var _rlStr = matches[1].split(' of '); // replace for each into actual JavaScript


            cnt = '"; ' + cnt.replace(matches[1], function (mtc) {
              localKeys.push(_rlStr[0]);
              localKeys.push(_rlStr[0] + 'Index');
              varCOunt = varCOunt + 1; // tslint:disable-next-line

              return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(_rlStr[1], true, nameSpace, localKeys) + '.length; i' + varCOunt + '++';
            }) + '{ \n ' + _rlStr[0] + '= ' + addNameSpace(_rlStr[1], true, nameSpace, localKeys) + '[i' + varCOunt + ']; \n var ' + _rlStr[0] + 'Index=i' + varCOunt + '; \n str = str + "';
          } else {
            //helper function handling
            var fnStr = cnt.split('(');
            var fNameSpace = helper && helper.hasOwnProperty(fnStr[0]) ? 'this.' : 'global';
            fNameSpace = /\./.test(fnStr[0]) ? '' : fNameSpace;
            var ftArray = matches[1].split(',');

            if (matches[1].length !== 0 && !/data/.test(ftArray[0]) && !/window./.test(ftArray[0])) {
              matches[1] = fNameSpace === 'global' ? nameSpace + '.' + matches[1] : matches[1];
            }

            var splRegexp = /\@|\$|\#/gm;
            var arrObj = /\]\./gm;

            if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
              var splArrRegexp = /\@|\$|\#|\]\./gm;

              if (splArrRegexp.test(cnt)) {
                // tslint:disable-next-line
                cnt = '"+ ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(matches[1], rlStr.replace(WORDFUNC, function (strs) {
                  return HandleSpecialCharArrObj(strs, nameSpace, localKeys);
                })) + '+ "';
              }
            } else {
              cnt = '" + ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(rlStr, addNameSpace(matches[1].replace(/,( |)data.|,/gi, ',' + nameSpace + '.').replace(/,( |)data.window/gi, ',window'), fNameSpace === 'global' ? false : true, nameSpace, localKeys)) + '+"';
            }
          }
        } else if (ELSE_STMT.test(cnt)) {
          // handling else condition
          cnt = '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "');
        } else if (!!cnt.match(IF_OR_FOR)) {
          // close condition 
          cnt = cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "');
        } else if (SPECIAL_CHAR.test(cnt)) {
          // template string with double slash with special character
          if (cnt.match(SINGLE_SLASH)) {
            cnt = SlashReplace(cnt);
          }

          cnt = '"+' + NameSpaceForspecialChar(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
        } else {
          // template string with double slash
          if (cnt.match(SINGLE_SLASH)) {
            cnt = SlashReplace(cnt);
            cnt = '"+' + NameSpaceForspecialChar(cnt, localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '"]+"';
          } else {
            // evaluate normal expression
            cnt = '"+' + addNameSpace(cnt.replace(/\,/gi, '+' + nameSpace + '.'), localKeys.indexOf(cnt) === -1, nameSpace, localKeys) + '+"';
          }
        }

        return cnt;
      });
    }

    function addNameSpace(str, addNS, nameSpace, ignoreList) {
      return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split('.')[0]) === -1 ? nameSpace + '.' + str : str;
    }

    function NameSpaceArrObj(str, addNS, nameSpace, ignoreList) {
      var arrObjReg = /^\..*/gm;
      return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split('.')[0]) === -1 && !arrObjReg.test(str) ? nameSpace + '.' + str : str;
    } // // Create hashCode for template string to storeCached function
    // function hashCode(str: string): string {
    //     return str.split('').reduce((a: number, b: string) => { a = ((a << 5) - a) + b.charCodeAt(0); return a & a; }, 0).toString();
    // }


    function NameSpaceForspecialChar(str, addNS, nameSpace, ignoreList) {
      return addNS && !NOT_NUMBER.test(str) && ignoreList.indexOf(str.split('.')[0]) === -1 ? nameSpace + '["' + str : str;
    } // tslint:disable-next-line


    function SlashReplace(tempStr) {
      // tslint:disable-next-line
      var _double = "\\\\";

      if (tempStr.match(DOUBLE_SLASH)) {
        tempStr = tempStr;
      } else {
        tempStr = tempStr.replace(SINGLE_SLASH, _double);
      }

      return tempStr;
    }

    function HandleSpecialCharArrObj(str, nameSpaceNew, keys) {
      str = str.trim();
      var windowFunc = /\window\./gm;

      if (!windowFunc.test(str)) {
        var quotes = /'|"/gm;
        var splRegexp = /\@|\$|\#/gm;

        if (splRegexp.test(str)) {
          str = NameSpaceForspecialChar(str, keys.indexOf(str) === -1, nameSpaceNew, keys) + '"]';
        }

        if (ARR_OBJ.test(str)) {
          return NameSpaceArrObj(str, !quotes.test(str) && keys.indexOf(str) === -1, nameSpaceNew, keys);
        } else {
          return addNameSpace(str, !quotes.test(str) && keys.indexOf(str) === -1, nameSpaceNew, keys);
        }
      } else {
        return str;
      }
    }
    /**
     * Template Engine Bridge
     */


    var HAS_ROW = /^[\n\r.]+\<tr|^\<tr/;
    var HAS_SVG = /^[\n\r.]+\<svg|^\<path|^\<g/;
    var blazorTemplates = {};

    function getRandomId() {
      return '-' + Math.random().toString(36).substr(2, 5);
    }
    /**
     * Compile the template string into template function.
     * @param  {string} templateString - The template string which is going to convert.
     * @param  {Object} helper? - Helper functions as an object.
     * @private
     */
    //tslint:disable-next-line


    function compile$$1(templateString, helper) {
      var compiler = engineObj.compile(templateString, helper); //tslint:disable-next-line

      return function (data, component, propName, templateId, isStringTemplate, index) {
        var result = compiler(data, component, propName);
        var blazorTemplateId = 'BlazorTemplateId';

        if (isBlazor() && !isStringTemplate) {
          var randomId = getRandomId();
          var blazorId = templateId + randomId;

          if (!blazorTemplates[templateId]) {
            blazorTemplates[templateId] = [];
          }

          if (!isNullOrUndefined(index)) {
            var _keys6 = Object.keys(blazorTemplates[templateId][index]);

            for (var _i41 = 0, _keys7 = _keys6; _i41 < _keys7.length; _i41++) {
              var key = _keys7[_i41];

              if (key !== blazorTemplateId && data[key]) {
                blazorTemplates[templateId][index][key] = data[key];
              }

              if (key === blazorTemplateId) {
                blazorId = blazorTemplates[templateId][index][key];
              }
            }
          } else {
            data[blazorTemplateId] = blazorId;
            blazorTemplates[templateId].push(data);
          } // tslint:disable-next-line:no-any


          return propName === 'rowTemplate' ? [_createElement('tr', {
            id: blazorId,
            className: 'e-blazor-template'
          })] : // tslint:disable-next-line:no-any
          [_createElement('div', {
            id: blazorId,
            className: 'e-blazor-template'
          })];
        }

        if (typeof result === 'string') {
          if (HAS_SVG.test(result)) {
            var ele = _createElement('svg', {
              innerHTML: result
            });

            return ele.childNodes;
          } else {
            var _ele = _createElement(HAS_ROW.test(result) ? 'table' : 'div', {
              innerHTML: result
            });

            return _ele.childNodes;
          }
        } else {
          return result;
        }
      };
    }

    function updateBlazorTemplate(templateId, templateName, comp, isEmpty, callBack) {
      if (isBlazor()) {
        var ejsIntrop = 'sfBlazor';
        window[ejsIntrop].updateTemplate(templateName, blazorTemplates[templateId], templateId, comp, callBack);

        if (isEmpty !== false) {
          blazorTemplates[templateId] = [];
        }
      }
    }

    function resetBlazorTemplate(templateId, templateName, index) {
      var templateDiv = document.getElementById(templateId);

      if (templateDiv) {
        // tslint:disable-next-line:no-any
        var innerTemplates = templateDiv.getElementsByClassName('blazor-inner-template');

        for (var i = 0; i < innerTemplates.length; i++) {
          var tempId = ' ';

          if (!isNullOrUndefined(index)) {
            tempId = innerTemplates[index].getAttribute('data-templateId');
          } else {
            tempId = innerTemplates[i].getAttribute('data-templateId');
          }

          var tempElement = document.getElementById(tempId);

          if (tempElement) {
            var length = tempElement.childNodes.length;

            for (var j = 0; j < length; j++) {
              if (!isNullOrUndefined(index)) {
                innerTemplates[index].appendChild(tempElement.childNodes[0]);
                i = innerTemplates.length;
              } else {
                innerTemplates[i].appendChild(tempElement.childNodes[0]);
              }
            }
          }
        }
      }
    }
    /**
     * Set your custom template engine for template rendering.
     * @param  {ITemplateEngine} classObj - Class object for custom template.
     * @private
     */


    function setTemplateEngine(classObj) {
      engineObj.compile = classObj.compile;
    }
    /**
     * Get current template engine for template rendering
     * @param  {ITemplateEngine} classObj - Class object for custom template.
     * @private
     */


    function getTemplateEngine() {
      return engineObj.compile;
    } //Default Engine Class


    var Engine = /*#__PURE__*/function () {
      function Engine() {
        _classCallCheck(this, Engine);
      }

      _createClass2(Engine, [{
        key: "compile",
        value: function compile(templateString) {
          var helper = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
          return compile$1(templateString, helper);
        }
      }]);

      return Engine;
    }();

    var engineObj = {
      compile: new Engine().compile
    };
    var simpleRegex = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/;
    var multipleSplitRegex = /(?:#([\w-]+)|(\w+)|\.([\w-]+))/g;
    var idClassSelector = /^(\.|#)/;
    var selectMapper = {
      '.': 'className',
      '#': 'id'
    };
    var classRegexString = '(?=.*?\\b{value}\\b)';
    var assigner = {
      className: 'attributes.className',
      id: 'attributes.id',
      tagName: 'tagName'
    };
    var emptyElements = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'link', 'meta', 'param', 'embed', 'command', 'keygen', 'source', 'track', 'wbr'];
    var blockElements = ['a', 'address', 'article', 'applet', 'aside', 'audio', 'blockquote', 'button', 'canvas', 'center', 'dd', 'del', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'iframe', 'ins', 'isindex', 'li', 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', 'output', 'p', 'pre', 'section', 'script', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul', 'video'];
    var inlineElement = ['abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo', 'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q', 's', 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'textarea', 'tt', 'u', 'var'];
    var selfClosingElements = ['colgroup', 'dd', 'dt', 'li', 'options', 'p', 'td', 'tfoot', 'th', 'thead', 'tr'];
    var fillAttrs = ['checked', 'compact', 'declare', 'defer', 'disabled', 'ismap', 'multiple', 'nohref', 'noresize', 'noshade', 'nowrap', 'readonly', 'selected'];
    var cspElement = ['Script', 'style'];
    var nameMapper = {
      'tabindex': 'tabIndex'
    };
    var startRegex = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
    var endRegex = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
    var attributeRegex = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
    /**
     * Namespace for VirtualDOM
     * @private
     */

    var VirtualDOM;

    (function (VirtualDOM) {
      //tslint:disable:no-any
      function createElement(tagName, properties) {
        var children = [];
        var extended = extend({}, {}, properties, true);

        if (!isNullOrUndefined(properties)) {
          var _keys8 = Object.keys(properties);

          if (_keys8.length) {
            if (extended.innerHTML) {
              children = ConvertHTMLToJSon(extended.innerHTML);
              delete extended.innerHTML;
            }

            if (extended.attrs) {
              extend(extended, extended.attrs);
              delete extended.attrs;
            }

            if (extended.styles) {
              var valArr = extended.styles.split(';');
              var vObj = {};

              for (var i = 0, length = valArr.length; i < length; i++) {
                var cVal = valArr[i];
                var styleSplit = cVal.split(':');
                vObj[styleSplit[0]] = styleSplit[1];
              }

              delete extended.styles;
              extended.style = vObj;
            }
          }
        }

        return {
          tagName: tagName,
          attributes: extended || {},
          children: children
        };
      }

      VirtualDOM.createElement = createElement;

      function assignParent(childrens, parent) {
        if (parent && childrens) {
          childrens.forEach(function (child) {
            if (isObject(child)) {
              if (child.parent) {
                detach(child);
              }

              child.parent = parent;
            }

            return child;
          });
        }
      }

      VirtualDOM.assignParent = assignParent;

      function append(fromElements, toElement) {
        assignParent(fromElements, toElement);

        if (toElement.children) {
          toElement.children = toElement.children.concat(fromElements);
        } else {
          toElement.children = [].concat(fromElements);
        }
      }

      VirtualDOM.append = append;

      function prepend(child, toElement) {
        assignParent(child, toElement);

        if (!toElement.children || !toElement.children.length) {
          toElement.children = [];
          toElement.children.concat(child);
        } else {
          for (var i = child.length - 1; i >= 0; i--) {
            toElement.children.unshift(child[i]);
          }
        }
      }

      VirtualDOM.prepend = prepend;

      function detach(element) {
        var parent = element.parent;

        if (parent) {
          var index = parent.children.indexOf(element);

          if (index !== -1) {
            parent.children.splice(index);
          }
        }

        return parent;
      }

      VirtualDOM.detach = detach; //tslint:disable-next-line

      function vDomSelector(_ref64) {
        var ele = _ref64.ele,
            selector = _ref64.selector,
            selectAll = _ref64.selectAll,
            immediateParent = _ref64.immediateParent;
        var iSelector = selector.split(' ');
        var curColl = ele;

        for (var i = 0, length = iSelector.length; i < length; i++) {
          var isDescendant = false;
          var parent = curColl;
          var curSelector = iSelector[i];
          var _mapper = [];

          if (simpleRegex.test(curSelector)) {
            processSelector(curSelector, _mapper);
          } else if (curSelector.indexOf('>') === -1) {
            var splitSelector = curSelector.match(multipleSplitRegex);

            var _iterator55 = _createForOfIteratorHelper(splitSelector),
                _step55;

            try {
              for (_iterator55.s(); !(_step55 = _iterator55.n()).done;) {
                var curMap = _step55.value;
                processSelector(curMap, _mapper);
              }
            } catch (err) {
              _iterator55.e(err);
            } finally {
              _iterator55.f();
            }
          } else if (curSelector.indexOf('>') !== -1) {
            isDescendant = true;
            var dSelector = curSelector.split('>'); //tslint:disable-next-line

            var dParent = ele;
            var descendent = void 0;
            var flag = 0;

            var _iterator56 = _createForOfIteratorHelper(dSelector),
                _step56;

            try {
              for (_iterator56.s(); !(_step56 = _iterator56.n()).done;) {
                var sel = _step56.value;

                if (!dParent) {
                  break;
                }

                if (dParent.length) {
                  var descendentChild = [];

                  var _iterator57 = _createForOfIteratorHelper(dParent),
                      _step57;

                  try {
                    for (_iterator57.s(); !(_step57 = _iterator57.n()).done;) {
                      var child = _step57.value;
                      descendentChild = descendentChild.concat(vDomSelector({
                        ele: child,
                        selector: sel,
                        selectAll: selectAll,
                        immediateParent: !!flag
                      }));
                    }
                  } catch (err) {
                    _iterator57.e(err);
                  } finally {
                    _iterator57.f();
                  }

                  descendent = descendentChild;
                } else {
                  descendent = vDomSelector({
                    ele: dParent,
                    selector: sel,
                    selectAll: selectAll,
                    immediateParent: !!flag
                  });
                }

                flag++;
                dParent = descendent;
              }
            } catch (err) {
              _iterator56.e(err);
            } finally {
              _iterator56.f();
            }

            if (descendent) {
              curColl = descendent;
            }
          }

          if (!isDescendant) {
            if (parent.length) {
              var iCurSelector = [];

              var _iterator58 = _createForOfIteratorHelper(parent),
                  _step58;

              try {
                for (_iterator58.s(); !(_step58 = _iterator58.n()).done;) {
                  var curParent = _step58.value;
                  iCurSelector = iCurSelector.concat(accessElement(curParent, _mapper, selectAll, immediateParent));
                }
              } catch (err) {
                _iterator58.e(err);
              } finally {
                _iterator58.f();
              }

              curColl = iCurSelector;
            } else {
              curColl = accessElement(parent, _mapper, selectAll, immediateParent);
            }
          }
        }

        if (selectAll) {
          return curColl;
        } else {
          return curColl[0] || null;
        }
      }

      VirtualDOM.vDomSelector = vDomSelector;

      function processSelector(selector, mapper) {
        var match = selector.match(idClassSelector);
        var obj = {};

        if (match) {
          var curMapper = selectMapper[match[0]];

          if (curMapper === 'className') {
            var curObj = mapper.filter(function (obj) {
              return obj.hasOwnProperty('className');
            })[0];
            var canPush = false;

            if (!curObj) {
              canPush = true;
              curObj = {};
            }

            var existValue = curObj[curMapper] || '';
            curObj[curMapper] = existValue + classRegexString.replace('{value}', selector.replace('.', ''));

            if (canPush) {
              mapper.push(curObj);
            }
          } else {
            obj[curMapper] = selector.replace(match[0], '');
            mapper.push(obj);
          }
        } else {
          mapper.push({
            tagName: selector
          });
        }
      } //tslint:disable-next-line


      function accessElement(ele, mapper, selectAll, immediateParent) {
        if (ele.children) {
          //tslint:disable-next-line
          var temp = ele.children.filter(function (child) {
            if (typeof child !== 'string') {
              var matched = true;

              var _iterator59 = _createForOfIteratorHelper(mapper),
                  _step59;

              try {
                for (_iterator59.s(); !(_step59 = _iterator59.n()).done;) {
                  var map = _step59.value;
                  var key = Object.keys(map)[0];
                  var expected = map[key];
                  var actualValue = getValue(assigner[key], child);

                  if (key === 'className') {
                    if (!new RegExp('^' + expected + '.*$').test(actualValue)) {
                      matched = false;
                      break;
                    }
                  } else if (actualValue !== expected) {
                    matched = false;
                    break;
                  }
                }
              } catch (err) {
                _iterator59.e(err);
              } finally {
                _iterator59.f();
              }

              return matched;
            } else {
              return false;
            }
          });

          if (!immediateParent && (!temp.length || selectAll)) {
            ele.children.forEach(function (child) {
              if (isObject(child)) {
                temp = temp.concat(accessElement(child, mapper, selectAll));
              }
            });
          }

          return temp;
        } else {
          return [];
        }
      }

      VirtualDOM.accessElement = accessElement;

      function ConvertHTMLToJSon(htmlString) {
        var results = [];
        var isText;
        var tagArray = [];
        var nodeArray = [];

        while (htmlString) {
          isText = true;
          var lastVal = getLastValue(tagArray);

          if (!lastVal || !contains(cspElement, lastVal)) {
            if (htmlString.indexOf('</') === 0) {
              var match = htmlString.match(endRegex);

              if (match) {
                htmlString = htmlString.substring(match[0].length); //tslint:disable-next-line

                match[0].replace(endRegex, iterateEndTag);
              }

              isText = false;
            } else if (htmlString.indexOf('<') === 0) {
              var _match = htmlString.match(startRegex);

              if (_match) {
                htmlString = htmlString.substring(_match[0].length); //tslint:disable-next-line

                _match[0].replace(startRegex, iterateStartTag);
              }

              isText = false;
            }

            if (isText) {
              var tagIndex = htmlString.indexOf('<');
              var text = tagIndex < 0 ? htmlString : htmlString.substring(0, tagIndex);
              htmlString = tagIndex < 0 ? '' : htmlString.substring(tagIndex);
              iterateText(text);
            }
          } else {
            //tslint:disable-next-line
            htmlString = htmlString.replace(new RegExp('([\\s\\S]*?)<\/' + getLastValue(nodeArray) + '[^>]*>'), function (all, text) {
              text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
              iterateText(text);
              return '';
            });
            iterateEndTag('', getLastValue(tagArray));
          }
        }

        function iterateStartTag(start, tagName, rest) {
          tagName = tagName.toLowerCase();

          if (contains(blockElements, tagName)) {
            while (getLastValue(tagArray) && contains(inlineElement, getLastValue(tagArray))) {
              iterateEndTag('', getLastValue(tagArray));
            }
          }

          if (contains(selfClosingElements, tagName) && getLastValue(tagArray)) {
            iterateEndTag('', tagName);
          }

          var isSelfTag = contains(emptyElements, tagName);

          if (!isSelfTag) {
            tagArray.push(tagName);
          }

          var attrs = {}; //tslint:disable-next-line

          rest.replace(attributeRegex, function (match, name) {
            //tslint:disable-next-line
            var val = (arguments.length <= 4 ? undefined : arguments[4]) ? arguments.length <= 4 ? undefined : arguments[4] : (arguments.length <= 5 ? undefined : arguments[5]) ? arguments.length <= 5 ? undefined : arguments[5] : (arguments.length <= 6 ? undefined : arguments[6]) ? arguments.length <= 6 ? undefined : arguments[6] : contains(fillAttrs, name) ? name : '';

            if (name === 'style') {
              var valArr = val.split(';');
              var vObj = {};

              for (var i = 0, length = valArr.length; i < length; i++) {
                var cVal = valArr[i];
                var styleSplit = cVal.split(':');
                vObj[styleSplit[0]] = styleSplit[1];
              }

              val = vObj;
            }

            name = nameMapper[name] || name;
            attrs[name] = val; //tslint:disable-next-line
          });
          attrs['data-id'] = getRandomId();
          var tagObject = {
            tagName: tagName,
            attributes: attrs
          };

          if (isSelfTag) {
            var parent = nodeArray[0] || results;

            if (parent.children === undefined) {
              parent.children = [];
            }

            tagObject.parent = parent;
            parent.children.push(tagObject);
          } else {
            nodeArray.unshift(tagObject);
          }
        }

        function iterateEndTag(start, tagName) {
          var pos;

          if (!tagName) {
            pos = 0;
          } else {
            for (pos = tagArray.length - 1; pos >= 0; pos--) {
              if (tagArray[pos] === tagName) {
                break;
              }
            }
          }

          if (pos >= 0) {
            for (var j = nodeArray.length - 1; j >= pos; j--) {
              //tslint:disable-next-line
              var node = nodeArray.shift();

              if (nodeArray.length === 0) {
                results.push(node);
              } else {
                var parent = nodeArray[0];

                if (parent.children === undefined) {
                  parent.children = [];
                }

                node.parent = parent;
                parent.children.push(node);
              }
            }

            tagArray.length = pos;
          }
        }

        function iterateText(text) {
          if (nodeArray.length === 0) {
            results.push(text);
          } else {
            var parent = nodeArray[0];

            if (parent.children === undefined) {
              parent.children = [];
            }

            parent.children.push(text);
          }
        }

        return results;
      }

      VirtualDOM.ConvertHTMLToJSon = ConvertHTMLToJSon; //tslint:disable-next-line 

      function getLastValue(arr) {
        return arr[arr.length - 1];
      }

      function contains(arr, key) {
        return arr.indexOf(key) !== -1;
      } //tslint:disable-next-line


      function cloneNode(ele, deep) {
        if (isObject(ele)) {
          if (deep) {
            return extend({}, {}, ele, true);
          } else {
            return {
              tagName: ele.tagName,
              attributes: ele.attributes
            };
          }
        } else {
          return ele.cloneNode(deep);
        }
      }

      VirtualDOM.cloneNode = cloneNode;

      function setStyleAttribute(element, attrs) {
        if (element.attributes.style) {
          element.attributes.style = extend({}, attrs);
        } else {
          element.attributes.style = extend(element.attributes.style, attrs);
        }
      }

      VirtualDOM.setStyleAttribute = setStyleAttribute; //tslint:enable:no-any
    })(VirtualDOM || (VirtualDOM = {}));
    /**
     * Functions related to dom operations.
     */


    var SVG_REG = /^svg|^path|^g/;
    /**
     * Function to create Html element.
     * @param tagName - Name of the tag, id and class names.
     * @param properties - Object to set properties in the element.
     * @param properties.id - To set the id to the created element.
     * @param properties.className - To add classes to the element.
     * @param properties.innerHTML - To set the innerHTML to element.
     * @param properties.styles - To set the some custom styles to element.
     * @param properties.attrs - To set the attributes to element.
     * @private
     */

    function _createElement(tagName, properties) {
      //tslint:disable-next-line
      var element = SVG_REG.test(tagName) ? document.createElementNS('http://www.w3.org/2000/svg', tagName) : document.createElement(tagName);

      if (typeof properties === 'undefined') {
        return element;
      }

      element.innerHTML = properties.innerHTML ? properties.innerHTML : '';

      if (properties.className !== undefined) {
        element.className = properties.className;
      }

      if (properties.id !== undefined) {
        element.id = properties.id;
      }

      if (properties.styles !== undefined) {
        element.setAttribute('style', properties.styles);
      }

      if (properties.attrs !== undefined) {
        attributes(element, properties.attrs);
      }

      return element;
    }
    /**
     * The function used to add the classes to array of elements
     * @param  {Element[]|NodeList} elements - An array of elements that need to add a list of classes
     * @param  {string|string[]} classes - String or array of string that need to add an individual element as a class
     * @private
     */


    function addClass(elements, classes) {
      var classList = getClassList(classes);

      var _iterator60 = _createForOfIteratorHelper(elements),
          _step60;

      try {
        for (_iterator60.s(); !(_step60 = _iterator60.n()).done;) {
          var ele = _step60.value;

          var _iterator61 = _createForOfIteratorHelper(classList),
              _step61;

          try {
            for (_iterator61.s(); !(_step61 = _iterator61.n()).done;) {
              var className = _step61.value;

              if (isObject(ele)) {
                var curClass = getValue('attributes.className', ele);

                if (isNullOrUndefined(curClass)) {
                  setValue('attributes.className', className, ele);
                } else if (!new RegExp('\\b' + className + '\\b', 'i').test(curClass)) {
                  setValue('attributes.className', curClass + ' ' + className, ele);
                }
              } else {
                if (!ele.classList.contains(className)) {
                  ele.classList.add(className);
                }
              }
            }
          } catch (err) {
            _iterator61.e(err);
          } finally {
            _iterator61.f();
          }
        }
      } catch (err) {
        _iterator60.e(err);
      } finally {
        _iterator60.f();
      }

      return elements;
    }
    /**
     * The function used to add the classes to array of elements
     * @param  {Element[]|NodeList} elements - An array of elements that need to remove a list of classes
     * @param  {string|string[]} classes - String or array of string that need to add an individual element as a class
     * @private
     */


    function removeClass(elements, classes) {
      var classList = getClassList(classes);

      var _iterator62 = _createForOfIteratorHelper(elements),
          _step62;

      try {
        for (_iterator62.s(); !(_step62 = _iterator62.n()).done;) {
          var ele = _step62.value;
          var flag = isObject(ele);
          var canRemove = flag ? getValue('attributes.className', ele) : ele.className !== '';

          if (canRemove) {
            var _iterator63 = _createForOfIteratorHelper(classList),
                _step63;

            try {
              for (_iterator63.s(); !(_step63 = _iterator63.n()).done;) {
                var className = _step63.value;

                if (flag) {
                  var _classes = getValue('attributes.className', ele);

                  var classArr = _classes.split(' ');

                  var index = classArr.indexOf(className);

                  if (index !== -1) {
                    classArr.splice(index, 1);
                  }

                  setValue('attributes.className', classArr.join(' '), ele);
                } else {
                  ele.classList.remove(className);
                }
              }
            } catch (err) {
              _iterator63.e(err);
            } finally {
              _iterator63.f();
            }
          }
        }
      } catch (err) {
        _iterator62.e(err);
      } finally {
        _iterator62.f();
      }

      return elements;
    }

    function getClassList(classes) {
      var classList = [];

      if (typeof classes === 'string') {
        classList.push(classes);
      } else {
        classList = classes;
      }

      return classList;
    }
    /**
     * The function used to check element is visible or not.
     * @param  {Element|Node} element - An element the need to check visibility
     * @private
     */


    function isVisible(element) {
      var ele = element;
      return ele.style.visibility === '' && ele.offsetWidth > 0;
    }
    /**
     * The function used to insert an array of elements into a first of the element.
     * @param  {Element[]|NodeList} fromElements - An array of elements that need to prepend.
     * @param  {Element} toElement - An element that is going to prepend.
     * @private
     */


    function prepend(fromElements, toElement, isEval) {
      //tslint:disable:no-any
      if (isObject(toElement)) {
        VirtualDOM.prepend(fromElements, toElement);
      } else {
        var docFrag = document.createDocumentFragment();

        var _iterator64 = _createForOfIteratorHelper(fromElements),
            _step64;

        try {
          for (_iterator64.s(); !(_step64 = _iterator64.n()).done;) {
            var ele = _step64.value;
            docFrag.appendChild(ele);
          }
        } catch (err) {
          _iterator64.e(err);
        } finally {
          _iterator64.f();
        }

        toElement.insertBefore(docFrag, toElement.firstElementChild);

        if (isEval) {
          executeScript(toElement);
        }
      }

      return fromElements;
    }
    /**
     * The function used to insert an array of elements into last of the element.
     * @param  {Element[]|NodeList} fromElements - An array of elements that need to append.
     * @param  {Element} toElement - An element that is going to prepend.
     * @private
     */


    function append(fromElements, toElement, isEval) {
      if (isObject(toElement)) {
        VirtualDOM.append(fromElements, toElement);
      } else {
        var docFrag = document.createDocumentFragment();

        var _iterator65 = _createForOfIteratorHelper(fromElements),
            _step65;

        try {
          for (_iterator65.s(); !(_step65 = _iterator65.n()).done;) {
            var ele = _step65.value;
            docFrag.appendChild(ele);
          }
        } catch (err) {
          _iterator65.e(err);
        } finally {
          _iterator65.f();
        }

        toElement.appendChild(docFrag);

        if (isEval) {
          executeScript(toElement);
        }
      }

      return fromElements;
    } //tslint: enable:no-any

    /**
     * The function is used to evaluate script from Ajax request
     * @param ele - An element is going to evaluate the script
     */


    function executeScript(ele) {
      var eleArray = ele.querySelectorAll('script');
      eleArray.forEach(function (element) {
        var script = document.createElement('script');
        script.text = element.innerHTML;
        document.head.appendChild(script);
        detach(script);
      });
    }
    /**
     * The function used to remove the element from the
     * @param  {Element|Node|HTMLElement} element - An element that is going to detach from the Dom
     * @private
     */


    function detach(element) {
      if (isObject(element)) {
        return VirtualDOM.detach(element);
      } else {
        var parentNode = element.parentNode;
        return parentNode.removeChild(element);
      }
    }
    /**
     * The function used to remove the element from Dom also clear the bounded events
     * @param  {Element|Node|HTMLElement} element - An element remove from the Dom
     * @private
     */


    function remove(element) {
      if (isObject(element)) {
        VirtualDOM.detach(element);
      } else {
        var parentNode = element.parentNode;
        EventHandler.clearEvents(element);
        parentNode.removeChild(element);
      }
    }
    /**
     * The function helps to set multiple attributes to an element
     * @param  {Element|Node} element - An element that need to set attributes.
     * @param  {{[key:string]:string}} attributes - JSON Object that is going to as attributes.
     * @private
     */


    function attributes(element, attributes) {
      var keys = Object.keys(attributes);
      var ele = element;

      for (var _i42 = 0, _keys9 = keys; _i42 < _keys9.length; _i42++) {
        var key = _keys9[_i42];

        if (isObject(ele)) {
          var iKey = key;

          if (key === 'tabindex') {
            iKey = 'tabIndex';
          }

          ele.attributes[iKey] = attributes[key];
        } else {
          ele.setAttribute(key, attributes[key]);
        }
      }

      return ele;
    }
    /**
     * The function selects the element from giving context.
     * @param  {string} selector - Selector string need fetch element from the
     * @param  {Document|Element=document} context - It is an optional type, That specifies a Dom context.
     * @private
     */
    //tslint:disable-next-line


    function select(selector) {
      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
      var needsVDOM = arguments.length > 2 ? arguments[2] : undefined;

      if (isObject(context) && needsVDOM) {
        //tslint:disable-next-line
        return VirtualDOM.vDomSelector({
          ele: context,
          selector: selector,
          selectAll: false
        });
      } else {
        return context.querySelector(selector);
      }
    }
    /**
     * The function selects an array of element from the given context.
     * @param  {string} selector - Selector string need fetch element from the
     * @param  {Document|Element=document} context - It is an optional type, That specifies a Dom context.
     * @private
     */


    function selectAll(selector) {
      var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
      var needsVDOM = arguments.length > 2 ? arguments[2] : undefined;

      if (isObject(context) && !needsVDOM) {
        //tslint:disable-next-line
        return VirtualDOM.vDomSelector({
          ele: context,
          selector: selector,
          selectAll: true
        });
      } else {
        var nodeList = context.querySelectorAll(selector);
        return nodeList;
      }
    }
    /**
     * Returns single closest parent element based on class selector.
     * @param  {Element} element - An element that need to find the closest element.
     * @param  {string} selector - A classSelector of closest element.
     * @private
     */


    function closest(element, selector) {
      var el = element;

      if (typeof el.closest === 'function') {
        return el.closest(selector);
      }

      while (el && el.nodeType === 1) {
        if (matches(el, selector)) {
          return el;
        }

        el = el.parentNode;
      }

      return null;
    }
    /**
     * Returns all sibling elements of the given element.
     * @param  {Element|Node} element - An element that need to get siblings.
     * @private
     */


    function siblings(element) {
      var siblings = [];
      var childNodes = Array.prototype.slice.call(element.parentNode.childNodes);

      var _iterator66 = _createForOfIteratorHelper(childNodes),
          _step66;

      try {
        for (_iterator66.s(); !(_step66 = _iterator66.n()).done;) {
          var curNode = _step66.value;

          if (curNode.nodeType === Node.ELEMENT_NODE && element !== curNode) {
            siblings.push(curNode);
          }
        }
      } catch (err) {
        _iterator66.e(err);
      } finally {
        _iterator66.f();
      }

      return siblings;
    }
    /**
     * set the value if not exist. Otherwise set the existing value
     * @param  {HTMLElement} element - An element to which we need to set value.
     * @param  {string} property - Property need to get or set.
     * @param  {string} value - value need to set.
     * @private
     */


    function getAttributeOrDefault(element, property, value) {
      var attrVal;
      var isObj = isObject(element);

      if (isObj) {
        attrVal = getValue('attributes.' + property, element);
      } else {
        attrVal = element.getAttribute(property);
      }

      if (isNullOrUndefined(attrVal) && value) {
        if (!isObj) {
          element.setAttribute(property, value.toString());
        } else {
          element.attributes[property] = value;
        }

        attrVal = value;
      }

      return attrVal;
    }
    /**
     * Set the style attributes to Html element.
     * @param {HTMLElement} element - Element which we want to set attributes
     * @param {any} attrs - Set the given attributes to element
     * @return {void}
     * @private
     */


    function setStyleAttribute(element, attrs) {
      if (attrs !== undefined) {
        if (isObject(element)) {
          // tslint:disable-next-line:no-any
          VirtualDOM.setStyleAttribute(element, attrs);
        } else {
          Object.keys(attrs).forEach(function (key) {
            // tslint:disable-next-line:no-any
            element.style[key] = attrs[key];
          });
        }
      }
    }
    /**
     * Method for add and remove classes to a dom element.
     * @param {Element} element - Element for add and remove classes
     * @param {string[]} addClasses - List of classes need to be add to the element
     * @param {string[]} removeClasses - List of classes need to be remove from the element
     * @return {void}
     * @private
     */


    function classList(element, addClasses, removeClasses) {
      addClass([element], addClasses);
      removeClass([element], removeClasses);
    }
    /**
     * Method to check whether the element matches the given selector.
     * @param {Element} element - Element to compare with the selector.
     * @param {string} selector - String selector which element will satisfy.
     * @return {void}
     * @private
     */


    function matches(element, selector) {
      //tslint:disable-next-line
      var matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;

      if (matches) {
        return matches.call(element, selector);
      } else {
        return [].indexOf.call(document.querySelectorAll(selector), element) !== -1;
      }
    }

    function includeInnerHTML(ele, innerHTML) {
      if (isObject(ele)) {
        if (innerHTML === '') {
          ele.children = [];
        } else {
          var res = VirtualDOM.ConvertHTMLToJSon(innerHTML);

          if (res.length) {
            VirtualDOM.assignParent(res, ele);
            ele.children = res;
          }
        }
      } else {
        ele.innerHTML = innerHTML;
      }
    } //tslint:disable-next-line


    function containsClass(ele, className) {
      if (isObject(ele)) {
        // tslint:disable-next-line:no-any
        return new RegExp('\\b' + className + '\\b', 'i').test(ele.attributes.className);
      } else {
        return ele.classList.contains(className);
      }
    }
    /**
     * Method to check whether the element matches the given selector.
     * @param {} element - Element to compare with the selector.
     * @param {string} selector - String selector which element will satisfy.
     * @return {Element | VirtualObject}
     * @private
     */
    //tslint:disable:no-any


    function cloneNode(element, deep) {
      if (isObject(element)) {
        if (deep) {
          return extend({}, {}, element, true);
        } else {
          return {
            tagName: element.tagName,
            attributes: element.attributes
          };
        }
      } else {
        return element.cloneNode(deep);
      }
    }

    var isColEName = new RegExp('\]');
    /* tslint:enable:no-any */

    /**
     * Base library module is common module for Framework modules like touch,keyboard and etc.,
     * @private
     */

    var Base = /*#__PURE__*/function () {
      /**
       * Base constructor accept options and element
       */
      function Base(options, element) {
        _classCallCheck(this, Base);

        this.isRendered = false;
        this.isComplexArraySetter = false;
        this.isServerRendered = false;
        this.allowServerDataBinding = true;
        this.isProtectedOnChange = true;
        this.properties = {};
        this.changedProperties = {};
        this.oldProperties = {};
        this.bulkChanges = {};
        this.refreshing = false;
        this.ignoreCollectionWatch = false; // tslint:disable-next-line:no-empty

        this.finalUpdate = function () {};

        this.childChangedProperties = {};
        this.modelObserver = new Observer(this);

        if (!isUndefined(element)) {
          if ('string' === typeof element) {
            this.element = document.querySelector(element);
          } else {
            this.element = element;
          }

          if (!isNullOrUndefined(this.element)) {
            this.isProtectedOnChange = false;
            this.addInstance();
          }
        }

        if (!isUndefined(options)) {
          this.setProperties(options, true);
        }

        this.isDestroyed = false;
      }
      /** Property base section */

      /**
       * Function used to set bunch of property at a time.
       * @private
       * @param  {Object} prop - JSON object which holds components properties.
       * @param  {boolean} muteOnChange? - Specifies to true when we set properties.
       */


      _createClass2(Base, [{
        key: "setProperties",
        value: function setProperties(prop, muteOnChange) {
          var prevDetection = this.isProtectedOnChange;
          this.isProtectedOnChange = !!muteOnChange;
          merge(this, prop);

          if (muteOnChange !== true) {
            merge(this.changedProperties, prop);
            this.dataBind();
          } else if (isBlazor() && this.isRendered) {
            this.serverDataBind(prop);
          }

          this.finalUpdate();
          this.changedProperties = {};
          this.oldProperties = {};
          this.isProtectedOnChange = prevDetection;
        }
      }, {
        key: "clearChanges",
        value: function clearChanges() {
          this.finalUpdate();
          this.changedProperties = {};
          this.oldProperties = {};
          this.childChangedProperties = {};
        }
        /**
         * Bind property changes immediately to components
         */

      }, {
        key: "dataBind",
        value: function dataBind() {
          Base.callChildDataBind(this.childChangedProperties, this);

          if (Object.getOwnPropertyNames(this.changedProperties).length) {
            var prevDetection = this.isProtectedOnChange;
            var newChanges = this.changedProperties;
            var oldChanges = this.oldProperties;
            this.clearChanges();
            this.isProtectedOnChange = true;
            this.onPropertyChanged(newChanges, oldChanges);
            this.isProtectedOnChange = prevDetection;
          }
        }
      }, {
        key: "serverDataBind",

        /* tslint:disable:no-any */
        value: function serverDataBind(newChanges) {
          if (!isBlazor()) {
            return;
          }

          newChanges = newChanges ? newChanges : {};
          extend(this.bulkChanges, {}, newChanges, true);

          if (this.allowServerDataBinding) {
            var sfBlazor = 'sfBlazor';
            window[sfBlazor].updateModel(this);
            this.bulkChanges = {};
          }
        }
        /* tslint:enable:no-any */

      }, {
        key: "saveChanges",
        value: function saveChanges(key, newValue, oldValue) {
          if (isBlazor()) {
            // tslint:disable-next-line:no-any
            var newChanges = {};
            newChanges[key] = newValue;
            this.serverDataBind(newChanges);
          }

          if (this.isProtectedOnChange) {
            return;
          }

          this.oldProperties[key] = oldValue;
          this.changedProperties[key] = newValue;
          this.finalUpdate();
          this.finalUpdate = setImmediate(this.dataBind.bind(this));
        }
      }, {
        key: "addEventListener",

        /** Event Base Section */

        /**
         * Adds the handler to the given event listener.
         * @param {string} eventName - A String that specifies the name of the event
         * @param {Function} listener - Specifies the call to run when the event occurs.
         * @return {void}
         */
        value: function addEventListener(eventName, handler) {
          this.modelObserver.on(eventName, handler);
        }
        /**
         * Removes the handler from the given event listener.
         * @param {string} eventName - A String that specifies the name of the event to remove
         * @param {Function} listener - Specifies the function to remove
         * @return {void}
         */

      }, {
        key: "removeEventListener",
        value: function removeEventListener(eventName, handler) {
          this.modelObserver.off(eventName, handler);
        }
        /**
         * Triggers the handlers in the specified event.
         * @private
         * @param {string} eventName - Specifies the event to trigger for the specified component properties.
         * Can be a custom event, or any of the standard events.
         * @param {Event} eventProp - Additional parameters to pass on to the event properties
         * @param {Function} successHandler - this function will invoke after event successfully triggered
         * @param {Function} errorHandler - this function will invoke after event if it failured to call.
         * @return {void}
         */

      }, {
        key: "trigger",
        value: function trigger(eventName, eventProp, successHandler, errorHandler) {
          var _this415 = this;

          if (this.isDestroyed !== true) {
            var prevDetection = this.isProtectedOnChange;
            this.isProtectedOnChange = false;
            var data = this.modelObserver.notify(eventName, eventProp, successHandler, errorHandler);

            if (isColEName.test(eventName)) {
              var handler = getValue(eventName, this);

              if (handler) {
                var blazor = 'Blazor';

                if (window[blazor]) {
                  var promise = handler.call(this, eventProp);

                  if (promise && typeof promise.then === 'function') {
                    if (!successHandler) {
                      data = promise;
                    } else {
                      promise.then(function (data) {
                        if (successHandler) {
                          data = typeof data === 'string' && _this415.modelObserver.isJson(data) ? JSON.parse(data) : data;
                          successHandler.call(_this415, data);
                        }
                      })["catch"](function (data) {
                        if (errorHandler) {
                          data = typeof data === 'string' && _this415.modelObserver.isJson(data) ? JSON.parse(data) : data;
                          errorHandler.call(_this415, data);
                        }
                      });
                    }
                  } else if (successHandler) {
                    successHandler.call(this, eventProp);
                  }
                } else {
                  handler.call(this, eventProp);

                  if (successHandler) {
                    successHandler.call(this, eventProp);
                  }
                }
              } else if (successHandler) {
                successHandler.call(this, eventProp);
              }
            }

            this.isProtectedOnChange = prevDetection;
            return data;
          }
        }
        /**
         * To maintain instance in base class
         */

      }, {
        key: "addInstance",
        value: function addInstance() {
          // Add module class to the root element
          var moduleClass = 'e-' + this.getModuleName().toLowerCase();
          addClass([this.element], ['e-lib', moduleClass]);

          if (!isNullOrUndefined(this.element.ej2_instances)) {
            this.element.ej2_instances.push(this);
          } else {
            setValue('ej2_instances', [this], this.element);
          }
        }
        /**
         * To remove the instance from the element
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this416 = this;

          this.element.ej2_instances = this.element.ej2_instances.filter(function (i) {
            return i !== _this416;
          });
          removeClass([this.element], ['e-' + this.getModuleName()]);

          if (this.element.ej2_instances.length === 0) {
            // Remove module class from the root element
            removeClass([this.element], ['e-lib']);
          }

          this.clearChanges();
          this.modelObserver.destroy();
          this.isDestroyed = true;
        }
      }], [{
        key: "callChildDataBind",

        /**
         * Calls for child element data bind
         * @param {Object} obj
         * @param {Object} parent
         * @returns {void}
         */
        // tslint:disable-next-line:no-any
        value: function callChildDataBind(obj, parent) {
          var keys = Object.keys(obj);

          for (var _i43 = 0, _keys10 = keys; _i43 < _keys10.length; _i43++) {
            var key = _keys10[_i43];

            if (parent[key] instanceof Array) {
              var _iterator67 = _createForOfIteratorHelper(parent[key]),
                  _step67;

              try {
                for (_iterator67.s(); !(_step67 = _iterator67.n()).done;) {
                  var _obj = _step67.value;

                  if (_obj.dataBind !== undefined) {
                    _obj.dataBind();
                  }
                }
              } catch (err) {
                _iterator67.e(err);
              } finally {
                _iterator67.f();
              }
            } else {
              parent[key].dataBind();
            }
          }
        }
      }]);

      return Base;
    }();
    /**
     * Global function to get the component instance from the rendered element.
     * @param elem Specifies the HTMLElement or element id string.
     * @param comp Specifies the component module name or Component.
     */
    // tslint:disable-next-line:no-any


    function getComponent(elem, comp) {
      var instance;
      var i;
      var ele = typeof elem === 'string' ? document.getElementById(elem) : elem;

      for (i = 0; i < ele.ej2_instances.length; i++) {
        instance = ele.ej2_instances[i];

        if (typeof comp === 'string') {
          var compName = instance.getModuleName();

          if (comp === compName) {
            return instance;
          }
        } else {
          // tslint:disable-next-line:no-any
          if (instance instanceof comp) {
            return instance;
          }
        }
      }

      return undefined;
    }
    /**
     * Function to remove the child instances.
     * @return {void}
     * @private
     */
    // tslint:disable-next-line:no-any


    function removeChildInstance(element) {
      // tslint:disable-next-line:no-any
      var childEle = [].slice.call(element.getElementsByClassName('e-control'));

      for (var i = 0; i < childEle.length; i++) {
        var compName = childEle[i].classList[1].split('e-')[1]; // tslint:disable-next-line:no-any

        var compInstance = getComponent(childEle[i], compName);

        if (!isUndefined(compInstance)) {
          compInstance.destroy();
        }
      }
    }
    /**
     * Returns the Class Object
     * @param {ClassObject} instance - instance of ClassObject
     * @param {string} curKey - key of the current instance
     * @param {Object} defaultValue - default Value
     * @param {Object[]} type
     */


    function getObject(instance, curKey, defaultValue, type) {
      if (!instance.properties.hasOwnProperty(curKey) || !(instance.properties[curKey] instanceof type)) {
        instance.properties[curKey] = createInstance(type, [instance, curKey, defaultValue]);
      }

      return instance.properties[curKey];
    }
    /**
     * Returns object array
     * @param {ClassObject} instance
     * @param {string} curKey
     * @param {Object[]} defaultValue
     * @param type
     * @param {boolean} isSetter
     * @returns {Object[]}
     */


    function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
      var result = [];
      var len = defaultValue ? defaultValue.length : 0;

      for (var i = 0; i < len; i++) {
        var curType = type;

        if (isFactory) {
          curType = type(defaultValue[i], instance);
        }

        if (isSetter) {
          var inst = createInstance(curType, [instance, curKey, {}, true]);
          inst.setProperties(defaultValue[i], true);
          result.push(inst);
        } else {
          result.push(createInstance(curType, [instance, curKey, defaultValue[i], false]));
        }
      }

      return result;
    }
    /**
     * Returns the properties of the object
     * @param {Object} defaultValue
     * @param {string} curKey
     */


    function propertyGetter(defaultValue, curKey) {
      return function () {
        if (!this.properties.hasOwnProperty(curKey)) {
          this.properties[curKey] = defaultValue;
        }

        return this.properties[curKey];
      };
    }
    /**
     * Set the properties for the object
     * @param {Object} defaultValue
     * @param {string} curKey
     */


    function propertySetter(defaultValue, curKey) {
      return function (newValue) {
        if (this.properties[curKey] !== newValue) {
          var oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
          this.saveChanges(curKey, newValue, oldVal);
          this.properties[curKey] = newValue;
        }
      };
    }
    /**
     * Returns complex objects
     */


    function complexGetter(defaultValue, curKey, type) {
      return function () {
        return getObject(this, curKey, defaultValue, type);
      };
    }
    /**
     * Sets complex objects
     */


    function complexSetter(defaultValue, curKey, type) {
      return function (newValue) {
        getObject(this, curKey, defaultValue, type).setProperties(newValue);
      };
    }

    function complexFactoryGetter(defaultValue, curKey, type) {
      return function () {
        var curType = type({});

        if (this.properties.hasOwnProperty(curKey)) {
          return this.properties[curKey];
        } else {
          return getObject(this, curKey, defaultValue, curType);
        }
      };
    }

    function complexFactorySetter(defaultValue, curKey, type) {
      return function (newValue) {
        var curType = type(newValue, this);
        getObject(this, curKey, defaultValue, curType).setProperties(newValue);
      };
    }

    function complexArrayGetter(defaultValue, curKey, type) {
      return function () {
        var _this417 = this;

        if (!this.properties.hasOwnProperty(curKey)) {
          var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
          this.properties[curKey] = defCollection;
        }

        var ignore = this.controlParent !== undefined && this.controlParent.ignoreCollectionWatch || this.ignoreCollectionWatch;

        if (!this.properties[curKey].hasOwnProperty('push') && !ignore) {
          ['push', 'pop'].forEach(function (extendFunc) {
            var descriptor = {
              value: complexArrayDefinedCallback(extendFunc, curKey, type, _this417.properties[curKey]).bind(_this417),
              configurable: true
            };
            Object.defineProperty(_this417.properties[curKey], extendFunc, descriptor);
          });
        }

        if (!this.properties[curKey].hasOwnProperty('isComplexArray')) {
          Object.defineProperty(this.properties[curKey], 'isComplexArray', {
            value: true
          });
        }

        return this.properties[curKey];
      };
    }

    function complexArraySetter(defaultValue, curKey, type) {
      return function (newValue) {
        this.isComplexArraySetter = true;
        var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, false);
        var newValCollection = getObjectArray(this, curKey, newValue, type, true);
        this.isComplexArraySetter = false;
        this.saveChanges(curKey, newValCollection, oldValueCollection);
        this.properties[curKey] = newValCollection;
      };
    }

    function complexArrayFactorySetter(defaultValue, curKey, type) {
      return function (newValue) {
        var oldValueCollection = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
        var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
        this.saveChanges(curKey, newValCollection, oldValueCollection);
        this.properties[curKey] = newValCollection;
      };
    }

    function complexArrayFactoryGetter(defaultValue, curKey, type) {
      return function () {
        var curType = type({});

        if (!this.properties.hasOwnProperty(curKey)) {
          var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
          this.properties[curKey] = defCollection;
        }

        return this.properties[curKey];
      };
    }

    function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
      /* tslint:disable no-function-expression */
      return function () {
        var keyString = this.propName ? this.getParentKey() + '.' + curKey + '-' : curKey + '-';

        switch (dFunc) {
          case 'push':
            for (var i = 0; i < arguments.length; i++) {
              Array.prototype[dFunc].apply(prop, [i < 0 || arguments.length <= i ? undefined : arguments[i]]);

              var _model = getArrayModel(keyString + (prop.length - 1), i < 0 || arguments.length <= i ? undefined : arguments[i], !this.controlParent, dFunc);

              this.serverDataBind(_model, i < 0 || arguments.length <= i ? undefined : arguments[i], false, dFunc);
            }

            break;

          case 'pop':
            Array.prototype[dFunc].apply(prop);
            var model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
            this.serverDataBind(model, {
              ejsAction: 'pop'
            }, false, dFunc);
            break;
        }

        return prop;
      };
      /* tslint:enable no-function-expression */
    }

    function getArrayModel(keyString, value, isControlParent, arrayFunction) {
      var modelObject = keyString;

      if (isControlParent) {
        modelObject = {};
        modelObject[keyString] = value;

        if (value && typeof value === 'object') {
          var action = 'ejsAction';
          modelObject[keyString][action] = arrayFunction;
        }
      }

      return modelObject;
    }
    /**
     * Method used to create property. General syntax below.
     * @param  {T} defaultValue? - Specifies the default value of property.
     * ```
     * @Property('TypeScript')
     * propertyName: Type;
     * ```
     * @private
     */


    function Property(defaultValue) {
      return function (target, key) {
        var propertyDescriptor = {
          set: propertySetter(defaultValue, key),
          get: propertyGetter(defaultValue, key),
          enumerable: true,
          configurable: true
        }; //new property creation

        Object.defineProperty(target, key, propertyDescriptor);
        addPropertyCollection(target, key, 'prop', defaultValue);
      };
    }
    /**
     * Method used to create complex property. General syntax below.
     * @param  {T} defaultValue - Specifies the default value of property.
     * @param  {Function} type - Specifies the class type of complex object.
     * ```
     * @Complex<Type>({},Type)
     * propertyName: Type;
     * ```
     * @private
     */


    function Complex(defaultValue, type) {
      return function (target, key) {
        var propertyDescriptor = {
          set: complexSetter(defaultValue, key, type),
          get: complexGetter(defaultValue, key, type),
          enumerable: true,
          configurable: true
        }; //new property creation

        Object.defineProperty(target, key, propertyDescriptor);
        addPropertyCollection(target, key, 'complexProp', defaultValue, type);
      };
    }
    /**
     * Method used to create complex Factory property. General syntax below.
     * @param  {Function} defaultType - Specifies the default value of property.
     * @param  {Function} type - Specifies the class factory type of complex object.
     * ```
     * @ComplexFactory(defaultType, factoryFunction)
     * propertyName: Type1 | Type2;
     * ```
     * @private
     */


    function ComplexFactory(type) {
      return function (target, key) {
        var propertyDescriptor = {
          set: complexFactorySetter({}, key, type),
          get: complexFactoryGetter({}, key, type),
          enumerable: true,
          configurable: true
        }; //new property creation

        Object.defineProperty(target, key, propertyDescriptor);
        addPropertyCollection(target, key, 'complexProp', {}, type);
      };
    }
    /**
     * Method used to create complex array property. General syntax below.
     * @param  {T[]} defaultValue - Specifies the default value of property.
     * @param  {Function} type - Specifies the class type of complex object.
     * ```
     * @Collection([], Type);
     * propertyName: Type;
     * ```
     * @private
     */


    function Collection(defaultValue, type) {
      return function (target, key) {
        var propertyDescriptor = {
          set: complexArraySetter(defaultValue, key, type),
          get: complexArrayGetter(defaultValue, key, type),
          enumerable: true,
          configurable: true
        }; //new property creation

        Object.defineProperty(target, key, propertyDescriptor);
        addPropertyCollection(target, key, 'colProp', defaultValue, type);
      };
    }
    /**
     * Method used to create complex factory array property. General syntax below.
     * @param  {T[]} defaultType - Specifies the default type of property.
     * @param  {Function} type - Specifies the class type of complex object.
     * ```
     * @Collection([], Type);
     * propertyName: Type;
     * ```
     * @private
     */


    function CollectionFactory(type) {
      return function (target, key) {
        var propertyDescriptor = {
          set: complexArrayFactorySetter([], key, type),
          get: complexArrayFactoryGetter([], key, type),
          enumerable: true,
          configurable: true
        }; //new property creation

        Object.defineProperty(target, key, propertyDescriptor);
        addPropertyCollection(target, key, 'colProp', {}, type);
      };
    }
    /**
     * Method used to create event property. General syntax below.
     * @param  {Function} defaultValue? - Specifies the default value of property.
     * @param  {boolean} isComplex? - Specifies the whether it is complex object.
     * ```
     * @Event(()=>{return true;})
     * ```
     * @private
     */


    function Event$1() {
      return function (target, key) {
        var eventDescriptor = {
          set: function set(newValue) {
            var oldValue = this.properties[key];

            if (oldValue !== newValue) {
              var finalContext = getParentContext(this, key);

              if (isUndefined(oldValue) === false) {
                finalContext.context.removeEventListener(finalContext.prefix, oldValue);
              }

              finalContext.context.addEventListener(finalContext.prefix, newValue);
              this.properties[key] = newValue;
            }
          },
          get: propertyGetter(undefined, key),
          enumerable: true,
          configurable: true
        };
        Object.defineProperty(target, key, eventDescriptor);
        addPropertyCollection(target, key, 'event');
      };
    }
    /**
     * NotifyPropertyChanges is triggers the call back when the property has been changed.
     *
     * ```
     *  @NotifyPropertyChanges
     * class DemoClass implements INotifyPropertyChanged {
     *
     *     @Property()
     *     property1: string;
     *
     *     dataBind: () => void;
     *
     *     constructor() { }
     *
     *     onPropertyChanged(newProp: any, oldProp: any) {
     *         // Called when property changed
     *     }
     * }
     * ```
     * @private
     */


    function NotifyPropertyChanges(classConstructor) {
      /** Need to code */
    }
    /**
     * Method  used to create the builderObject for the target component.
     * @private
     */


    function addPropertyCollection(target, key, propertyType, defaultValue, type) {
      if (isUndefined(target.propList)) {
        target.propList = {
          props: [],
          complexProps: [],
          colProps: [],
          events: [],
          propNames: [],
          complexPropNames: [],
          colPropNames: [],
          eventNames: []
        };
      }
      /* tslint:disable no-any */


      target.propList[propertyType + 's'].push({
        propertyName: key,
        defaultValue: defaultValue,
        type: type
      });
      target.propList[propertyType + 'Names'].push(key);
      /* tslint:enable no-any */
    }
    /**
     * Returns an object containing the builder properties
     * @param {Function} component
     * @private
     */


    function getBuilderProperties(component) {
      if (isUndefined(component.prototype.builderObject)) {
        component.prototype.builderObject = {
          properties: {},
          propCollections: [],
          add: function add() {
            this.isPropertyArray = true;
            this.propCollections.push(extend({}, this.properties, {}));
          }
        };
        var rex = /complex/;

        for (var _i44 = 0, _Object$keys6 = Object.keys(component.prototype.propList); _i44 < _Object$keys6.length; _i44++) {
          var key = _Object$keys6[_i44];

          var _iterator68 = _createForOfIteratorHelper(component.prototype.propList[key]),
              _step68;

          try {
            var _loop9 = function _loop9() {
              var prop = _step68.value;

              if (rex.test(key)) {
                component.prototype.builderObject[prop.propertyName] = function (value) {
                  var childType = {};
                  merge(childType, getBuilderProperties(prop.type));
                  value(childType);
                  var tempValue;

                  if (!childType.isPropertyArray) {
                    tempValue = extend({}, childType.properties, {});
                  } else {
                    tempValue = childType.propCollections;
                  }

                  this.properties[prop.propertyName] = tempValue;
                  childType.properties = {};
                  childType.propCollections = [];
                  childType.isPropertyArray = false;
                  return this;
                };
              } else {
                component.prototype.builderObject[prop.propertyName] = function (value) {
                  this.properties[prop.propertyName] = value;
                  return this;
                };
              }
            };

            for (_iterator68.s(); !(_step68 = _iterator68.n()).done;) {
              _loop9();
            }
          } catch (err) {
            _iterator68.e(err);
          } finally {
            _iterator68.f();
          }
        }
      }

      return component.prototype.builderObject;
    }
    /**
     * Method used to create builder for the components
     * @param {any} component -specifies the target component for which builder to be created.
     * @private
     */


    function CreateBuilder(component) {
      var builderFunction = function builderFunction(element) {
        this.element = element;
        return this;
      };

      var instanceFunction = function instanceFunction(element) {
        if (!builderFunction.prototype.hasOwnProperty('create')) {
          builderFunction.prototype = getBuilderProperties(component);

          builderFunction.prototype.create = function () {
            var temp = extend({}, {}, this.properties);
            this.properties = {};
            return new component(temp, this.element);
          };
        }

        return new builderFunction(element);
      };

      return instanceFunction;
    }
    /**
     * Returns parent options for the object
     * @param {Object} context
     * @param {string} prefix
     * @private
     */


    function getParentContext(context, prefix) {
      if (context.hasOwnProperty('parentObj') === false) {
        return {
          context: context,
          prefix: prefix
        };
      } else {
        var curText = getValue('propName', context);

        if (curText) {
          prefix = curText + '-' + prefix;
        }

        return getParentContext(getValue('parentObj', context), prefix);
      }
    }

    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var Animation_1;
    /**
     * The Animation framework provide options to animate the html DOM elements
     * ```typescript
     *   let animeObject = new Animation({
     *      name: 'SlideLeftIn',
     *      duration: 1000
     *   });
     *   animeObject.animate('#anime1');
     *   animeObject.animate('#anime2', { duration: 500 });
     * ```
     */

    var Animation = Animation_1 = /*#__PURE__*/function (_Base) {
      _inherits(Animation, _Base);

      var _super163 = _createSuper(Animation);

      function Animation(options) {
        var _this418;

        _classCallCheck(this, Animation);

        _this418 = _super163.call(this, options, undefined);
        /**
         * @private
         */

        _this418.easing = {
          ease: 'cubic-bezier(0.250, 0.100, 0.250, 1.000)',
          linear: 'cubic-bezier(0.250, 0.250, 0.750, 0.750)',
          easeIn: 'cubic-bezier(0.420, 0.000, 1.000, 1.000)',
          easeOut: 'cubic-bezier(0.000, 0.000, 0.580, 1.000)',
          easeInOut: 'cubic-bezier(0.420, 0.000, 0.580, 1.000)',
          elasticInOut: 'cubic-bezier(0.5,-0.58,0.38,1.81)',
          elasticIn: 'cubic-bezier(0.17,0.67,0.59,1.81)',
          elasticOut: 'cubic-bezier(0.7,-0.75,0.99,1.01)'
        };
        return _this418;
      }
      /**
       * Applies animation to the current element.
       * @param {string | HTMLElement} element - Element which needs to be animated.
       * @param {AnimationModel} options - Overriding default animation settings.
       * @return {void}
       */


      _createClass2(Animation, [{
        key: "animate",
        value: function animate(element, options) {
          options = !options ? {} : options;
          var model = this.getModel(options);

          if (typeof element === 'string') {
            var elements = Array.prototype.slice.call(selectAll(element, document));

            var _iterator69 = _createForOfIteratorHelper(elements),
                _step69;

            try {
              for (_iterator69.s(); !(_step69 = _iterator69.n()).done;) {
                var _element2 = _step69.value;
                model.element = _element2;
                Animation_1.delayAnimation(model);
              }
            } catch (err) {
              _iterator69.e(err);
            } finally {
              _iterator69.f();
            }
          } else {
            model.element = element;
            Animation_1.delayAnimation(model);
          }
        }
        /**
         * Stop the animation effect on animated element.
         * @param {HTMLElement} element - Element which needs to be stop the animation.
         * @param {AnimationOptions} model - Handling the animation model at stop function.
         * @return {void}
         */

      }, {
        key: "getModel",

        /**
         * Returns Animation Model
         * @param {AnimationModel} options
         * @returns {AnimationModel}
         */
        value: function getModel(options) {
          return {
            name: options.name || this.name,
            delay: options.delay || this.delay,
            duration: options.duration !== undefined ? options.duration : this.duration,
            begin: options.begin || this.begin,
            end: options.end || this.end,
            fail: options.fail || this.fail,
            progress: options.progress || this.progress,
            timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] : options.timingFunction || this.easing[this.timingFunction]
          };
        }
        /**
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {// no code needed
        }
        /**
         * Returns module name as animation
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'animation';
        }
        /**
         * @private
         */

      }, {
        key: "destroy",
        value: function destroy() {//Override base destroy;
        }
      }], [{
        key: "stop",
        value: function stop(element, model) {
          element.style.animation = '';
          element.removeAttribute('e-animate');
          var animationId = element.getAttribute('e-animation-id');

          if (animationId) {
            var frameId = parseInt(animationId, 10);
            cancelAnimationFrame(frameId);
            element.removeAttribute('e-animation-id');
          }

          if (model && model.end) {
            model.end.call(this, model);
          }
        }
        /**
         * Set delay to animation element
         * @param {AnimationModel} model
         * @returns {void}
         */

      }, {
        key: "delayAnimation",
        value: function delayAnimation(model) {
          if (model.delay) {
            setTimeout(function () {
              Animation_1.applyAnimation(model);
            }, model.delay);
          } else {
            Animation_1.applyAnimation(model);
          }
        }
        /**
         * Triggers animation
         * @param {AnimationModel} model
         * @returns {void}
         */

      }, {
        key: "applyAnimation",
        value: function applyAnimation(model) {
          var _this419 = this;

          model.timeStamp = 0;
          var step = 0;
          var timerId = 0;
          var startTime = 0;
          var prevTimeStamp = 0;
          var duration = model.duration;
          model.element.setAttribute('e-animate', 'true');

          var startAnimation = function startAnimation(timeStamp) {
            try {
              if (timeStamp) {
                // let step: number = model.timeStamp = timeStamp - startTime;

                /** phantomjs workaround for timestamp fix */
                prevTimeStamp = prevTimeStamp === 0 ? timeStamp : prevTimeStamp;
                model.timeStamp = timeStamp + model.timeStamp - prevTimeStamp;
                prevTimeStamp = timeStamp;
                /** phantomjs workaround end */
                // trigger animation begin event

                if (!step && model.begin) {
                  model.begin.call(_this419, model);
                }

                step = step + 1;
                var avg = model.timeStamp / step;

                if (model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute('e-animate')) {
                  // apply animation effect to the current element                
                  model.element.style.animation = model.name + ' ' + model.duration + 'ms ' + model.timingFunction;

                  if (model.progress) {
                    model.progress.call(_this419, model);
                  } // repeat requestAnimationFrame 


                  requestAnimationFrame(startAnimation);
                } else {
                  // clear requestAnimationFrame
                  cancelAnimationFrame(timerId);
                  model.element.removeAttribute('e-animation-id');
                  model.element.removeAttribute('e-animate');
                  model.element.style.animation = '';

                  if (model.end) {
                    model.end.call(_this419, model);
                  }
                }
              } else {
                startTime = performance.now(); // set initial requestAnimationFrame

                timerId = requestAnimationFrame(startAnimation);
                model.element.setAttribute('e-animation-id', timerId.toString());
              }
            } catch (e) {
              cancelAnimationFrame(timerId);
              model.element.removeAttribute('e-animation-id');

              if (model.fail) {
                model.fail.call(_this419, e);
              }
            }
          };

          startAnimation();
        }
      }]);

      return Animation;
    }(Base);

    __decorate([Property('FadeIn')], Animation.prototype, "name", void 0);

    __decorate([Property(400)], Animation.prototype, "duration", void 0);

    __decorate([Property('ease')], Animation.prototype, "timingFunction", void 0);

    __decorate([Property(0)], Animation.prototype, "delay", void 0);

    __decorate([Event$1()], Animation.prototype, "progress", void 0);

    __decorate([Event$1()], Animation.prototype, "begin", void 0);

    __decorate([Event$1()], Animation.prototype, "end", void 0);

    __decorate([Event$1()], Animation.prototype, "fail", void 0);

    Animation = Animation_1 = __decorate([NotifyPropertyChanges], Animation);
    /**
     * Ripple provides material theme's wave effect when an element is clicked
     * ```html
     * <div id='ripple'></div>
     * <script>
     *   rippleEffect(document.getElementById('ripple'));
     * </script>
     * ```
     * @private
     * @param HTMLElement element - Target element
     * @param RippleOptions rippleOptions - Ripple options .
     */

    function rippleEffect(element, rippleOptions, done) {
      var rippleModel = getRippleModel(rippleOptions);

      if (rippleModel.rippleFlag === false || rippleModel.rippleFlag === undefined && !isRippleEnabled) {
        return Function;
      }

      element.setAttribute('data-ripple', 'true');
      EventHandler.add(element, 'mousedown', rippleHandler, {
        parent: element,
        rippleOptions: rippleModel
      });
      EventHandler.add(element, 'mouseup', rippleUpHandler, {
        parent: element,
        rippleOptions: rippleModel,
        done: done
      });
      EventHandler.add(element, 'mouseleave', rippleLeaveHandler, {
        parent: element,
        rippleOptions: rippleModel
      });

      if (Browser.isPointer) {
        EventHandler.add(element, 'transitionend', rippleLeaveHandler, {
          parent: element,
          rippleOptions: rippleModel
        });
      }

      return function () {
        element.removeAttribute('data-ripple');
        EventHandler.remove(element, 'mousedown', rippleHandler);
        EventHandler.remove(element, 'mouseup', rippleUpHandler);
        EventHandler.remove(element, 'mouseleave', rippleLeaveHandler);
        EventHandler.remove(element, 'transitionend', rippleLeaveHandler);
      };
    }

    function getRippleModel(rippleOptions) {
      var rippleModel = {
        selector: rippleOptions && rippleOptions.selector ? rippleOptions.selector : null,
        ignore: rippleOptions && rippleOptions.ignore ? rippleOptions.ignore : null,
        rippleFlag: rippleOptions && rippleOptions.rippleFlag,
        isCenterRipple: rippleOptions && rippleOptions.isCenterRipple,
        duration: rippleOptions && rippleOptions.duration ? rippleOptions.duration : 350
      };
      return rippleModel;
    }
    /**
     * Handler for ripple event
     * @param {MouseEvent} e
     * @returns {void}
     * @private
     */


    function rippleHandler(e) {
      var target = e.target;
      var selector = this.rippleOptions.selector;
      var element = selector ? closest(target, selector) : target;

      if (!element || this.rippleOptions && closest(target, this.rippleOptions.ignore)) {
        return;
      }

      var offset = element.getBoundingClientRect();
      var offsetX = e.pageX - document.body.scrollLeft;
      var offsetY = e.pageY - (!document.body.scrollTop && document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop);
      var pageX = Math.max(Math.abs(offsetX - offset.left), Math.abs(offsetX - offset.right));
      var pageY = Math.max(Math.abs(offsetY - offset.top), Math.abs(offsetY - offset.bottom));
      var radius = Math.sqrt(pageX * pageX + pageY * pageY);
      var diameter = radius * 2 + 'px';
      var x = offsetX - offset.left - radius;
      var y = offsetY - offset.top - radius;

      if (this.rippleOptions && this.rippleOptions.isCenterRipple) {
        x = 0;
        y = 0;
        diameter = '100%';
      }

      element.classList.add('e-ripple');
      var duration = this.rippleOptions.duration.toString();
      var styles = 'width: ' + diameter + ';height: ' + diameter + ';left: ' + x + 'px;top: ' + y + 'px;' + 'transition-duration: ' + duration + 'ms;';

      var rippleElement = _createElement('div', {
        className: 'e-ripple-element',
        styles: styles
      });

      element.appendChild(rippleElement);
      window.getComputedStyle(rippleElement).getPropertyValue('opacity');
      rippleElement.style.transform = 'scale(1)';

      if (element !== this.parent) {
        EventHandler.add(element, 'mouseleave', rippleLeaveHandler, {
          parent: this.parent,
          rippleOptions: this.rippleOptions
        });
      }
    }
    /**
     * Handler for ripple element mouse up event
     * @param {MouseEvent} e
     * @returns {void}
     * @private
     */


    function rippleUpHandler(e) {
      removeRipple(e, this);
    }
    /**
     * Handler for ripple element mouse move event
     * @param {MouseEvent} e
     * @returns {void}
     * @private
     */


    function rippleLeaveHandler(e) {
      removeRipple(e, this);
    }
    /**
     * Handler for removing ripple element
     * @param {MouseEvent} e
     * @param {rippleArgs} eventArgs
     * @returns {void}
     * @private
     */


    function removeRipple(e, eventArgs) {
      var duration = eventArgs.rippleOptions.duration;
      var target = e.target;
      var selector = eventArgs.rippleOptions.selector;
      var element = selector ? closest(target, selector) : target;

      if (!element || element && element.className.indexOf('e-ripple') === -1) {
        return;
      }

      var rippleElements = selectAll('.e-ripple-element', element);
      var rippleElement = rippleElements[rippleElements.length - 1];

      if (rippleElement) {
        rippleElement.style.opacity = '0.5';
      }

      if (eventArgs.parent !== element) {
        EventHandler.remove(element, 'mouseleave', rippleLeaveHandler);
      }
      /* tslint:disable:align */


      setTimeout(function () {
        if (rippleElement && rippleElement.parentNode) {
          rippleElement.parentNode.removeChild(rippleElement);
        }

        if (!element.getElementsByClassName('e-ripple-element').length) {
          element.classList.remove('e-ripple');
        }

        if (eventArgs.done) {
          eventArgs.done(e);
        }
      }, duration);
    }

    var isRippleEnabled = false;
    /**
     * Animation Module provides support to enable ripple effect functionality to Essential JS 2 components.
     * @param {boolean} isRipple Specifies the boolean value to enable or disable ripple effect.
     * @returns {boolean}
     */

    function enableRipple(isRipple) {
      isRippleEnabled = isRipple;
      return isRippleEnabled;
    }
    /**
     * Module loading operations
     */


    var MODULE_SUFFIX = 'Module';

    var ModuleLoader = /*#__PURE__*/function () {
      function ModuleLoader(parent) {
        _classCallCheck(this, ModuleLoader);

        this.loadedModules = [];
        this.parent = parent;
      }

      _createClass2(ModuleLoader, [{
        key: "inject",

        /**
         * Inject required modules in component library
         * @return {void}
         * @param {ModuleDeclaration[]} requiredModules - Array of modules to be required
         * @param {Function[]} moduleList - Array of modules to be injected from sample side
         */
        value: function inject(requiredModules, moduleList) {
          var reqLength = requiredModules.length;

          if (reqLength === 0) {
            this.clean();
            return;
          }

          if (this.loadedModules.length) {
            this.clearUnusedModule(requiredModules);
          }

          for (var i = 0; i < reqLength; i++) {
            var modl = requiredModules[i];

            var _iterator70 = _createForOfIteratorHelper(moduleList),
                _step70;

            try {
              for (_iterator70.s(); !(_step70 = _iterator70.n()).done;) {
                var _module5 = _step70.value;
                var modName = modl.member;

                if (_module5.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
                  var moduleObject = createInstance(_module5, modl.args);
                  var memberName = this.getMemberName(modName);

                  if (modl.isProperty) {
                    setValue(memberName, _module5, this.parent);
                  } else {
                    setValue(memberName, moduleObject, this.parent);
                  }

                  var loadedModule = modl;
                  loadedModule.member = memberName;
                  this.loadedModules.push(loadedModule);
                }
              }
            } catch (err) {
              _iterator70.e(err);
            } finally {
              _iterator70.f();
            }
          }
        }
        /**
         * To remove the created object while destroying the control
         * @return {void}
         */

      }, {
        key: "clean",
        value: function clean() {
          var _iterator71 = _createForOfIteratorHelper(this.loadedModules),
              _step71;

          try {
            for (_iterator71.s(); !(_step71 = _iterator71.n()).done;) {
              var modules = _step71.value;

              if (!modules.isProperty) {
                getValue(modules.member, this.parent).destroy();
              }
            }
          } catch (err) {
            _iterator71.e(err);
          } finally {
            _iterator71.f();
          }

          this.loadedModules = [];
        }
        /**
         * Removes all unused modules
         * @param {ModuleDeclaration[]} moduleList
         * @returns {void}
         */

      }, {
        key: "clearUnusedModule",
        value: function clearUnusedModule(moduleList) {
          var _this420 = this;

          var usedModules = moduleList.map(function (arg) {
            return _this420.getMemberName(arg.member);
          });
          var removableModule = this.loadedModules.filter(function (module) {
            return usedModules.indexOf(module.member) === -1;
          });

          var _iterator72 = _createForOfIteratorHelper(removableModule),
              _step72;

          try {
            for (_iterator72.s(); !(_step72 = _iterator72.n()).done;) {
              var mod = _step72.value;

              if (!mod.isProperty) {
                getValue(mod.member, this.parent).destroy();
              }

              this.loadedModules.splice(this.loadedModules.indexOf(mod), 1);
              deleteObject(this.parent, mod.member);
            }
          } catch (err) {
            _iterator72.e(err);
          } finally {
            _iterator72.f();
          }
        }
        /**
         * To get the name of the member.
         * @param {string} name
         * @returns {string}
         */

      }, {
        key: "getMemberName",
        value: function getMemberName(name) {
          return name[0].toLowerCase() + name.substring(1) + MODULE_SUFFIX;
        }
        /**
         * Returns boolean based on whether the module specified is loaded or not
         * @param {string} modName
         * @returns {boolean}
         */

      }, {
        key: "isModuleLoaded",
        value: function isModuleLoaded(modName) {
          var _iterator73 = _createForOfIteratorHelper(this.loadedModules),
              _step73;

          try {
            for (_iterator73.s(); !(_step73 = _iterator73.n()).done;) {
              var mod = _step73.value;

              if (mod.member === this.getMemberName(modName)) {
                return true;
              }
            }
          } catch (err) {
            _iterator73.e(err);
          } finally {
            _iterator73.f();
          }

          return false;
        }
      }]);

      return ModuleLoader;
    }();
    /**
     * To detect the changes for inner properties.
     * @private
     */


    var ChildProperty = /*#__PURE__*/function () {
      function ChildProperty(parent, propName, defaultValue, isArray) {
        _classCallCheck(this, ChildProperty);

        this.isComplexArraySetter = false;
        this.properties = {};
        this.changedProperties = {};
        this.childChangedProperties = {};
        this.oldProperties = {}; // tslint:disable-next-line:no-empty

        this.finalUpdate = function () {};

        this.callChildDataBind = getValue('callChildDataBind', Base);
        this.parentObj = parent;
        this.controlParent = this.parentObj.controlParent || this.parentObj;
        this.propName = propName;
        this.isParentArray = isArray;
        this.setProperties(defaultValue, true);
      }
      /**
       * Updates the property changes
       * @param {boolean} val
       * @param {string} propName
       * @returns {void}
       */


      _createClass2(ChildProperty, [{
        key: "updateChange",
        value: function updateChange(val, propName) {
          if (val === true) {
            this.parentObj.childChangedProperties[propName] = val;
          } else {
            delete this.parentObj.childChangedProperties[propName];
          }

          if (this.parentObj.updateChange) {
            this.parentObj.updateChange(val, this.parentObj.propName);
          }
        }
        /**
         * Updates time out duration
         */

      }, {
        key: "updateTimeOut",
        value: function updateTimeOut() {
          if (this.parentObj.updateTimeOut) {
            this.parentObj.finalUpdate();
            this.parentObj.updateTimeOut();
          } else {
            var changeTime = setTimeout(this.parentObj.dataBind.bind(this.parentObj));

            var clearUpdate = function clearUpdate() {
              clearTimeout(changeTime);
            };

            this.finalUpdate = clearUpdate;
          }
        }
        /**
         * Clears changed properties
         */

      }, {
        key: "clearChanges",
        value: function clearChanges() {
          this.finalUpdate();
          this.updateChange(false, this.propName);
          this.oldProperties = {};
          this.changedProperties = {};
        }
        /**
         * Set property changes
         * @param {Object} prop
         * @param {boolean} muteOnChange
         * {void}
         */

      }, {
        key: "setProperties",
        value: function setProperties(prop, muteOnChange) {
          if (muteOnChange === true) {
            merge(this, prop);
            this.updateChange(false, this.propName);
            this.clearChanges();
          } else {
            merge(this, prop);
          }
        }
        /**
         * Binds data
         */

      }, {
        key: "dataBind",
        value: function dataBind() {
          this.callChildDataBind(this.childChangedProperties, this);

          if (this.isParentArray) {
            var curIndex = this.parentObj[this.propName].indexOf(this);

            if (Object.keys(this.changedProperties).length) {
              setValue(this.propName + '.' + curIndex, this.changedProperties, this.parentObj.changedProperties);
              setValue(this.propName + '.' + curIndex, this.oldProperties, this.parentObj.oldProperties);
            }
          } else {
            this.parentObj.changedProperties[this.propName] = this.changedProperties;
            this.parentObj.oldProperties[this.propName] = this.oldProperties;
          }

          this.clearChanges();
        }
        /**
         * Saves changes to newer values
         * @param {string} key
         * @param {Object} newValue
         * @param {Object} oldValue
         * @returns {void}
         */

      }, {
        key: "saveChanges",
        value: function saveChanges(key, newValue, oldValue, restrictServerDataBind) {
          if (this.controlParent.isProtectedOnChange) {
            return;
          }

          if (!restrictServerDataBind) {
            this.serverDataBind(key, newValue, true);
          }

          this.oldProperties[key] = oldValue;
          this.changedProperties[key] = newValue;
          this.updateChange(true, this.propName);
          this.finalUpdate();
          this.updateTimeOut();
        }
      }, {
        key: "serverDataBind",
        value: function serverDataBind(key, value, isSaveChanges, action) {
          if (isBlazor() && !this.parentObj.isComplexArraySetter) {
            // tslint:disable-next-line:no-any
            var parent;
            var newChanges = {};
            var parentKey = isSaveChanges ? this.getParentKey(true) + '.' + key : key;
            /* istanbul ignore else  */

            if (parentKey.indexOf('.') !== -1) {
              var complexKeys = parentKey.split('.');
              parent = newChanges;

              for (var i = 0; i < complexKeys.length; i++) {
                var isFinal = i === complexKeys.length - 1;
                parent[complexKeys[i]] = isFinal ? value : {};
                parent = isFinal ? parent : parent[complexKeys[i]];
              }
            } else {
              newChanges[parentKey] = {};
              parent = newChanges[parentKey];
              newChanges[parentKey][key] = value;
            }
            /* istanbul ignore next */


            if (this.isParentArray) {
              var actionProperty = 'ejsAction';
              parent[actionProperty] = action ? action : 'none';
            }

            this.controlParent.serverDataBind(newChanges);
          }
        }
      }, {
        key: "getParentKey",
        value: function getParentKey(isSaveChanges) {
          // tslint:disable-next-line:no-any
          var index = '';
          var propName = this.propName;
          /* istanbul ignore next */

          if (this.isParentArray) {
            index = this.parentObj[this.propName].indexOf(this);
            var valueLength = this.parentObj[this.propName].length;
            valueLength = isSaveChanges ? valueLength : valueLength > 0 ? valueLength - 1 : 0;
            index = index !== -1 ? '-' + index : '-' + valueLength;
            propName = propName + index;
          }

          if (this.controlParent !== this.parentObj) {
            propName = this.parentObj.getParentKey() + '.' + this.propName + index;
          }

          return propName;
        }
      }]);

      return ChildProperty;
    }();

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var componentCount = 0;
    var lastPageID;
    var lastHistoryLen = 0;
    /**
     * Base class for all Essential JavaScript components
     */

    var Component = /*#__PURE__*/function (_Base2) {
      _inherits(Component, _Base2);

      var _super164 = _createSuper(Component);

      /**
       * Initialize the constructor for component base
       */
      function Component(options, selector) {
        var _this421;

        _classCallCheck(this, Component);

        _this421 = _super164.call(this, options, selector);
        _this421.randomId = uniqueID();
        /**
         * string template option for Blazor template rendering
         * @private
         */

        _this421.isStringTemplate = false;
        _this421.needsID = false;
        _this421.isReactHybrid = false;

        if (isNullOrUndefined(_this421.enableRtl)) {
          _this421.setProperties({
            'enableRtl': rightToLeft
          }, true);
        }

        if (isNullOrUndefined(_this421.locale)) {
          _this421.setProperties({
            'locale': defaultCulture
          }, true);
        }

        _this421.moduleLoader = new ModuleLoader(_assertThisInitialized(_this421));
        _this421.localObserver = new Observer(_assertThisInitialized(_this421)); // tslint:disable-next-line:no-function-constructor-with-string-args

        onIntlChange.on('notifyExternalChange', _this421.detectFunction, _assertThisInitialized(_this421), _this421.randomId);

        if (!isUndefined(selector)) {
          _this421.appendTo();
        }

        return _this421;
      }

      _createClass2(Component, [{
        key: "requiredModules",
        value: function requiredModules() {
          return [];
        }
      }, {
        key: "destroy",

        /**
         * Destroys the sub modules while destroying the widget
         */
        value: function destroy() {
          if (this.isDestroyed) {
            return;
          }

          if (this.enablePersistence) {
            this.setPersistData();
          }

          this.localObserver.destroy();

          if (this.refreshing) {
            return;
          }

          removeClass([this.element], ['e-control']);
          this.trigger('destroyed', {
            cancel: false
          });

          _get(_getPrototypeOf(Component.prototype), "destroy", this).call(this);

          this.moduleLoader.clean();
          onIntlChange.off('notifyExternalChange', this.detectFunction, this.randomId);
        }
        /**
         * Applies all the pending property changes and render the component again.
         */

      }, {
        key: "refresh",
        value: function refresh() {
          this.refreshing = true;
          this.moduleLoader.clean();
          this.destroy();
          this.clearChanges();
          this.localObserver = new Observer(this);
          this.preRender();
          this.injectModules();
          this.render();
          this.refreshing = false;
        }
      }, {
        key: "accessMount",
        value: function accessMount() {
          if (this.mount && !this.isReactHybrid) {
            this.mount();
          }
        }
        /**
         * Returns the route element of the component
         */

      }, {
        key: "getRootElement",
        value: function getRootElement() {
          if (this.isReactHybrid) {
            return this.actualElement;
          } else {
            return this.element;
          }
        }
        /**
         * Appends the control within the given HTML element
         * @param {string | HTMLElement} selector - Target element where control needs to be appended
         */

      }, {
        key: "appendTo",
        value: function appendTo(selector) {
          if (!isNullOrUndefined(selector) && typeof selector === 'string') {
            this.element = document.querySelector(selector);
          } else if (!isNullOrUndefined(selector)) {
            this.element = selector;
          }

          if (!isNullOrUndefined(this.element)) {
            var moduleClass = 'e-' + this.getModuleName().toLowerCase();
            addClass([this.element], ['e-control', moduleClass]);
            this.isProtectedOnChange = false;

            if (this.needsID && !this.element.id) {
              this.element.id = this.getUniqueID(this.getModuleName());
            }

            if (this.enablePersistence) {
              this.mergePersistData();
              window.addEventListener('unload', this.setPersistData.bind(this));
            }

            var inst = getValue('ej2_instances', this.element);

            if (!inst || inst.indexOf(this) === -1) {
              _get(_getPrototypeOf(Component.prototype), "addInstance", this).call(this);
            }

            this.preRender();
            this.injectModules();
            this.render();

            if (!this.mount) {
              this.trigger('created');
            } else {
              this.accessMount();
            }
          }
        }
        /**
         * It is used to process the post rendering functionalities to a component.
         */

      }, {
        key: "renderComplete",
        value: function renderComplete(wrapperElement) {
          if (isBlazor()) {
            var sfBlazor = 'sfBlazor'; // tslint:disable-next-line:no-any

            window[sfBlazor].renderComplete(this.element, wrapperElement);
          }

          this.isRendered = true;
        }
        /**
         * When invoked, applies the pending property changes immediately to the component.
         */

      }, {
        key: "dataBind",
        value: function dataBind() {
          this.injectModules();

          _get(_getPrototypeOf(Component.prototype), "dataBind", this).call(this);
        }
      }, {
        key: "on",

        /**
         * Attach one or more  event handler to the current component context.
         * It is used for internal handling event internally within the component only.
         * @param {BoundOptions[]| string} event - It is  optional type either to  Set the collection of event list or the eventName.
         * @param {Function} handler - optional parameter Specifies the handler to run when the event occurs
         * @param {Object} context - optional parameter Specifies the context to be bind in the handler.
         * @return {void}
         * @private
         */
        value: function on(event, handler, context) {
          if (typeof event === 'string') {
            this.localObserver.on(event, handler, context);
          } else {
            var _iterator74 = _createForOfIteratorHelper(event),
                _step74;

            try {
              for (_iterator74.s(); !(_step74 = _iterator74.n()).done;) {
                var arg = _step74.value;
                this.localObserver.on(arg.event, arg.handler, arg.context);
              }
            } catch (err) {
              _iterator74.e(err);
            } finally {
              _iterator74.f();
            }
          }
        }
        /**
         * To remove one or more event handler that has been attached with the on() method.
         * @param {BoundOptions[]| string} event - It is  optional type either to  Set the collection of event list or the eventName.
         * @param {Function} handler - optional parameter Specifies the function to run when the event occurs
         * @return {void}
         * @private
         */

      }, {
        key: "off",
        value: function off(event, handler) {
          if (typeof event === 'string') {
            this.localObserver.off(event, handler);
          } else {
            var _iterator75 = _createForOfIteratorHelper(event),
                _step75;

            try {
              for (_iterator75.s(); !(_step75 = _iterator75.n()).done;) {
                var arg = _step75.value;
                this.localObserver.off(arg.event, arg.handler);
              }
            } catch (err) {
              _iterator75.e(err);
            } finally {
              _iterator75.f();
            }
          }
        }
        /**
         * To notify the handlers in the specified event.
         * @param {string} property - Specifies the event to be notify.
         * @param {Object} argument - Additional parameters to pass while calling the handler.
         * @return {void}
         * @private
         */

      }, {
        key: "notify",
        value: function notify(property, argument) {
          if (this.isDestroyed !== true) {
            this.localObserver.notify(property, argument);
          }
        }
        /**
         * Get injected modules
         * @private
         */

      }, {
        key: "getInjectedModules",
        value: function getInjectedModules() {
          return this.injectedModules;
        }
      }, {
        key: "createElement",

        /**
         * This is a instance method to create an element.
         * @private
         */
        //tslint:disable:no-any
        value: function createElement(tagName, prop, isVDOM) {
          if (isVDOM && this.isReactHybrid) {
            if (prop) {
              prop = {};
            }

            prop['data-id'] = getRandomId();
            return VirtualDOM.createElement(tagName, prop);
          } else {
            return _createElement(tagName, prop);
          }
        }
        /**
         *
         * @param handler - handler to be triggered after state Updated.
         * @param argument - Arguments to be passed to caller.
         * @private
         */
        //tslint:disable:no-any

      }, {
        key: "triggerStateChange",
        value: function triggerStateChange(handler, argument) {
          if (this.isReactHybrid) {
            //tslint:disable:no-any
            this.setState();
            this.currentContext = {
              calls: handler,
              args: argument
            };
          }
        } // tslint: enable: no-any

      }, {
        key: "injectModules",
        value: function injectModules() {
          if (this.injectedModules && this.injectedModules.length) {
            this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
          }
        }
      }, {
        key: "detectFunction",
        value: function detectFunction(args) {
          var prop = Object.keys(args);

          if (prop.length) {
            this[prop[0]] = args[prop[0]];
          }
        }
      }, {
        key: "mergePersistData",
        value: function mergePersistData() {
          var data = window.localStorage.getItem(this.getModuleName() + this.element.id);

          if (!(isNullOrUndefined(data) || data === '')) {
            this.setProperties(JSON.parse(data), true);
          }
        }
      }, {
        key: "setPersistData",
        value: function setPersistData() {
          if (!this.isDestroyed) {
            window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
          }
        } //tslint:disable-next-line

      }, {
        key: "clearTemplate",
        value: function clearTemplate(templateName, index) {//No Code
        }
      }, {
        key: "getUniqueID",
        value: function getUniqueID(definedName) {
          if (this.isHistoryChanged()) {
            componentCount = 0;
          }

          lastPageID = this.pageID(location.href);
          lastHistoryLen = history.length;
          return definedName + '_' + lastPageID + '_' + componentCount++;
        }
      }, {
        key: "pageID",
        value: function pageID(url) {
          var hash = 0;

          if (url.length === 0) {
            return hash;
          }

          for (var i = 0; i < url.length; i++) {
            var _char10 = url.charCodeAt(i);

            hash = (hash << 5) - hash + _char10;
            hash = hash & hash; // Convert to 32bit integer
          }

          return Math.abs(hash);
        }
      }, {
        key: "isHistoryChanged",
        value: function isHistoryChanged() {
          return lastPageID !== this.pageID(location.href) || lastHistoryLen !== history.length;
        }
      }, {
        key: "addOnPersist",
        value: function addOnPersist(options) {
          var _this422 = this;

          var persistObj = {};

          var _iterator76 = _createForOfIteratorHelper(options),
              _step76;

          try {
            for (_iterator76.s(); !(_step76 = _iterator76.n()).done;) {
              var key = _step76.value;
              var objValue = void 0;
              objValue = getValue(key, this);

              if (!isUndefined(objValue)) {
                setValue(key, this.getActualProperties(objValue), persistObj);
              }
            }
          } catch (err) {
            _iterator76.e(err);
          } finally {
            _iterator76.f();
          }

          return JSON.stringify(persistObj, function (key, value) {
            return _this422.getActualProperties(value);
          });
        }
      }, {
        key: "getActualProperties",
        value: function getActualProperties(obj) {
          if (obj instanceof ChildProperty) {
            return getValue('properties', obj);
          } else {
            return obj;
          }
        }
      }, {
        key: "ignoreOnPersist",
        value: function ignoreOnPersist(options) {
          return JSON.stringify(this.iterateJsonProperties(this.properties, options));
        }
      }, {
        key: "iterateJsonProperties",
        value: function iterateJsonProperties(obj, ignoreList) {
          var _this423 = this;

          var newObj = {};

          var _loop10 = function _loop10() {
            var key = _Object$keys7[_i45];

            if (ignoreList.indexOf(key) === -1) {
              // tslint:disable-next-line:no-any
              var value = obj[key];

              if (typeof value === 'object' && !(value instanceof Array)) {
                var newList = ignoreList.filter(function (str) {
                  return new RegExp(key + '.').test(str);
                }).map(function (str) {
                  return str.replace(key + '.', '');
                });
                newObj[key] = _this423.iterateJsonProperties(_this423.getActualProperties(value), newList);
              } else {
                newObj[key] = value;
              }
            }
          };

          for (var _i45 = 0, _Object$keys7 = Object.keys(obj); _i45 < _Object$keys7.length; _i45++) {
            _loop10();
          }

          return newObj;
        }
      }], [{
        key: "Inject",

        /**
         * Dynamically injects the required modules to the component.
         */
        value: function Inject() {
          if (!this.prototype.injectedModules) {
            this.prototype.injectedModules = [];
          }

          for (var _len26 = arguments.length, moduleList = new Array(_len26), _key23 = 0; _key23 < _len26; _key23++) {
            moduleList[_key23] = arguments[_key23];
          }

          for (var i = 0; i < moduleList.length; i++) {
            if (this.prototype.injectedModules.indexOf(moduleList[i]) === -1) {
              this.prototype.injectedModules.push(moduleList[i]);
            }
          }
        }
      }]);

      return Component;
    }(Base);

    __decorate$1([Property(false)], Component.prototype, "enablePersistence", void 0);

    __decorate$1([Property()], Component.prototype, "enableRtl", void 0);

    __decorate$1([Property()], Component.prototype, "locale", void 0);

    Component = __decorate$1([NotifyPropertyChanges], Component); //Function handling for page navigation detection 

    /* istanbul ignore next */

    (function () {
      if (typeof window !== 'undefined') {
        window.addEventListener('popstate',
        /* istanbul ignore next */
        function () {
          componentCount = 0;
        });
      }
    })();

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var Draggable_1;
    var defaultPosition = {
      left: 0,
      top: 0,
      bottom: 0,
      right: 0
    };
    var isDraggedObject = {
      isDragged: false
    };
    /**
     * Specifies the position coordinates
     */

    var Position = /*#__PURE__*/function (_ChildProperty) {
      _inherits(Position, _ChildProperty);

      var _super165 = _createSuper(Position);

      function Position() {
        _classCallCheck(this, Position);

        return _super165.apply(this, arguments);
      }

      return Position;
    }(ChildProperty);

    __decorate$2([Property(0)], Position.prototype, "left", void 0);

    __decorate$2([Property(0)], Position.prototype, "top", void 0);
    /**
     * Draggable Module provides support to enable draggable functionality in Dom Elements.
     * ```html
     * <div id='drag'>Draggable</div>
     * <script>
     * var ele = document.getElementById('drag');
     * var drag:Draggable = new Draggable(ele,{
     *     clone:false,
     *     drag: function(e) {
     *      //drag handler code.
     *      },
     *     handle:'.class'
     * });
     * </script>
     * ```
     */


    var Draggable = Draggable_1 = /*#__PURE__*/function (_Base3) {
      _inherits(Draggable, _Base3);

      var _super166 = _createSuper(Draggable);

      function Draggable(element, options) {
        var _this424;

        _classCallCheck(this, Draggable);

        _this424 = _super166.call(this, options, element);
        _this424.dragLimit = Draggable_1.getDefaultPosition();
        _this424.borderWidth = Draggable_1.getDefaultPosition();
        _this424.padding = Draggable_1.getDefaultPosition();
        _this424.diffX = 0;
        _this424.prevLeft = 0;
        _this424.prevTop = 0;
        _this424.dragProcessStarted = false;
        /* tslint:disable no-any */

        _this424.tapHoldTimer = 0;
        _this424.externalInitialize = false;
        _this424.diffY = 0;
        _this424.parentScrollX = 0;
        _this424.parentScrollY = 0;
        _this424.droppables = {};

        _this424.bind();

        return _this424;
      }

      _createClass2(Draggable, [{
        key: "bind",
        value: function bind() {
          this.toggleEvents();

          if (Browser.isIE) {
            addClass([this.element], 'e-block-touch');
          }

          this.droppables[this.scope] = {};
        }
      }, {
        key: "toggleEvents",
        value: function toggleEvents(isUnWire) {
          var ele;

          if (!isUndefined(this.handle)) {
            ele = select(this.handle, this.element);
          }

          var handler = this.enableTapHold && Browser.isDevice && Browser.isTouch ? this.mobileInitialize : this.initialize;

          if (isUnWire) {
            EventHandler.remove(ele || this.element, Browser.touchStartEvent, handler);
          } else {
            EventHandler.add(ele || this.element, Browser.touchStartEvent, handler, this);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "mobileInitialize",
        value: function mobileInitialize(evt) {
          var _this425 = this;

          var target = evt.currentTarget;
          this.tapHoldTimer = setTimeout(function () {
            _this425.externalInitialize = true;

            _this425.removeTapholdTimer();

            _this425.initialize(evt, target);
          }, this.tapHoldThreshold);
          EventHandler.add(document, Browser.touchMoveEvent, this.removeTapholdTimer, this);
          EventHandler.add(document, Browser.touchEndEvent, this.removeTapholdTimer, this);
        }
        /* istanbul ignore next */

      }, {
        key: "removeTapholdTimer",
        value: function removeTapholdTimer() {
          clearTimeout(this.tapHoldTimer);
          EventHandler.remove(document, Browser.touchMoveEvent, this.removeTapholdTimer);
          EventHandler.remove(document, Browser.touchEndEvent, this.removeTapholdTimer);
        }
        /* istanbul ignore next */

      }, {
        key: "getScrollableParent",
        value: function getScrollableParent(element, axis) {
          var scroll = {
            'vertical': 'scrollHeight',
            'horizontal': 'scrollWidth'
          };
          var client = {
            'vertical': 'clientHeight',
            'horizontal': 'clientWidth'
          };

          if (isNullOrUndefined(element)) {
            return null;
          }

          if (element[scroll[axis]] > element[client[axis]]) {
            if (axis === 'vertical' ? element.scrollTop > 0 : element.scrollLeft > 0) {
              if (axis === 'vertical') {
                this.parentScrollY = this.parentScrollY + (this.parentScrollY === 0 ? element.scrollTop : element.scrollTop - this.parentScrollY);
              } else {
                this.parentScrollX = this.parentScrollX + (this.parentScrollX === 0 ? element.scrollLeft : element.scrollLeft - this.parentScrollX);
              }

              if (!isNullOrUndefined(element)) {
                return this.getScrollableParent(element.parentNode, axis);
              } else {
                return element;
              }
            } else {
              return this.getScrollableParent(element.parentNode, axis);
            }
          } else {
            return this.getScrollableParent(element.parentNode, axis);
          }
        }
      }, {
        key: "getScrollableValues",
        value: function getScrollableValues() {
          this.parentScrollX = 0;
          this.parentScrollY = 0;
          var isModalDialog = this.element.classList.contains('e-dialog') && this.element.classList.contains('e-dlg-modal');
          var verticalScrollParent = this.getScrollableParent(this.element.parentNode, 'vertical');
          var horizontalScrollParent = this.getScrollableParent(this.element.parentNode, 'horizontal');
        }
      }, {
        key: "initialize",
        value: function initialize(evt, curTarget) {
          this.currentStateTarget = evt.target;

          if (this.isDragStarted()) {
            return;
          } else {
            this.isDragStarted(true);
            this.externalInitialize = false;
          }

          this.target = evt.currentTarget || curTarget;
          this.dragProcessStarted = false;

          if (this.abort) {
            /* tslint:disable no-any */
            var abortSelectors = this.abort;

            if (typeof abortSelectors === 'string') {
              abortSelectors = [abortSelectors];
            }

            for (var i = 0; i < abortSelectors.length; i++) {
              if (!isNullOrUndefined(closest(evt.target, abortSelectors[i]))) {
                /* istanbul ignore next */
                if (this.isDragStarted()) {
                  this.isDragStarted(true);
                }

                return;
              }
            }
          }

          if (this.preventDefault && !isUndefined(evt.changedTouches)) {
            evt.preventDefault();
          }

          this.element.setAttribute('aria-grabbed', 'true');
          var intCoord = this.getCoordinates(evt);
          this.initialPosition = {
            x: intCoord.pageX,
            y: intCoord.pageY
          };

          if (!this.clone) {
            var pos = this.element.getBoundingClientRect();
            this.getScrollableValues();

            if (evt.clientX === evt.pageX) {
              this.parentScrollX = 0;
            }

            if (evt.clientY === evt.pageY) {
              this.parentScrollY = 0;
            }

            this.relativeXPosition = intCoord.pageX - (pos.left + this.parentScrollX);
            this.relativeYPosition = intCoord.pageY - (pos.top + this.parentScrollY);
          }

          if (this.externalInitialize) {
            this.intDragStart(evt);
          } else {
            EventHandler.add(document, Browser.touchMoveEvent, this.intDragStart, this);
            EventHandler.add(document, Browser.touchEndEvent, this.intDestroy, this);
          }

          this.toggleEvents(true);
          document.body.classList.add('e-prevent-select');
          this.externalInitialize = false;
          EventHandler.trigger(document.documentElement, Browser.touchStartEvent, evt);
        }
      }, {
        key: "intDragStart",
        value: function intDragStart(evt) {
          this.removeTapholdTimer();
          var isChangeTouch = !isUndefined(evt.changedTouches);

          if (isChangeTouch && evt.changedTouches.length !== 1) {
            return;
          }

          if (isChangeTouch) {
            evt.preventDefault();
          }

          var intCordinate = this.getCoordinates(evt);
          var pos;
          var styleProp = getComputedStyle(this.element);
          this.margin = {
            left: parseInt(styleProp.marginLeft, 10),
            top: parseInt(styleProp.marginTop, 10),
            right: parseInt(styleProp.marginRight, 10),
            bottom: parseInt(styleProp.marginBottom, 10)
          };
          var element = this.element;

          if (this.clone && this.dragTarget) {
            var intClosest = closest(evt.target, this.dragTarget);

            if (!isNullOrUndefined(intClosest)) {
              element = intClosest;
            }
          }

          this.offset = this.calculateParentPosition(element);
          this.position = this.getMousePosition(evt, this.isDragScroll);
          var x = this.initialPosition.x - intCordinate.pageX;
          var y = this.initialPosition.y - intCordinate.pageY;
          var distance = Math.sqrt(x * x + y * y);

          if (distance >= this.distance || this.externalInitialize) {
            var ele = this.getHelperElement(evt);

            if (!ele || isNullOrUndefined(ele)) {
              return;
            }

            var dragTargetElement = this.helperElement = ele;
            this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent);

            if (this.dragStart) {
              var curTarget = this.getProperTargetElement(evt);
              var args = {
                event: evt,
                element: element,
                target: curTarget,
                bindEvents: isBlazor() ? this.bindDragEvents.bind(this) : null,
                dragElement: dragTargetElement
              };
              this.trigger('dragStart', args);
            }

            if (this.dragArea) {
              this.setDragArea();
            } else {
              this.dragLimit = {
                left: 0,
                right: 0,
                bottom: 0,
                top: 0
              };
              this.borderWidth = {
                top: 0,
                left: 0
              };
            }

            pos = {
              left: this.position.left - this.parentClientRect.left,
              top: this.position.top - this.parentClientRect.top
            };

            if (this.clone && !this.enableTailMode) {
              this.diffX = this.position.left - this.offset.left;
              this.diffY = this.position.top - this.offset.top;
            }

            this.getScrollableValues();
            var posValue = this.getProcessedPositionValue({
              top: pos.top - this.diffY + 'px',
              left: pos.left - this.diffX + 'px'
            });
            this.dragElePosition = {
              top: pos.top,
              left: pos.left
            };
            setStyleAttribute(dragTargetElement, this.getDragPosition({
              position: 'absolute',
              left: posValue.left,
              top: posValue.top
            }));
            EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart);
            EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy);

            if (!isBlazor()) {
              this.bindDragEvents(dragTargetElement);
            }
          }
        }
      }, {
        key: "bindDragEvents",
        value: function bindDragEvents(dragTargetElement) {
          if (isVisible(dragTargetElement)) {
            EventHandler.add(document, Browser.touchMoveEvent, this.intDrag, this);
            EventHandler.add(document, Browser.touchEndEvent, this.intDragStop, this);
            this.setGlobalDroppables(false, this.element, dragTargetElement);
          } else {
            this.toggleEvents();
            document.body.classList.remove('e-prevent-select');
          }
        }
      }, {
        key: "elementInViewport",
        value: function elementInViewport(el) {
          this.top = el.offsetTop;
          this.left = el.offsetLeft;
          this.width = el.offsetWidth;
          this.height = el.offsetHeight;

          while (el.offsetParent) {
            el = el.offsetParent;
            this.top += el.offsetTop;
            this.left += el.offsetLeft;
          }

          return this.top >= window.pageYOffset && this.left >= window.pageXOffset && this.top + this.height <= window.pageYOffset + window.innerHeight && this.left + this.width <= window.pageXOffset + window.innerWidth;
        }
      }, {
        key: "getProcessedPositionValue",
        value: function getProcessedPositionValue(value) {
          if (this.queryPositionInfo) {
            return this.queryPositionInfo(value);
          }

          return value;
        }
      }, {
        key: "calculateParentPosition",
        value: function calculateParentPosition(ele) {
          if (isNullOrUndefined(ele)) {
            return {
              left: 0,
              top: 0
            };
          }

          var rect = ele.getBoundingClientRect();
          var style = getComputedStyle(ele);
          return {
            left: rect.left + window.pageXOffset - parseInt(style.marginLeft, 10),
            top: rect.top + window.pageYOffset - parseInt(style.marginTop, 10)
          };
        } // tslint:disable-next-line:max-func-body-length

      }, {
        key: "intDrag",
        value: function intDrag(evt) {
          if (!isUndefined(evt.changedTouches) && evt.changedTouches.length !== 1) {
            return;
          }

          var left;
          var top;
          this.position = this.getMousePosition(evt, this.isDragScroll);
          var docHeight = this.getDocumentWidthHeight('Height');

          if (docHeight < this.position.top) {
            this.position.top = docHeight;
          }

          var docWidth = this.getDocumentWidthHeight('Width');

          if (docWidth < this.position.left) {
            this.position.left = docWidth;
          }

          if (this.drag) {
            var curTarget = this.getProperTargetElement(evt);
            this.trigger('drag', {
              event: evt,
              element: this.element,
              target: curTarget
            });
          }

          var eleObj = this.checkTargetElement(evt);

          if (eleObj.target && eleObj.instance) {
            /* tslint:disable no-any */
            var flag = true;

            if (this.hoverObject) {
              if (this.hoverObject.instance !== eleObj.instance) {
                this.triggerOutFunction(evt, eleObj);
              } else {
                flag = false;
              }
            }

            if (flag) {
              eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
              eleObj.instance.intOver(evt, eleObj.target);
              this.hoverObject = eleObj;
            }
          } else if (this.hoverObject) {
            this.triggerOutFunction(evt, eleObj);
          }

          var helperElement = this.droppables[this.scope].helper;
          this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);
          var tLeft = this.parentClientRect.left;
          var tTop = this.parentClientRect.top;
          var intCoord = this.getCoordinates(evt);
          var pagex = intCoord.pageX;
          var pagey = intCoord.pageY;
          var dLeft = this.position.left - this.diffX;
          var dTop = this.position.top - this.diffY;

          if (this.dragArea) {
            var _styles = getComputedStyle(helperElement);

            if (this.pageX !== pagex || this.skipDistanceCheck) {
              var helperWidth = helperElement.offsetWidth + (parseFloat(_styles.marginLeft) + parseFloat(_styles.marginRight));

              if (this.dragLimit.left > dLeft && dLeft > 0) {
                left = this.dragLimit.left;
              } else if (this.dragLimit.right + window.pageXOffset < dLeft + helperWidth && dLeft > 0) {
                left = dLeft - (dLeft - this.dragLimit.right) + window.pageXOffset - helperWidth;
              } else {
                left = dLeft < 0 ? this.dragLimit.left : dLeft;
              }
            }

            if (this.pageY !== pagey || this.skipDistanceCheck) {
              var helperHeight = helperElement.offsetHeight + (parseFloat(_styles.marginTop) + parseFloat(_styles.marginBottom));

              if (this.dragLimit.top > dTop && dTop > 0) {
                top = this.dragLimit.top;
              } else if (this.dragLimit.bottom + window.pageYOffset < dTop + helperHeight && dTop > 0) {
                top = dTop - (dTop - this.dragLimit.bottom) + window.pageYOffset - helperHeight;
              } else {
                top = dTop < 0 ? this.dragLimit.top : dTop;
              }
            }
          } else {
            left = dLeft;
            top = dTop;
          }

          var iTop = tTop + this.borderWidth.top;
          var iLeft = tLeft + this.borderWidth.left;

          if (this.dragProcessStarted) {
            if (isNullOrUndefined(top)) {
              top = this.prevTop;
            }

            if (isNullOrUndefined(left)) {
              left = this.prevLeft;
            }
          }

          var draEleTop;
          var draEleLeft;

          if (this.dragArea) {
            draEleTop = top - iTop < 0 ? this.dragLimit.top : top - iTop;
            draEleLeft = left - iLeft < 0 ? this.dragElePosition.left : left - iLeft;
          } else {
            draEleTop = top - iTop;
            draEleLeft = left - iLeft;
          }

          var dragValue = this.getProcessedPositionValue({
            top: draEleTop + 'px',
            left: draEleLeft + 'px'
          });
          setStyleAttribute(helperElement, this.getDragPosition(dragValue));

          if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {
            this.helperElement.scrollIntoView();
          }

          this.dragProcessStarted = true;
          this.prevLeft = left;
          this.prevTop = top;
          this.position.left = left;
          this.position.top = top;
          this.pageX = pagex;
          this.pageY = pagey;
        }
      }, {
        key: "triggerOutFunction",
        value: function triggerOutFunction(evt, eleObj) {
          this.hoverObject.instance.intOut(evt, eleObj.target);
          this.hoverObject.instance.dragData[this.scope] = null;
          this.hoverObject = null;
        }
      }, {
        key: "getDragPosition",
        value: function getDragPosition(dragValue) {
          var temp = extend({}, dragValue);

          if (this.axis) {
            if (this.axis === 'x') {
              delete temp.top;
            } else if (this.axis === 'y') {
              delete temp.left;
            }
          }

          return temp;
        }
      }, {
        key: "getDocumentWidthHeight",
        value: function getDocumentWidthHeight(str) {
          var docBody = document.body;
          var docEle = document.documentElement;
          var returnValue = Math.max(docBody['scroll' + str], docEle['scroll' + str], docBody['offset' + str], docEle['offset' + str], docEle['client' + str]);
          return returnValue;
        }
      }, {
        key: "intDragStop",
        value: function intDragStop(evt) {
          this.dragProcessStarted = false;

          if (!isUndefined(evt.changedTouches) && evt.changedTouches.length !== 1) {
            return;
          }

          var type = ['touchend', 'pointerup', 'mouseup'];

          if (type.indexOf(evt.type) !== -1) {
            if (this.dragStop) {
              var curTarget = this.getProperTargetElement(evt);
              this.trigger('dragStop', {
                event: evt,
                element: this.element,
                target: curTarget,
                helper: this.helperElement
              });
            }

            this.intDestroy(evt);
          } else {
            this.element.setAttribute('aria-grabbed', 'false');
          }

          var eleObj = this.checkTargetElement(evt);

          if (eleObj.target && eleObj.instance) {
            eleObj.instance.dragStopCalled = true;
            eleObj.instance.dragData[this.scope] = this.droppables[this.scope];
            eleObj.instance.intDrop(evt, eleObj.target);
          }

          this.setGlobalDroppables(true);
          document.body.classList.remove('e-prevent-select');
        }
        /**
         * @private
         */

      }, {
        key: "intDestroy",
        value: function intDestroy(evt) {
          this.dragProcessStarted = false;
          this.toggleEvents();
          document.body.classList.remove('e-prevent-select');
          this.element.setAttribute('aria-grabbed', 'false');
          EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart);
          EventHandler.remove(document, Browser.touchEndEvent, this.intDragStop);
          EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy);
          EventHandler.remove(document, Browser.touchMoveEvent, this.intDrag);

          if (this.isDragStarted()) {
            this.isDragStarted(true);
          }
        } // triggers when property changed

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {//No Code to handle
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'draggable';
        }
      }, {
        key: "isDragStarted",
        value: function isDragStarted(change) {
          if (change) {
            isDraggedObject.isDragged = !isDraggedObject.isDragged;
          }

          return isDraggedObject.isDragged;
        }
      }, {
        key: "setDragArea",
        value: function setDragArea() {
          var eleWidthBound;
          var eleHeightBound;
          var top = 0;
          var left = 0;
          var ele;
          var type = typeof this.dragArea;

          if (type === 'string') {
            ele = select(this.dragArea);
          } else {
            ele = this.dragArea;
          }

          if (ele) {
            var elementArea = ele.getBoundingClientRect();
            eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
            eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;
            var _keys11 = ['Top', 'Left', 'Bottom', 'Right'];

            var _styles2 = getComputedStyle(ele);

            for (var i = 0; i < _keys11.length; i++) {
              var key = _keys11[i];
              var tborder = _styles2['border' + key + 'Width'];
              var tpadding = _styles2['padding' + key];
              var lowerKey = key.toLowerCase();
              this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
              this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
            }

            top = elementArea.top;
            left = elementArea.left;
            this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
            this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
            this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right);
            this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);
          }
        }
      }, {
        key: "getProperTargetElement",
        value: function getProperTargetElement(evt) {
          var intCoord = this.getCoordinates(evt);
          var ele;
          var prevStyle = this.helperElement.style.pointerEvents || '';

          if (compareElementParent(evt.target, this.helperElement) || evt.type.indexOf('touch') !== -1) {
            this.helperElement.style.pointerEvents = 'none';
            ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY);
            this.helperElement.style.pointerEvents = prevStyle;
          } else {
            ele = evt.target;
          }

          return ele;
        }
      }, {
        key: "getMousePosition",
        value: function getMousePosition(evt, isdragscroll) {
          /* tslint:disable no-any */
          var dragEle = evt.srcElement !== undefined ? evt.srcElement : evt.target;
          var intCoord = this.getCoordinates(evt);
          var pageX;
          var pageY;
          var isOffsetParent = isNullOrUndefined(dragEle.offsetParent);
          /* istanbul ignore next */

          if (isdragscroll) {
            pageX = this.clone ? intCoord.pageX : intCoord.pageX + (isOffsetParent ? 0 : dragEle.offsetParent.scrollLeft) - this.relativeXPosition;
            pageY = this.clone ? intCoord.pageY : intCoord.pageY + (isOffsetParent ? 0 : dragEle.offsetParent.scrollTop) - this.relativeYPosition;
          } else {
            pageX = this.clone ? intCoord.pageX : intCoord.pageX + window.pageXOffset - this.relativeXPosition;
            pageY = this.clone ? intCoord.pageY : intCoord.pageY + window.pageYOffset - this.relativeYPosition;
          }

          return {
            left: pageX - (this.margin.left + this.cursorAt.left),
            top: pageY - (this.margin.top + this.cursorAt.top)
          };
        }
      }, {
        key: "getCoordinates",
        value: function getCoordinates(evt) {
          if (evt.type.indexOf('touch') > -1) {
            return evt.changedTouches[0];
          }

          return evt;
        }
      }, {
        key: "getHelperElement",
        value: function getHelperElement(evt) {
          var element;

          if (this.clone) {
            if (this.helper) {
              element = this.helper({
                sender: evt,
                element: this.target
              });
            } else {
              element = _createElement('div', {
                className: 'e-drag-helper e-block-touch',
                innerHTML: 'Draggable'
              });
              document.body.appendChild(element);
            }
          } else {
            element = this.element;
          }

          return element;
        }
      }, {
        key: "setGlobalDroppables",
        value: function setGlobalDroppables(reset, drag, helper) {
          this.droppables[this.scope] = reset ? null : {
            draggable: drag,
            helper: helper,
            draggedElement: this.element
          };
        }
      }, {
        key: "checkTargetElement",
        value: function checkTargetElement(evt) {
          var target = this.getProperTargetElement(evt);
          var dropIns = this.getDropInstance(target);

          if (!dropIns && target && !isNullOrUndefined(target.parentNode)) {
            var parent = closest(target.parentNode, '.e-droppable') || target.parentElement;

            if (parent) {
              dropIns = this.getDropInstance(parent);
            }
          }

          return {
            target: target,
            instance: dropIns
          };
        }
      }, {
        key: "getDropInstance",
        value: function getDropInstance(ele) {
          var name = 'getModuleName';
          var drop;
          var eleInst = ele && ele.ej2_instances;

          if (eleInst) {
            var _iterator77 = _createForOfIteratorHelper(eleInst),
                _step77;

            try {
              for (_iterator77.s(); !(_step77 = _iterator77.n()).done;) {
                var inst = _step77.value;

                if (inst[name]() === 'droppable') {
                  drop = inst;
                  break;
                }
              }
            } catch (err) {
              _iterator77.e(err);
            } finally {
              _iterator77.f();
            }
          }

          return drop;
        }
      }, {
        key: "destroy",
        value: function destroy() {
          this.toggleEvents(true);

          _get(_getPrototypeOf(Draggable.prototype), "destroy", this).call(this);
        }
      }], [{
        key: "getDefaultPosition",
        value: function getDefaultPosition() {
          return extend({}, defaultPosition);
        }
      }]);

      return Draggable;
    }(Base);

    __decorate$2([Complex({}, Position)], Draggable.prototype, "cursorAt", void 0);

    __decorate$2([Property(true)], Draggable.prototype, "clone", void 0);

    __decorate$2([Property()], Draggable.prototype, "dragArea", void 0);

    __decorate$2([Property()], Draggable.prototype, "isDragScroll", void 0);

    __decorate$2([Event$1()], Draggable.prototype, "drag", void 0);

    __decorate$2([Event$1()], Draggable.prototype, "dragStart", void 0);

    __decorate$2([Event$1()], Draggable.prototype, "dragStop", void 0);

    __decorate$2([Property(1)], Draggable.prototype, "distance", void 0);

    __decorate$2([Property()], Draggable.prototype, "handle", void 0);

    __decorate$2([Property()], Draggable.prototype, "abort", void 0);

    __decorate$2([Property()], Draggable.prototype, "helper", void 0);

    __decorate$2([Property('default')], Draggable.prototype, "scope", void 0);

    __decorate$2([Property('')], Draggable.prototype, "dragTarget", void 0);

    __decorate$2([Property()], Draggable.prototype, "axis", void 0);

    __decorate$2([Property()], Draggable.prototype, "queryPositionInfo", void 0);

    __decorate$2([Property(false)], Draggable.prototype, "enableTailMode", void 0);

    __decorate$2([Property(false)], Draggable.prototype, "skipDistanceCheck", void 0);

    __decorate$2([Property(true)], Draggable.prototype, "preventDefault", void 0);

    __decorate$2([Property(false)], Draggable.prototype, "enableAutoScroll", void 0);

    __decorate$2([Property(false)], Draggable.prototype, "enableTapHold", void 0);

    __decorate$2([Property(750)], Draggable.prototype, "tapHoldThreshold", void 0);

    Draggable = Draggable_1 = __decorate$2([NotifyPropertyChanges], Draggable);

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };
    /**
     * Droppable Module provides support to enable droppable functionality in Dom Elements.
     * ```html
     * <div id='drop'>Droppable</div>
     * <script>
     * let ele:HTMLElement = document.getElementById('drop');
     * var drag:Droppable = new Droppable(ele,{
     *     accept:'.drop',
     *     drop: function(e) {
     *      //drop handler code.
     *     }
     * });
     * </script>
     * ```
     */


    var Droppable = /*#__PURE__*/function (_Base4) {
      _inherits(Droppable, _Base4);

      var _super167 = _createSuper(Droppable);

      function Droppable(element, options) {
        var _this426;

        _classCallCheck(this, Droppable);

        _this426 = _super167.call(this, options, element);
        _this426.mouseOver = false;
        _this426.dragData = {};
        _this426.dragStopCalled = false;

        _this426.bind();

        return _this426;
      }

      _createClass2(Droppable, [{
        key: "bind",
        value: function bind() {
          this.wireEvents();
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          EventHandler.add(this.element, Browser.touchEndEvent, this.intDrop, this);
        } // triggers when property changed

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {//No Code to handle
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'droppable';
        }
      }, {
        key: "intOver",
        value: function intOver(event, element) {
          if (!this.mouseOver) {
            var drag = this.dragData[this.scope];
            this.trigger('over', {
              event: event,
              target: element,
              dragData: drag
            });
            this.mouseOver = true;
          }
        }
      }, {
        key: "intOut",
        value: function intOut(event, element) {
          if (this.mouseOver) {
            this.trigger('out', {
              evt: event,
              target: element
            });
            this.mouseOver = false;
          }
        }
      }, {
        key: "intDrop",
        value: function intDrop(evt, element) {
          if (!this.dragStopCalled) {
            return;
          } else {
            this.dragStopCalled = false;
          }

          var accept = true;
          var drag = this.dragData[this.scope];
          var isDrag = drag ? drag.helper && isVisible(drag.helper) : false;
          var area;

          if (isDrag) {
            area = this.isDropArea(evt, drag.helper, element);

            if (this.accept) {
              accept = matches(drag.helper, this.accept);
            }
          }

          if (isDrag && this.drop && area.canDrop && accept) {
            this.trigger('drop', {
              event: evt,
              target: area.target,
              droppedElement: drag.helper,
              dragData: drag
            });
          }

          this.mouseOver = false;
        }
      }, {
        key: "isDropArea",
        value: function isDropArea(evt, helper, element) {
          var area = {
            canDrop: true,
            target: element || evt.target
          };
          var isTouch = evt.type === 'touchend';

          if (isTouch || area.target === helper) {
            helper.style.display = 'none';
            var coord = isTouch ? evt.changedTouches[0] : evt;
            var ele = document.elementFromPoint(coord.clientX, coord.clientY);
            area.canDrop = false;
            area.canDrop = compareElementParent(ele, this.element);

            if (area.canDrop) {
              area.target = ele;
            }

            helper.style.display = '';
          }

          return area;
        }
      }, {
        key: "destroy",
        value: function destroy() {
          EventHandler.remove(this.element, Browser.touchEndEvent, this.intDrop);

          _get(_getPrototypeOf(Droppable.prototype), "destroy", this).call(this);
        }
      }]);

      return Droppable;
    }(Base);

    __decorate$3([Property()], Droppable.prototype, "accept", void 0);

    __decorate$3([Property('default')], Droppable.prototype, "scope", void 0);

    __decorate$3([Event$1()], Droppable.prototype, "drop", void 0);

    __decorate$3([Event$1()], Droppable.prototype, "over", void 0);

    __decorate$3([Event$1()], Droppable.prototype, "out", void 0);

    Droppable = __decorate$3([NotifyPropertyChanges], Droppable);

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    };

    var KeyboardEvents_1;
    var keyCode = {
      'backspace': 8,
      'tab': 9,
      'enter': 13,
      'shift': 16,
      'control': 17,
      'alt': 18,
      'pause': 19,
      'capslock': 20,
      'space': 32,
      'escape': 27,
      'pageup': 33,
      'pagedown': 34,
      'end': 35,
      'home': 36,
      'leftarrow': 37,
      'uparrow': 38,
      'rightarrow': 39,
      'downarrow': 40,
      'insert': 45,
      'delete': 46,
      'f1': 112,
      'f2': 113,
      'f3': 114,
      'f4': 115,
      'f5': 116,
      'f6': 117,
      'f7': 118,
      'f8': 119,
      'f9': 120,
      'f10': 121,
      'f11': 122,
      'f12': 123,
      'semicolon': 186,
      'plus': 187,
      'comma': 188,
      'minus': 189,
      'dot': 190,
      'forwardslash': 191,
      'graveaccent': 192,
      'openbracket': 219,
      'backslash': 220,
      'closebracket': 221,
      'singlequote': 222
    };
    /**
     * KeyboardEvents class enables you to bind key action desired key combinations for ex., Ctrl+A, Delete, Alt+Space etc.
     * ```html
     * <div id='testEle'>  </div>;
     * <script>
     *   let node: HTMLElement = document.querySelector('#testEle');
     *   let kbInstance = new KeyboardEvents({
     *       element: node,
     *       keyConfigs:{ selectAll : 'ctrl+a' },
     *       keyAction: function (e:KeyboardEvent, action:string) {
     *           // handler function code
     *       }
     *   });
     * </script>
     * ```
     */

    var KeyboardEvents = KeyboardEvents_1 = /*#__PURE__*/function (_Base5) {
      _inherits(KeyboardEvents, _Base5);

      var _super168 = _createSuper(KeyboardEvents);

      /**
       * Initializes the KeyboardEvents
       * @param {HTMLElement} element
       * @param {KeyboardEventsModel} options
       */
      function KeyboardEvents(element, options) {
        var _this427;

        _classCallCheck(this, KeyboardEvents);

        _this427 = _super168.call(this, options, element);
        /**
         * To handle a key press event returns null
         */

        _this427.keyPressHandler = function (e) {
          var isAltKey = e.altKey;
          var isCtrlKey = e.ctrlKey;
          var isShiftKey = e.shiftKey;
          var curkeyCode = e.which;
          var keys = Object.keys(_this427.keyConfigs);

          for (var _i46 = 0, _keys12 = keys; _i46 < _keys12.length; _i46++) {
            var key = _keys12[_i46];

            var configCollection = _this427.keyConfigs[key].split(',');

            var _iterator78 = _createForOfIteratorHelper(configCollection),
                _step78;

            try {
              for (_iterator78.s(); !(_step78 = _iterator78.n()).done;) {
                var rconfig = _step78.value;
                var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());

                if (isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey && isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode) {
                  e.action = key;

                  if (_this427.keyAction) {
                    _this427.keyAction(e);
                  }
                }
              }
            } catch (err) {
              _iterator78.e(err);
            } finally {
              _iterator78.f();
            }
          }
        };

        _this427.bind();

        return _this427;
      }
      /**
       * Unwire bound events and destroy the instance.
       * @return {void}
       */


      _createClass2(KeyboardEvents, [{
        key: "destroy",
        value: function destroy() {
          this.unwireEvents();

          _get(_getPrototypeOf(KeyboardEvents.prototype), "destroy", this).call(this);
        }
        /**
         * Function can be used to specify certain action if a property is changed
         * @param newProp
         * @param oldProp
         * @returns {void}
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {// No code are needed
        }
      }, {
        key: "bind",
        value: function bind() {
          this.wireEvents();
        }
        /**
         * To get the module name, returns 'keyboard'.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'keyboard';
        }
        /**
         * Wiring event handlers to events
         */

      }, {
        key: "wireEvents",
        value: function wireEvents() {
          this.element.addEventListener(this.eventName, this.keyPressHandler);
        }
        /**
         * Unwiring event handlers to events
         */

      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          this.element.removeEventListener(this.eventName, this.keyPressHandler);
        }
        /**
         * To get the key configuration data
         * @param {string} config - configuration data
         * returns {KeyData}
         */

      }], [{
        key: "getKeyConfigData",
        value: function getKeyConfigData(config) {
          if (config in this.configCache) {
            return this.configCache[config];
          }

          var keys = config.toLowerCase().split('+');
          var keyData = {
            altKey: keys.indexOf('alt') !== -1 ? true : false,
            ctrlKey: keys.indexOf('ctrl') !== -1 ? true : false,
            shiftKey: keys.indexOf('shift') !== -1 ? true : false,
            keyCode: null
          };

          if (keys[keys.length - 1].length > 1 && !!Number(keys[keys.length - 1])) {
            keyData.keyCode = Number(keys[keys.length - 1]);
          } else {
            keyData.keyCode = KeyboardEvents_1.getKeyCode(keys[keys.length - 1]);
          }

          KeyboardEvents_1.configCache[config] = keyData;
          return keyData;
        } // Return the keycode value as string 

      }, {
        key: "getKeyCode",
        value: function getKeyCode(keyVal) {
          return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);
        }
      }]);

      return KeyboardEvents;
    }(Base);

    KeyboardEvents.configCache = {};

    __decorate$4([Property({})], KeyboardEvents.prototype, "keyConfigs", void 0);

    __decorate$4([Property('keyup')], KeyboardEvents.prototype, "eventName", void 0);

    __decorate$4([Event$1()], KeyboardEvents.prototype, "keyAction", void 0);

    KeyboardEvents = KeyboardEvents_1 = __decorate$4([NotifyPropertyChanges], KeyboardEvents);
    /**
     * L10n modules provides localized text for different culture.
     * ```typescript
     * import {setCulture} from '@syncfusion/ts-base-library';
     * //load global locale object common for all components.
     * L10n.load({
     *    'fr-BE': {
     *       'button': {
     *            'check': 'vérifié'
     *        }
     *    }
     * });
     * //set globale default locale culture.
     * setCulture('fr-BE');
     * let instance: L10n = new L10n('button', {
     *    check: 'checked'
     * });
     * //Get locale text for current property.
     * instance.getConstant('check');
     * //Change locale culture in a component.
     * instance.setLocale('en-US');
     * ```
     */

    var L10n = /*#__PURE__*/function () {
      /**
       * Constructor
       */
      function L10n(controlName, localeStrings, locale) {
        _classCallCheck(this, L10n);

        this.controlName = controlName;
        this.localeStrings = localeStrings;
        this.setLocale(locale || defaultCulture);
      }
      /**
       * Sets the locale text
       * @param {string} locale
       * @returns {void}
       */


      _createClass2(L10n, [{
        key: "setLocale",
        value: function setLocale(locale) {
          var intLocale = this.intGetControlConstant(L10n.locale, locale);
          this.currentLocale = intLocale || this.localeStrings;
        }
        /**
         * Sets the global locale for all components.
         * @param {Object} localeObject - specifies the localeObject to be set as global locale.
         */

      }, {
        key: "getConstant",

        /**
         * Returns current locale text for the property based on the culture name and control name.
         * @param {string} propertyName - specifies the property for which localize text to be returned.
         * @return string
         */
        value: function getConstant(prop) {
          // Removed conditional operator because this method does not return correct value when passing 0 as value in localization
          if (!isNullOrUndefined(this.currentLocale[prop])) {
            return this.currentLocale[prop];
          } else {
            return this.localeStrings[prop] || '';
          }
        }
        /**
         * Returns the control constant object for current object and the locale specified.
         * @param {Object} curObject
         * @param {string} locale
         * @returns {Object}
         */

      }, {
        key: "intGetControlConstant",
        value: function intGetControlConstant(curObject, locale) {
          if (curObject[locale]) {
            return curObject[locale][this.controlName];
          }

          return null;
        }
      }], [{
        key: "load",
        value: function load(localeObject) {
          this.locale = extend(this.locale, localeObject, {}, true);
        }
      }]);

      return L10n;
    }();

    L10n.locale = {};

    var __decorate$5 = undefined && undefined.__decorate || function (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;
    };
    /**
     * SwipeSettings is a framework module that provides support to handle swipe event like swipe up, swipe right, etc..,
     */


    var SwipeSettings = /*#__PURE__*/function (_ChildProperty2) {
      _inherits(SwipeSettings, _ChildProperty2);

      var _super169 = _createSuper(SwipeSettings);

      function SwipeSettings() {
        _classCallCheck(this, SwipeSettings);

        return _super169.apply(this, arguments);
      }

      return SwipeSettings;
    }(ChildProperty);

    __decorate$5([Property(50)], SwipeSettings.prototype, "swipeThresholdDistance", void 0);

    var swipeRegex = /(Up|Down)/;
    /**
     * Touch class provides support to handle the touch event like tap, double tap, tap hold, etc..,
     * ```typescript
     *    let node: HTMLElement;
     * let touchObj: Touch = new Touch({
     *    element: node,
     *    tap: function (e) {
     *        // tap handler function code
     *    }
     *    tapHold: function (e) {
     *        // tap hold handler function code
     *    }
     *    scroll: function (e) {
     *        // scroll handler function code
     *    }
     *    swipe: function (e) {
     *        // swipe handler function code
     *    }
     * });
     * ```
     */

    var Touch = /*#__PURE__*/function (_Base6) {
      _inherits(Touch, _Base6);

      var _super170 = _createSuper(Touch);

      /* End-Properties */
      function Touch(element, options) {
        var _this428;

        _classCallCheck(this, Touch);

        _this428 = _super170.call(this, options, element);
        _this428.touchAction = true;
        _this428.tapCount = 0;

        _this428.startEvent = function (evt) {
          if (_this428.touchAction === true) {
            var point = _this428.updateChangeTouches(evt);

            if (evt.changedTouches !== undefined) {
              _this428.touchAction = false;
            }

            _this428.isTouchMoved = false;
            _this428.movedDirection = '';
            _this428.startPoint = _this428.lastMovedPoint = {
              clientX: point.clientX,
              clientY: point.clientY
            };
            _this428.startEventData = point;
            _this428.hScrollLocked = _this428.vScrollLocked = false;
            _this428.tStampStart = Date.now();
            _this428.timeOutTapHold = setTimeout(function () {
              _this428.tapHoldEvent(evt);
            }, _this428.tapHoldThreshold);
            EventHandler.add(_this428.element, Browser.touchMoveEvent, _this428.moveEvent, _assertThisInitialized(_this428));
            EventHandler.add(_this428.element, Browser.touchEndEvent, _this428.endEvent, _assertThisInitialized(_this428));
            EventHandler.add(_this428.element, Browser.touchCancelEvent, _this428.cancelEvent, _assertThisInitialized(_this428));
          }
        };

        _this428.moveEvent = function (evt) {
          var point = _this428.updateChangeTouches(evt);

          _this428.movedPoint = point;
          _this428.isTouchMoved = !(point.clientX === _this428.startPoint.clientX && point.clientY === _this428.startPoint.clientY);
          var eScrollArgs = {};

          if (_this428.isTouchMoved) {
            clearTimeout(_this428.timeOutTapHold);

            _this428.calcScrollPoints(evt);

            var scrollArg = {
              startEvents: _this428.startEventData,
              originalEvent: evt,
              startX: _this428.startPoint.clientX,
              startY: _this428.startPoint.clientY,
              distanceX: _this428.distanceX,
              distanceY: _this428.distanceY,
              scrollDirection: _this428.scrollDirection,
              velocity: _this428.getVelocity(point)
            };
            eScrollArgs = extend(eScrollArgs, {}, scrollArg);

            _this428.trigger('scroll', eScrollArgs);

            _this428.lastMovedPoint = {
              clientX: point.clientX,
              clientY: point.clientY
            };
          }
        };

        _this428.cancelEvent = function (evt) {
          clearTimeout(_this428.timeOutTapHold);
          clearTimeout(_this428.timeOutTap);
          _this428.tapCount = 0;

          _this428.swipeFn(evt);

          EventHandler.remove(_this428.element, Browser.touchCancelEvent, _this428.cancelEvent);
        };

        _this428.endEvent = function (evt) {
          _this428.swipeFn(evt);

          if (!_this428.isTouchMoved) {
            if (typeof _this428.tap === 'function') {
              _this428.trigger('tap', {
                originalEvent: evt,
                tapCount: ++_this428.tapCount
              });

              _this428.timeOutTap = setTimeout(function () {
                _this428.tapCount = 0;
              }, _this428.tapThreshold);
            }
          }

          _this428.modeclear();
        };

        _this428.swipeFn = function (evt) {
          clearTimeout(_this428.timeOutTapHold);
          clearTimeout(_this428.timeOutTap);

          var point = _this428.updateChangeTouches(evt);

          var diffX = point.clientX - _this428.startPoint.clientX;
          var diffY = point.clientY - _this428.startPoint.clientY;
          diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
          diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
          _this428.isTouchMoved = diffX > 1 || diffY > 1;
          _this428.endPoint = point;

          _this428.calcPoints(evt);

          var swipeArgs = {
            originalEvent: evt,
            startEvents: _this428.startEventData,
            startX: _this428.startPoint.clientX,
            startY: _this428.startPoint.clientY,
            distanceX: _this428.distanceX,
            distanceY: _this428.distanceY,
            swipeDirection: _this428.movedDirection,
            velocity: _this428.getVelocity(point)
          };

          if (_this428.isTouchMoved) {
            var eSwipeArgs;
            var tDistance = _this428.swipeSettings.swipeThresholdDistance;
            eSwipeArgs = extend(eSwipeArgs, _this428.defaultArgs, swipeArgs);
            var canTrigger = false;
            var ele = _this428.element;

            var scrollBool = _this428.isScrollable(ele);

            var moved = swipeRegex.test(_this428.movedDirection);

            if (tDistance < _this428.distanceX && !moved || tDistance < _this428.distanceY && moved) {
              if (!scrollBool) {
                canTrigger = true;
              } else {
                canTrigger = _this428.checkSwipe(ele, moved);
              }
            }

            if (canTrigger) {
              _this428.trigger('swipe', eSwipeArgs);
            }
          }

          _this428.modeclear();
        };

        _this428.modeclear = function () {
          _this428.modeClear = setTimeout(function () {
            _this428.touchAction = true;
          }, typeof _this428.tap !== 'function' ? 0 : 20);
          _this428.lastTapTime = new Date().getTime();
          EventHandler.remove(_this428.element, Browser.touchMoveEvent, _this428.moveEvent);
          EventHandler.remove(_this428.element, Browser.touchEndEvent, _this428.endEvent);
          EventHandler.remove(_this428.element, Browser.touchCancelEvent, _this428.cancelEvent);
        };

        _this428.bind();

        return _this428;
      } // triggers when property changed 

      /**
       * @private
       * @param newProp
       * @param oldProp
       */


      _createClass2(Touch, [{
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {//No Code to handle
        }
      }, {
        key: "bind",
        value: function bind() {
          this.wireEvents();

          if (Browser.isIE) {
            this.element.classList.add('e-block-touch');
          }
        }
        /**
         * To destroy the touch instance.
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.unwireEvents();

          _get(_getPrototypeOf(Touch.prototype), "destroy", this).call(this);
        } // Need to changes the event binding once we updated the event handler.

      }, {
        key: "wireEvents",
        value: function wireEvents() {
          EventHandler.add(this.element, Browser.touchStartEvent, this.startEvent, this);
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          EventHandler.remove(this.element, Browser.touchStartEvent, this.startEvent);
        }
        /**
         * Returns module name as touch
         * @returns {string}
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'touch';
        }
        /**
         * Returns if the HTML element is Scrollable.
         * @param {HTMLElement} element - HTML Element to check if Scrollable.
         * @returns {boolean}
         */

      }, {
        key: "isScrollable",
        value: function isScrollable(element) {
          var eleStyle = getComputedStyle(element);
          var style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;

          if (/(auto|scroll)/.test(style)) {
            return true;
          }

          return false;
        }
      }, {
        key: "tapHoldEvent",
        value: function tapHoldEvent(evt) {
          this.tapCount = 0;
          this.touchAction = true;
          var eTapArgs;
          EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);
          EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent);
          eTapArgs = {
            originalEvent: evt
          };
          this.trigger('tapHold', eTapArgs);
          EventHandler.remove(this.element, Browser.touchCancelEvent, this.cancelEvent);
        }
      }, {
        key: "calcPoints",
        value: function calcPoints(evt) {
          var point = this.updateChangeTouches(evt);
          this.defaultArgs = {
            originalEvent: evt
          };
          this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.startPoint.clientX));
          this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.startPoint.clientY));

          if (this.distanceX > this.distanceY) {
            this.movedDirection = point.clientX > this.startPoint.clientX ? 'Right' : 'Left';
          } else {
            this.movedDirection = point.clientY < this.startPoint.clientY ? 'Up' : 'Down';
          }
        }
      }, {
        key: "calcScrollPoints",
        value: function calcScrollPoints(evt) {
          var point = this.updateChangeTouches(evt);
          this.defaultArgs = {
            originalEvent: evt
          };
          this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX));
          this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY));

          if ((this.distanceX > this.distanceY || this.hScrollLocked === true) && this.vScrollLocked === false) {
            this.scrollDirection = point.clientX > this.lastMovedPoint.clientX ? 'Right' : 'Left';
            this.hScrollLocked = true;
          } else {
            this.scrollDirection = point.clientY < this.lastMovedPoint.clientY ? 'Up' : 'Down';
            this.vScrollLocked = true;
          }
        }
      }, {
        key: "getVelocity",
        value: function getVelocity(pnt) {
          var newX = pnt.clientX;
          var newY = pnt.clientY;
          var newT = Date.now();
          var xDist = newX - this.startPoint.clientX;
          var yDist = newY - this.startPoint.clientX;
          var interval = newT - this.tStampStart;
          return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
        } // tslint:disable-next-line:no-any

      }, {
        key: "checkSwipe",
        value: function checkSwipe(ele, flag) {
          var keys = ['scroll', 'offset'];
          var temp = flag ? ['Height', 'Top'] : ['Width', 'Left'];

          if (ele[keys[0] + temp[0]] <= ele[keys[1] + temp[0]]) {
            return true;
          }

          return ele[keys[0] + temp[1]] === 0 || ele[keys[1] + temp[0]] + ele[keys[0] + temp[1]] >= ele[keys[0] + temp[0]];
        }
      }, {
        key: "updateChangeTouches",
        value: function updateChangeTouches(evt) {
          // tslint:disable-next-line:max-line-length
          var point = evt.changedTouches && evt.changedTouches.length !== 0 ? evt.changedTouches[0] : evt;
          return point;
        }
      }]);

      return Touch;
    }(Base);

    __decorate$5([Event$1()], Touch.prototype, "tap", void 0);

    __decorate$5([Event$1()], Touch.prototype, "tapHold", void 0);

    __decorate$5([Event$1()], Touch.prototype, "swipe", void 0);

    __decorate$5([Event$1()], Touch.prototype, "scroll", void 0);

    __decorate$5([Property(350)], Touch.prototype, "tapThreshold", void 0);

    __decorate$5([Property(750)], Touch.prototype, "tapHoldThreshold", void 0);

    __decorate$5([Complex({}, SwipeSettings)], Touch.prototype, "swipeSettings", void 0);

    Touch = __decorate$5([NotifyPropertyChanges], Touch);
    /**
     * SanitizeHtmlHelper for sanitize the value.
     */

    var removeTags = ['script', 'style', 'iframe[src]', 'link[href*="javascript:"]', 'object[type="text/x-scriptlet"]', 'object[data^="data:text/html;base64"]', 'img[src^="data:text/html;base64"]', '[src^="javascript:"]', '[dynsrc^="javascript:"]', '[lowsrc^="javascript:"]', '[type^="application/x-shockwave-flash"]'];
    var removeAttrs = [{
      attribute: 'href',
      selector: '[href*="javascript:"]'
    }, {
      attribute: 'background',
      selector: '[background^="javascript:"]'
    }, {
      attribute: 'style',
      selector: '[style*="javascript:"]'
    }, {
      attribute: 'style',
      selector: '[style*="expression("]'
    }, {
      attribute: 'href',
      selector: 'a[href^="data:text/html;base64"]'
    }];
    var jsEvents = ['onchange', 'onclick', 'onmouseover', 'onmouseout', 'onkeydown', 'onload', 'onerror', 'onblur', 'onfocus', 'onbeforeload', 'onbeforeunload', 'onkeyup', 'onsubmit', 'onafterprint', 'onbeforeonload', 'onbeforeprint', 'onblur', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick', 'oncontextmenu', 'ondblclick', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'ondurationchange', 'onemptied', 'onended', 'onerror', 'onerror', 'onfocus', 'onformchange', 'onforminput', 'onhaschange', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onmessage', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onoffline', 'onoine', 'ononline', 'onpagehide', 'onpageshow', 'onpause', 'onplay', 'onplaying', 'onpopstate', 'onprogress', 'onratechange', 'onreadystatechange', 'onredo', 'onresize', 'onscroll', 'onseeked', 'onseeking', 'onselect', 'onstalled', 'onstorage', 'onsubmit', 'onsuspend', 'ontimeupdate', 'onundo', 'onunload', 'onvolumechange', 'onwaiting', 'onmouseenter', 'onmouseleave', 'onmousewheel', 'onstart', 'onpropertychange'];

    var SanitizeHtmlHelper = /*#__PURE__*/function () {
      function SanitizeHtmlHelper() {
        _classCallCheck(this, SanitizeHtmlHelper);
      }

      _createClass2(SanitizeHtmlHelper, null, [{
        key: "beforeSanitize",
        value: function beforeSanitize() {
          return {
            selectors: {
              tags: removeTags,
              attributes: removeAttrs
            }
          };
        }
      }, {
        key: "sanitize",
        value: function sanitize(value) {
          var item = this.beforeSanitize();
          var output = this.serializeValue(item, value);
          return output;
        }
      }, {
        key: "serializeValue",
        value: function serializeValue(item, value) {
          this.removeAttrs = item.selectors.attributes;
          this.removeTags = item.selectors.tags;
          this.wrapElement = document.createElement('div');
          this.wrapElement.innerHTML = value;
          this.removeXssTags();
          this.removeJsEvents();
          this.removeXssAttrs();
          var tempEleValue = this.wrapElement.innerHTML;
          this.removeElement();
          return tempEleValue;
        }
      }, {
        key: "removeElement",
        value: function removeElement() {
          // Removes an element's attibute to avoid html tag validation
          var nodes = this.wrapElement.children;

          for (var j = 0; j < nodes.length; j++) {
            var attribute = nodes[j].attributes;

            for (var i = 0; i < attribute.length; i++) {
              this.wrapElement.children[j].removeAttribute(attribute[i].localName);
            }
          }
        }
      }, {
        key: "removeXssTags",
        value: function removeXssTags() {
          var elements = this.wrapElement.querySelectorAll(this.removeTags.join(','));

          if (elements.length > 0) {
            elements.forEach(function (element) {
              detach(element);
            });
          } else {
            return;
          }
        }
      }, {
        key: "removeJsEvents",
        value: function removeJsEvents() {
          var elements = this.wrapElement.querySelectorAll('[' + jsEvents.join('],[') + ']');

          if (elements.length > 0) {
            elements.forEach(function (element) {
              jsEvents.forEach(function (attr) {
                if (element.hasAttribute(attr)) {
                  element.removeAttribute(attr);
                }
              });
            });
          } else {
            return;
          }
        }
      }, {
        key: "removeXssAttrs",
        value: function removeXssAttrs() {
          var _this429 = this;

          this.removeAttrs.forEach(function (item, index) {
            var elements = _this429.wrapElement.querySelectorAll(item.selector);

            if (elements.length > 0) {
              elements.forEach(function (element) {
                element.removeAttribute(item.attribute);
              });
            }
          });
        }
      }]);

      return SanitizeHtmlHelper;
    }();
    /**
     * Base modules
     */
    //# sourceMappingURL=ej2-base.es2015.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js ***!
    \*****************************************************************************/

  /*! exports provided: wrapperInitialize, getTextNode, destroy, preRender, createCheckBox, rippleMouseHandler, setHiddenInput, buttonObserver, Button, CheckBox, RadioButton, Switch, classNames, ChipList, Chip */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /**
     * Initialize wrapper element for angular.
     * @private
     */


    function wrapperInitialize(createElement, tag, type, element, WRAPPER, role) {
      var input = element;

      if (element.tagName === tag) {
        var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', element);
        input = createElement('input', {
          attrs: {
            'type': type
          }
        });
        var props = ['change', 'cssClass', 'label', 'labelPosition', 'id'];

        for (var index = 0, _len27 = element.attributes.length; index < _len27; index++) {
          if (props.indexOf(element.attributes[index].nodeName) === -1) {
            input.setAttribute(element.attributes[index].nodeName, element.attributes[index].nodeValue);
          }
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
          'class': WRAPPER,
          'role': role,
          'aria-checked': 'false'
        });
        element.appendChild(input);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, input);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["deleteObject"])(element, 'ej2_instances');
      }

      return input;
    }

    function getTextNode(element) {
      var node;
      var childnode = element.childNodes;

      for (var i = 0; i < childnode.length; i++) {
        node = childnode[i];

        if (node.nodeType === 3) {
          return node;
        }
      }

      return null;
    }
    /**
     * Destroy the button components.
     * @private
     */


    function _destroy(ejInst, wrapper, tagName) {
      if (tagName === 'INPUT') {
        wrapper.parentNode.insertBefore(ejInst.element, wrapper);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper);
        ejInst.element.checked = false;
        ['name', 'value', 'disabled'].forEach(function (key) {
          ejInst.element.removeAttribute(key);
        });
      } else {
        ['role', 'aria-checked', 'class'].forEach(function (key) {
          wrapper.removeAttribute(key);
        });
        wrapper.innerHTML = '';
      }
    }

    function _preRender(proxy, control, wrapper, element, moduleName) {
      element = wrapperInitialize(proxy.createElement, control, 'checkbox', element, wrapper, moduleName);
      proxy.element = element;

      if (proxy.element.getAttribute('type') !== 'checkbox') {
        proxy.element.setAttribute('type', 'checkbox');
      }

      if (!proxy.element.id) {
        proxy.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + moduleName);
      }
    }
    /**
     * Creates CheckBox component UI with theming and ripple support.
     * @private
     */


    function createCheckBox(createElement) {
      var enableRipple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      var wrapper = createElement('div', {
        className: 'e-checkbox-wrapper e-css'
      });

      if (options.cssClass) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], options.cssClass.split(' '));
      }

      if (options.enableRtl) {
        wrapper.classList.add('e-rtl');
      }

      if (enableRipple) {
        var rippleSpan = createElement('span', {
          className: 'e-ripple-container'
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
          isCenterRipple: true,
          duration: 400
        });
        wrapper.appendChild(rippleSpan);
      }

      var frameSpan = createElement('span', {
        className: 'e-frame e-icons'
      });

      if (options.checked) {
        frameSpan.classList.add('e-check');
      }

      wrapper.appendChild(frameSpan);

      if (options.label) {
        var labelSpan = createElement('span', {
          className: 'e-label',
          innerHTML: options.label
        });
        wrapper.appendChild(labelSpan);
      }

      return wrapper;
    }

    function rippleMouseHandler(e, rippleSpan) {
      if (rippleSpan) {
        var _event2 = document.createEvent('MouseEvents');

        _event2.initEvent(e.type, false, true);

        rippleSpan.dispatchEvent(_event2);
      }
    }
    /**
     * Append hidden input to given element
     * @private
     */


    function setHiddenInput(proxy, wrap) {
      if (proxy.element.getAttribute('ejs-for')) {
        wrap.appendChild(proxy.createElement('input', {
          attrs: {
            'name': proxy.name || proxy.element.name,
            'value': 'false',
            'type': 'hidden'
          }
        }));
      }
    }
    /**
     * Common modules
     */


    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var buttonObserver = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Observer"]();
    var cssClassName = {
      RTL: 'e-rtl',
      BUTTON: 'e-btn',
      PRIMARY: 'e-primary',
      ICONBTN: 'e-icon-btn'
    };
    /**
     * The Button is a graphical user interface element that triggers an event on its click action. It can contain a text, an image, or both.
     * ```html
     * <button id="button">Button</button>
     * ```
     * ```typescript
     * <script>
     * var btnObj = new Button();
     * btnObj.appendTo("#button");
     * </script>
     * ```
     */

    var Button = /*#__PURE__*/function (_syncfusion_ej2_base_) {
      _inherits(Button, _syncfusion_ej2_base_);

      var _super171 = _createSuper(Button);

      /**
       * Constructor for creating the widget
       * @param  {ButtonModel} options?
       * @param  {string|HTMLButtonElement} element?
       */
      function Button(options, element) {
        _classCallCheck(this, Button);

        return _super171.call(this, options, element);
      }

      _createClass2(Button, [{
        key: "preRender",
        value: function preRender() {// pre render code snippets
        }
        /**
         * Initialize the control rendering
         * @returns void
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (!this.disabled) {
              this.wireEvents();
            }

            buttonObserver.notify('component-rendered', {
              id: this.element.id,
              instance: this
            });
          } else {
            this.initialize();
          }

          this.removeRippleEffect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
            selector: '.' + cssClassName.BUTTON
          });
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.cssClass.split(' '));
          }

          if (this.isPrimary) {
            this.element.classList.add(cssClassName.PRIMARY);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.getModuleName() !== 'progress-btn') {
            if (this.content) {
              var tempContent = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.content) : this.content;
              this.element.innerHTML = tempContent;
            }

            this.setIconCss();
          }

          if (this.enableRtl) {
            this.element.classList.add(cssClassName.RTL);
          }

          if (this.disabled) {
            this.controlStatus(this.disabled);
          } else {
            this.wireEvents();
          }
        }
      }, {
        key: "controlStatus",
        value: function controlStatus(disabled) {
          this.element.disabled = disabled;
        }
      }, {
        key: "setIconCss",
        value: function setIconCss() {
          if (this.iconCss) {
            var span = this.createElement('span', {
              className: 'e-btn-icon ' + this.iconCss
            });

            if (!this.element.textContent.trim()) {
              this.element.classList.add(cssClassName.ICONBTN);
            } else {
              span.classList.add('e-icon-' + this.iconPosition.toLowerCase());

              if (this.iconPosition === 'Top' || this.iconPosition === 'Bottom') {
                this.element.classList.add('e-' + this.iconPosition.toLowerCase() + '-icon-btn');
              }
            }

            var node = this.element.childNodes[0];

            if (node && (this.iconPosition === 'Left' || this.iconPosition === 'Top')) {
              this.element.insertBefore(span, node);
            } else {
              this.element.appendChild(span);
            }
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          if (this.isToggle) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.btnClickHandler, this);
          }
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          if (this.isToggle) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.btnClickHandler);
          }
        }
      }, {
        key: "btnClickHandler",
        value: function btnClickHandler() {
          if (this.element.classList.contains('e-active')) {
            this.element.classList.remove('e-active');
          } else {
            this.element.classList.add('e-active');
          }
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            var span;
            var classList = [cssClassName.PRIMARY, cssClassName.RTL, cssClassName.ICONBTN, 'e-success', 'e-info', 'e-danger', 'e-warning', 'e-flat', 'e-outline', 'e-small', 'e-bigger', 'e-active', 'e-round', 'e-top-icon-btn', 'e-bottom-icon-btn'];

            if (this.cssClass) {
              classList = classList.concat(this.cssClass.split(' '));
            }

            _get(_getPrototypeOf(Button.prototype), "destroy", this).call(this);

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classList);

            if (!this.element.getAttribute('class')) {
              this.element.removeAttribute('class');
            }

            if (this.disabled) {
              this.element.removeAttribute('disabled');
            }

            if (this.content) {
              this.element.innerHTML = this.element.innerHTML.replace(this.content, '');
            }

            span = this.element.querySelector('span.e-btn-icon');

            if (span) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(span);
            }
          }

          this.unWireEvents();

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            this.removeRippleEffect();
          }
        }
        /**
         * Get component name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'btn';
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @returns string
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * Dynamically injects the required modules to the component.
         * @private
         */

      }, {
        key: "onPropertyChanged",

        /**
         * Called internally if any of the property value changed.
         * @param  {ButtonModel} newProp
         * @param  {ButtonModel} oldProp
         * @returns void
         * @private
         */
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i47 = 0, _Object$keys8 = Object.keys(newProp); _i47 < _Object$keys8.length; _i47++) {
            var prop = _Object$keys8[_i47];

            switch (prop) {
              case 'isPrimary':
                if (newProp.isPrimary) {
                  this.element.classList.add(cssClassName.PRIMARY);
                } else {
                  this.element.classList.remove(cssClassName.PRIMARY);
                }

                break;

              case 'disabled':
                this.controlStatus(newProp.disabled);
                break;

              case 'iconCss':
                var span = this.element.querySelector('span.e-btn-icon');

                if (span) {
                  if (newProp.iconCss) {
                    span.className = 'e-btn-icon ' + newProp.iconCss;

                    if (this.element.textContent.trim()) {
                      if (this.iconPosition === 'Left') {
                        span.classList.add('e-icon-left');
                      } else {
                        span.classList.add('e-icon-right');
                      }
                    }
                  } else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(span);
                  }
                } else {
                  this.setIconCss();
                }

                break;

              case 'iconPosition':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ['e-top-icon-btn', 'e-bottom-icon-btn']);
                span = this.element.querySelector('span.e-btn-icon');

                if (span) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(span);
                }

                this.setIconCss();
                break;

              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], newProp.cssClass.split(' '));
                }

                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  this.element.classList.add(cssClassName.RTL);
                } else {
                  this.element.classList.remove(cssClassName.RTL);
                }

                break;

              case 'content':
                var node = getTextNode(this.element);

                if (!node) {
                  this.element.classList.remove(cssClassName.ICONBTN);
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered && this.getModuleName() !== 'progress-btn') {
                  if (this.enableHtmlSanitizer) {
                    newProp.content = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(newProp.content);
                  }

                  this.element.innerHTML = newProp.content;
                  this.setIconCss();
                }

                break;

              case 'isToggle':
                if (newProp.isToggle) {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.btnClickHandler, this);
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.btnClickHandler);

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ['e-active']);
                }

                break;
            }
          }
        }
        /**
         * Click the button element
         * its native method
         * @public
         */

      }, {
        key: "click",
        value: function click() {
          this.element.click();
        }
        /**
         * Sets the focus to Button
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }], [{
        key: "Inject",
        value: function Inject() {// Inject code snippets
        }
      }]);

      return Button;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], Button.prototype, "iconPosition", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Button.prototype, "iconCss", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Button.prototype, "disabled", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Button.prototype, "isPrimary", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Button.prototype, "cssClass", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Button.prototype, "content", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Button.prototype, "isToggle", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Button.prototype, "locale", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Button.prototype, "enableHtmlSanitizer", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Button.prototype, "created", void 0);

    Button = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Button);
    /**
     * Button modules
     */

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var CHECK = 'e-check';
    var DISABLED = 'e-checkbox-disabled';
    var FRAME = 'e-frame';
    var INDETERMINATE = 'e-stop';
    var LABEL = 'e-label';
    var RIPPLE = 'e-ripple-container';
    var RIPPLECHECK = 'e-ripple-check';
    var RIPPLEINDETERMINATE = 'e-ripple-stop';
    var RTL = 'e-rtl';
    var WRAPPER = 'e-checkbox-wrapper';
    var containerAttr = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value'];
    /**
     * The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.
     * It contains checked, unchecked, and indeterminate states.
     * ```html
     * <input type="checkbox" id="checkbox"/>
     * <script>
     * var checkboxObj = new CheckBox({ label: "Default" });
     * checkboxObj.appendTo("#checkbox");
     * </script>
     * ```
     */

    var CheckBox = /*#__PURE__*/function (_syncfusion_ej2_base_2) {
      _inherits(CheckBox, _syncfusion_ej2_base_2);

      var _super172 = _createSuper(CheckBox);

      /**
       * Constructor for creating the widget
       * @private
       */
      function CheckBox(options, element) {
        var _this430;

        _classCallCheck(this, CheckBox);

        _this430 = _super172.call(this, options, element);
        _this430.isFocused = false;
        _this430.isMouseClick = false;
        return _this430;
      }

      _createClass2(CheckBox, [{
        key: "changeState",
        value: function changeState(state) {
          var ariaState;
          var rippleSpan;
          var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
          }

          if (state === 'check') {
            frameSpan.classList.remove(INDETERMINATE);
            frameSpan.classList.add(CHECK);

            if (rippleSpan) {
              rippleSpan.classList.remove(RIPPLEINDETERMINATE);
              rippleSpan.classList.add(RIPPLECHECK);
            }

            ariaState = 'true';
            this.element.checked = true;
          } else if (state === 'uncheck') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([frameSpan], [CHECK, INDETERMINATE]);

            if (rippleSpan) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([rippleSpan], [RIPPLECHECK, RIPPLEINDETERMINATE]);
            }

            ariaState = 'false';
            this.element.checked = false;
          } else {
            frameSpan.classList.remove(CHECK);
            frameSpan.classList.add(INDETERMINATE);

            if (rippleSpan) {
              rippleSpan.classList.remove(RIPPLECHECK);
              rippleSpan.classList.add(RIPPLEINDETERMINATE);
            }

            ariaState = 'mixed';
            this.element.indeterminate = true;
          }

          this.getWrapper().setAttribute('aria-checked', ariaState);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(event) {
          if (this.isMouseClick) {
            this.focusOutHandler();
            this.isMouseClick = false;
          }

          if (this.indeterminate) {
            this.changeState(this.checked ? 'check' : 'uncheck');
            this.indeterminate = false;
            this.element.indeterminate = false;
          } else if (this.checked) {
            this.changeState('uncheck');
            this.checked = false;
          } else {
            this.changeState('check');
            this.checked = true;
          }

          var changeEventArgs = {
            checked: this.element.checked,
            event: event
          };
          this.trigger('change', changeEventArgs);
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this431 = this;

          var wrapper = this.getWrapper();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (!this.disabled) {
              this.wrapper = wrapper;
              this.unWireEvents();
            }
          } else {
            if (this.wrapper) {
              wrapper = this.wrapper;

              _get(_getPrototypeOf(CheckBox.prototype), "destroy", this).call(this);

              if (!this.disabled) {
                this.unWireEvents();
              }

              if (this.tagName === 'INPUT') {
                if (this.getWrapper()) {
                  wrapper.parentNode.insertBefore(this.element, wrapper);
                }

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper);
                this.element.checked = false;

                if (this.indeterminate) {
                  this.element.indeterminate = false;
                }

                ['name', 'value', 'disabled'].forEach(function (key) {
                  _this431.element.removeAttribute(key);
                });
              } else {
                ['role', 'aria-checked', 'class'].forEach(function (key) {
                  wrapper.removeAttribute(key);
                });
                wrapper.innerHTML = '';
              }
            }
          }
        }
      }, {
        key: "focusHandler",
        value: function focusHandler() {
          this.isFocused = true;
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler() {
          this.getWrapper().classList.remove('e-focus');
          this.isFocused = false;
        }
        /**
         * Gets the module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'checkbox';
        }
        /**
         * Gets the properties to be maintained in the persistence state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['checked', 'indeterminate']);
        }
      }, {
        key: "getWrapper",
        value: function getWrapper() {
          if (this.element.parentElement) {
            return this.element.parentElement.parentElement;
          } else {
            return null;
          }
        }
      }, {
        key: "initialize",
        value: function initialize() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initialCheckedValue)) {
            this.initialCheckedValue = this.checked;
          }

          if (this.name) {
            this.element.setAttribute('name', this.name);
          }

          if (this.value) {
            this.element.setAttribute('value', this.value);
          }

          if (this.checked) {
            this.changeState('check');
          }

          if (this.indeterminate) {
            this.changeState();
          }

          if (this.disabled) {
            this.setDisabled();
          }
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          var wrapper = this.element.parentElement;

          if (!wrapper.classList.contains(WRAPPER)) {
            wrapper = this.createElement('div', {
              className: WRAPPER,
              attrs: {
                'role': 'checkbox',
                'aria-checked': 'false'
              }
            });
            this.element.parentNode.insertBefore(wrapper, this.element);
          }

          var label = this.createElement('label', {
            attrs: {
              "for": this.element.id
            }
          });
          var frameSpan = this.createElement('span', {
            className: 'e-icons ' + FRAME
          });
          wrapper.classList.add('e-wrapper');

          if (this.enableRtl) {
            wrapper.classList.add(RTL);
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], this.cssClass.split(' '));
          }

          wrapper.appendChild(label);
          label.appendChild(this.element);
          setHiddenInput(this, label);
          label.appendChild(frameSpan);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            var rippleSpan = this.createElement('span', {
              className: RIPPLE
            });

            if (this.labelPosition === 'Before') {
              label.appendChild(rippleSpan);
            } else {
              label.insertBefore(rippleSpan, frameSpan);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
              duration: 400,
              isCenterRipple: true
            });
          }

          if (this.label) {
            this.setText(this.label);
          }
        }
      }, {
        key: "keyUpHandler",
        value: function keyUpHandler() {
          if (this.isFocused) {
            this.getWrapper().classList.add('e-focus');
          }
        }
      }, {
        key: "labelMouseHandler",
        value: function labelMouseHandler(e) {
          this.isMouseClick = true;
          var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];
          rippleMouseHandler(e, rippleSpan);
        }
        /**
         * Called internally if any of the property value changes.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var wrapper = this.getWrapper();

          for (var _i48 = 0, _Object$keys9 = Object.keys(newProp); _i48 < _Object$keys9.length; _i48++) {
            var prop = _Object$keys9[_i48];

            switch (prop) {
              case 'checked':
                this.indeterminate = false;
                this.element.indeterminate = false;
                this.changeState(newProp.checked ? 'check' : 'uncheck');
                break;

              case 'indeterminate':
                if (newProp.indeterminate) {
                  this.changeState();
                } else {
                  this.element.indeterminate = false;
                  this.changeState(this.checked ? 'check' : 'uncheck');
                }

                break;

              case 'disabled':
                if (newProp.disabled) {
                  this.setDisabled();
                  this.wrapper = this.getWrapper();
                  this.unWireEvents();
                } else {
                  this.element.disabled = false;
                  wrapper.classList.remove(DISABLED);
                  wrapper.setAttribute('aria-disabled', 'false');
                  this.wireEvents();
                }

                break;

              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrapper], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], newProp.cssClass.split(' '));
                }

                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  wrapper.classList.add(RTL);
                } else {
                  wrapper.classList.remove(RTL);
                }

                break;

              case 'label':
                this.setText(newProp.label);
                break;

              case 'labelPosition':
                var label = wrapper.getElementsByClassName(LABEL)[0];
                var labelWrap = wrapper.getElementsByTagName('label')[0];
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(label);

                if (newProp.labelPosition === 'After') {
                  labelWrap.appendChild(label);
                } else {
                  labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);
                }

                break;

              case 'name':
                this.element.setAttribute('name', newProp.name);
                break;

              case 'value':
                this.element.setAttribute('value', newProp.value);
                break;

              case 'htmlAttributes':
                this.updateHtmlAttributeToWrapper();
                break;
            }
          }
        }
        /**
         * Initialize Angular, React and Unique ID support.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            return;
          }

          var element = this.element;
          this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
          this.tagName = this.element.tagName;
          element = wrapperInitialize(this.createElement, 'EJS-CHECKBOX', 'checkbox', element, WRAPPER, 'checkbox');
          this.element = element;

          if (this.element.getAttribute('type') !== 'checkbox') {
            this.element.setAttribute('type', 'checkbox');
          }

          if (!this.element.id) {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName());
          }
        }
        /**
         * Initialize the control rendering.
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.getWrapper().getElementsByClassName(RIPPLE)[0], {
                duration: 400,
                isCenterRipple: true
              });
            }
          } else {
            this.initWrapper();
            this.initialize();
          }

          if (!this.disabled) {
            this.wireEvents();
          }

          this.updateHtmlAttributeToWrapper();
          this.renderComplete();
          this.wrapper = this.getWrapper();
        }
      }, {
        key: "setDisabled",
        value: function setDisabled() {
          var wrapper = this.getWrapper();
          this.element.disabled = true;
          wrapper.classList.add(DISABLED);
          wrapper.setAttribute('aria-disabled', 'true');
        }
      }, {
        key: "setText",
        value: function setText(text) {
          var label = this.getWrapper().getElementsByClassName(LABEL)[0];

          if (label) {
            label.textContent = text;
          } else {
            text = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(text) : text;
            label = this.createElement('span', {
              className: LABEL,
              innerHTML: text
            });
            var labelWrap = this.getWrapper().getElementsByTagName('label')[0];

            if (this.labelPosition === 'Before') {
              labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName(FRAME)[0]);
            } else {
              labelWrap.appendChild(label);
            }
          }
        }
      }, {
        key: "changeHandler",
        value: function changeHandler(e) {
          e.stopPropagation();
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.checked = this.initialCheckedValue;
          this.element.checked = this.initialCheckedValue;
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          var wrapper = this.wrapper;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', this.keyUpHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.focusHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.focusOutHandler);

          var label = wrapper.getElementsByTagName('label')[0];

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(label, 'mousedown', this.labelMouseHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(label, 'mouseup', this.labelMouseHandler);

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
          }

          if (this.tagName === 'EJS-CHECKBOX') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'change', this.changeHandler);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var wrapper = this.getWrapper();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', this.keyUpHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.focusHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.focusOutHandler, this);

          var label = wrapper.getElementsByTagName('label')[0];

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(label, 'mousedown', this.labelMouseHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(label, 'mouseup', this.labelMouseHandler, this);

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
          }

          if (this.tagName === 'EJS-CHECKBOX') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'change', this.changeHandler, this);
          }
        }
      }, {
        key: "updateHtmlAttributeToWrapper",
        value: function updateHtmlAttributeToWrapper() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i49 = 0, _Object$keys10 = Object.keys(this.htmlAttributes); _i49 < _Object$keys10.length; _i49++) {
              var key = _Object$keys10[_i49];

              if (containerAttr.indexOf(key) > -1) {
                var wrapper = this.getWrapper();

                if (key === 'class') {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], this.htmlAttributes[key].split(' '));
                } else if (key === 'title') {
                  wrapper.setAttribute(key, this.htmlAttributes[key]);
                } else if (key === 'style') {
                  var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];
                  frameSpan.setAttribute(key, this.htmlAttributes[key]);
                } else {
                  this.element.setAttribute(key, this.htmlAttributes[key]);
                }
              }
            }
          }
        }
        /**
         * Click the CheckBox element
         * its native method
         * @public
         */

      }, {
        key: "click",
        value: function click() {
          this.element.click();
        }
        /**
         * Sets the focus to CheckBox
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return CheckBox;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], CheckBox.prototype, "change", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], CheckBox.prototype, "created", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], CheckBox.prototype, "checked", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], CheckBox.prototype, "cssClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], CheckBox.prototype, "disabled", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], CheckBox.prototype, "indeterminate", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], CheckBox.prototype, "label", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('After')], CheckBox.prototype, "labelPosition", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], CheckBox.prototype, "name", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], CheckBox.prototype, "value", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], CheckBox.prototype, "enableHtmlSanitizer", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], CheckBox.prototype, "htmlAttributes", void 0);

    CheckBox = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], CheckBox);
    /**
     * CheckBox modules
     */

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var RadioButton_1;
    var LABEL$1 = 'e-label';
    var RIPPLE$1 = 'e-ripple-container';
    var RTL$1 = 'e-rtl';
    var WRAPPER$1 = 'e-radio-wrapper';
    /**
     * The RadioButton is a graphical user interface element that allows you to select one option from the choices.
     * It contains checked and unchecked states.
     * ```html
     * <input type="radio" id="radio"/>
     * <script>
     * var radioObj = new RadioButton({ label: "Default" });
     * radioObj.appendTo("#radio");
     * </script>
     * ```
     */

    var RadioButton = RadioButton_1 = /*#__PURE__*/function (_syncfusion_ej2_base_3) {
      _inherits(RadioButton, _syncfusion_ej2_base_3);

      var _super173 = _createSuper(RadioButton);

      /**
       * Constructor for creating the widget
       * @private
       */
      function RadioButton(options, element) {
        var _this432;

        _classCallCheck(this, RadioButton);

        _this432 = _super173.call(this, options, element);
        _this432.isFocused = false;
        return _this432;
      }

      _createClass2(RadioButton, [{
        key: "changeHandler",
        value: function changeHandler(event) {
          this.checked = true;
          this.dataBind();
          var changeEventArgs = {
            value: this.value,
            event: event
          };
          this.trigger('change', changeEventArgs);

          if (this.tagName === 'EJS-RADIOBUTTON') {
            event.stopPropagation();
          }
        }
      }, {
        key: "updateChange",
        value: function updateChange(state) {
          var input;
          var instance;
          var radioGrp = this.getRadioGroup();

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

            if (input !== this.element) {
              instance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(input, RadioButton_1);
              instance.checked = false;

              if (this.tagName === 'EJS-RADIOBUTTON') {
                instance.angularValue = this.value;
              }
            }
          }
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this433 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (!this.disabled) {
              this.unWireEvents();
            }
          } else {
            var radioWrap = this.element.parentElement;

            _get(_getPrototypeOf(RadioButton.prototype), "destroy", this).call(this);

            if (!this.disabled) {
              this.unWireEvents();
            }

            if (this.tagName === 'INPUT') {
              radioWrap.parentNode.insertBefore(this.element, radioWrap);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(radioWrap);
              this.element.checked = false;
              ['name', 'value', 'disabled'].forEach(function (key) {
                _this433.element.removeAttribute(key);
              });
            } else {
              ['role', 'aria-checked', 'class'].forEach(function (key) {
                radioWrap.removeAttribute(key);
              });
              radioWrap.innerHTML = '';
            }
          }
        }
      }, {
        key: "focusHandler",
        value: function focusHandler() {
          this.isFocused = true;
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler() {
          this.getLabel().classList.remove('e-focus');
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'radio';
        }
        /**
         * To get the value of selected radio button in a group.
         * @method getSelectedValue
         * @return {string}
         */

      }, {
        key: "getSelectedValue",
        value: function getSelectedValue() {
          var input;
          var radioGrp = this.getRadioGroup();

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

            if (input.checked) {
              return input.value;
            }
          }

          return '';
        }
      }, {
        key: "getRadioGroup",
        value: function getRadioGroup() {
          return document.querySelectorAll('input.e-radio[name="' + this.element.getAttribute('name') + '"]');
        }
        /**
         * Gets the properties to be maintained in the persistence state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['checked']);
        }
      }, {
        key: "getLabel",
        value: function getLabel() {
          return this.element.nextElementSibling;
        }
      }, {
        key: "initialize",
        value: function initialize() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initialCheckedValue)) {
            this.initialCheckedValue = this.checked;
          }

          this.initWrapper();

          if (this.name) {
            this.element.setAttribute('name', this.name);
          }

          if (this.value) {
            this.element.setAttribute('value', this.value);
          }

          if (this.checked) {
            this.element.checked = true;
          }

          if (this.disabled) {
            this.setDisabled();
          }
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          var rippleSpan;
          var wrapper = this.element.parentElement;

          if (!wrapper.classList.contains(WRAPPER$1)) {
            wrapper = this.createElement('div', {
              className: WRAPPER$1
            });
            this.element.parentNode.insertBefore(wrapper, this.element);
          }

          var label = this.createElement('label', {
            attrs: {
              "for": this.element.id
            }
          });
          wrapper.appendChild(this.element);
          wrapper.appendChild(label);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            rippleSpan = this.createElement('span', {
              className: RIPPLE$1
            });
            label.appendChild(rippleSpan);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
              duration: 400,
              isCenterRipple: true
            });
          }

          wrapper.classList.add('e-wrapper');

          if (this.enableRtl) {
            label.classList.add(RTL$1);
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], this.cssClass.split(' '));
          }

          if (this.label) {
            this.setText(this.label);
          }
        }
      }, {
        key: "keyUpHandler",
        value: function keyUpHandler() {
          if (this.isFocused) {
            this.getLabel().classList.add('e-focus');
          }
        }
      }, {
        key: "labelRippleHandler",
        value: function labelRippleHandler(e) {
          var ripple = this.getLabel().getElementsByClassName(RIPPLE$1)[0];
          rippleMouseHandler(e, ripple);
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.checked = this.initialCheckedValue;

          if (this.initialCheckedValue) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              'checked': 'true'
            });
          }
        }
        /**
         * Called internally if any of the property value changes.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var label = this.getLabel();

          for (var _i50 = 0, _Object$keys11 = Object.keys(newProp); _i50 < _Object$keys11.length; _i50++) {
            var prop = _Object$keys11[_i50];

            switch (prop) {
              case 'checked':
                if (newProp.checked) {
                  this.updateChange(newProp.checked);
                }

                this.element.checked = newProp.checked;
                break;

              case 'disabled':
                if (newProp.disabled) {
                  this.setDisabled();
                  this.unWireEvents();
                } else {
                  this.element.disabled = false;
                  this.wireEvents();
                }

                break;

              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], newProp.cssClass.split(' '));
                }

                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  label.classList.add(RTL$1);
                } else {
                  label.classList.remove(RTL$1);
                }

                break;

              case 'label':
                this.setText(newProp.label);
                break;

              case 'labelPosition':
                if (newProp.labelPosition === 'Before') {
                  label.classList.add('e-right');
                } else {
                  label.classList.remove('e-right');
                }

                break;

              case 'name':
                this.element.setAttribute('name', newProp.name);
                break;

              case 'value':
                this.element.setAttribute('value', newProp.value);
                break;
            }
          }
        }
        /**
         * Initialize checked Property, Angular and React and Unique ID support.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            return;
          }

          var element = this.element;
          this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
          this.tagName = this.element.tagName;
          element = wrapperInitialize(this.createElement, 'EJS-RADIOBUTTON', 'radio', element, WRAPPER$1, 'radio');
          this.element = element;

          if (this.element.getAttribute('type') !== 'radio') {
            this.element.setAttribute('type', 'radio');
          }

          if (!this.element.id) {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName());
          }

          if (this.tagName === 'EJS-RADIOBUTTON') {
            var formControlName = this.element.getAttribute('formcontrolname');

            if (formControlName) {
              this.setProperties({
                'name': formControlName
              }, true);
              this.element.setAttribute('name', formControlName);
            }
          }
        }
        /**
         * Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
              var rippleSpan = this.element.parentElement.getElementsByClassName(RIPPLE$1)[0];
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
                duration: 400,
                isCenterRipple: true
              });
            }
          } else {
            this.initialize();
          }

          if (!this.disabled) {
            this.wireEvents();
          }

          this.renderComplete();
        }
      }, {
        key: "setDisabled",
        value: function setDisabled() {
          this.element.disabled = true;
        }
      }, {
        key: "setText",
        value: function setText(text) {
          var label = this.getLabel();
          var textLabel = label.getElementsByClassName(LABEL$1)[0];

          if (textLabel) {
            textLabel.textContent = text;
          } else {
            text = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(text) : text;
            textLabel = this.createElement('span', {
              className: LABEL$1,
              innerHTML: text
            });
            label.appendChild(textLabel);
          }

          if (this.labelPosition === 'Before') {
            this.getLabel().classList.add('e-right');
          } else {
            this.getLabel().classList.remove('e-right');
          }
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          var label = this.getLabel();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'change', this.changeHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.focusHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.focusOutHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', this.keyUpHandler);

          var rippleLabel = label.getElementsByClassName(LABEL$1)[0];

          if (rippleLabel) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(rippleLabel, 'mousedown', this.labelRippleHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(rippleLabel, 'mouseup', this.labelRippleHandler);
          }

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var label = this.getLabel();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'change', this.changeHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', this.keyUpHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.focusHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.focusOutHandler, this);

          var rippleLabel = label.getElementsByClassName(LABEL$1)[0];

          if (rippleLabel) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(rippleLabel, 'mousedown', this.labelRippleHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(rippleLabel, 'mouseup', this.labelRippleHandler, this);
          }

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
          }
        }
        /**
         * Click the RadioButton element
         * its native method
         * @public
         */

      }, {
        key: "click",
        value: function click() {
          this.element.click();
        }
        /**
         * Sets the focus to RadioButton
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return RadioButton;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], RadioButton.prototype, "change", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], RadioButton.prototype, "created", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], RadioButton.prototype, "checked", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], RadioButton.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], RadioButton.prototype, "disabled", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], RadioButton.prototype, "label", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('After')], RadioButton.prototype, "labelPosition", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], RadioButton.prototype, "name", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], RadioButton.prototype, "value", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], RadioButton.prototype, "enableHtmlSanitizer", void 0);

    RadioButton = RadioButton_1 = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], RadioButton);
    /**
     * RadioButton modules
     */

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };

    var DISABLED$1 = 'e-switch-disabled';
    var RIPPLE$2 = 'e-ripple-container';
    var RIPPLE_CHECK = 'e-ripple-check';
    var RTL$2 = 'e-rtl';
    var WRAPPER$2 = 'e-switch-wrapper';
    var ACTIVE = 'e-switch-active';
    /**
     * The Switch is a graphical user interface element that allows you to toggle between checked and unchecked states.
     * ```html
     * <input type="checkbox" id="switch"/>
     * <script>
     * var switchObj = new Switch({});
     * switchObj.appendTo("#switch");
     * </script>
     * ```
     */

    var Switch = /*#__PURE__*/function (_syncfusion_ej2_base_4) {
      _inherits(Switch, _syncfusion_ej2_base_4);

      var _super174 = _createSuper(Switch);

      /**
       * Constructor for creating the widget.
       * @private
       */
      function Switch(options, element) {
        var _this434;

        _classCallCheck(this, Switch);

        _this434 = _super174.call(this, options, element);
        _this434.isFocused = false;
        _this434.isDrag = false;
        return _this434;
      }

      _createClass2(Switch, [{
        key: "changeState",
        value: function changeState(state) {
          var ariaState;
          var rippleSpan;
          var wrapper = this.getWrapper();
          var bar = wrapper.querySelector('.e-switch-inner');
          var handle = wrapper.querySelector('.e-switch-handle');

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            rippleSpan = wrapper.getElementsByClassName(RIPPLE$2)[0];
          }

          if (state) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([bar, handle], ACTIVE);
            ariaState = 'true';
            this.element.checked = true;
            this.checked = true;

            if (rippleSpan) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([rippleSpan], [RIPPLE_CHECK]);
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([bar, handle], ACTIVE);
            ariaState = 'false';
            this.element.checked = false;
            this.checked = false;

            if (rippleSpan) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([rippleSpan], [RIPPLE_CHECK]);
            }
          }

          wrapper.setAttribute('aria-checked', ariaState);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(evt) {
          this.isDrag = false;
          this.focusOutHandler();
          this.changeState(!this.checked);
          this.element.focus();
          var changeEventArgs = {
            checked: this.element.checked,
            event: evt
          };
          this.trigger('change', changeEventArgs);
        }
        /**
         * Destroys the Switch widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (!this.disabled) {
              this.unWireEvents();
            }
          } else {
            _get(_getPrototypeOf(Switch.prototype), "destroy", this).call(this);

            if (!this.disabled) {
              this.unWireEvents();
            }

            _destroy(this, this.getWrapper(), this.tagName);
          }
        }
      }, {
        key: "focusHandler",
        value: function focusHandler() {
          this.isFocused = true;
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler() {
          this.getWrapper().classList.remove('e-focus');
        }
        /**
         * Gets the module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'switch';
        }
        /**
         * Gets the properties to be maintained in the persistence state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['checked']);
        }
      }, {
        key: "getWrapper",
        value: function getWrapper() {
          return this.element.parentElement;
        }
      }, {
        key: "initialize",
        value: function initialize() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initialSwitchCheckedValue)) {
            this.initialSwitchCheckedValue = this.checked;
          }

          if (this.name) {
            this.element.setAttribute('name', this.name);
          }

          if (this.value) {
            this.element.setAttribute('value', this.value);
          }

          if (this.checked) {
            this.changeState(true);
          }

          if (this.disabled) {
            this.setDisabled();
          }

          if (this.onLabel || this.offLabel) {
            this.setLabel(this.onLabel, this.offLabel);
          }
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          var wrapper = this.element.parentElement;

          if (!wrapper.classList.contains(WRAPPER$2)) {
            wrapper = this.createElement('div', {
              className: WRAPPER$2,
              attrs: {
                'role': 'switch',
                'aria-checked': 'false'
              }
            });
            this.element.parentNode.insertBefore(wrapper, this.element);
          }

          var switchInner = this.createElement('span', {
            className: 'e-switch-inner'
          });
          var onLabel = this.createElement('span', {
            className: 'e-switch-on'
          });
          var offLabel = this.createElement('span', {
            className: 'e-switch-off'
          });
          var handle = this.createElement('span', {
            className: 'e-switch-handle'
          });
          wrapper.appendChild(this.element);
          setHiddenInput(this, wrapper);
          switchInner.appendChild(onLabel);
          switchInner.appendChild(offLabel);
          wrapper.appendChild(switchInner);
          wrapper.appendChild(handle);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            var rippleSpan = this.createElement('span', {
              className: RIPPLE$2
            });
            handle.appendChild(rippleSpan);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(rippleSpan, {
              duration: 400,
              isCenterRipple: true
            });
          }

          wrapper.classList.add('e-wrapper');

          if (this.enableRtl) {
            wrapper.classList.add(RTL$2);
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], this.cssClass.split(' '));
          }
        }
        /**
         * Called internally if any of the property value changes.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var wrapper = this.getWrapper();

          for (var _i51 = 0, _Object$keys12 = Object.keys(newProp); _i51 < _Object$keys12.length; _i51++) {
            var prop = _Object$keys12[_i51];

            switch (prop) {
              case 'checked':
                this.changeState(newProp.checked);
                break;

              case 'disabled':
                if (newProp.disabled) {
                  this.setDisabled();
                  this.unWireEvents();
                } else {
                  this.element.disabled = false;
                  wrapper.classList.remove(DISABLED$1);
                  wrapper.setAttribute('aria-disabled', 'false');
                  this.wireEvents();
                }

                break;

              case 'value':
                this.element.setAttribute('value', newProp.value);
                break;

              case 'name':
                this.element.setAttribute('name', newProp.name);
                break;

              case 'onLabel':
              case 'offLabel':
                this.setLabel(newProp.onLabel, newProp.offLabel);
                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  wrapper.classList.add(RTL$2);
                } else {
                  wrapper.classList.remove(RTL$2);
                }

                break;

              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrapper], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], newProp.cssClass.split(' '));
                }

                break;
            }
          }
        }
        /**
         * Initialize Angular, React and Unique ID support.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            return;
          }

          var element = this.element;
          this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
          this.tagName = this.element.tagName;

          _preRender(this, 'EJS-SWITCH', WRAPPER$2, element, this.getModuleName());
        }
        /**
         * Initialize control rendering.
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element.parentElement, {
                duration: 400,
                isCenterRipple: true
              });
            }
          } else {
            this.initWrapper();
            this.initialize();
          }

          if (!this.disabled) {
            this.wireEvents();
          }

          this.renderComplete();
        }
      }, {
        key: "rippleHandler",
        value: function rippleHandler(e) {
          var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE$2)[0];
          rippleMouseHandler(e, rippleSpan);

          if (e.type === 'mousedown' && e.currentTarget.classList.contains('e-switch-wrapper') && e.which === 1) {
            this.isDrag = true;
            this.isFocused = false;
          }
        }
      }, {
        key: "rippleTouchHandler",
        value: function rippleTouchHandler(eventType) {
          var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE$2)[0];

          if (rippleSpan) {
            var _event3 = document.createEvent('MouseEvents');

            _event3.initEvent(eventType, false, true);

            rippleSpan.dispatchEvent(_event3);
          }
        }
      }, {
        key: "setDisabled",
        value: function setDisabled() {
          var wrapper = this.getWrapper();
          this.element.disabled = true;
          wrapper.classList.add(DISABLED$1);
          wrapper.setAttribute('aria-disabled', 'true');
        }
      }, {
        key: "setLabel",
        value: function setLabel(onText, offText) {
          var wrapper = this.getWrapper();

          if (onText) {
            wrapper.querySelector('.e-switch-on').textContent = onText;
          }

          if (offText) {
            wrapper.querySelector('.e-switch-off').textContent = offText;
          }
        }
      }, {
        key: "switchFocusHandler",
        value: function switchFocusHandler() {
          if (this.isFocused) {
            this.getWrapper().classList.add('e-focus');
          }
        }
      }, {
        key: "switchMouseUp",
        value: function switchMouseUp(e) {
          var target = e.target;
          var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE$2)[0];

          if (e.type === 'touchmove') {
            e.preventDefault();
          }

          if (e.type === 'touchstart') {
            this.isDrag = true;
            this.rippleTouchHandler('mousedown');
          }

          if (this.isDrag) {
            if (e.type === 'mouseup' && target.className.indexOf('e-switch') < 0 || e.type === 'touchend') {
              this.clickHandler(e);
              this.rippleTouchHandler('mouseup');
              e.preventDefault();
            }
          }
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.checked = this.initialSwitchCheckedValue;
          this.element.checked = this.initialSwitchCheckedValue;
        }
        /**
         * Toggle the Switch component state into checked/unchecked.
         * @returns void
         */

      }, {
        key: "toggle",
        value: function toggle() {
          this.clickHandler();
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var wrapper = this.getWrapper();
          var handle = wrapper.querySelector('.e-switch-handle');
          this.delegateMouseUpHandler = this.switchMouseUp.bind(this);
          this.delegateKeyUpHandler = this.switchFocusHandler.bind(this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(wrapper, 'click', this.clickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.focusHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.focusOutHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseup', this.delegateMouseUpHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', this.delegateKeyUpHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(wrapper, 'mousedown mouseup', this.rippleHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(wrapper, 'touchstart touchmove touchend', this.switchMouseUp, this);

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
          }
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          var wrapper = this.getWrapper();
          var handle = wrapper.querySelector('.e-switch-handle');

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(wrapper, 'click', this.clickHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.focusHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.focusOutHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseup', this.delegateMouseUpHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', this.delegateKeyUpHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(wrapper, 'mousedown mouseup', this.rippleHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(wrapper, 'touchstart touchmove touchend', this.switchMouseUp);

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
          }
        }
        /**
         * Click the switch element
         * its native method
         * @public
         */

      }, {
        key: "click",
        value: function click() {
          this.element.click();
        }
        /**
         * Sets the focus to Switch
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return Switch;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Switch.prototype, "change", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Switch.prototype, "created", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Switch.prototype, "checked", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Switch.prototype, "cssClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Switch.prototype, "disabled", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Switch.prototype, "name", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Switch.prototype, "onLabel", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Switch.prototype, "offLabel", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Switch.prototype, "value", void 0);

    Switch = __decorate$3([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Switch);
    /**
     * Switch modules
     */

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    };

    var classNames = {
      chipSet: 'e-chip-set',
      chip: 'e-chip',
      avatar: 'e-chip-avatar',
      text: 'e-chip-text',
      icon: 'e-chip-icon',
      "delete": 'e-chip-delete',
      deleteIcon: 'e-dlt-btn',
      multiSelection: 'e-multi-selection',
      singleSelection: 'e-selection',
      active: 'e-active',
      chipWrapper: 'e-chip-avatar-wrap',
      iconWrapper: 'e-chip-icon-wrap',
      focused: 'e-focused',
      disabled: 'e-disabled',
      rtl: 'e-rtl'
    };
    /**
     * A chip component is a small block of essential information, mostly used on contacts or filter tags.
     * ```html
     * <div id="chip"></div>
     * ```
     * ```typescript
     * <script>
     * var chipObj = new ChipList();
     * chipObj.appendTo("#chip");
     * </script>
     * ```
     */

    var ChipList = /*#__PURE__*/function (_syncfusion_ej2_base_5) {
      _inherits(ChipList, _syncfusion_ej2_base_5);

      var _super175 = _createSuper(ChipList);

      function ChipList(options, element) {
        var _this435;

        _classCallCheck(this, ChipList);

        _this435 = _super175.call(this, options, element);
        _this435.multiSelectedChip = [];
        return _this435;
      }
      /**
       * Initialize the event handler
       * @private
       */


      _createClass2(ChipList, [{
        key: "preRender",
        value: function preRender() {//prerender
        }
        /**
         * To find the chips length.
         * @returns boolean
         * @private
         */

      }, {
        key: "chipType",
        value: function chipType() {
          return this.chips && this.chips.length && this.chips.length > 0;
        }
        /**
         * To Initialize the control rendering.
         * @returns void
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.type = this.chips.length ? 'chipset' : this.text || this.element.innerText ? 'chip' : 'chipset';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.setAttributes();
            this.createChip();
            this.setRtl();
            this.select(this.selectedChips);
          }

          this.wireEvent(false);
          this.rippleFunction = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
            selector: '.e-chip'
          });
          this.renderComplete();
        }
      }, {
        key: "createChip",
        value: function createChip() {
          this.innerText = this.element.innerText.trim();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var childElement = this.element.querySelectorAll('.e-chip');

            for (var i = 0; i < childElement.length; i++) {
              if (childElement[i] != null) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(childElement[i]);
              }
            }
          } else {
            this.element.innerHTML = '';
          }

          this.chipCreation(this.type === 'chip' ? [this.innerText ? this.innerText : this.text] : this.chips);
        }
      }, {
        key: "setAttributes",
        value: function setAttributes() {
          if (this.type === 'chip') {
            this.element.tabIndex = 0;
            this.element.setAttribute('role', 'option');
          } else {
            this.element.classList.add(classNames.chipSet);
            this.element.setAttribute('role', 'listbox');

            if (this.selection === 'Multiple') {
              this.element.classList.add(classNames.multiSelection);
              this.element.setAttribute('aria-multiselectable', 'true');
            } else if (this.selection === 'Single') {
              this.element.classList.add(classNames.singleSelection);
              this.element.setAttribute('aria-multiselectable', 'false');
            } else {
              this.element.setAttribute('aria-multiselectable', 'false');
            }
          }
        }
      }, {
        key: "setRtl",
        value: function setRtl() {
          this.element.classList[this.enableRtl ? 'add' : 'remove'](classNames.rtl);
        }
      }, {
        key: "chipCreation",
        value: function chipCreation(data) {
          var chipListArray = [];

          for (var i = 0; i < data.length; i++) {
            var fieldsData = this.getFieldValues(data[i]);
            var chipArray = this.elementCreation(fieldsData);
            var className = (classNames.chip + ' ' + (fieldsData.enabled ? ' ' : classNames.disabled) + ' ' + (fieldsData.avatarIconCss || fieldsData.avatarText ? classNames.chipWrapper : fieldsData.leadingIconCss ? classNames.iconWrapper : ' ') + ' ' + fieldsData.cssClass).split(' ').filter(function (css) {
              return css;
            });

            if (!this.chipType()) {
              chipListArray = chipArray;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], className);
              this.element.setAttribute('aria-label', fieldsData.text);

              if (fieldsData.value) {
                this.element.setAttribute('data-value', fieldsData.value.toString());
              }
            } else {
              var wrapper = this.createElement('DIV', {
                className: className.join(' '),
                attrs: {
                  tabIndex: '0',
                  role: 'option',
                  'aria-label': fieldsData.text,
                  'aria-selected': 'false'
                }
              });

              if (fieldsData.value) {
                wrapper.setAttribute('data-value', fieldsData.value.toString());
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(chipArray, wrapper);
              chipListArray.push(wrapper);
            }
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(chipListArray, this.element);
        }
      }, {
        key: "getFieldValues",
        value: function getFieldValues(data) {
          var chipEnabled = !(this.enabled.toString() === 'false');
          var fields = {
            text: typeof data === 'object' ? data.text ? data.text.toString() : this.text.toString() : !this.chipType() ? this.innerText ? this.innerText : this.text.toString() : data.toString(),
            cssClass: typeof data === 'object' ? data.cssClass ? data.cssClass.toString() : this.cssClass.toString() : this.cssClass.toString(),
            leadingIconCss: typeof data === 'object' ? data.leadingIconCss ? data.leadingIconCss.toString() : this.leadingIconCss.toString() : this.leadingIconCss.toString(),
            avatarIconCss: typeof data === 'object' ? data.avatarIconCss ? data.avatarIconCss.toString() : this.avatarIconCss.toString() : this.avatarIconCss.toString(),
            avatarText: typeof data === 'object' ? data.avatarText ? data.avatarText.toString() : this.avatarText.toString() : this.avatarText.toString(),
            trailingIconCss: typeof data === 'object' ? data.trailingIconCss ? data.trailingIconCss.toString() : this.trailingIconCss.toString() : this.trailingIconCss.toString(),
            enabled: typeof data === 'object' ? !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data.enabled) ? data.enabled.toString() === 'false' ? false : true : chipEnabled : chipEnabled,
            value: typeof data === 'object' ? data.value ? data.value.toString() : null : null,
            leadingIconUrl: typeof data === 'object' ? data.leadingIconUrl ? data.leadingIconUrl.toString() : this.leadingIconUrl : this.leadingIconUrl,
            trailingIconUrl: typeof data === 'object' ? data.trailingIconUrl ? data.trailingIconUrl.toString() : this.trailingIconUrl : this.trailingIconUrl
          };
          return fields;
        }
      }, {
        key: "elementCreation",
        value: function elementCreation(fields) {
          var chipArray = [];

          if (fields.avatarText || fields.avatarIconCss) {
            var className = (classNames.avatar + ' ' + fields.avatarIconCss).trim();
            var chipAvatarElement = this.createElement('span', {
              className: className
            });
            chipAvatarElement.innerText = fields.avatarText;
            chipArray.push(chipAvatarElement);
          } else if (fields.leadingIconCss) {
            var _className = (classNames.icon + ' ' + fields.leadingIconCss).trim();

            var chipIconElement = this.createElement('span', {
              className: _className
            });
            chipArray.push(chipIconElement);
          } else if (fields.leadingIconUrl) {
            var _className2 = (classNames.avatar + ' ' + 'image-url').trim();

            var _chipIconElement = this.createElement('span', {
              className: _className2
            });

            _chipIconElement.style.backgroundImage = 'url(' + fields.leadingIconUrl + ')';
            chipArray.push(_chipIconElement);
          }

          var chipTextElement = this.createElement('span', {
            className: classNames.text
          });
          chipTextElement.innerText = fields.text;
          chipArray.push(chipTextElement);

          if (fields.trailingIconCss || this.chipType() && this.enableDelete) {
            var _className3 = (classNames["delete"] + ' ' + (fields.trailingIconCss ? fields.trailingIconCss : classNames.deleteIcon)).trim();

            var chipdeleteElement = this.createElement('span', {
              className: _className3
            });
            chipArray.push(chipdeleteElement);
          } else if (fields.trailingIconUrl) {
            var _className4 = 'trailing-icon-url'.trim();

            var chipIconsElement = this.createElement('span', {
              className: _className4
            });
            chipIconsElement.style.backgroundImage = 'url(' + fields.trailingIconUrl + ')';
            chipArray.push(chipIconsElement);
          }

          return chipArray;
        }
        /**
         * A function that finds chip based on given input.
         * @param  {number | HTMLElement } fields - We can pass index number or element of chip.
         */

      }, {
        key: "find",
        value: function find(fields) {
          var chipData;
          var chipElement = fields instanceof HTMLElement ? fields : this.element.querySelectorAll('.' + classNames.chip)[fields];

          if (chipElement && this.chipType()) {
            chipData = {
              text: undefined,
              index: undefined,
              element: undefined,
              data: undefined
            };
            chipData.index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chipElement);
            chipData.text = typeof this.chips[chipData.index] === 'object' ? this.chips[chipData.index].text ? this.chips[chipData.index].text.toString() : '' : this.chips[chipData.index].toString();
            chipData.data = this.chips[chipData.index];
            chipData.element = chipElement;
          }

          return chipData;
        }
        /**
         * Allows adding the chip item(s) by passing a single or array of string, number, or ChipModel values.
         * @param  {string[] | number[] | ChipModel[] | string | number | ChipModel} chipsData - We can pass array of string or
         *  array of number or array of chip model or string data or number data or chip model.
         * @deprecated
         */

      }, {
        key: "add",
        value: function add(chipsData) {
          if (this.type !== 'chip') {
            var _this$chips;

            var fieldData = chipsData instanceof Array ? chipsData : [chipsData];

            (_this$chips = this.chips).push.apply(_this$chips, _toConsumableArray(fieldData));

            this.chipCreation(fieldData);
          }
        }
        /**
         * Allows selecting the chip item(s) by passing a single or array of string, number, or ChipModel values.
         * @param  {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
         *  or chip element or array of chip element.
         */

      }, {
        key: "select",
        value: function select(fields) {
          this.onSelect(fields, false);
        }
      }, {
        key: "multiSelection",
        value: function multiSelection(newProp) {
          var items = this.element.querySelectorAll('.' + 'e-chip');

          for (var j = 0; j < newProp.length; j++) {
            if (typeof newProp[j] === 'string') {
              for (var k = 0; k < items.length; k++) {
                if (newProp[j] !== k) {
                  if (newProp[j] === items[k].attributes[5].value) {
                    this.multiSelectedChip.push(k);
                    break;
                  }
                }
              }
            } else {
              this.multiSelectedChip.push(newProp[j]);
            }
          }
        }
      }, {
        key: "onSelect",
        value: function onSelect(fields, callFromProperty) {
          if (this.chipType() && this.selection !== 'None') {
            if (callFromProperty) {
              var chipElements = this.element.querySelectorAll('.' + classNames.chip);

              for (var i = 0; i < chipElements.length; i++) {
                chipElements[i].setAttribute('aria-selected', 'false');
                chipElements[i].classList.remove(classNames.active);
              }
            }

            var fieldData = fields instanceof Array ? fields : [fields];

            for (var _i52 = 0; _i52 < fieldData.length; _i52++) {
              var chipElement = fieldData[_i52] instanceof HTMLElement ? fieldData[_i52] : this.element.querySelectorAll('.' + classNames.chip)[fieldData[_i52]];

              if (chipElement instanceof HTMLElement) {
                this.selectionHandler(chipElement);
              }
            }
          }
        }
        /**
         * Allows removing the chip item(s) by passing a single or array of string, number, or ChipModel values.
         * @param  {number | number[] | HTMLElement | HTMLElement[]} fields - We can pass number or array of number
         *  or chip element or array of chip element.
         */

      }, {
        key: "remove",
        value: function remove(fields) {
          var _this436 = this;

          if (this.chipType()) {
            var fieldData = fields instanceof Array ? fields : [fields];
            var chipElements = [];
            var chipCollection = this.element.querySelectorAll('.' + classNames.chip);
            fieldData.forEach(function (data) {
              var chipElement = data instanceof HTMLElement ? data : chipCollection[data];

              if (chipElement instanceof HTMLElement) {
                chipElements.push(chipElement);
              }
            });
            chipElements.forEach(function (element) {
              var chips = _this436.element.querySelectorAll('.' + classNames.chip);

              var index = Array.prototype.slice.call(chips).indexOf(element);

              _this436.deleteHandler(element, index);
            });
          }
        }
        /**
         * Returns the selected chip(s) data.
         */

      }, {
        key: "getSelectedChips",
        value: function getSelectedChips() {
          var selectedChips;

          if (this.chipType() && this.selection !== 'None') {
            var selectedItems = {
              texts: [],
              Indexes: [],
              data: [],
              elements: []
            };
            var items = this.element.querySelectorAll('.' + classNames.active);

            for (var i = 0; i < items.length; i++) {
              var chip = items[i];
              selectedItems.elements.push(chip);
              var index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chip);
              selectedItems.Indexes.push(index);
              selectedItems.data.push(this.chips[index]);
              var text = typeof this.chips[index] === 'object' ? this.chips[index].text ? this.chips[index].text.toString() : null : this.chips[index].toString();
              selectedItems.texts.push(text);
            }

            var selectedItem = {
              text: selectedItems.texts[0],
              index: selectedItems.Indexes[0],
              data: selectedItems.data[0],
              element: selectedItems.elements[0]
            };
            selectedChips = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedItem.index) ? this.selection === 'Multiple' ? selectedItems : selectedItem : undefined;
          }

          return selectedChips;
        }
      }, {
        key: "wireEvent",
        value: function wireEvent(unWireEvent) {
          if (!unWireEvent) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.focusOutHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.keyHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', this.keyHandler, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.focusOutHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.keyHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', this.keyHandler);
          }
        }
      }, {
        key: "keyHandler",
        value: function keyHandler(e) {
          if (e.target.classList.contains(classNames.chip)) {
            if (e.type === 'keydown') {
              if (e.keyCode === 13) {
                this.clickHandler(e);
              } else if (e.keyCode === 46 && this.enableDelete) {
                this.clickHandler(e, true);
              }
            } else if (e.keyCode === 9) {
              this.focusInHandler(e.target);
            }
          }
        }
      }, {
        key: "focusInHandler",
        value: function focusInHandler(chipWrapper) {
          if (!chipWrapper.classList.contains(classNames.focused)) {
            chipWrapper.classList.add(classNames.focused);
          }
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler(e) {
          var chipWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + classNames.chip);
          var focusedElement = !this.chipType() ? this.element.classList.contains(classNames.focused) ? this.element : null : this.element.querySelector('.' + classNames.focused);

          if (chipWrapper && focusedElement) {
            focusedElement.classList.remove(classNames.focused);
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var _this437 = this;

          var del = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
          var chipWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + classNames.chip);

          if (chipWrapper) {
            var chipDataArgs;

            if (this.chipType()) {
              chipDataArgs = this.find(chipWrapper);
            } else {
              var index = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.chip)).indexOf(chipWrapper);
              chipDataArgs = {
                text: this.innerText ? this.innerText : this.text,
                element: chipWrapper,
                data: this.text,
                index: index
              };
            }

            chipDataArgs.event = e;
            chipDataArgs.cancel = false;
            this.trigger('beforeClick', chipDataArgs, function (observedArgs) {
              if (!observedArgs.cancel) {
                observedArgs.element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(observedArgs.element) : observedArgs.element;

                _this437.clickEventHandler(observedArgs.element, e, del);
              }
            });
          }
        }
      }, {
        key: "clickEventHandler",
        value: function clickEventHandler(chipWrapper, e, del) {
          var _this438 = this;

          if (this.chipType()) {
            var chipData = this.find(chipWrapper);
            chipData.event = e;
            var deleteElement = e.target.classList.contains(classNames.deleteIcon) ? e.target : del ? chipWrapper.querySelector('.' + classNames.deleteIcon) : undefined;

            if (deleteElement && this.enableDelete) {
              chipData.cancel = false;
              var deletedItemArgs = chipData;
              this.trigger('delete', deletedItemArgs, function (observedArgs) {
                if (!observedArgs.cancel) {
                  observedArgs.element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(observedArgs.element) : observedArgs.element;

                  _this438.deleteHandler(observedArgs.element, observedArgs.index);
                }
              });
            } else if (this.selection !== 'None') {
              this.selectionHandler(chipWrapper);
              chipData.selected = chipWrapper.classList.contains(classNames.active);
              var selectedItemArgs = chipData;
              this.trigger('click', selectedItemArgs);
            } else {
              this.focusInHandler(chipWrapper);
              var clickedItemArgs = chipData;
              this.trigger('click', clickedItemArgs);
            }
          } else {
            this.focusInHandler(chipWrapper);
            var _clickedItemArgs = {
              text: this.innerText ? this.innerText : this.text,
              element: chipWrapper,
              data: this.text,
              event: e
            };
            this.trigger('click', _clickedItemArgs);
          }
        }
      }, {
        key: "selectionHandler",
        value: function selectionHandler(chipWrapper) {
          if (this.selection === 'Single') {
            var activeElement = this.element.querySelector('.' + classNames.active);

            if (activeElement && activeElement !== chipWrapper) {
              activeElement.classList.remove(classNames.active);
              activeElement.setAttribute('aria-selected', 'false');
            }

            this.setProperties({
              selectedChips: null
            }, true);
          } else {
            this.setProperties({
              selectedChips: []
            }, true);
          }

          if (chipWrapper.classList.contains(classNames.active)) {
            chipWrapper.classList.remove(classNames.active);
            chipWrapper.setAttribute('aria-selected', 'false');
          } else {
            chipWrapper.classList.add(classNames.active);
            chipWrapper.setAttribute('aria-selected', 'true');
          }

          this.updateSelectedChips();
        }
      }, {
        key: "updateSelectedChips",
        value: function updateSelectedChips() {
          var chipListEle = this.element.querySelectorAll('.e-chip');
          var chipCollIndex = [];
          var chipCollValue = [];
          var chip = null;
          var value;

          for (var i = 0; i < chipListEle.length; i++) {
            var selectedEle = this.element.querySelectorAll('.e-chip')[i];

            if (selectedEle.getAttribute('aria-selected') === 'true') {
              value = selectedEle.getAttribute('data-value');

              if (this.selection === 'Single' && selectedEle.classList.contains('e-active')) {
                chip = value ? value : i;
                break;
              } else {
                value ? chipCollValue.push(value) : chipCollIndex.push(i);
              }
            }
          }

          this.setProperties({
            selectedChips: this.selection === 'Single' ? chip : value ? chipCollValue : chipCollIndex
          }, true);
        }
      }, {
        key: "deleteHandler",
        value: function deleteHandler(chipWrapper, index) {
          this.allowServerDataBinding = true;
          this.chips.splice(index, 1);
          this.setProperties({
            chips: this.chips
          }, true);
          this.serverDataBind();
          this.allowServerDataBinding = false;

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(chipWrapper);
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [classNames.chipSet, classNames.chip, classNames.rtl, classNames.multiSelection, classNames.singleSelection, classNames.disabled, classNames.chipWrapper, classNames.iconWrapper, classNames.active, classNames.focused].concat(this.cssClass.toString().split(' ').filter(function (css) {
            return css;
          })));
          this.removeMultipleAttributes(['tabindex', 'role', 'aria-label', 'aria-multiselectable'], this.element);
          this.wireEvent(true);
          this.rippleFunction();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var chipChildElement = !this.chipType() ? this.element.querySelectorAll('.e-chip-text') : this.element.querySelectorAll('.e-chip');

            for (var i = 0; i < chipChildElement.length; i++) {
              if (chipChildElement[i] != null) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(chipChildElement[i]);
              }
            }
          } else {
            _get(_getPrototypeOf(ChipList.prototype), "destroy", this).call(this);

            this.element.innerHTML = '';
            this.element.innerText = this.innerText;
          }
        }
      }, {
        key: "removeMultipleAttributes",
        value: function removeMultipleAttributes(attributes$$1, element) {
          attributes$$1.forEach(function (attr) {
            element.removeAttribute(attr);
          });
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'chip-list';
        }
        /**
         * Called internally if any of the property value changed.
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i53 = 0, _Object$keys13 = Object.keys(newProp); _i53 < _Object$keys13.length; _i53++) {
            var prop = _Object$keys13[_i53];

            switch (prop) {
              case 'chips':
              case 'text':
              case 'avatarText':
              case 'avatarIconCss':
              case 'leadingIconCss':
              case 'trailingIconCss':
              case 'selection':
              case 'enableDelete':
              case 'enabled':
                if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
                  this.isServerRendered = false;
                  this.refresh();
                  this.isServerRendered = true;
                }

                break;

              case 'cssClass':
                if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
                  if (!this.chipType()) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldProp.cssClass.toString().split(' ').filter(function (css) {
                      return css;
                    }));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], newProp.cssClass.toString().split(' ').filter(function (css) {
                      return css;
                    }));
                  } else {
                    this.isServerRendered = false;
                    this.refresh();
                    this.isServerRendered = true;
                  }
                }

                break;

              case 'selectedChips':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.element.querySelectorAll('.e-active'), 'e-active');

                if (this.selection === 'Multiple') {
                  this.multiSelectedChip = [];
                  this.multiSelection(newProp.selectedChips);
                  this.onSelect(this.multiSelectedChip, true);
                  this.updateSelectedChips();
                } else {
                  this.onSelect(newProp.selectedChips, true);
                }

                break;

              case 'enableRtl':
                this.setRtl();
                break;
            }
          }
        }
      }]);

      return ChipList;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], ChipList.prototype, "chips", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "text", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "avatarText", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "avatarIconCss", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "leadingIconCss", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "trailingIconCss", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "leadingIconUrl", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "trailingIconUrl", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ChipList.prototype, "cssClass", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ChipList.prototype, "enabled", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], ChipList.prototype, "selectedChips", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], ChipList.prototype, "selection", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ChipList.prototype, "enableDelete", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ChipList.prototype, "created", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ChipList.prototype, "click", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ChipList.prototype, "beforeClick", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ChipList.prototype, "delete", void 0);

    ChipList = __decorate$4([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ChipList);
    /**
     * Represents ChipList `Chip` model class.
     */

    var Chip = function Chip() {
      _classCallCheck(this, Chip);
    };
    /**
     * Chip modules
     */

    /**
     * Button all modules
     */
    //# sourceMappingURL=ej2-buttons.es2015.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-data/dist/es6/ej2-data.es2015.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-data/dist/es6/ej2-data.es2015.js ***!
    \***********************************************************************/

  /*! exports provided: DataManager, Deferred, Query, Predicate, Adaptor, JsonAdaptor, UrlAdaptor, ODataAdaptor, ODataV4Adaptor, WebApiAdaptor, WebMethodAdaptor, RemoteSaveAdaptor, CacheAdaptor, DataUtil */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /**
     * Query class is used to build query which is used by the DataManager to communicate with datasource.
     */


    var Query = /*#__PURE__*/function () {
      /**
       * Constructor for Query class.
       * @param  {string|string[]} from?
       * @hidden
       */
      function Query(from) {
        _classCallCheck(this, Query);

        /** @hidden */
        this.subQuery = null;
        /** @hidden */

        this.isChild = false;
        /** @hidden */

        this.distincts = [];
        this.queries = [];
        this.key = '';
        this.fKey = '';

        if (typeof from === 'string') {
          this.fromTable = from;
        } else if (from && from instanceof Array) {
          this.lookups = from;
        }

        this.expands = [];
        this.sortedColumns = [];
        this.groupedColumns = [];
        this.subQuery = null;
        this.isChild = false;
        this.params = [];
        return this;
      }
      /**
       * Sets the primary key.
       * @param  {string} field - Defines the column field.
       */


      _createClass2(Query, [{
        key: "setKey",
        value: function setKey(field) {
          this.key = field;
          return this;
        }
        /**
         * Sets default DataManager to execute query.
         * @param  {DataManager} dataManager - Defines the DataManager.
         */

      }, {
        key: "using",
        value: function using(dataManager) {
          this.dataManager = dataManager;
          return this;
        }
        /**
         * Executes query with the given DataManager.
         * @param  {DataManager} dataManager - Defines the DataManager.
         * @param  {Function} done - Defines the success callback.
         * @param  {Function} fail - Defines the failure callback.
         * @param  {Function} always - Defines the callback which will be invoked on either success or failure.
         *
         * <pre>
         * let dataManager: DataManager = new DataManager([{ ID: '10' }, { ID: '2' }, { ID: '1' }, { ID: '20' }]);
         * let query: Query = new Query();
         * query.sortBy('ID', (x: string, y: string): number => { return parseInt(x, 10) - parseInt(y, 10) });
         * let promise: Promise< Object > = query.execute(dataManager);
         * promise.then((e: { result: Object }) => { });
         * </pre>
         */

      }, {
        key: "execute",
        value: function execute(dataManager, done, fail, always) {
          dataManager = dataManager || this.dataManager;

          if (dataManager) {
            return dataManager.executeQuery(this, done, fail, always);
          }

          return DataUtil.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument');
        }
        /**
         * Executes query with the local datasource.
         * @param  {DataManager} dataManager - Defines the DataManager.
         */

      }, {
        key: "executeLocal",
        value: function executeLocal(dataManager) {
          dataManager = dataManager || this.dataManager;

          if (dataManager) {
            return dataManager.executeLocal(this);
          }

          return DataUtil.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument');
        }
        /**
         * Creates deep copy of the Query object.
         */

      }, {
        key: "clone",
        value: function clone() {
          var cloned = new Query();
          cloned.queries = this.queries.slice(0);
          cloned.key = this.key;
          cloned.isChild = this.isChild;
          cloned.dataManager = this.dataManager;
          cloned.fromTable = this.fromTable;
          cloned.params = this.params.slice(0);
          cloned.expands = this.expands.slice(0);
          cloned.sortedColumns = this.sortedColumns.slice(0);
          cloned.groupedColumns = this.groupedColumns.slice(0);
          cloned.subQuerySelector = this.subQuerySelector;
          cloned.subQuery = this.subQuery;
          cloned.fKey = this.fKey;
          cloned.isCountRequired = this.isCountRequired;
          cloned.distincts = this.distincts.slice(0);
          return cloned;
        }
        /**
         * Specifies the name of table to retrieve data in query execution.
         * @param  {string} tableName - Defines the table name.
         */

      }, {
        key: "from",
        value: function from(tableName) {
          this.fromTable = tableName;
          return this;
        }
        /**
         * Adds additional parameter which will be sent along with the request which will be generated while DataManager execute.
         * @param  {string} key - Defines the key of additional parameter.
         * @param  {Function|string} value - Defines the value for the key.
         */

      }, {
        key: "addParams",
        value: function addParams(key, value) {
          if (typeof value === 'function') {
            this.params.push({
              key: key,
              fn: value
            });
          } else {
            this.params.push({
              key: key,
              value: value
            });
          }

          return this;
        }
        /**
         * @hidden
         */

      }, {
        key: "distinct",
        value: function distinct(fields) {
          if (typeof fields === 'string') {
            this.distincts = [].slice.call([fields], 0);
          } else {
            this.distincts = fields.slice(0);
          }

          return this;
        }
        /**
         * Expands the related table.
         * @param  {string|Object[]} tables
         */

      }, {
        key: "expand",
        value: function expand(tables) {
          if (typeof tables === 'string') {
            this.expands = [].slice.call([tables], 0);
          } else {
            this.expands = tables.slice(0);
          }

          return this;
        }
        /**
         * Filter data with given filter criteria.
         * @param  {string|Predicate} fieldName - Defines the column field or Predicate.
         * @param  {string} operator - Defines the operator how to filter data.
         * @param  {string|number|boolean} value - Defines the values to match with data.
         * @param  {boolean} ignoreCase - If ignore case set to false, then filter data with exact match or else
         * filter data with case insensitive.
         */

      }, {
        key: "where",
        value: function where(fieldName, operator, value, ignoreCase, ignoreAccent) {
          operator = operator ? operator.toLowerCase() : null;
          var predicate = null;

          if (typeof fieldName === 'string') {
            predicate = new Predicate(fieldName, operator, value, ignoreCase, ignoreAccent);
          } else if (fieldName instanceof Predicate) {
            predicate = fieldName;
          }

          this.queries.push({
            fn: 'onWhere',
            e: predicate
          });
          return this;
        }
        /**
         * Search data with given search criteria.
         * @param  {string|number|boolean} searchKey - Defines the search key.
         * @param  {string|string[]} fieldNames - Defines the collection of column fields.
         * @param  {string} operator - Defines the operator how to search data.
         * @param  {boolean} ignoreCase - If ignore case set to false, then filter data with exact match or else
         * filter data with case insensitive.
         */

      }, {
        key: "search",
        value: function search(searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {
          if (typeof fieldNames === 'string') {
            fieldNames = [fieldNames];
          }

          if (!operator || operator === 'none') {
            operator = 'contains';
          }

          var comparer = DataUtil.fnOperators[operator];
          this.queries.push({
            fn: 'onSearch',
            e: {
              fieldNames: fieldNames,
              operator: operator,
              searchKey: searchKey,
              ignoreCase: ignoreCase,
              ignoreAccent: ignoreAccent,
              comparer: comparer
            }
          });
          return this;
        }
        /**
         * Sort the data with given sort criteria.
         * By default, sort direction is ascending.
         * @param  {string|string[]} fieldName - Defines the single or collection of column fields.
         * @param  {string|Function} comparer - Defines the sort direction or custom sort comparer function.
         */

      }, {
        key: "sortBy",
        value: function sortBy(fieldName, comparer, isFromGroup) {
          var order = 'ascending';
          var sorts;
          var temp;

          if (typeof fieldName === 'string' && DataUtil.endsWith(fieldName.toLowerCase(), ' desc')) {
            fieldName = fieldName.replace(/ desc$/i, '');
            comparer = 'descending';
          }

          if (!comparer || typeof comparer === 'string') {
            order = comparer ? comparer.toLowerCase() : 'ascending';
            comparer = DataUtil.fnSort(comparer);
          }

          if (isFromGroup) {
            sorts = Query.filterQueries(this.queries, 'onSortBy');

            for (var i = 0; i < sorts.length; i++) {
              temp = sorts[i].e.fieldName;

              if (typeof temp === 'string') {
                if (temp === fieldName) {
                  return this;
                }
              } else if (temp instanceof Array) {
                for (var j = 0; j < temp.length; j++) {
                  if (temp[j] === fieldName || fieldName.toLowerCase() === temp[j] + ' desc') {
                    return this;
                  }
                }
              }
            }
          }

          this.queries.push({
            fn: 'onSortBy',
            e: {
              fieldName: fieldName,
              comparer: comparer,
              direction: order
            }
          });
          return this;
        }
        /**
         * Sorts data in descending order.
         * @param  {string} fieldName - Defines the column field.
         */

      }, {
        key: "sortByDesc",
        value: function sortByDesc(fieldName) {
          return this.sortBy(fieldName, 'descending');
        }
        /**
         * Groups data with the given field name.
         * @param  {string} fieldName - Defines the column field.
         */

      }, {
        key: "group",
        value: function group(fieldName, fn, format) {
          this.sortBy(fieldName, null, true);
          this.queries.push({
            fn: 'onGroup',
            e: {
              fieldName: fieldName,
              comparer: fn ? fn : null,
              format: format ? format : null
            }
          });
          return this;
        }
        /**
         * Gets data based on the given page index and size.
         * @param  {number} pageIndex - Defines the current page index.
         * @param  {number} pageSize - Defines the no of records per page.
         */

      }, {
        key: "page",
        value: function page(pageIndex, pageSize) {
          this.queries.push({
            fn: 'onPage',
            e: {
              pageIndex: pageIndex,
              pageSize: pageSize
            }
          });
          return this;
        }
        /**
         * Gets data based on the given start and end index.
         * @param  {number} start - Defines the start index of the datasource.
         * @param  {number} end - Defines the end index of the datasource.
         */

      }, {
        key: "range",
        value: function range(start, end) {
          this.queries.push({
            fn: 'onRange',
            e: {
              start: start,
              end: end
            }
          });
          return this;
        }
        /**
         * Gets data from the top of the data source based on given number of records count.
         * @param  {number} nos - Defines the no of records to retrieve from datasource.
         */

      }, {
        key: "take",
        value: function take(nos) {
          this.queries.push({
            fn: 'onTake',
            e: {
              nos: nos
            }
          });
          return this;
        }
        /**
         * Skips data with given number of records count from the top of the data source.
         * @param  {number} nos - Defines the no of records skip in the datasource.
         */

      }, {
        key: "skip",
        value: function skip(nos) {
          this.queries.push({
            fn: 'onSkip',
            e: {
              nos: nos
            }
          });
          return this;
        }
        /**
         * Selects specified columns from the data source.
         * @param  {string|string[]} fieldNames - Defines the collection of column fields.
         */

      }, {
        key: "select",
        value: function select(fieldNames) {
          if (typeof fieldNames === 'string') {
            fieldNames = [].slice.call([fieldNames], 0);
          }

          this.queries.push({
            fn: 'onSelect',
            e: {
              fieldNames: fieldNames
            }
          });
          return this;
        }
        /**
         * Gets the records in hierarchical relationship from two tables. It requires the foreign key to relate two tables.
         * @param  {Query} query - Defines the query to relate two tables.
         * @param  {Function} selectorFn - Defines the custom function to select records.
         */

      }, {
        key: "hierarchy",
        value: function hierarchy(query, selectorFn) {
          this.subQuerySelector = selectorFn;
          this.subQuery = query;
          return this;
        }
        /**
         * Sets the foreign key which is used to get data from the related table.
         * @param  {string} key - Defines the foreign key.
         */

      }, {
        key: "foreignKey",
        value: function foreignKey(key) {
          this.fKey = key;
          return this;
        }
        /**
         * It is used to get total number of records in the DataManager execution result.
         */

      }, {
        key: "requiresCount",
        value: function requiresCount() {
          this.isCountRequired = true;
          return this;
        } //type - sum, avg, min, max

        /**
         * Aggregate the data with given type and field name.
         * @param  {string} type - Defines the aggregate type.
         * @param  {string} field - Defines the column field to aggregate.
         */

      }, {
        key: "aggregate",
        value: function aggregate(type, field) {
          this.queries.push({
            fn: 'onAggregates',
            e: {
              field: field,
              type: type
            }
          });
          return this;
        }
        /**
         * Pass array of filterColumn query for performing filter operation.
         * @param  {QueryOptions[]} queries
         * @param  {string} name
         * @hidden
         */

      }], [{
        key: "filterQueries",
        value: function filterQueries(queries, name) {
          return queries.filter(function (q) {
            return q.fn === name;
          });
        }
        /**
         * To get the list of queries which is already filtered in current data source.
         * @param  {Object[]} queries
         * @param  {string[]} singles
         * @hidden
         */

      }, {
        key: "filterQueryLists",
        value: function filterQueryLists(queries, singles) {
          var filtered = queries.filter(function (q) {
            return singles.indexOf(q.fn) !== -1;
          });
          var res = {};

          for (var i = 0; i < filtered.length; i++) {
            if (!res[filtered[i].fn]) {
              res[filtered[i].fn] = filtered[i].e;
            }
          }

          return res;
        }
      }]);

      return Query;
    }();
    /**
     * Predicate class is used to generate complex filter criteria.
     * This will be used by DataManager to perform multiple filtering operation.
     */


    var Predicate = /*#__PURE__*/function () {
      /**
       * Constructor for Predicate class.
       * @param  {string|Predicate} field
       * @param  {string} operator
       * @param  {string|number|boolean|Predicate|Predicate[]} value
       * @param  {boolean=false} ignoreCase
       * @hidden
       */
      function Predicate(field, operator, value) {
        var ignoreCase = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
        var ignoreAccent = arguments.length > 4 ? arguments[4] : undefined;

        _classCallCheck(this, Predicate);

        /** @hidden */
        this.ignoreAccent = false;
        /** @hidden */

        this.isComplex = false;

        if (typeof field === 'string') {
          this.field = field;
          this.operator = operator.toLowerCase();
          this.value = value;
          this.ignoreCase = ignoreCase;
          this.ignoreAccent = ignoreAccent;
          this.isComplex = false;
          this.comparer = DataUtil.fnOperators.processOperator(this.operator);
        } else if (field instanceof Predicate && value instanceof Predicate || value instanceof Array) {
          this.isComplex = true;
          this.condition = operator.toLowerCase();
          this.predicates = [field];

          if (value instanceof Array) {
            [].push.apply(this.predicates, value);
          } else {
            this.predicates.push(value);
          }
        }

        return this;
      }
      /**
       * Adds n-number of new predicates on existing predicate with “and” condition.
       * @param  {Object[]} args - Defines the collection of predicates.
       */


      _createClass2(Predicate, [{
        key: "and",

        /**
         * Adds new predicate on existing predicate with “and” condition.
         * @param  {string} field - Defines the column field.
         * @param  {string} operator - Defines the operator how to filter data.
         * @param  {string} value - Defines the values to match with data.
         * @param  {boolean} ignoreCase? - If ignore case set to false, then filter data with exact match or else
         * filter data with case insensitive.
         */
        value: function and(field, operator, value, ignoreCase, ignoreAccent) {
          return Predicate.combine(this, field, operator, value, 'and', ignoreCase, ignoreAccent);
        }
        /**
         * Adds n-number of new predicates on existing predicate with “or” condition.
         * @param  {Object[]} args - Defines the collection of predicates.
         */

      }, {
        key: "or",

        /**
         * Adds new predicate on existing predicate with “or” condition.
         * @param  {string} field - Defines the column field.
         * @param  {string} operator - Defines the operator how to filter data.
         * @param  {string} value - Defines the values to match with data.
         * @param  {boolean} ignoreCase? - If ignore case set to false, then filter data with exact match or else
         * filter data with case insensitive.
         */
        value: function or(field, operator, value, ignoreCase, ignoreAccent) {
          return Predicate.combine(this, field, operator, value, 'or', ignoreCase, ignoreAccent);
        }
        /**
         * Converts plain JavaScript object to Predicate object.
         * @param  {Predicate[]|Predicate} json - Defines single or collection of Predicate.
         */

      }, {
        key: "validate",

        /**
         * Validate the record based on the predicates.
         * @param  {Object} record - Defines the datasource record.
         */
        value: function validate(record) {
          var predicate = this.predicates ? this.predicates : [];
          var isAnd;
          var ret;

          if (!this.isComplex && this.comparer) {
            return this.comparer.call(this, DataUtil.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
          }

          isAnd = this.condition === 'and';

          for (var i = 0; i < predicate.length; i++) {
            ret = predicate[i].validate(record);

            if (isAnd) {
              if (!ret) {
                return false;
              }
            } else {
              if (ret) {
                return true;
              }
            }
          }

          return isAnd;
        }
        /**
         * Converts predicates to plain JavaScript.
         * This method is uses Json stringify when serializing Predicate object.
         */

      }, {
        key: "toJson",
        value: function toJson() {
          var predicates;
          var p;

          if (this.isComplex) {
            predicates = [];
            p = this.predicates;

            for (var i = 0; i < p.length; i++) {
              predicates.push(p[i].toJson());
            }
          }

          return {
            isComplex: this.isComplex,
            field: this.field,
            operator: this.operator,
            value: this.value,
            ignoreCase: this.ignoreCase,
            ignoreAccent: this.ignoreAccent,
            condition: this.condition,
            predicates: predicates
          };
        }
      }], [{
        key: "and",
        value: function and() {
          for (var _len29 = arguments.length, args = new Array(_len29), _key24 = 0; _key24 < _len29; _key24++) {
            args[_key24] = arguments[_key24];
          }

          return Predicate.combinePredicates([].slice.call(args, 0), 'and');
        }
      }, {
        key: "or",
        value: function or() {
          for (var _len30 = arguments.length, args = new Array(_len30), _key25 = 0; _key25 < _len30; _key25++) {
            args[_key25] = arguments[_key25];
          }

          return Predicate.combinePredicates([].slice.call(args, 0), 'or');
        }
      }, {
        key: "fromJson",
        value: function fromJson(json) {
          if (json instanceof Array) {
            var res = [];

            for (var i = 0, _len31 = json.length; i < _len31; i++) {
              res.push(this.fromJSONData(json[i]));
            }

            return res;
          }

          var pred = json;
          return this.fromJSONData(pred);
        }
      }, {
        key: "combinePredicates",
        value: function combinePredicates(predicates, operator) {
          if (predicates.length === 1) {
            if (!(predicates[0] instanceof Array)) {
              return predicates[0];
            }

            predicates = predicates[0];
          }

          return new Predicate(predicates[0], operator, predicates.slice(1));
        }
      }, {
        key: "combine",
        value: function combine(pred, field, operator, value, condition, ignoreCase, ignoreAccent) {
          if (field instanceof Predicate) {
            return Predicate[condition](pred, field);
          }

          if (typeof field === 'string') {
            return Predicate[condition](pred, new Predicate(field, operator, value, ignoreCase, ignoreAccent));
          }

          return DataUtil.throwError('Predicate - ' + condition + ' : invalid arguments');
        }
      }, {
        key: "fromJSONData",
        value: function fromJSONData(json) {
          var preds = json.predicates || [];
          var len = preds.length;
          var predicates = [];
          var result;

          for (var i = 0; i < len; i++) {
            predicates.push(this.fromJSONData(preds[i]));
          }

          if (!json.isComplex) {
            result = new Predicate(json.field, json.operator, json.value, json.ignoreCase, json.ignoreAccent);
          } else {
            result = new Predicate(predicates[0], json.condition, predicates.slice(1));
          }

          return result;
        }
      }]);

      return Predicate;
    }();

    var consts = {
      GroupGuid: '{271bbba0-1ee7}'
    };
    /**
     * Data manager common utility methods.
     * @hidden
     */

    var DataUtil = /*#__PURE__*/function () {
      function DataUtil() {
        _classCallCheck(this, DataUtil);
      }

      _createClass2(DataUtil, null, [{
        key: "getValue",

        /**
         * Returns the value by invoking the provided parameter function.
         * If the paramater is not of type function then it will be returned as it is.
         * @param  {Function|string|string[]|number} value
         * @param  {Object} inst?
         * @hidden
         */
        value: function getValue(value, inst) {
          if (typeof value === 'function') {
            return value.call(inst || {});
          }

          return value;
        }
        /**
         * Returns true if the input string ends with given string.
         * @param  {string} input
         * @param  {string} substr
         */

      }, {
        key: "endsWith",
        value: function endsWith(input, substr) {
          return input.slice && input.slice(-substr.length) === substr;
        }
        /**
         * Returns true if the input string starts with given string.
         * @param  {string} str
         * @param  {string} startstr
         */

      }, {
        key: "startsWith",
        value: function startsWith(input, start) {
          return input.slice(0, start.length) === start;
        }
        /**
         * To return the sorting function based on the string.
         * @param  {string} order
         * @hidden
         */

      }, {
        key: "fnSort",
        value: function fnSort(order) {
          order = order ? DataUtil.toLowerCase(order) : 'ascending';

          if (order === 'ascending') {
            return this.fnAscending;
          }

          return this.fnDescending;
        }
        /**
         * Comparer function which is used to sort the data in ascending order.
         * @param  {string|number} x
         * @param  {string|number} y
         * @returns number
         */

      }, {
        key: "fnAscending",
        value: function fnAscending(x, y) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(x) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(y)) {
            return -1;
          }

          if (y === null || y === undefined) {
            return -1;
          }

          if (typeof x === 'string') {
            return x.localeCompare(y);
          }

          if (x === null || x === undefined) {
            return 1;
          }

          return x - y;
        }
        /**
         * Comparer function which is used to sort the data in descending order.
         * @param  {string|number} x
         * @param  {string|number} y
         * @returns number
         */

      }, {
        key: "fnDescending",
        value: function fnDescending(x, y) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(x) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(y)) {
            return -1;
          }

          if (y === null || y === undefined) {
            return 1;
          }

          if (typeof x === 'string') {
            return x.localeCompare(y) * -1;
          }

          if (x === null || x === undefined) {
            return -1;
          }

          return y - x;
        }
      }, {
        key: "extractFields",
        value: function extractFields(obj, fields) {
          var newObj = {};

          for (var i = 0; i < fields.length; i++) {
            newObj = this.setValue(fields[i], this.getObject(fields[i], obj), newObj);
          }

          return newObj;
        }
        /**
         * Select objects by given fields from jsonArray.
         * @param  {Object[]} jsonArray
         * @param  {string[]} fields
         */

      }, {
        key: "select",
        value: function select(jsonArray, fields) {
          var newData = [];

          for (var i = 0; i < jsonArray.length; i++) {
            newData.push(this.extractFields(jsonArray[i], fields));
          }

          return newData;
        }
        /**
         * Group the input data based on the field name.
         * It also performs aggregation of the grouped records based on the aggregates paramater.
         * @param  {Object[]} jsonArray
         * @param  {string} field?
         * @param  {Object[]} agg?
         * @param  {number} level?
         * @param  {Object[]} groupDs?
         */

      }, {
        key: "group",
        value: function group(jsonArray, field, aggregates, level, groupDs, format) {
          var _this439 = this;

          level = level || 1;
          var jsonData = jsonArray;
          var guid = 'GroupGuid';

          if (jsonData.GroupGuid === consts[guid]) {
            var _loop11 = function _loop11(j) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs)) {
                var indx = -1;
                var temp = groupDs.filter(function (e) {
                  return e.key === jsonData[j].key;
                });
                indx = groupDs.indexOf(temp[0]);
                jsonData[j].items = _this439.group(jsonData[j].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format);
                jsonData[j].count = groupDs[indx].count;
              } else {
                jsonData[j].items = _this439.group(jsonData[j].items, field, aggregates, jsonData.level + 1, null, format);
                jsonData[j].count = jsonData[j].items.length;
              }
            };

            for (var j = 0; j < jsonData.length; j++) {
              _loop11(j);
            }

            jsonData.childLevels += 1;
            return jsonData;
          }

          var grouped = {};
          var groupedArray = [];
          groupedArray.GroupGuid = consts[guid];
          groupedArray.level = level;
          groupedArray.childLevels = 0;
          groupedArray.records = jsonData;

          var _loop12 = function _loop12(i) {
            var val = _this439.getVal(jsonData, i, field);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(format)) {
              val = format(val, field);
            }

            if (!grouped[val]) {
              grouped[val] = {
                key: val,
                count: 0,
                items: [],
                aggregates: {},
                field: field
              };
              groupedArray.push(grouped[val]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs)) {
                var tempObj = groupDs.filter(function (e) {
                  return e.key === grouped[val].key;
                });
                grouped[val].count = tempObj[0].count;
              }
            }

            grouped[val].count = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs) ? grouped[val].count : grouped[val].count += 1;
            grouped[val].items.push(jsonData[i]);
          };

          for (var i = 0; i < jsonData.length; i++) {
            _loop12(i);
          }

          if (aggregates && aggregates.length) {
            var _loop13 = function _loop13(_i54) {
              var res = {};
              var fn = void 0;
              var aggs = aggregates;

              for (var _j = 0; _j < aggregates.length; _j++) {
                fn = DataUtil.aggregates[aggregates[_j].type];

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs)) {
                  var temp = groupDs.filter(function (e) {
                    return e.key === groupedArray[_i54].key;
                  });

                  if (fn) {
                    res[aggs[_j].field + ' - ' + aggs[_j].type] = fn(temp[0].items, aggs[_j].field);
                  }
                } else {
                  if (fn) {
                    res[aggs[_j].field + ' - ' + aggs[_j].type] = fn(groupedArray[_i54].items, aggs[_j].field);
                  }
                }
              }

              groupedArray[_i54].aggregates = res;
            };

            for (var _i54 = 0; _i54 < groupedArray.length; _i54++) {
              _loop13(_i54);
            }
          }

          return jsonData.length && groupedArray || jsonData;
        }
        /**
         * It is used to categorize the multiple items based on a specific field in jsonArray.
         * The hierarchical queries are commonly required when you use foreign key binding.
         * @param  {string} fKey
         * @param  {string} from
         * @param  {Object[]} source
         * @param  {Group} lookup?
         * @param  {string} pKey?
         * @hidden
         */

      }, {
        key: "buildHierarchy",
        value: function buildHierarchy(fKey, from, source, lookup, pKey) {
          var i;
          var grp = {};
          var temp;

          if (lookup.result) {
            lookup = lookup.result;
          }

          if (lookup.GroupGuid) {
            this.throwError('DataManager: Do not have support Grouping in hierarchy');
          }

          for (i = 0; i < lookup.length; i++) {
            var fKeyData = this.getObject(fKey, lookup[i]);
            temp = grp[fKeyData] || (grp[fKeyData] = []);
            temp.push(lookup[i]);
          }

          for (i = 0; i < source.length; i++) {
            var _fKeyData = this.getObject(pKey || fKey, source[i]);

            source[i][from] = grp[_fKeyData];
          }
        }
        /**
         * The method used to get the field names which started with specified characters.
         * @param  {Object} obj
         * @param  {string[]} fields?
         * @param  {string} prefix?
         * @hidden
         */

      }, {
        key: "getFieldList",
        value: function getFieldList(obj, fields, prefix) {
          if (prefix === undefined) {
            prefix = '';
          }

          if (fields === undefined || fields === null) {
            return this.getFieldList(obj, [], prefix);
          }

          var copyObj = obj;
          var keys = Object.keys(obj);

          for (var _i55 = 0, _keys13 = keys; _i55 < _keys13.length; _i55++) {
            var prop = _keys13[_i55];

            if (typeof copyObj[prop] === 'object' && !(copyObj[prop] instanceof Array)) {
              this.getFieldList(copyObj[prop], fields, prefix + prop + '.');
            } else {
              fields.push(prefix + prop);
            }
          }

          return fields;
        }
        /**
         * Gets the value of the property in the given object.
         * The complex object can be accessed by providing the field names concatenated with dot(.).
         * @param  {string} nameSpace - The name of the property to be accessed.
         * @param  {Object} from - Defines the source object.
         */

      }, {
        key: "getObject",
        value: function getObject(nameSpace, from) {
          if (!nameSpace) {
            return from;
          }

          if (!from) {
            return undefined;
          }

          if (nameSpace.indexOf('.') === -1) {
            return from[nameSpace];
          }

          var value = from;
          var splits = nameSpace.split('.');

          for (var i = 0; i < splits.length; i++) {
            if (value == null) {
              break;
            }

            value = value[splits[i]];
          }

          return value;
        }
        /**
         * To set value for the nameSpace in desired object.
         * @param {string} nameSpace - String value to the get the inner object.
         * @param {Object} value - Value that you need to set.
         * @param {Object} obj - Object to get the inner object value.
         * @return { [key: string]: Object; } | Object
         * @hidden
         */

      }, {
        key: "setValue",
        value: function setValue(nameSpace, value, obj) {
          var keys = nameSpace.toString().split('.');
          var start = obj || {};
          var fromObj = start;
          var i;
          var length = keys.length;
          var key;

          for (i = 0; i < length; i++) {
            key = keys[i];

            if (i + 1 === length) {
              fromObj[key] = value === undefined ? undefined : value;
            } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fromObj[key])) {
              fromObj[key] = {};
            }

            fromObj = fromObj[key];
          }

          return start;
        }
        /**
         * Sort the given data based on the field and comparer.
         * @param  {Object[]} ds - Defines the input data.
         * @param  {string} field - Defines the field to be sorted.
         * @param  {Function} comparer - Defines the comparer function used to sort the records.
         */

      }, {
        key: "sort",
        value: function sort(ds, field, comparer) {
          if (ds.length <= 1) {
            return ds;
          }

          var middle = parseInt((ds.length / 2).toString(), 10);
          var left = ds.slice(0, middle);
          var right = ds.slice(middle);
          left = this.sort(left, field, comparer);
          right = this.sort(right, field, comparer);
          return this.merge(left, right, field, comparer);
        }
      }, {
        key: "ignoreDiacritics",
        value: function ignoreDiacritics(value) {
          if (typeof value !== 'string') {
            return value;
          }

          var result = value.split('');
          var newValue = result.map(function (temp) {
            return temp in DataUtil.diacritics ? DataUtil.diacritics[temp] : temp;
          });
          return newValue.join('');
        }
      }, {
        key: "merge",
        value: function merge(left, right, fieldName, comparer) {
          var result = [];
          var current;

          while (left.length > 0 || right.length > 0) {
            if (left.length > 0 && right.length > 0) {
              if (comparer) {
                current = comparer(this.getVal(left, 0, fieldName), this.getVal(right, 0, fieldName), left[0], right[0]) <= 0 ? left : right;
              } else {
                current = left[0][fieldName] < left[0][fieldName] ? left : right;
              }
            } else {
              current = left.length > 0 ? left : right;
            }

            result.push(current.shift());
          }

          return result;
        }
      }, {
        key: "getVal",
        value: function getVal(array, index, field) {
          return field ? this.getObject(field, array[index]) : array[index];
        }
      }, {
        key: "toLowerCase",
        value: function toLowerCase(val) {
          return val ? typeof val === 'string' ? val.toLowerCase() : val.toString() : val === 0 || val === false ? val.toString() : '';
        }
        /**
         * To perform the filter operation with specified adaptor and returns the result.
         * @param  {Object} adaptor
         * @param  {string} fnName
         * @param  {Object} param1?
         * @param  {Object} param2?
         * @hidden
         */

      }, {
        key: "callAdaptorFunction",
        value: function callAdaptorFunction(adaptor, fnName, param1, param2) {
          if (fnName in adaptor) {
            var res = adaptor[fnName](param1, param2);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(res)) {
              param1 = res;
            }
          }

          return param1;
        }
      }, {
        key: "getAddParams",
        value: function getAddParams(adp, dm, query) {
          var req = {};
          DataUtil.callAdaptorFunction(adp, 'addParams', {
            dm: dm,
            query: query,
            params: query.params,
            reqParams: req
          });
          return req;
        }
        /**
         * Checks wheather the given input is a plain object or not.
         * @param  {Object|Object[]} obj
         */

      }, {
        key: "isPlainObject",
        value: function isPlainObject(obj) {
          return !!obj && obj.constructor === Object;
        }
        /**
         * Returns true when the browser cross origin request.
         */

      }, {
        key: "isCors",
        value: function isCors() {
          var xhr = null;
          var request = 'XMLHttpRequest';

          try {
            xhr = new window[request]();
          } catch (e) {// No exception handling
          }

          return !!xhr && 'withCredentials' in xhr;
        }
        /**
         * Generate random GUID value which will be prefixed with the given value.
         * @param  {string} prefix
         */

      }, {
        key: "getGuid",
        value: function getGuid(prefix) {
          var hexs = '0123456789abcdef';
          var rand;
          return (prefix || '') + '00000000-0000-4000-0000-000000000000'.replace(/0/g, function (val, i) {
            if ('crypto' in window && 'getRandomValues' in crypto) {
              var arr = new Uint8Array(1);
              window.crypto.getRandomValues(arr);
              rand = arr[0] % 16 | 0;
            } else {
              rand = Math.random() * 16 | 0;
            }

            return hexs[i === 19 ? rand & 0x3 | 0x8 : rand];
          });
        }
        /**
         * Checks wheather the given value is null or not.
         * @param  {string|Object} val
         * @returns boolean
         */

      }, {
        key: "isNull",
        value: function isNull(val) {
          return val === undefined || val === null;
        }
        /**
         * To get the required items from collection of objects.
         * @param  {Object[]} array
         * @param  {string} field
         * @param  {Function} comparer
         * @returns Object
         * @hidden
         */

      }, {
        key: "getItemFromComparer",
        value: function getItemFromComparer(array, field, comparer) {
          var keyVal;
          var current;
          var key;
          var i = 0;
          var castRequired = typeof DataUtil.getVal(array, 0, field) === 'string';

          if (array.length) {
            while (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(keyVal) && i < array.length) {
              keyVal = DataUtil.getVal(array, i, field);
              key = array[i++];
            }
          }

          for (; i < array.length; i++) {
            current = DataUtil.getVal(array, i, field);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(current)) {
              continue;
            }

            if (castRequired) {
              keyVal = +keyVal;
              current = +current;
            }

            if (comparer(keyVal, current) > 0) {
              keyVal = current;
              key = array[i];
            }
          }

          return key;
        }
        /**
         * To get distinct values of Array or Array of Objects.
         * @param  {Object[]} json
         * @param  {string} field
         * @param  {boolean} requiresCompleteRecord
         * @returns Object[]
         * * distinct array of objects is return when requiresCompleteRecord set as true.
         * @hidden
         */

      }, {
        key: "distinct",
        value: function distinct(json, fieldName, requiresCompleteRecord) {
          requiresCompleteRecord = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(requiresCompleteRecord) ? false : requiresCompleteRecord;
          var result = [];
          var val;
          var tmp = {};
          json.forEach(function (data, index) {
            val = typeof json[index] === 'object' ? DataUtil.getVal(json, index, fieldName) : json[index];

            if (!(val in tmp)) {
              result.push(!requiresCompleteRecord ? val : json[index]);
              tmp[val] = 1;
            }
          });
          return result;
        }
      }]);

      return DataUtil;
    }();
    /**
     * Specifies the value which will be used to adjust the date value to server timezone.
     * @default null
     */


    DataUtil.serverTimezoneOffset = null;
    /**
     * Species whether are not to be parsed with serverTimezoneOffset value.
     * @hidden
     */

    DataUtil.timeZoneHandling = true;
    /**
     * Throw error with the given string as message.
     * @param  {string} er
     */

    DataUtil.throwError = function (error) {
      try {
        throw new Error(error);
      } catch (e) {
        throw e.message + '\n' + e.stack;
      }
    };

    DataUtil.aggregates = {
      /**
       * Calculate sum of the given field in the data.
       * @param  {Object[]} ds
       * @param  {string} field
       */
      sum: function sum(ds, field) {
        var result = 0;
        var val;
        var castRequired = typeof DataUtil.getVal(ds, 0, field) !== 'number';

        for (var i = 0; i < ds.length; i++) {
          val = DataUtil.getVal(ds, i, field);

          if (!isNaN(val) && val !== null) {
            if (castRequired) {
              val = +val;
            }

            result += val;
          }
        }

        return result;
      },

      /**
       * Calculate average value of the given field in the data.
       * @param  {Object[]} ds
       * @param  {string} field
       */
      average: function average(ds, field) {
        return DataUtil.aggregates.sum(ds, field) / ds.length;
      },

      /**
       * Returns the min value of the data based on the field.
       * @param  {Object[]} ds
       * @param  {string|Function} field
       */
      min: function min(ds, field) {
        var comparer;

        if (typeof field === 'function') {
          comparer = field;
          field = null;
        }

        return DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnAscending));
      },

      /**
       * Returns the max value of the data based on the field.
       * @param  {Object[]} ds
       * @param  {string} field
       * @returns number
       */
      max: function max(ds, field) {
        var comparer;

        if (typeof field === 'function') {
          comparer = field;
          field = null;
        }

        return DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnDescending));
      },

      /**
       * Returns the total number of true value present in the data based on the given boolean field name.
       * @param  {Object[]} ds
       * @param  {string} field
       */
      truecount: function truecount(ds, field) {
        return new DataManager(ds).executeLocal(new Query().where(field, 'equal', true, true)).length;
      },

      /**
       * Returns the total number of false value present in the data based on the given boolean field name.
       * @param  {Object[]} ds
       * @param  {string} field
       */
      falsecount: function falsecount(ds, field) {
        return new DataManager(ds).executeLocal(new Query().where(field, 'equal', false, true)).length;
      },

      /**
       * Returns the length of the given data.
       * @param  {Object[]} ds
       * @param  {string} field?
       * @returns number
       */
      count: function count(ds, field) {
        return ds.length;
      }
    };
    /**
     * Specifies the Object with filter operators.
     */

    DataUtil.operatorSymbols = {
      '<': 'lessthan',
      '>': 'greaterthan',
      '<=': 'lessthanorequal',
      '>=': 'greaterthanorequal',
      '==': 'equal',
      '!=': 'notequal',
      '*=': 'contains',
      '$=': 'endswith',
      '^=': 'startswith'
    };
    /**
     * Specifies the Object with filter operators which will be used for OData filter query generation.
     * * It will be used for date/number type filter query.
     */

    DataUtil.odBiOperator = {
      '<': ' lt ',
      '>': ' gt ',
      '<=': ' le ',
      '>=': ' ge ',
      '==': ' eq ',
      '!=': ' ne ',
      'lessthan': ' lt ',
      'lessthanorequal': ' le ',
      'greaterthan': ' gt ',
      'greaterthanorequal': ' ge ',
      'equal': ' eq ',
      'notequal': ' ne '
    };
    /**
     * Specifies the Object with filter operators which will be used for OData filter query generation.
     * It will be used for string type filter query.
     */

    DataUtil.odUniOperator = {
      '$=': 'endswith',
      '^=': 'startswith',
      '*=': 'substringof',
      'endswith': 'endswith',
      'startswith': 'startswith',
      'contains': 'substringof'
    };
    /**
     * Specifies the Object with filter operators which will be used for ODataV4 filter query generation.
     * It will be used for string type filter query.
     */

    DataUtil.odv4UniOperator = {
      '$=': 'endswith',
      '^=': 'startswith',
      '*=': 'contains',
      'endswith': 'endswith',
      'startswith': 'startswith',
      'contains': 'contains'
    };
    DataUtil.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"
    };
    DataUtil.fnOperators = {
      /**
       * Returns true when the actual input is equal to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       * @param  {boolean} ignoreAccent?
       */
      equal: function equal(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil.ignoreDiacritics(actual);
          expected = DataUtil.ignoreDiacritics(expected);
        }

        if (ignoreCase) {
          return DataUtil.toLowerCase(actual) === DataUtil.toLowerCase(expected);
        }

        return actual === expected;
      },

      /**
       * Returns true when the actual input is not equal to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       */
      notequal: function notequal(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil.ignoreDiacritics(actual);
          expected = DataUtil.ignoreDiacritics(expected);
        }

        return !DataUtil.fnOperators.equal(actual, expected, ignoreCase);
      },

      /**
       * Returns true when the actual input is less than to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       */
      lessthan: function lessthan(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil.toLowerCase(actual) < DataUtil.toLowerCase(expected);
        }

        return actual < expected;
      },

      /**
       * Returns true when the actual input is greater than to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       */
      greaterthan: function greaterthan(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil.toLowerCase(actual) > DataUtil.toLowerCase(expected);
        }

        return actual > expected;
      },

      /**
       * Returns true when the actual input is less than or equal to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       */
      lessthanorequal: function lessthanorequal(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil.toLowerCase(actual) <= DataUtil.toLowerCase(expected);
        }

        return actual <= expected;
      },

      /**
       * Returns true when the actual input is greater than or equal to the given input.
       * @param  {string|number|boolean} actual
       * @param  {string|number|boolean} expected
       * @param  {boolean} ignoreCase?
       */
      greaterthanorequal: function greaterthanorequal(actual, expected, ignoreCase) {
        if (ignoreCase) {
          return DataUtil.toLowerCase(actual) >= DataUtil.toLowerCase(expected);
        }

        return actual >= expected;
      },

      /**
       * Returns true when the actual input contains the given string.
       * @param  {string|number} actual
       * @param  {string|number} expected
       * @param  {boolean} ignoreCase?
       */
      contains: function contains(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil.ignoreDiacritics(actual);
          expected = DataUtil.ignoreDiacritics(expected);
        }

        if (ignoreCase) {
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actual) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(expected) && DataUtil.toLowerCase(actual).indexOf(DataUtil.toLowerCase(expected)) !== -1;
        }

        return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actual) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(expected) && actual.toString().indexOf(expected) !== -1;
      },

      /**
       * Returns true when the given input value is not null.
       * @param  {string|number} actual
       * @returns boolean
       */
      notnull: function notnull(actual) {
        return actual !== null;
      },

      /**
       * Returns true when the given input value is null.
       * @param  {string|number} actual
       * @returns boolean
       */
      isnull: function isnull(actual) {
        return actual === null;
      },

      /**
       * Returns true when the actual input starts with the given string
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      startswith: function startswith(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil.ignoreDiacritics(actual);
          expected = DataUtil.ignoreDiacritics(expected);
        }

        if (ignoreCase) {
          return actual && expected && DataUtil.startsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected));
        }

        return actual && expected && DataUtil.startsWith(actual, expected);
      },

      /**
       * Returns true when the actual input ends with the given string.
       * @param  {string} actual
       * @param  {string} expected
       * @param  {boolean} ignoreCase?
       */
      endswith: function endswith(actual, expected, ignoreCase, ignoreAccent) {
        if (ignoreAccent) {
          actual = DataUtil.ignoreDiacritics(actual);
          expected = DataUtil.ignoreDiacritics(expected);
        }

        if (ignoreCase) {
          return actual && expected && DataUtil.endsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected));
        }

        return actual && expected && DataUtil.endsWith(actual, expected);
      },

      /**
       * It will return the filter operator based on the filter symbol.
       * @param  {string} operator
       * @hidden
       */
      processSymbols: function processSymbols(operator) {
        var fnName = DataUtil.operatorSymbols[operator];

        if (fnName) {
          var fn = DataUtil.fnOperators[fnName];
          return fn;
        }

        return DataUtil.throwError('Query - Process Operator : Invalid operator');
      },

      /**
       * It will return the valid filter operator based on the specified operators.
       * @param  {string} operator
       * @hidden
       */
      processOperator: function processOperator(operator) {
        var fn = DataUtil.fnOperators[operator];

        if (fn) {
          return fn;
        }

        return DataUtil.fnOperators.processSymbols(operator);
      }
    };
    /**
     * To perform the parse operation on JSON data, like convert to string from JSON or convert to JSON from string.
     */

    DataUtil.parse = {
      /**
       * Parse the given string to the plain JavaScript object.
       * @param  {string|Object|Object[]} jsonText
       */
      parseJson: function parseJson(jsonText) {
        if (typeof jsonText === 'string') {
          jsonText = JSON.parse(jsonText, DataUtil.parse.jsonReviver);
        } else if (jsonText instanceof Array) {
          DataUtil.parse.iterateAndReviveArray(jsonText);
        } else if (typeof jsonText === 'object' && jsonText !== null) {
          DataUtil.parse.iterateAndReviveJson(jsonText);
        }

        return jsonText;
      },

      /**
       * It will perform on array of values.
       * @param  {string[]|Object[]} array
       * @hidden
       */
      iterateAndReviveArray: function iterateAndReviveArray(array) {
        for (var i = 0; i < array.length; i++) {
          if (typeof array[i] === 'object' && array[i] !== null) {
            DataUtil.parse.iterateAndReviveJson(array[i]);
          } else if (typeof array[i] === 'string' && !/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(array[i])) {
            array[i] = DataUtil.parse.jsonReviver('', array[i]);
          } else {
            array[i] = DataUtil.parse.parseJson(array[i]);
          }
        }
      },

      /**
       * It will perform on JSON values
       * @param  {JSON} json
       * @hidden
       */
      iterateAndReviveJson: function iterateAndReviveJson(json) {
        var value;
        var keys = Object.keys(json);

        for (var _i56 = 0, _keys14 = keys; _i56 < _keys14.length; _i56++) {
          var prop = _keys14[_i56];

          if (DataUtil.startsWith(prop, '__')) {
            continue;
          }

          value = json[prop];

          if (typeof value === 'object') {
            if (value instanceof Array) {
              DataUtil.parse.iterateAndReviveArray(value);
            } else if (value) {
              DataUtil.parse.iterateAndReviveJson(value);
            }
          } else {
            json[prop] = DataUtil.parse.jsonReviver(json[prop], value);
          }
        }
      },

      /**
       * It will perform on JSON values
       * @param  {string} field
       * @param  {string|Date} value
       * @hidden
       */
      jsonReviver: function jsonReviver(field, value) {
        if (typeof value === 'string') {
          var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
          var offSet = DataUtil.timeZoneHandling ? DataUtil.serverTimezoneOffset : null;

          if (ms) {
            return DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), offSet, true);
          } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
            var isUTC = value.indexOf('Z') > -1 || value.indexOf('z') > -1;
            var arr = value.split(/[^0-9.]/);

            if (isUTC) {
              value = DataUtil.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), DataUtil.serverTimezoneOffset, false);
            } else {
              var utcFormat = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10));
              var hrs = parseInt(arr[6], 10);
              var mins = parseInt(arr[7], 10);

              if (isNaN(hrs) && isNaN(mins)) {
                return utcFormat;
              }

              if (value.indexOf('+') > -1) {
                utcFormat.setHours(utcFormat.getHours() - hrs, utcFormat.getMinutes() - mins);
              } else {
                utcFormat.setHours(utcFormat.getHours() + hrs, utcFormat.getMinutes() + mins);
              }

              value = DataUtil.dateParse.toTimeZone(utcFormat, DataUtil.serverTimezoneOffset, false);
            }

            if (DataUtil.serverTimezoneOffset == null) {
              value = DataUtil.dateParse.addSelfOffset(value);
            }
          }
        }

        return value;
      },

      /**
       * Check wheather the given value is JSON or not.
       * @param  {Object[]} jsonData
       */
      isJson: function isJson(jsonData) {
        if (typeof jsonData[0] === 'string') {
          return jsonData;
        }

        return DataUtil.parse.parseJson(jsonData);
      },

      /**
       * Checks wheather the given value is GUID or not.
       * @param  {string} value
       */
      isGuid: function isGuid(value) {
        var regex = /[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i;
        var match = regex.exec(value);
        return match != null;
      },

      /**
       * The method used to replace the value based on the type.
       * @param  {Object} value
       * @param  {boolean} stringify
       * @hidden
       */
      replacer: function replacer(value, stringify) {
        if (DataUtil.isPlainObject(value)) {
          return DataUtil.parse.jsonReplacer(value, stringify);
        }

        if (value instanceof Array) {
          return DataUtil.parse.arrayReplacer(value);
        }

        if (value instanceof Date) {
          return DataUtil.parse.jsonReplacer({
            val: value
          }, stringify).val;
        }

        return value;
      },

      /**
       * It will replace the JSON value.
       * @param  {string} key
       * @param  {Object} val
       * @hidden
       */
      jsonReplacer: function jsonReplacer(val, stringify) {
        var value;
        var keys = Object.keys(val);

        for (var _i57 = 0, _keys15 = keys; _i57 < _keys15.length; _i57++) {
          var prop = _keys15[_i57];
          value = val[prop];

          if (!(value instanceof Date)) {
            continue;
          }

          var d = value;

          if (DataUtil.serverTimezoneOffset == null) {
            val[prop] = DataUtil.dateParse.toTimeZone(d, null).toJSON();
          } else {
            d = new Date(+d + DataUtil.serverTimezoneOffset * 3600000);
            val[prop] = DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(d), null).toJSON();
          }
        }

        return val;
      },

      /**
       * It will replace the Array of value.
       * @param  {string} key
       * @param  {Object[]} val
       * @hidden
       */
      arrayReplacer: function arrayReplacer(val) {
        for (var i = 0; i < val.length; i++) {
          if (DataUtil.isPlainObject(val[i])) {
            val[i] = DataUtil.parse.jsonReplacer(val[i]);
          } else if (val[i] instanceof Date) {
            val[i] = DataUtil.parse.jsonReplacer({
              date: val[i]
            }).date;
          }
        }

        return val;
      },

      /**
       * It will replace the Date object with respective to UTC format value.
       * @param  {string} key
       * @param  {any} value
       * @hidden
       */

      /* tslint:disable-next-line:no-any */
      jsonDateReplacer: function jsonDateReplacer(key, value) {
        if (key === 'value' && value) {
          if (typeof value === 'string') {
            var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);

            if (ms) {
              value = DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), null, true);
            } else if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
              var arr = value.split(/[^0-9]/);
              value = DataUtil.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), null, true);
            }
          }

          if (value instanceof Date) {
            value = DataUtil.dateParse.addSelfOffset(value);

            if (DataUtil.serverTimezoneOffset === null) {
              return DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(value), null).toJSON();
            } else {
              value = DataUtil.dateParse.toTimeZone(value, value.getTimezoneOffset() / 60 * 2 - DataUtil.serverTimezoneOffset, false);
              return value.toJSON();
            }
          }
        }

        return value;
      }
    };
    /**
     * @hidden
     */

    DataUtil.dateParse = {
      addSelfOffset: function addSelfOffset(input) {
        return new Date(+input - input.getTimezoneOffset() * 60000);
      },
      toUTC: function toUTC(input) {
        return new Date(+input + input.getTimezoneOffset() * 60000);
      },
      toTimeZone: function toTimeZone(input, offset, utc) {
        if (offset === null) {
          return input;
        }

        var unix = utc ? DataUtil.dateParse.toUTC(input) : input;
        return new Date(+unix - offset * 3600000);
      },
      toLocalTime: function toLocalTime(input) {
        var datefn = input;
        var timeZone = -datefn.getTimezoneOffset();
        var differenceString = timeZone >= 0 ? '+' : '-';

        var localtimefn = function localtimefn(num) {
          var norm = Math.floor(Math.abs(num));
          return (norm < 10 ? '0' : '') + norm;
        };

        var val = datefn.getFullYear() + '-' + localtimefn(datefn.getMonth() + 1) + '-' + localtimefn(datefn.getDate()) + 'T' + localtimefn(datefn.getHours()) + ':' + localtimefn(datefn.getMinutes()) + ':' + localtimefn(datefn.getSeconds()) + differenceString + localtimefn(timeZone / 60) + ':' + localtimefn(timeZone % 60);
        return val;
      }
    };
    /**
     * Adaptors are specific data source type aware interfaces that are used by DataManager to communicate with DataSource.
     * This is the base adaptor class that other adaptors can extend.
     * @hidden
     */

    var Adaptor = /*#__PURE__*/function () {
      /**
       * Constructor for Adaptor class
       * @param  {DataOptions} ds?
       * @hidden
       * @returns aggregates
       */
      function Adaptor(ds) {
        _classCallCheck(this, Adaptor);

        // common options for all the adaptors 
        this.options = {
          from: 'table',
          requestType: 'json',
          sortBy: 'sorted',
          select: 'select',
          skip: 'skip',
          group: 'group',
          take: 'take',
          search: 'search',
          count: 'requiresCounts',
          where: 'where',
          aggregates: 'aggregates',
          expand: 'expand'
        };
        /**
         * Specifies the type of adaptor.
         * @default Adaptor
         */

        this.type = Adaptor;
        this.dataSource = ds;
        this.pvt = {};
      }
      /**
       * Returns the data from the query processing.
       * @param  {Object} data
       * @param  {DataOptions} ds?
       * @param  {Query} query?
       * @param  {XMLHttpRequest} xhr?
       * @returns Object
       */


      _createClass2(Adaptor, [{
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr) {
          return data;
        }
      }]);

      return Adaptor;
    }();
    /**
     * JsonAdaptor is used to process JSON data. It contains methods to process the given JSON data based on the queries.
     * @hidden
     */


    var JsonAdaptor = /*#__PURE__*/function (_Adaptor) {
      _inherits(JsonAdaptor, _Adaptor);

      var _super176 = _createSuper(JsonAdaptor);

      function JsonAdaptor() {
        _classCallCheck(this, JsonAdaptor);

        return _super176.apply(this, arguments);
      }

      _createClass2(JsonAdaptor, [{
        key: "processQuery",

        /**
         * Process the JSON data based on the provided queries.
         * @param  {DataManager} dataManager
         * @param  {Query} query
         * @returns Object
         */
        value: function processQuery(dataManager, query) {
          var result = dataManager.dataSource.json.slice(0);
          var count = result.length;
          var countFlg = true;
          var ret;
          var key;
          var agg = {};

          for (var i = 0; i < query.queries.length; i++) {
            key = query.queries[i];
            ret = this[key.fn].call(this, result, key.e, query);

            if (key.fn === 'onAggregates') {
              agg[key.e.field + ' - ' + key.e.type] = ret;
            } else {
              result = ret !== undefined ? ret : result;
            }

            if (key.fn === 'onPage' || key.fn === 'onSkip' || key.fn === 'onTake' || key.fn === 'onRange') {
              countFlg = false;
            }

            if (countFlg) {
              count = result.length;
            }
          }

          if (query.isCountRequired) {
            result = {
              result: result,
              count: count,
              aggregates: agg
            };
          }

          return result;
        }
        /**
         * Performs batch update in the JSON array which add, remove and update records.
         * @param  {DataManager} dm
         * @param  {CrudOptions} changes
         * @param  {RemoteArgs} e
         */

      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e) {
          var i;
          var deletedRecordsLen = changes.deletedRecords.length;

          for (i = 0; i < changes.addedRecords.length; i++) {
            this.insert(dm, changes.addedRecords[i]);
          }

          for (i = 0; i < changes.changedRecords.length; i++) {
            this.update(dm, e.key, changes.changedRecords[i]);
          }

          for (i = 0; i < deletedRecordsLen; i++) {
            this.remove(dm, e.key, changes.deletedRecords[i]);
          }

          return changes;
        }
        /**
         * Performs filter operation with the given data and where query.
         * @param  {Object[]} ds
         * @param  {{validate:Function}} e
         */

      }, {
        key: "onWhere",
        value: function onWhere(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          return ds.filter(function (obj) {
            if (e) {
              return e.validate(obj);
            }
          });
        }
        /**
         * Returns aggregate function based on the aggregate type.
         * @param  {Object[]} ds
         * @param  {{field:string} e
         * @param  {string}} type
         */

      }, {
        key: "onAggregates",
        value: function onAggregates(ds, e) {
          var fn = DataUtil.aggregates[e.type];

          if (!ds || !fn || ds.length === 0) {
            return null;
          }

          return fn(ds, e.field);
        }
        /**
         * Performs search operation based on the given query.
         * @param  {Object[]} ds
         * @param  {QueryOptions} e
         */

      }, {
        key: "onSearch",
        value: function onSearch(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          if (e.fieldNames.length === 0) {
            DataUtil.getFieldList(ds[0], e.fieldNames);
          }

          return ds.filter(function (obj) {
            for (var j = 0; j < e.fieldNames.length; j++) {
              if (e.comparer.call(obj, DataUtil.getObject(e.fieldNames[j], obj), e.searchKey, e.ignoreCase, e.ignoreAccent)) {
                return true;
              }
            }

            return false;
          });
        }
        /**
         * Sort the data with given direction and field.
         * @param  {Object[]} ds
         * @param  {{comparer:(a:Object} e
         * @param  {Object} b
         */

      }, {
        key: "onSortBy",
        value: function onSortBy(ds, e, query) {
          if (!ds || !ds.length) {
            return ds;
          }

          var fnCompare;
          var field = DataUtil.getValue(e.fieldName, query);

          if (!field) {
            return ds.sort(e.comparer);
          }

          if (field instanceof Array) {
            field = field.slice(0);

            for (var i = field.length - 1; i >= 0; i--) {
              if (!field[i]) {
                continue;
              }

              fnCompare = e.comparer;

              if (DataUtil.endsWith(field[i], ' desc')) {
                fnCompare = DataUtil.fnSort('descending');
                field[i] = field[i].replace(' desc', '');
              }

              ds = DataUtil.sort(ds, field[i], fnCompare);
            }

            return ds;
          }

          return DataUtil.sort(ds, field, e.comparer);
        }
        /**
         * Group the data based on the given query.
         * @param  {Object[]} ds
         * @param  {QueryOptions} e
         * @param  {Query} query
         */

      }, {
        key: "onGroup",
        value: function onGroup(ds, e, query) {
          if (!ds || !ds.length) {
            return ds;
          }

          var aggQuery = Query.filterQueries(query.queries, 'onAggregates');
          var agg = [];

          if (aggQuery.length) {
            var tmp;

            for (var i = 0; i < aggQuery.length; i++) {
              tmp = aggQuery[i].e;
              agg.push({
                type: tmp.type,
                field: DataUtil.getValue(tmp.field, query)
              });
            }
          }

          return DataUtil.group(ds, DataUtil.getValue(e.fieldName, query), agg, null, null, e.comparer);
        }
        /**
         * Retrieves records based on the given page index and size.
         * @param  {Object[]} ds
         * @param  {{pageSize:number} e
         * @param  {number}} pageIndex
         * @param  {Query} query
         */

      }, {
        key: "onPage",
        value: function onPage(ds, e, query) {
          var size = DataUtil.getValue(e.pageSize, query);
          var start = (DataUtil.getValue(e.pageIndex, query) - 1) * size;
          var end = start + size;

          if (!ds || !ds.length) {
            return ds;
          }

          return ds.slice(start, end);
        }
        /**
         * Retrieves records based on the given start and end index from query.
         * @param  {Object[]} ds
         * @param  {{start:number} e
         * @param  {number}} end
         */

      }, {
        key: "onRange",
        value: function onRange(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          return ds.slice(DataUtil.getValue(e.start), DataUtil.getValue(e.end));
        }
        /**
         * Picks the given count of records from the top of the datasource.
         * @param  {Object[]} ds
         * @param  {{nos:number}} e
         */

      }, {
        key: "onTake",
        value: function onTake(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          return ds.slice(0, DataUtil.getValue(e.nos));
        }
        /**
         * Skips the given count of records from the data source.
         * @param  {Object[]} ds
         * @param  {{nos:number}} e
         */

      }, {
        key: "onSkip",
        value: function onSkip(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          return ds.slice(DataUtil.getValue(e.nos));
        }
        /**
         * Selects specified columns from the data source.
         * @param  {Object[]} ds
         * @param  {{fieldNames:string}} e
         */

      }, {
        key: "onSelect",
        value: function onSelect(ds, e) {
          if (!ds || !ds.length) {
            return ds;
          }

          return DataUtil.select(ds, DataUtil.getValue(e.fieldNames));
        }
        /**
         * Inserts new record in the table.
         * @param  {DataManager} dm
         * @param  {Object} data
         * @param  {number} position
         */

      }, {
        key: "insert",
        value: function insert(dm, data, tableName, query, position) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(position)) {
            return dm.dataSource.json.push(data);
          } else {
            return dm.dataSource.json.splice(position, 0, data);
          }
        }
        /**
         * Remove the data from the dataSource based on the key field value.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName?
         * @returns null
         */

      }, {
        key: "remove",
        value: function remove(dm, keyField, value, tableName) {
          var ds = dm.dataSource.json;
          var i;

          if (typeof value === 'object' && !(value instanceof Date)) {
            value = DataUtil.getObject(keyField, value);
          }

          for (i = 0; i < ds.length; i++) {
            if (DataUtil.getObject(keyField, ds[i]) === value) {
              break;
            }
          }

          return i !== ds.length ? ds.splice(i, 1) : null;
        }
        /**
         * Updates existing record and saves the changes to the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName?
         * @returns null
         */

      }, {
        key: "update",
        value: function update(dm, keyField, value, tableName) {
          var ds = dm.dataSource.json;
          var i;
          var key;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(keyField)) {
            key = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(keyField, value);
          }

          for (i = 0; i < ds.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(keyField) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(keyField, ds[i]) === key) {
              break;
            }
          }

          return i < ds.length ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(ds[i], value) : null;
        }
      }]);

      return JsonAdaptor;
    }(Adaptor);
    /**
     * URL Adaptor of DataManager can be used when you are required to use remote service to retrieve data.
     * It interacts with server-side for all DataManager Queries and CRUD operations.
     * @hidden
     */


    var UrlAdaptor = /*#__PURE__*/function (_Adaptor2) {
      _inherits(UrlAdaptor, _Adaptor2);

      var _super177 = _createSuper(UrlAdaptor);

      function UrlAdaptor() {
        _classCallCheck(this, UrlAdaptor);

        return _super177.apply(this, arguments);
      }

      _createClass2(UrlAdaptor, [{
        key: "processQuery",

        /**
         * Process the query to generate request body.
         * @param  {DataManager} dm
         * @param  {Query} query
         * @param  {Object[]} hierarchyFilters?
         * @returns p
         */
        value: function processQuery(dm, query, hierarchyFilters) {
          var queries = this.getQueryRequest(query);
          var singles = Query.filterQueryLists(query.queries, ['onSelect', 'onPage', 'onSkip', 'onTake', 'onRange']);
          var params = query.params;
          var url = dm.dataSource.url;
          var temp;
          var skip;
          var take = null;
          var options = this.options;
          var request = {
            sorts: [],
            groups: [],
            filters: [],
            searches: [],
            aggregates: []
          }; // calc Paging & Range

          if ('onPage' in singles) {
            temp = singles.onPage;
            skip = DataUtil.getValue(temp.pageIndex, query);
            take = DataUtil.getValue(temp.pageSize, query);
            skip = (skip - 1) * take;
          } else if ('onRange' in singles) {
            temp = singles.onRange;
            skip = temp.start;
            take = temp.end - temp.start;
          } // Sorting


          for (var i = 0; i < queries.sorts.length; i++) {
            temp = DataUtil.getValue(queries.sorts[i].e.fieldName, query);
            request.sorts.push(DataUtil.callAdaptorFunction(this, 'onEachSort', {
              name: temp,
              direction: queries.sorts[i].e.direction
            }, query));
          } // hierarchy


          if (hierarchyFilters) {
            temp = this.getFiltersFrom(hierarchyFilters, query);

            if (temp) {
              request.filters.push(DataUtil.callAdaptorFunction(this, 'onEachWhere', temp.toJson(), query));
            }
          } // Filters


          for (var _i58 = 0; _i58 < queries.filters.length; _i58++) {
            request.filters.push(DataUtil.callAdaptorFunction(this, 'onEachWhere', queries.filters[_i58].e.toJson(), query));

            var _keys16 = typeof request.filters[_i58] === 'object' ? Object.keys(request.filters[_i58]) : [];

            var _iterator79 = _createForOfIteratorHelper(_keys16),
                _step79;

            try {
              for (_iterator79.s(); !(_step79 = _iterator79.n()).done;) {
                var prop = _step79.value;

                if (DataUtil.isNull(request[prop])) {
                  delete request[prop];
                }
              }
            } catch (err) {
              _iterator79.e(err);
            } finally {
              _iterator79.f();
            }
          } // Searches


          for (var _i59 = 0; _i59 < queries.searches.length; _i59++) {
            temp = queries.searches[_i59].e;
            request.searches.push(DataUtil.callAdaptorFunction(this, 'onEachSearch', {
              fields: temp.fieldNames,
              operator: temp.operator,
              key: temp.searchKey,
              ignoreCase: temp.ignoreCase
            }, query));
          } // Grouping


          for (var _i60 = 0; _i60 < queries.groups.length; _i60++) {
            request.groups.push(DataUtil.getValue(queries.groups[_i60].e.fieldName, query));
          } // aggregates


          for (var _i61 = 0; _i61 < queries.aggregates.length; _i61++) {
            temp = queries.aggregates[_i61].e;
            request.aggregates.push({
              type: temp.type,
              field: DataUtil.getValue(temp.field, query)
            });
          }

          var req = {};
          this.getRequestQuery(options, query, singles, request, req); // Params

          DataUtil.callAdaptorFunction(this, 'addParams', {
            dm: dm,
            query: query,
            params: params,
            reqParams: req
          }); // cleanup

          var keys = Object.keys(req);

          for (var _i62 = 0, _keys17 = keys; _i62 < _keys17.length; _i62++) {
            var _prop = _keys17[_i62];

            if (DataUtil.isNull(req[_prop]) || req[_prop] === '' || req[_prop].length === 0) {
              delete req[_prop];
            }
          }

          if (!(options.skip in req && options.take in req) && take !== null) {
            req[options.skip] = DataUtil.callAdaptorFunction(this, 'onSkip', skip, query);
            req[options.take] = DataUtil.callAdaptorFunction(this, 'onTake', take, query);
          }

          var p = this.pvt;
          this.pvt = {};

          if (this.options.requestType === 'json') {
            return {
              data: JSON.stringify(req, DataUtil.parse.jsonDateReplacer),
              url: url,
              pvtData: p,
              type: 'POST',
              contentType: 'application/json; charset=utf-8'
            };
          }

          temp = this.convertToQueryString(req, query, dm);
          temp = (dm.dataSource.url.indexOf('?') !== -1 ? '&' : '/') + temp;
          return {
            type: 'GET',
            url: temp.length ? url.replace(/\/*$/, temp) : url,
            pvtData: p
          };
        }
      }, {
        key: "getRequestQuery",
        value: function getRequestQuery(options, query, singles, request, request1) {
          var param = 'param';
          var req = request1;
          req[options.from] = query.fromTable;

          if (options.apply && query.distincts.length) {
            req[options.apply] = 'onDistinct' in this ? DataUtil.callAdaptorFunction(this, 'onDistinct', query.distincts) : '';
          }

          if (!query.distincts.length && options.expand) {
            req[options.expand] = 'onExpand' in this && 'onSelect' in singles ? DataUtil.callAdaptorFunction(this, 'onExpand', {
              selects: DataUtil.getValue(singles.onSelect.fieldNames, query),
              expands: query.expands
            }, query) : query.expands;
          }

          req[options.select] = 'onSelect' in singles && !query.distincts.length ? DataUtil.callAdaptorFunction(this, 'onSelect', DataUtil.getValue(singles.onSelect.fieldNames, query), query) : '';
          req[options.count] = query.isCountRequired ? DataUtil.callAdaptorFunction(this, 'onCount', query.isCountRequired, query) : '';
          req[options.search] = request.searches.length ? DataUtil.callAdaptorFunction(this, 'onSearch', request.searches, query) : '';
          req[options.skip] = 'onSkip' in singles ? DataUtil.callAdaptorFunction(this, 'onSkip', DataUtil.getValue(singles.onSkip.nos, query), query) : '';
          req[options.take] = 'onTake' in singles ? DataUtil.callAdaptorFunction(this, 'onTake', DataUtil.getValue(singles.onTake.nos, query), query) : '';
          req[options.where] = request.filters.length || request.searches.length ? DataUtil.callAdaptorFunction(this, 'onWhere', request.filters, query) : '';
          req[options.sortBy] = request.sorts.length ? DataUtil.callAdaptorFunction(this, 'onSortBy', request.sorts, query) : '';
          req[options.group] = request.groups.length ? DataUtil.callAdaptorFunction(this, 'onGroup', request.groups, query) : '';
          req[options.aggregates] = request.aggregates.length ? DataUtil.callAdaptorFunction(this, 'onAggregates', request.aggregates, query) : '';
          req[param] = [];
        }
        /**
         * Convert the object from processQuery to string which can be added query string.
         * @param  {Object} req
         * @param  {Query} query
         * @param  {DataManager} dm
         */

      }, {
        key: "convertToQueryString",
        value: function convertToQueryString(request, query, dm) {
          return ''; // this needs to be overridden
        }
        /**
         * Return the data from the data manager processing.
         * @param  {DataResult} data
         * @param  {DataOptions} ds?
         * @param  {Query} query?
         * @param  {XMLHttpRequest} xhr?
         * @param  {Object} request?
         * @param  {CrudOptions} changes?
         */

      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes) {
          if (xhr && xhr.getResponseHeader('Content-Type') && xhr.getResponseHeader('Content-Type').indexOf('application/json') !== -1) {
            var handleTimeZone = DataUtil.timeZoneHandling;

            if (ds && !ds.timeZoneHandling) {
              DataUtil.timeZoneHandling = false;
            }

            data = DataUtil.parse.parseJson(data);
            DataUtil.timeZoneHandling = handleTimeZone;
          }

          var requests = request;
          var pvt = requests.pvtData || {};
          var groupDs = data ? data.groupDs : [];

          if (xhr && xhr.getResponseHeader('Content-Type') && xhr.getResponseHeader('Content-Type').indexOf('xml') !== -1) {
            return query.isCountRequired ? {
              result: [],
              count: 0
            } : [];
          }

          var d = JSON.parse(requests.data);

          if (d && d.action === 'batch' && data && data.addedRecords) {
            changes.addedRecords = data.addedRecords;
            return changes;
          }

          if (data && data.d) {
            data = data.d;
          }

          var args = {};

          if (data && 'count' in data) {
            args.count = data.count;
          }

          args.result = data && data.result ? data.result : data;
          this.getAggregateResult(pvt, data, args, groupDs, query);
          return DataUtil.isNull(args.count) ? args.result : {
            result: args.result,
            count: args.count,
            aggregates: args.aggregates
          };
        }
        /**
         * Add the group query to the adaptor`s option.
         * @param  {Object[]} e
         * @returns void
         */

      }, {
        key: "onGroup",
        value: function onGroup(e) {
          this.pvt.groups = e;
          return e;
        }
        /**
         * Add the aggregate query to the adaptor`s option.
         * @param  {Aggregates[]} e
         * @returns void
         */

      }, {
        key: "onAggregates",
        value: function onAggregates(e) {
          this.pvt.aggregates = e;
        }
        /**
         * Prepare the request body based on the newly added, removed and updated records.
         * The result is used by the batch request.
         * @param  {DataManager} dm
         * @param  {CrudOptions} changes
         * @param  {Object} e
         */

      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e, query, original) {
          var url;
          var key;
          return {
            type: 'POST',
            url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.removeUrl || dm.dataSource.url,
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              changed: changes.changedRecords,
              added: changes.addedRecords,
              deleted: changes.deletedRecords,
              action: 'batch',
              table: e[url],
              key: e[key]
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
        /**
         * Method will trigger before send the request to server side.
         * Used to set the custom header or modify the request options.
         * @param  {DataManager} dm
         * @param  {XMLHttpRequest} request
         * @returns void
         */

      }, {
        key: "beforeSend",
        value: function beforeSend(dm, request) {// need to extend this method
        }
        /**
         * Prepare and returns request body which is used to insert a new record in the table.
         * @param  {DataManager} dm
         * @param  {Object} data
         * @param  {string} tableName
         */

      }, {
        key: "insert",
        value: function insert(dm, data, tableName, query) {
          return {
            url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              value: data,
              table: tableName,
              action: 'insert'
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
        /**
         * Prepare and return request body which is used to remove record from the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {number|string} value
         * @param  {string} tableName
         */

      }, {
        key: "remove",
        value: function remove(dm, keyField, value, tableName, query) {
          return {
            type: 'POST',
            url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              key: value,
              keyColumn: keyField,
              table: tableName,
              action: 'remove'
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
        /**
         * Prepare and return request body which is used to update record.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName
         */

      }, {
        key: "update",
        value: function update(dm, keyField, value, tableName, query) {
          return {
            type: 'POST',
            url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              value: value,
              action: 'update',
              keyColumn: keyField,
              key: DataUtil.getObject(keyField, value),
              table: tableName
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
        /**
         * To generate the predicate based on the filtered query.
         * @param  {Object[]|string[]|number[]} data
         * @param  {Query} query
         * @hidden
         */

      }, {
        key: "getFiltersFrom",
        value: function getFiltersFrom(data, query) {
          var key = query.fKey;
          var value;
          var prop = key;
          var pKey = query.key;
          var predicats = [];

          if (typeof data[0] !== 'object') {
            prop = null;
          }

          for (var i = 0; i < data.length; i++) {
            if (typeof data[0] === 'object') {
              value = DataUtil.getObject(pKey || prop, data[i]);
            } else {
              value = data[i];
            }

            predicats.push(new Predicate(key, 'equal', value));
          }

          return Predicate.or(predicats);
        }
      }, {
        key: "getAggregateResult",
        value: function getAggregateResult(pvt, data, args, groupDs, query) {
          var pData = data;

          if (data && data.result) {
            pData = data.result;
          }

          if (pvt && pvt.aggregates && pvt.aggregates.length) {
            var agg = pvt.aggregates;
            var fn;
            var aggregateData = pData;
            var res = {};

            if (data.aggregate) {
              aggregateData = data.aggregate;
            }

            for (var i = 0; i < agg.length; i++) {
              fn = DataUtil.aggregates[agg[i].type];

              if (fn) {
                res[agg[i].field + ' - ' + agg[i].type] = fn(aggregateData, agg[i].field);
              }
            }

            args.aggregates = res;
          }

          if (pvt && pvt.groups && pvt.groups.length) {
            var groups = pvt.groups;

            for (var _i63 = 0; _i63 < groups.length; _i63++) {
              var level = null;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(groupDs)) {
                groupDs = DataUtil.group(groupDs, groups[_i63]);
              }

              var groupQuery = Query.filterQueries(query.queries, 'onGroup')[_i63].e;

              pData = DataUtil.group(pData, groups[_i63], pvt.aggregates, level, groupDs, groupQuery.comparer);
            }

            args.result = pData;
          }

          return args;
        }
      }, {
        key: "getQueryRequest",
        value: function getQueryRequest(query) {
          var req = {
            sorts: [],
            groups: [],
            filters: [],
            searches: [],
            aggregates: []
          };
          req.sorts = Query.filterQueries(query.queries, 'onSortBy');
          req.groups = Query.filterQueries(query.queries, 'onGroup');
          req.filters = Query.filterQueries(query.queries, 'onWhere');
          req.searches = Query.filterQueries(query.queries, 'onSearch');
          req.aggregates = Query.filterQueries(query.queries, 'onAggregates');
          return req;
        }
      }, {
        key: "addParams",
        value: function addParams(options) {
          var req = options.reqParams;

          if (options.params.length) {
            req.params = {};
          }

          var _iterator80 = _createForOfIteratorHelper(options.params),
              _step80;

          try {
            for (_iterator80.s(); !(_step80 = _iterator80.n()).done;) {
              var tmp = _step80.value;

              if (req[tmp.key]) {
                throw new Error('Query() - addParams: Custom Param is conflicting other request arguments');
              }

              req[tmp.key] = tmp.value;

              if (tmp.fn) {
                req[tmp.key] = tmp.fn.call(options.query, tmp.key, options.query, options.dm);
              }

              req.params[tmp.key] = req[tmp.key];
            }
          } catch (err) {
            _iterator80.e(err);
          } finally {
            _iterator80.f();
          }
        }
      }]);

      return UrlAdaptor;
    }(Adaptor);
    /**
     * OData Adaptor that is extended from URL Adaptor, is used for consuming data through OData Service.
     * @hidden
     */


    var ODataAdaptor = /*#__PURE__*/function (_UrlAdaptor) {
      _inherits(ODataAdaptor, _UrlAdaptor);

      var _super178 = _createSuper(ODataAdaptor);

      function ODataAdaptor(props) {
        var _this440;

        _classCallCheck(this, ODataAdaptor);

        _this440 = _super178.call(this); // options replaced the default adaptor options

        _this440.options = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, _this440.options, {
          requestType: 'get',
          accept: 'application/json;odata=light;q=1,application/json;odata=verbose;q=0.5',
          multipartAccept: 'multipart/mixed',
          sortBy: '$orderby',
          select: '$select',
          skip: '$skip',
          take: '$top',
          count: '$inlinecount',
          where: '$filter',
          expand: '$expand',
          batch: '$batch',
          changeSet: '--changeset_',
          batchPre: 'batch_',
          contentId: 'Content-Id: ',
          batchContent: 'Content-Type: multipart/mixed; boundary=',
          changeSetContent: 'Content-Type: application/http\nContent-Transfer-Encoding: binary ',
          batchChangeSetContentType: 'Content-Type: application/json; charset=utf-8 ',
          updateType: 'PUT'
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(_this440.options, props || {});
        return _this440;
      }

      _createClass2(ODataAdaptor, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'ODataAdaptor';
        }
        /**
         * Generate request string based on the filter criteria from query.
         * @param  {Predicate} pred
         * @param  {boolean} requiresCast?
         */

      }, {
        key: "onPredicate",
        value: function onPredicate(predicate, query, requiresCast) {
          var returnValue = '';
          var operator;
          var guid;
          var val = predicate.value;
          var type = typeof val;
          var field = predicate.field ? ODataAdaptor.getField(predicate.field) : null;

          if (val instanceof Date) {
            val = 'datetime\'' + DataUtil.parse.replacer(val) + '\'';
          }

          if (type === 'string') {
            val = encodeURIComponent(val);
            val = '\'' + val + '\'';

            if (requiresCast) {
              field = 'cast(' + field + ', \'Edm.String\')';
            }

            if (DataUtil.parse.isGuid(val)) {
              guid = 'guid';
            }

            if (predicate.ignoreCase) {
              if (!guid) {
                field = 'tolower(' + field + ')';
              }

              val = val.toLowerCase();
            }
          }

          operator = DataUtil.odBiOperator[predicate.operator];

          if (operator) {
            returnValue += field;
            returnValue += operator;

            if (guid) {
              returnValue += guid;
            }

            return returnValue + val;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.getModuleName) && this.getModuleName() === 'ODataV4Adaptor') {
            operator = DataUtil.odv4UniOperator[predicate.operator];
          } else {
            operator = DataUtil.odUniOperator[predicate.operator];
          }

          if (operator === 'substringof') {
            var temp = val;
            val = field;
            field = temp;
          }

          returnValue += operator + '(';
          returnValue += field + ',';

          if (guid) {
            returnValue += guid;
          }

          returnValue += val + ')';
          return returnValue;
        }
      }, {
        key: "addParams",
        value: function addParams(options) {
          _get(_getPrototypeOf(ODataAdaptor.prototype), "addParams", this).call(this, options);

          delete options.reqParams.params;
        }
        /**
         * Generate request string based on the multiple filter criteria from query.
         * @param  {Predicate} pred
         * @param  {boolean} requiresCast?
         */

      }, {
        key: "onComplexPredicate",
        value: function onComplexPredicate(predicate, query, requiresCast) {
          var res = [];

          for (var i = 0; i < predicate.predicates.length; i++) {
            res.push('(' + this.onEachWhere(predicate.predicates[i], query, requiresCast) + ')');
          }

          return res.join(' ' + predicate.condition + ' ');
        }
        /**
         * Generate query string based on the multiple filter criteria from query.
         * @param  {Predicate} filter
         * @param  {boolean} requiresCast?
         */

      }, {
        key: "onEachWhere",
        value: function onEachWhere(filter, query, requiresCast) {
          return filter.isComplex ? this.onComplexPredicate(filter, query, requiresCast) : this.onPredicate(filter, query, requiresCast);
        }
        /**
         * Generate query string based on the multiple filter criteria from query.
         * @param  {string[]} filters
         */

      }, {
        key: "onWhere",
        value: function onWhere(filters) {
          if (this.pvt.search) {
            filters.push(this.onEachWhere(this.pvt.search, null, true));
          }

          return filters.join(' and ');
        }
        /**
         * Generate query string based on the multiple search criteria from query.
         * @param  {{fields:string[]} e
         * @param  {string} operator
         * @param  {string} key
         * @param  {boolean}} ignoreCase
         */

      }, {
        key: "onEachSearch",
        value: function onEachSearch(e) {
          if (e.fields && e.fields.length === 0) {
            DataUtil.throwError('Query() - Search : oData search requires list of field names to search');
          }

          var filter = this.pvt.search || [];

          for (var i = 0; i < e.fields.length; i++) {
            filter.push(new Predicate(e.fields[i], e.operator, e.key, e.ignoreCase));
          }

          this.pvt.search = filter;
        }
        /**
         * Generate query string based on the search criteria from query.
         * @param  {Object} e
         */

      }, {
        key: "onSearch",
        value: function onSearch(e) {
          this.pvt.search = Predicate.or(this.pvt.search);
          return '';
        }
        /**
         * Generate query string based on multiple sort criteria from query.
         * @param  {QueryOptions} e
         */

      }, {
        key: "onEachSort",
        value: function onEachSort(e) {
          var res = [];

          if (e.name instanceof Array) {
            for (var i = 0; i < e.name.length; i++) {
              res.push(ODataAdaptor.getField(e.name[i]) + (e.direction === 'descending' ? ' desc' : ''));
            }
          } else {
            res.push(ODataAdaptor.getField(e.name) + (e.direction === 'descending' ? ' desc' : ''));
          }

          return res.join(',');
        }
        /**
         * Returns sort query string.
         * @param  {string[]} e
         */

      }, {
        key: "onSortBy",
        value: function onSortBy(e) {
          return e.reverse().join(',');
        }
        /**
         * Adds the group query to the adaptor option.
         * @param  {Object[]} e
         * @returns string
         */

      }, {
        key: "onGroup",
        value: function onGroup(e) {
          this.pvt.groups = e;
          return [];
        }
        /**
         * Returns the select query string.
         * @param  {string[]} e
         */

      }, {
        key: "onSelect",
        value: function onSelect(e) {
          for (var i = 0; i < e.length; i++) {
            e[i] = ODataAdaptor.getField(e[i]);
          }

          return e.join(',');
        }
        /**
         * Add the aggregate query to the adaptor option.
         * @param  {Object[]} e
         * @returns string
         */

      }, {
        key: "onAggregates",
        value: function onAggregates(e) {
          this.pvt.aggregates = e;
          return '';
        }
        /**
         * Returns the query string which requests total count from the data source.
         * @param  {boolean} e
         * @returns string
         */

      }, {
        key: "onCount",
        value: function onCount(e) {
          return e === true ? 'allpages' : '';
        }
        /**
         * Method will trigger before send the request to server side.
         * Used to set the custom header or modify the request options.
         * @param  {DataManager} dm
         * @param  {XMLHttpRequest} request
         * @param  {Ajax} settings?
         */

      }, {
        key: "beforeSend",
        value: function beforeSend(dm, request, settings) {
          if (DataUtil.endsWith(settings.url, this.options.batch) && settings.type.toLowerCase() === 'post') {
            request.setRequestHeader('Accept', this.options.multipartAccept);
            request.setRequestHeader('DataServiceVersion', '2.0');
            request.overrideMimeType('text/plain; charset=x-user-defined');
          } else {
            request.setRequestHeader('Accept', this.options.accept);
          }

          request.setRequestHeader('DataServiceVersion', '2.0');
          request.setRequestHeader('MaxDataServiceVersion', '2.0');
        }
        /**
         * Returns the data from the query processing.
         * @param  {DataResult} data
         * @param  {DataOptions} ds?
         * @param  {Query} query?
         * @param  {XMLHttpRequest} xhr?
         * @param  {Ajax} request?
         * @param  {CrudOptions} changes?
         * @returns aggregateResult
         */

      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes) {
          var metaCheck = 'odata.metadata';

          if (request && request.type === 'GET' && !this.rootUrl && data[metaCheck]) {
            var dataUrls = data[metaCheck].split('/$metadata#');
            this.rootUrl = dataUrls[0];
            this.resourceTableName = dataUrls[1];
          }

          var pvtData = 'pvtData';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data.d)) {
            var dataCopy = query && query.isCountRequired ? data.d.results : data.d;
            var metaData = '__metadata';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataCopy)) {
              for (var i = 0; i < dataCopy.length; i++) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataCopy[i][metaData])) {
                  delete dataCopy[i][metaData];
                }
              }
            }
          }

          var pvt = request && request[pvtData];
          var emptyAndBatch = this.processBatchResponse(data, query, xhr, request, changes);

          if (emptyAndBatch) {
            return emptyAndBatch;
          }

          var versionCheck = xhr && request.getResponseHeader('DataServiceVersion');
          var count = null;
          var version = versionCheck && parseInt(versionCheck, 10) || 2;

          if (query && query.isCountRequired) {
            var oDataCount = '__count';

            if (data[oDataCount] || data['odata.count']) {
              count = data[oDataCount] || data['odata.count'];
            }

            if (data.d) {
              data = data.d;
            }

            if (data[oDataCount] || data['odata.count']) {
              count = data[oDataCount] || data['odata.count'];
            }
          }

          if (version === 3 && data.value) {
            data = data.value;
          }

          if (data.d) {
            data = data.d;
          }

          if (version < 3 && data.results) {
            data = data.results;
          }

          var args = {};
          args.count = count;
          args.result = data;
          this.getAggregateResult(pvt, data, args, null, query);
          return DataUtil.isNull(count) ? args.result : {
            result: args.result,
            count: args.count,
            aggregates: args.aggregates
          };
        }
        /**
         * Converts the request object to query string.
         * @param  {Object} req
         * @param  {Query} query
         * @param  {DataManager} dm
         * @returns tableName
         */

      }, {
        key: "convertToQueryString",
        value: function convertToQueryString(request, query, dm) {
          var res = [];
          var table = 'table';
          var tableName = request[table] || '';
          var format = '$format';
          delete request[table];

          if (dm.dataSource.requiresFormat) {
            request[format] = 'json';
          }

          var keys = Object.keys(request);

          for (var _i64 = 0, _keys18 = keys; _i64 < _keys18.length; _i64++) {
            var prop = _keys18[_i64];
            res.push(prop + '=' + request[prop]);
          }

          res = res.join('&');

          if (dm.dataSource.url && dm.dataSource.url.indexOf('?') !== -1 && !tableName) {
            return res;
          }

          return res.length ? tableName + '?' + res : tableName || '';
        }
      }, {
        key: "localTimeReplacer",
        value: function localTimeReplacer(key, convertObj) {
          var _iterator81 = _createForOfIteratorHelper(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(convertObj) ? Object.keys(convertObj) : []),
              _step81;

          try {
            for (_iterator81.s(); !(_step81 = _iterator81.n()).done;) {
              var prop = _step81.value;

              if (convertObj[prop] instanceof Date) {
                convertObj[prop] = DataUtil.dateParse.toLocalTime(convertObj[prop]);
              }
            }
          } catch (err) {
            _iterator81.e(err);
          } finally {
            _iterator81.f();
          }

          return convertObj;
        }
        /**
         * Prepare and returns request body which is used to insert a new record in the table.
         * @param  {DataManager} dm
         * @param  {Object} data
         * @param  {string} tableName?
         */

      }, {
        key: "insert",
        value: function insert(dm, data, tableName) {
          return {
            url: (dm.dataSource.insertUrl || dm.dataSource.url).replace(/\/*$/, tableName ? '/' + tableName : ''),
            data: JSON.stringify(data, this.options.localTime ? this.localTimeReplacer : null)
          };
        }
        /**
         * Prepare and return request body which is used to remove record from the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {number} value
         * @param  {string} tableName?
         */

      }, {
        key: "remove",
        value: function remove(dm, keyField, value, tableName) {
          var url;

          if (typeof value === 'string' && !DataUtil.parse.isGuid(value)) {
            url = "('".concat(value, "')");
          } else {
            url = "(".concat(value, ")");
          }

          return {
            type: 'DELETE',
            url: (dm.dataSource.removeUrl || dm.dataSource.url).replace(/\/*$/, tableName ? '/' + tableName : '') + url
          };
        }
        /**
         * Updates existing record and saves the changes to the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName?
         * @returns this
         */

      }, {
        key: "update",
        value: function update(dm, keyField, value, tableName, query, original) {
          if (this.options.updateType === 'PATCH' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(original)) {
            value = this.compareAndRemove(value, original, keyField);
          }

          var url;

          if (typeof value[keyField] === 'string' && !DataUtil.parse.isGuid(value[keyField])) {
            url = "('".concat(value[keyField], "')");
          } else {
            url = "(".concat(value[keyField], ")");
          }

          return {
            type: this.options.updateType,
            url: (dm.dataSource.updateUrl || dm.dataSource.url).replace(/\/*$/, tableName ? '/' + tableName : '') + url,
            data: JSON.stringify(value, this.options.localTime ? this.localTimeReplacer : null),
            accept: this.options.accept
          };
        }
        /**
         * Prepare the request body based on the newly added, removed and updated records.
         * The result is used by the batch request.
         * @param  {DataManager} dm
         * @param  {CrudOptions} changes
         * @param  {RemoteArgs} e
         * @returns {Object}
         */

      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e, query, original) {
          var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);
          var url = this.rootUrl ? this.rootUrl + '/' + this.options.batch : dm.dataSource.url.replace(/\/*$/, '/' + this.options.batch);
          e.url = this.resourceTableName ? this.resourceTableName : e.url;
          var args = {
            url: e.url,
            key: e.key,
            cid: 1,
            cSet: DataUtil.getGuid(this.options.changeSet)
          };
          var req = '--' + initialGuid + '\n';
          req += 'Content-Type: multipart/mixed; boundary=' + args.cSet.replace('--', '') + '\n';
          this.pvt.changeSet = 0;
          req += this.generateInsertRequest(changes.addedRecords, args, dm);
          req += this.generateUpdateRequest(changes.changedRecords, args, dm, original ? original.changedRecords : []);
          req += this.generateDeleteRequest(changes.deletedRecords, args, dm);
          req += args.cSet + '--\n';
          req += '--' + initialGuid + '--';
          return {
            type: 'POST',
            url: url,
            dataType: 'json',
            contentType: 'multipart/mixed; charset=UTF-8;boundary=' + initialGuid,
            data: req
          };
        }
        /**
         * Generate the string content from the removed records.
         * The result will be send during batch update.
         * @param  {Object[]} arr
         * @param  {RemoteArgs} e
         * @returns this
         */

      }, {
        key: "generateDeleteRequest",
        value: function generateDeleteRequest(arr, e, dm) {
          if (!arr) {
            return '';
          }

          var req = '';
          var stat = {
            'method': 'DELETE ',
            'url': function url(data, i, key) {
              var url = DataUtil.getObject(key, data[i]);

              if (typeof url === 'number' || DataUtil.parse.isGuid(url)) {
                return '(' + url + ')';
              } else if (url instanceof Date) {
                var dateTime = data[i][key];
                return '(' + dateTime.toJSON() + ')';
              } else {
                return "('".concat(url, "')");
              }
            },
            'data': function data(_data3, i) {
              return '';
            }
          };
          req = this.generateBodyContent(arr, e, stat, dm);
          return req + '\n';
        }
        /**
         * Generate the string content from the inserted records.
         * The result will be send during batch update.
         * @param  {Object[]} arr
         * @param  {RemoteArgs} e
         */

      }, {
        key: "generateInsertRequest",
        value: function generateInsertRequest(arr, e, dm) {
          if (!arr) {
            return '';
          }

          var req = '';
          var stat = {
            'method': 'POST ',
            'url': function url(data, i, key) {
              return '';
            },
            'data': function data(_data4, i) {
              return JSON.stringify(_data4[i]) + '\n\n';
            }
          };
          req = this.generateBodyContent(arr, e, stat, dm);
          return req;
        }
        /**
         * Generate the string content from the updated records.
         * The result will be send during batch update.
         * @param  {Object[]} arr
         * @param  {RemoteArgs} e
         */

      }, {
        key: "generateUpdateRequest",
        value: function generateUpdateRequest(arr, e, dm, org) {
          var _this441 = this;

          if (!arr) {
            return '';
          }

          var req = '';
          arr.forEach(function (change) {
            return change = _this441.compareAndRemove(change, org.filter(function (o) {
              return DataUtil.getObject(e.key, o) === DataUtil.getObject(e.key, change);
            })[0], e.key);
          });
          var stat = {
            'method': this.options.updateType + ' ',
            'url': function url(data, i, key) {
              if (typeof data[i][key] === 'number' || DataUtil.parse.isGuid(data[i][key])) {
                return '(' + data[i][key] + ')';
              } else if (data[i][key] instanceof Date) {
                var date = data[i][key];
                return '(' + date.toJSON() + ')';
              } else {
                return "('".concat(data[i][key], "')");
              }
            },
            'data': function data(_data5, i) {
              return JSON.stringify(_data5[i]) + '\n\n';
            }
          };
          req = this.generateBodyContent(arr, e, stat, dm);
          return req;
        }
      }, {
        key: "generateBodyContent",
        value: function generateBodyContent(arr, e, stat, dm) {
          var req = '';

          for (var i = 0; i < arr.length; i++) {
            req += '\n' + e.cSet + '\n';
            req += this.options.changeSetContent + '\n\n';
            req += stat.method;

            if (stat.method === 'POST ') {
              req += (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\n';
            } else if (stat.method === 'PUT ' || stat.method === 'PATCH ') {
              req += (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\n';
            } else if (stat.method === 'DELETE ') {
              req += (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + stat.url(arr, i, e.key) + ' HTTP/1.1\n';
            }

            req += 'Accept: ' + this.options.accept + '\n';
            req += 'Content-Id: ' + this.pvt.changeSet++ + '\n';
            req += this.options.batchChangeSetContentType + '\n';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(arr[i]['@odata.etag'])) {
              req += 'If-Match: ' + arr[i]['@odata.etag'] + '\n\n';
              delete arr[i]['@odata.etag'];
            } else {
              req += '\n';
            }

            req += stat.data(arr, i);
          }

          return req;
        }
      }, {
        key: "processBatchResponse",
        value: function processBatchResponse(data, query, xhr, request, changes) {
          if (xhr && xhr.getResponseHeader('Content-Type') && xhr.getResponseHeader('Content-Type').indexOf('xml') !== -1) {
            return query.isCountRequired ? {
              result: [],
              count: 0
            } : [];
          }

          if (request && this.options.batch && DataUtil.endsWith(request.url, this.options.batch) && request.type.toLowerCase() === 'post') {
            var guid = xhr.getResponseHeader('Content-Type');
            var cIdx;
            var jsonObj;
            var d = data + '';
            guid = guid.substring(guid.indexOf('=batchresponse') + 1);
            d = d.split(guid);

            if (d.length < 2) {
              return {};
            }

            d = d[1];
            var exVal = /(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(d);

            if (exVal) {
              d.replace(exVal[0], '');
            }

            var changeGuid = exVal ? exVal[1] : '';
            d = d.split(changeGuid);

            for (var i = d.length; i > -1; i--) {
              if (!/\bContent-ID:/i.test(d[i]) || !/\bHTTP.+201/.test(d[i])) {
                continue;
              }

              cIdx = parseInt(/\bContent-ID: (\d+)/i.exec(d[i])[1], 10);

              if (changes.addedRecords[cIdx]) {
                jsonObj = DataUtil.parse.parseJson(/^\{.+\}/m.exec(d[i])[0]);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, changes.addedRecords[cIdx], this.processResponse(jsonObj));
              }
            }

            return changes;
          }

          return null;
        }
      }, {
        key: "compareAndRemove",
        value: function compareAndRemove(data, original, key) {
          var _this442 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(original)) {
            return data;
          }

          Object.keys(data).forEach(function (prop) {
            if (prop !== key && prop !== '@odata.etag') {
              if (DataUtil.isPlainObject(data[prop])) {
                _this442.compareAndRemove(data[prop], original[prop]);

                var _final = Object.keys(data[prop]).filter(function (data) {
                  return data !== '@odata.etag';
                });

                if (_final.length === 0) {
                  delete data[prop];
                }
              } else if (data[prop] === original[prop]) {
                delete data[prop];
              } else if (data[prop] && original[prop] && data[prop].valueOf() === original[prop].valueOf()) {
                delete data[prop];
              }
            }
          });
          return data;
        }
      }], [{
        key: "getField",
        value: function getField(prop) {
          return prop.replace(/\./g, '/');
        }
      }]);

      return ODataAdaptor;
    }(UrlAdaptor);
    /**
     * The OData v4 is an improved version of OData protocols.
     * The DataManager uses the ODataV4Adaptor to consume OData v4 services.
     * @hidden
     */


    var ODataV4Adaptor = /*#__PURE__*/function (_ODataAdaptor) {
      _inherits(ODataV4Adaptor, _ODataAdaptor);

      var _super179 = _createSuper(ODataV4Adaptor);

      function ODataV4Adaptor(props) {
        var _this443;

        _classCallCheck(this, ODataV4Adaptor);

        _this443 = _super179.call(this, props); // options replaced the default adaptor options

        _this443.options = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, _this443.options, {
          requestType: 'get',
          accept: 'application/json, text/javascript, */*; q=0.01',
          multipartAccept: 'multipart/mixed',
          sortBy: '$orderby',
          select: '$select',
          skip: '$skip',
          take: '$top',
          count: '$count',
          search: '$search',
          where: '$filter',
          expand: '$expand',
          batch: '$batch',
          changeSet: '--changeset_',
          batchPre: 'batch_',
          contentId: 'Content-Id: ',
          batchContent: 'Content-Type: multipart/mixed; boundary=',
          changeSetContent: 'Content-Type: application/http\nContent-Transfer-Encoding: binary ',
          batchChangeSetContentType: 'Content-Type: application/json; charset=utf-8 ',
          updateType: 'PATCH',
          localTime: false,
          apply: '$apply'
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(_this443.options, props || {});
        return _this443;
      }
      /**
       * @hidden
       */


      _createClass2(ODataV4Adaptor, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'ODataV4Adaptor';
        }
        /**
         * Returns the query string which requests total count from the data source.
         * @param  {boolean} e
         * @returns string
         */

      }, {
        key: "onCount",
        value: function onCount(e) {
          return e === true ? 'true' : '';
        }
        /**
         * Generate request string based on the filter criteria from query.
         * @param  {Predicate} pred
         * @param  {boolean} requiresCast?
         */

      }, {
        key: "onPredicate",
        value: function onPredicate(predicate, query, requiresCast) {
          var returnValue = '';
          var val = predicate.value;
          var isDate = val instanceof Date;

          if (query instanceof Query) {
            var queries = this.getQueryRequest(query);

            for (var i = 0; i < queries.filters.length; i++) {
              if (queries.filters[i].e.key === predicate.value) {
                requiresCast = true;
              }
            }
          }

          returnValue = _get(_getPrototypeOf(ODataV4Adaptor.prototype), "onPredicate", this).call(this, predicate, query, requiresCast);

          if (isDate) {
            returnValue = returnValue.replace(/datetime'(.*)'$/, '$1');
          }

          if (DataUtil.parse.isGuid(val)) {
            returnValue = returnValue.replace('guid', '').replace(/'/g, '');
          }

          return returnValue;
        }
        /**
         *  Generate query string based on the multiple search criteria from query.
         * @param  {{fields:string[]} e
         * @param  {string} operator
         * @param  {string} key
         * @param  {boolean}} ignoreCase
         */

      }, {
        key: "onEachSearch",
        value: function onEachSearch(e) {
          var search = this.pvt.searches || [];
          search.push(e.key);
          this.pvt.searches = search;
        }
        /**
         *  Generate query string based on the search criteria from query.
         * @param  {Object} e
         */

      }, {
        key: "onSearch",
        value: function onSearch(e) {
          return this.pvt.searches.join(' OR ');
        }
        /**
         * Returns the expand query string.
         * @param  {string} e
         */

      }, {
        key: "onExpand",
        value: function onExpand(e) {
          var _this444 = this;

          var selected = {};
          var expanded = {};
          var expands = e.expands.slice();
          var exArr = [];
          var selects = e.selects.filter(function (item) {
            return item.indexOf('.') > -1;
          });
          selects.forEach(function (select) {
            var splits = select.split('.');

            if (!(splits[0] in selected)) {
              selected[splits[0]] = [];
            }

            selected[splits[0]].push(splits[1]);
          }); //Auto expand from select query

          Object.keys(selected).forEach(function (expand) {
            if (expands.indexOf(expand) === -1) {
              expands.push(expand);
            }
          });
          expands.forEach(function (expand) {
            expanded[expand] = expand in selected ? "".concat(expand, "(").concat(_this444.options.select, "=").concat(selected[expand].join(','), ")") : expand;
          });
          Object.keys(expanded).forEach(function (ex) {
            return exArr.push(expanded[ex]);
          });
          return exArr.join(',');
        }
        /**
         * Returns the groupby query string.
         * @param  {string} e
         */

      }, {
        key: "onDistinct",
        value: function onDistinct(distinctFields) {
          var fields = distinctFields.map(function (field) {
            return ODataAdaptor.getField(field);
          }).join(',');
          return "groupby((".concat(fields, "))");
        }
        /**
         * Returns the select query string.
         * @param  {string[]} e
         */

      }, {
        key: "onSelect",
        value: function onSelect(e) {
          return _get(_getPrototypeOf(ODataV4Adaptor.prototype), "onSelect", this).call(this, e.filter(function (item) {
            return item.indexOf('.') === -1;
          }));
        }
        /**
         * Method will trigger before send the request to server side.
         * Used to set the custom header or modify the request options.
         * @param  {DataManager} dm
         * @param  {XMLHttpRequest} request
         * @param  {Ajax} settings
         * @returns void
         */

      }, {
        key: "beforeSend",
        value: function beforeSend(dm, request, settings) {
          if (settings.type === 'POST' || settings.type === 'PUT' || settings.type === 'PATCH') {
            request.setRequestHeader('Prefer', 'return=representation');
          }

          request.setRequestHeader('Accept', this.options.accept);
        }
        /**
         * Returns the data from the query processing.
         * @param  {DataResult} data
         * @param  {DataOptions} ds?
         * @param  {Query} query?
         * @param  {XMLHttpRequest} xhr?
         * @param  {Ajax} request?
         * @param  {CrudOptions} changes?
         * @returns aggregateResult
         */

      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes) {
          var metaName = '@odata.context';

          if (request && request.type === 'GET' && !this.rootUrl && data[metaName]) {
            var dataUrl = data[metaName].split('/$metadata#');
            this.rootUrl = dataUrl[0];
            this.resourceTableName = dataUrl[1];
          }

          var pvtData = 'pvtData';
          var pvt = request && request[pvtData];

          var emptyAndBatch = _get(_getPrototypeOf(ODataV4Adaptor.prototype), "processBatchResponse", this).call(this, data, query, xhr, request, changes);

          if (emptyAndBatch) {
            return emptyAndBatch;
          }

          var count = null;
          var dataCount = '@odata.count';

          if (query && query.isCountRequired) {
            if (dataCount in data) {
              count = data[dataCount];
            }
          }

          data = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data.value) ? data.value : data;
          var args = {};
          args.count = count;
          args.result = data;
          this.getAggregateResult(pvt, data, args, null, query);
          return DataUtil.isNull(count) ? args.result : {
            result: args.result,
            count: count,
            aggregates: args.aggregates
          };
        }
      }]);

      return ODataV4Adaptor;
    }(ODataAdaptor);
    /**
     * The Web API is a programmatic interface to define the request and response messages system that is mostly exposed in JSON or XML.
     * The DataManager uses the WebApiAdaptor to consume Web API.
     * Since this adaptor is targeted to interact with Web API created using OData endpoint, it is extended from ODataAdaptor
     * @hidden
     */


    var WebApiAdaptor = /*#__PURE__*/function (_ODataAdaptor2) {
      _inherits(WebApiAdaptor, _ODataAdaptor2);

      var _super180 = _createSuper(WebApiAdaptor);

      function WebApiAdaptor() {
        _classCallCheck(this, WebApiAdaptor);

        return _super180.apply(this, arguments);
      }

      _createClass2(WebApiAdaptor, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'WebApiAdaptor';
        }
        /**
         * Prepare and returns request body which is used to insert a new record in the table.
         * @param  {DataManager} dm
         * @param  {Object} data
         * @param  {string} tableName?
         */

      }, {
        key: "insert",
        value: function insert(dm, data, tableName) {
          return {
            type: 'POST',
            url: dm.dataSource.url,
            data: JSON.stringify(data)
          };
        }
        /**
         * Prepare and return request body which is used to remove record from the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {number} value
         * @param  {string} tableName?
         */

      }, {
        key: "remove",
        value: function remove(dm, keyField, value, tableName) {
          return {
            type: 'DELETE',
            url: dm.dataSource.url + '/' + value,
            data: JSON.stringify(value)
          };
        }
        /**
         * Prepare and return request body which is used to update record.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName?
         */

      }, {
        key: "update",
        value: function update(dm, keyField, value, tableName) {
          return {
            type: 'PUT',
            url: dm.dataSource.url,
            data: JSON.stringify(value)
          };
        }
      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e) {
          var _this445 = this;

          var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre);
          var url = dm.dataSource.url.replace(/\/*$/, '/' + this.options.batch);
          e.url = this.resourceTableName ? this.resourceTableName : e.url;
          var req = []; //insertion

          var _loop14 = function _loop14(i, x) {
            changes.addedRecords.forEach(function (j, d) {
              var stat = {
                'method': 'POST ',
                'url': function url(data, i, key) {
                  return '';
                },
                'data': function data(_data6, i) {
                  return JSON.stringify(_data6[i]) + '\n\n';
                }
              };
              req.push('--' + initialGuid);
              req.push('Content-Type: application/http; msgtype=request', '');
              req.push('POST ' + '/api/' + (dm.dataSource.insertUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.addedRecords, i, e.key) + ' HTTP/1.1');
              req.push('Content-Type: ' + 'application/json; charset=utf-8');
              req.push('Host: ' + location.host);
              req.push('', j ? JSON.stringify(j) : '');
            });
          };

          for (var i = 0, x = changes.addedRecords.length; i < x; i++) {
            _loop14(i, x);
          } //updation 


          var _loop15 = function _loop15(_i65, _x2) {
            changes.changedRecords.forEach(function (j, d) {
              var stat = {
                'method': _this445.options.updateType + ' ',
                'url': function url(data, i, key) {
                  return '';
                },
                'data': function data(_data7, i) {
                  return JSON.stringify(_data7[i]) + '\n\n';
                }
              };
              req.push('--' + initialGuid);
              req.push('Content-Type: application/http; msgtype=request', '');
              req.push('PUT ' + '/api/' + (dm.dataSource.updateUrl || dm.dataSource.crudUrl || e.url) + stat.url(changes.changedRecords, _i65, e.key) + ' HTTP/1.1');
              req.push('Content-Type: ' + 'application/json; charset=utf-8');
              req.push('Host: ' + location.host);
              req.push('', j ? JSON.stringify(j) : '');
            });
          };

          for (var _i65 = 0, _x2 = changes.changedRecords.length; _i65 < _x2; _i65++) {
            _loop15(_i65, _x2);
          } //deletion


          var _loop16 = function _loop16(_i66, _x3) {
            changes.deletedRecords.forEach(function (j, d) {
              var state = {
                'mtd': 'DELETE ',
                'url': function url(data, i, key) {
                  var url = DataUtil.getObject(key, data[i]);

                  if (typeof url === 'number' || DataUtil.parse.isGuid(url)) {
                    return '/' + url;
                  } else if (url instanceof Date) {
                    var datTime = data[i][key];
                    return '/' + datTime.toJSON();
                  } else {
                    return "/'".concat(url, "'");
                  }
                },
                'data': function data(_data8, i) {
                  return '';
                }
              };
              req.push('--' + initialGuid);
              req.push('Content-Type: application/http; msgtype=request', '');
              req.push('DELETE ' + '/api/' + (dm.dataSource.removeUrl || dm.dataSource.crudUrl || e.url) + state.url(changes.deletedRecords, _i66, e.key) + ' HTTP/1.1');
              req.push('Content-Type: ' + 'application/json; charset=utf-8');
              req.push('Host: ' + location.host);
              req.push('', j ? JSON.stringify(j) : '');
            });
          };

          for (var _i66 = 0, _x3 = changes.deletedRecords.length; _i66 < _x3; _i66++) {
            _loop16(_i66, _x3);
          }

          req.push('--' + initialGuid + '--', '');
          return {
            type: 'POST',
            url: url,
            contentType: 'multipart/mixed; boundary=' + initialGuid,
            data: req.join('\r\n')
          };
        }
        /**
         * Method will trigger before send the request to server side.
         * Used to set the custom header or modify the request options.
         * @param  {DataManager} dm
         * @param  {XMLHttpRequest} request
         * @param  {Ajax} settings
         * @returns void
         */

      }, {
        key: "beforeSend",
        value: function beforeSend(dm, request, settings) {
          request.setRequestHeader('Accept', 'application/json, text/javascript, */*; q=0.01');
        }
        /**
         * Returns the data from the query processing.
         * @param  {DataResult} data
         * @param  {DataOptions} ds?
         * @param  {Query} query?
         * @param  {XMLHttpRequest} xhr?
         * @param  {Ajax} request?
         * @param  {CrudOptions} changes?
         * @returns aggregateResult
         */

      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes) {
          var pvtData = 'pvtData';
          var pvt = request && request[pvtData];
          var count = null;
          var args = {};

          if (request && request.type.toLowerCase() !== 'post') {
            var versionCheck = xhr && request.getResponseHeader('DataServiceVersion');
            var version = versionCheck && parseInt(versionCheck, 10) || 2;

            if (query && query.isCountRequired) {
              if (!DataUtil.isNull(data.Count)) {
                count = data.Count;
              }
            }

            if (version < 3 && data.Items) {
              data = data.Items;
            }

            args.count = count;
            args.result = data;
            this.getAggregateResult(pvt, data, args, null, query);
          }

          args.result = args.result || data;
          return DataUtil.isNull(count) ? args.result : {
            result: args.result,
            count: args.count,
            aggregates: args.aggregates
          };
        }
      }]);

      return WebApiAdaptor;
    }(ODataAdaptor);
    /**
     * WebMethodAdaptor can be used by DataManager to interact with web method.
     * @hidden
     */


    var WebMethodAdaptor = /*#__PURE__*/function (_UrlAdaptor2) {
      _inherits(WebMethodAdaptor, _UrlAdaptor2);

      var _super181 = _createSuper(WebMethodAdaptor);

      function WebMethodAdaptor() {
        _classCallCheck(this, WebMethodAdaptor);

        return _super181.apply(this, arguments);
      }

      _createClass2(WebMethodAdaptor, [{
        key: "processQuery",

        /**
         * Prepare the request body based on the query.
         * The query information can be accessed at the WebMethod using variable named `value`.
         * @param  {DataManager} dm
         * @param  {Query} query
         * @param  {Object[]} hierarchyFilters?
         * @returns application
         */
        value: function processQuery(dm, query, hierarchyFilters) {
          var obj = new UrlAdaptor().processQuery(dm, query, hierarchyFilters);
          var getData = 'data';
          var data = DataUtil.parse.parseJson(obj[getData]);
          var result = {};
          var value = 'value';

          if (data.param) {
            for (var i = 0; i < data.param.length; i++) {
              var param = data.param[i];
              var key = Object.keys(param)[0];
              result[key] = param[key];
            }
          }

          result[value] = data;
          var pvtData = 'pvtData';
          var url = 'url';
          return {
            data: JSON.stringify(result),
            url: obj[url],
            pvtData: obj[pvtData],
            type: 'POST',
            contentType: 'application/json; charset=utf-8'
          };
        }
      }]);

      return WebMethodAdaptor;
    }(UrlAdaptor);
    /**
     * RemoteSaveAdaptor, extended from JsonAdaptor and it is used for binding local data and performs all DataManager queries in client-side.
     * It interacts with server-side only for CRUD operations.
     * @hidden
     */


    var RemoteSaveAdaptor = /*#__PURE__*/function (_JsonAdaptor) {
      _inherits(RemoteSaveAdaptor, _JsonAdaptor);

      var _super182 = _createSuper(RemoteSaveAdaptor);

      /**
       * @hidden
       */
      function RemoteSaveAdaptor() {
        var _this446;

        _classCallCheck(this, RemoteSaveAdaptor);

        _this446 = _super182.call(this);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('beforeSend', UrlAdaptor.prototype.beforeSend, _assertThisInitialized(_this446));
        return _this446;
      }

      _createClass2(RemoteSaveAdaptor, [{
        key: "insert",
        value: function insert(dm, data, tableName, query, position) {
          this.pvt.position = position;
          this.updateType = 'add';
          return {
            url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              value: data,
              table: tableName,
              action: 'insert'
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
      }, {
        key: "remove",
        value: function remove(dm, keyField, val, tableName, query) {
          _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "remove", this).call(this, dm, keyField, val);

          return {
            type: 'POST',
            url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              key: val,
              keyColumn: keyField,
              table: tableName,
              action: 'remove'
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
      }, {
        key: "update",
        value: function update(dm, keyField, val, tableName, query) {
          this.updateType = 'update';
          this.updateKey = keyField;
          return {
            type: 'POST',
            url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              value: val,
              action: 'update',
              keyColumn: keyField,
              key: val[keyField],
              table: tableName
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes, e) {
          var i;

          if (this.updateType === 'add') {
            _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "insert", this).call(this, ds, data, null, null, this.pvt.position);
          }

          if (this.updateType === 'update') {
            _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "update", this).call(this, ds, this.updateKey, data);
          }

          this.updateType = undefined;

          if (data.added) {
            for (i = 0; i < data.added.length; i++) {
              _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "insert", this).call(this, ds, data.added[i]);
            }
          }

          if (data.changed) {
            for (i = 0; i < data.changed.length; i++) {
              _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "update", this).call(this, ds, e.key, data.changed[i]);
            }
          }

          if (data.deleted) {
            for (i = 0; i < data.deleted.length; i++) {
              _get(_getPrototypeOf(RemoteSaveAdaptor.prototype), "remove", this).call(this, ds, e.key, data.deleted[i]);
            }
          }

          return data;
        }
        /**
         * Prepare the request body based on the newly added, removed and updated records.
         * Also perform the changes in the locally cached data to sync with the remote data.
         * The result is used by the batch request.
         * @param  {DataManager} dm
         * @param  {CrudOptions} changes
         * @param  {RemoteArgs} e
         */

      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e, query, original) {
          return {
            type: 'POST',
            url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,
            contentType: 'application/json; charset=utf-8',
            dataType: 'json',
            data: JSON.stringify(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
              changed: changes.changedRecords,
              added: changes.addedRecords,
              deleted: changes.deletedRecords,
              action: 'batch',
              table: e.url,
              key: e.key
            }, DataUtil.getAddParams(this, dm, query)))
          };
        }
      }, {
        key: "addParams",
        value: function addParams(options) {
          var urlParams = new UrlAdaptor();
          urlParams.addParams(options);
        }
      }]);

      return RemoteSaveAdaptor;
    }(JsonAdaptor);
    /**
     * Cache Adaptor is used to cache the data of the visited pages. It prevents new requests for the previously visited pages.
     * You can configure cache page size and duration of caching by using cachingPageSize and timeTillExpiration properties of the DataManager
     * @hidden
     */


    var CacheAdaptor = /*#__PURE__*/function (_UrlAdaptor3) {
      _inherits(CacheAdaptor, _UrlAdaptor3);

      var _super183 = _createSuper(CacheAdaptor);

      /**
       * Constructor for CacheAdaptor class.
       * @param  {CacheAdaptor} adaptor?
       * @param  {number} timeStamp?
       * @param  {number} pageSize?
       * @hidden
       */
      function CacheAdaptor(adaptor, timeStamp, pageSize) {
        var _this447;

        _classCallCheck(this, CacheAdaptor);

        _this447 = _super183.call(this);
        _this447.isCrudAction = false;
        _this447.isInsertAction = false;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(adaptor)) {
          _this447.cacheAdaptor = adaptor;
        }

        _this447.pageSize = pageSize;
        _this447.guidId = DataUtil.getGuid('cacheAdaptor');
        var obj = {
          keys: [],
          results: []
        };
        window.localStorage.setItem(_this447.guidId, JSON.stringify(obj));
        var guid = _this447.guidId;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(timeStamp)) {
          setInterval(function () {
            var data;
            data = DataUtil.parse.parseJson(window.localStorage.getItem(guid));
            var forDel = [];

            for (var i = 0; i < data.results.length; i++) {
              var currentTime = +new Date();
              var requestTime = +new Date(data.results[i].timeStamp);
              data.results[i].timeStamp = currentTime - requestTime;

              if (currentTime - requestTime > timeStamp) {
                forDel.push(i);
              }
            }

            for (var _i67 = 0; _i67 < forDel.length; _i67++) {
              data.results.splice(forDel[_i67], 1);
              data.keys.splice(forDel[_i67], 1);
            }

            window.localStorage.removeItem(guid);
            window.localStorage.setItem(guid, JSON.stringify(data));
          }, timeStamp);
        }

        return _this447;
      }
      /**
       * It will generate the key based on the URL when we send a request to server.
       * @param  {string} url
       * @param  {Query} query?
       * @hidden
       */


      _createClass2(CacheAdaptor, [{
        key: "generateKey",
        value: function generateKey(url, query) {
          var queries = this.getQueryRequest(query);
          var singles = Query.filterQueryLists(query.queries, ['onSelect', 'onPage', 'onSkip', 'onTake', 'onRange']);
          var key = url;
          var page = 'onPage';

          if (page in singles) {
            key += singles[page].pageIndex;
          }

          queries.sorts.forEach(function (obj) {
            key += obj.e.direction + obj.e.fieldName;
          });
          queries.groups.forEach(function (obj) {
            key += obj.e.fieldName;
          });
          queries.searches.forEach(function (obj) {
            key += obj.e.searchKey;
          });

          for (var filter = 0; filter < queries.filters.length; filter++) {
            var currentFilter = queries.filters[filter];

            if (currentFilter.e.isComplex) {
              var newQuery = query.clone();
              newQuery.queries = [];

              for (var i = 0; i < currentFilter.e.predicates.length; i++) {
                newQuery.queries.push({
                  fn: 'onWhere',
                  e: currentFilter.e.predicates[i],
                  filter: query.queries.filter
                });
              }

              key += currentFilter.e.condition + this.generateKey(url, newQuery);
            } else {
              key += currentFilter.e.field + currentFilter.e.operator + currentFilter.e.value;
            }
          }

          return key;
        }
        /**
         * Process the query to generate request body.
         * If the data is already cached, it will return the cached data.
         * @param  {DataManager} dm
         * @param  {Query} query?
         * @param  {Object[]} hierarchyFilters?
         */

      }, {
        key: "processQuery",
        value: function processQuery(dm, query, hierarchyFilters) {
          var key = this.generateKey(dm.dataSource.url, query);
          var cachedItems;
          cachedItems = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));
          var data = cachedItems ? cachedItems.results[cachedItems.keys.indexOf(key)] : null;

          if (data != null && !this.isCrudAction && !this.isInsertAction) {
            return data;
          }

          this.isCrudAction = null;
          this.isInsertAction = null;
          return this.cacheAdaptor.processQuery.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
        }
        /**
         * Returns the data from the query processing.
         * It will also cache the data for later usage.
         * @param  {DataResult} data
         * @param  {DataManager} ds?
         * @param  {Query} query?
         * @param  {XMLHttpRequest} xhr?
         * @param  {Ajax} request?
         * @param  {CrudOptions} changes?
         */

      }, {
        key: "processResponse",
        value: function processResponse(data, ds, query, xhr, request, changes) {
          if (this.isInsertAction || request && this.cacheAdaptor.options.batch && DataUtil.endsWith(request.url, this.cacheAdaptor.options.batch) && request.type.toLowerCase() === 'post') {
            return this.cacheAdaptor.processResponse(data, ds, query, xhr, request, changes);
          }

          data = this.cacheAdaptor.processResponse.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
          var key = query ? this.generateKey(ds.dataSource.url, query) : ds.dataSource.url;
          var obj = {};
          obj = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId));
          var index = obj.keys.indexOf(key);

          if (index !== -1) {
            obj.results.splice(index, 1);
            obj.keys.splice(index, 1);
          }

          obj.results[obj.keys.push(key) - 1] = {
            keys: key,
            result: data.result,
            timeStamp: new Date(),
            count: data.count
          };

          while (obj.results.length > this.pageSize) {
            obj.results.splice(0, 1);
            obj.keys.splice(0, 1);
          }

          window.localStorage.setItem(this.guidId, JSON.stringify(obj));
          return data;
        }
        /**
         * Method will trigger before send the request to server side. Used to set the custom header or modify the request options.
         * @param  {DataManager} dm
         * @param  {XMLHttpRequest} request
         * @param  {Ajax} settings?
         */

      }, {
        key: "beforeSend",
        value: function beforeSend(dm, request, settings) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cacheAdaptor.options.batch) && DataUtil.endsWith(settings.url, this.cacheAdaptor.options.batch) && settings.type.toLowerCase() === 'post') {
            request.setRequestHeader('Accept', this.cacheAdaptor.options.multipartAccept);
          }

          if (!dm.dataSource.crossDomain) {
            request.setRequestHeader('Accept', this.cacheAdaptor.options.accept);
          }
        }
        /**
         * Updates existing record and saves the changes to the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName
         */

      }, {
        key: "update",
        value: function update(dm, keyField, value, tableName) {
          this.isCrudAction = true;
          return this.cacheAdaptor.update(dm, keyField, value, tableName);
        }
        /**
         * Prepare and returns request body which is used to insert a new record in the table.
         * @param  {DataManager} dm
         * @param  {Object} data
         * @param  {string} tableName?
         */

      }, {
        key: "insert",
        value: function insert(dm, data, tableName) {
          this.isInsertAction = true;
          return this.cacheAdaptor.insert(dm, data, tableName);
        }
        /**
         * Prepare and return request body which is used to remove record from the table.
         * @param  {DataManager} dm
         * @param  {string} keyField
         * @param  {Object} value
         * @param  {string} tableName?
         */

      }, {
        key: "remove",
        value: function remove(dm, keyField, value, tableName) {
          this.isCrudAction = true;
          return this.cacheAdaptor.remove(dm, keyField, value, tableName);
        }
        /**
         * Prepare the request body based on the newly added, removed and updated records.
         * The result is used by the batch request.
         * @param  {DataManager} dm
         * @param  {CrudOptions} changes
         * @param  {RemoteArgs} e
         */

      }, {
        key: "batchRequest",
        value: function batchRequest(dm, changes, e) {
          return this.cacheAdaptor.batchRequest(dm, changes, e);
        }
      }]);

      return CacheAdaptor;
    }(UrlAdaptor);
    /**
     * DataManager is used to manage and manipulate relational data.
     */


    var DataManager = /*#__PURE__*/function () {
      /**
       * Constructor for DataManager class
       * @param  {DataOptions|JSON[]} dataSource?
       * @param  {Query} query?
       * @param  {AdaptorOptions|string} adaptor?
       * @hidden
       */
      function DataManager(dataSource, query, adaptor) {
        var _this448 = this;

        _classCallCheck(this, DataManager);

        /** @hidden */
        this.dateParse = true;
        /** @hidden */

        this.timeZoneHandling = true;
        this.requests = [];

        if (!dataSource && !this.dataSource) {
          dataSource = [];
        }

        adaptor = adaptor || dataSource.adaptor;

        if (dataSource && dataSource.timeZoneHandling === false) {
          this.timeZoneHandling = dataSource.timeZoneHandling;
        }

        var data;

        if (dataSource instanceof Array) {
          data = {
            json: dataSource,
            offline: true
          };
        } else if (typeof dataSource === 'object') {
          if (!dataSource.json) {
            dataSource.json = [];
          }

          data = {
            url: dataSource.url,
            insertUrl: dataSource.insertUrl,
            removeUrl: dataSource.removeUrl,
            updateUrl: dataSource.updateUrl,
            crudUrl: dataSource.crudUrl,
            batchUrl: dataSource.batchUrl,
            json: dataSource.json,
            headers: dataSource.headers,
            accept: dataSource.accept,
            data: dataSource.data,
            timeTillExpiration: dataSource.timeTillExpiration,
            cachingPageSize: dataSource.cachingPageSize,
            enableCaching: dataSource.enableCaching,
            requestType: dataSource.requestType,
            key: dataSource.key,
            crossDomain: dataSource.crossDomain,
            jsonp: dataSource.jsonp,
            dataType: dataSource.dataType,
            offline: dataSource.offline !== undefined ? dataSource.offline : dataSource.adaptor instanceof RemoteSaveAdaptor ? false : dataSource.url ? false : true,
            requiresFormat: dataSource.requiresFormat
          };
        } else {
          DataUtil.throwError('DataManager: Invalid arguments');
        }

        if (data.requiresFormat === undefined && !DataUtil.isCors()) {
          data.requiresFormat = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data.crossDomain) ? true : data.crossDomain;
        }

        if (data.dataType === undefined) {
          data.dataType = 'json';
        }

        this.dataSource = data;
        this.defaultQuery = query;

        if (data.url && data.offline && !data.json.length) {
          this.isDataAvailable = false;
          this.adaptor = adaptor || new ODataAdaptor();
          this.dataSource.offline = false;
          this.ready = this.executeQuery(query || new Query());
          this.ready.then(function (e) {
            _this448.dataSource.offline = true;
            _this448.isDataAvailable = true;
            data.json = e.result;
            _this448.adaptor = new JsonAdaptor();
          });
        } else {
          this.adaptor = data.offline ? new JsonAdaptor() : new ODataAdaptor();
        }

        if (!data.jsonp && this.adaptor instanceof ODataAdaptor) {
          data.jsonp = 'callback';
        }

        this.adaptor = adaptor || this.adaptor;

        if (data.enableCaching) {
          this.adaptor = new CacheAdaptor(this.adaptor, data.timeTillExpiration, data.cachingPageSize);
        }

        return this;
      }
      /**
       * Overrides DataManager's default query with given query.
       * @param  {Query} query - Defines the new default query.
       */


      _createClass2(DataManager, [{
        key: "setDefaultQuery",
        value: function setDefaultQuery(query) {
          this.defaultQuery = query;
          return this;
        }
        /**
         * Executes the given query with local data source.
         * @param  {Query} query - Defines the query to retrieve data.
         */

      }, {
        key: "executeLocal",
        value: function executeLocal(query) {
          if (!this.defaultQuery && !(query instanceof Query)) {
            DataUtil.throwError('DataManager - executeLocal() : A query is required to execute');
          }

          if (!this.dataSource.json) {
            DataUtil.throwError('DataManager - executeLocal() : Json data is required to execute');
          }

          query = query || this.defaultQuery;
          var result = this.adaptor.processQuery(this, query);

          if (query.subQuery) {
            var from = query.subQuery.fromTable;
            var lookup = query.subQuery.lookups;
            var res = query.isCountRequired ? result.result : result;

            if (lookup && lookup instanceof Array) {
              DataUtil.buildHierarchy(query.subQuery.fKey, from, res, lookup, query.subQuery.key);
            }

            for (var j = 0; j < res.length; j++) {
              if (res[j][from] instanceof Array) {
                res[j] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {}, res[j]);
                res[j][from] = this.adaptor.processResponse(query.subQuery.using(new DataManager(res[j][from].slice(0))).executeLocal(), this, query);
              }
            }
          }

          return this.adaptor.processResponse(result, this, query);
        }
        /**
         * Executes the given query with either local or remote data source.
         * It will be executed as asynchronously and returns Promise object which will be resolved or rejected after action completed.
         * @param  {Query|Function} query - Defines the query to retrieve data.
         * @param  {Function} done - Defines the callback function and triggers when the Promise is resolved.
         * @param  {Function} fail - Defines the callback function and triggers when the Promise is rejected.
         * @param  {Function} always - Defines the callback function and triggers when the Promise is resolved or rejected.
         */

      }, {
        key: "executeQuery",
        value: function executeQuery(query, done, fail, always) {
          var _this449 = this;

          var makeRequest = 'makeRequest';

          if (typeof query === 'function') {
            always = fail;
            fail = done;
            done = query;
            query = null;
          }

          if (!query) {
            query = this.defaultQuery;
          }

          if (!(query instanceof Query)) {
            DataUtil.throwError('DataManager - executeQuery() : A query is required to execute');
          }

          var deffered = new Deferred();
          var args = {
            query: query
          };

          if (!this.dataSource.offline && this.dataSource.url !== undefined && this.dataSource.url !== '' || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[makeRequest])) {
            var result = this.adaptor.processQuery(this, query);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[makeRequest])) {
              this.adaptor[makeRequest](result, deffered, args, query);
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(result.url)) {
              this.makeRequest(result, deffered, args, query);
            } else {
              args = DataManager.getDeferedArgs(query, result, args);
              deffered.resolve(args);
            }
          } else {
            DataManager.nextTick(function () {
              var res = _this449.executeLocal(query);

              args = DataManager.getDeferedArgs(query, res, args);
              deffered.resolve(args);
            });
          }

          if (done || fail) {
            deffered.promise.then(done, fail);
          }

          if (always) {
            deffered.promise.then(always, always);
          }

          return deffered.promise;
        }
      }, {
        key: "extendRequest",
        value: function extendRequest(url, fnSuccess, fnFail) {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
            type: 'GET',
            dataType: this.dataSource.dataType,
            crossDomain: this.dataSource.crossDomain,
            jsonp: this.dataSource.jsonp,
            cache: true,
            processData: false,
            onSuccess: fnSuccess,
            onFailure: fnFail
          }, url);
        }
      }, {
        key: "makeRequest",
        value: function makeRequest(url, deffered, args, query) {
          var _this450 = this;

          var isSelector = !!query.subQuerySelector;

          var fnFail = function fnFail(e) {
            args.error = e;
            deffered.reject(args);
          };

          var process = function process(data, count, xhr, request, actual, aggregates, virtualSelectRecords) {
            args.xhr = xhr;
            args.count = count ? parseInt(count.toString(), 10) : 0;
            args.result = data;
            args.request = request;
            args.aggregates = aggregates;
            args.actual = actual;
            args.virtualSelectRecords = virtualSelectRecords;
            deffered.resolve(args);
          };

          var fnQueryChild = function fnQueryChild(data, selector) {
            var subDeffer = new Deferred();
            var childArgs = {
              parent: args
            };
            query.subQuery.isChild = true;

            var subUrl = _this450.adaptor.processQuery(_this450, query.subQuery, data ? _this450.adaptor.processResponse(data) : selector);

            var childReq = _this450.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);

            if (!isSelector) {
              subDeffer.then(function (subData) {
                if (data) {
                  DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, data, subData, query.subQuery.key);
                  process(data, subData.count, subData.xhr);
                }
              }, fnFail);
            }

            return childReq;
          };

          var fnSuccess = function fnSuccess(data, request) {
            if (request.httpRequest.getResponseHeader('Content-Type').indexOf('xml') === -1 && _this450.dateParse) {
              data = DataUtil.parse.parseJson(data);
            }

            var result = _this450.adaptor.processResponse(data, _this450, query, request.httpRequest, request);

            var count = 0;
            var aggregates = null;
            var virtualSelectRecords = 'virtualSelectRecords';
            var virtualRecords = data[virtualSelectRecords];

            if (query.isCountRequired) {
              count = result.count;
              aggregates = result.aggregates;
              result = result.result;
            }

            if (!query.subQuery) {
              process(result, count, request.httpRequest, request.type, data, aggregates, virtualRecords);
              return;
            }

            if (!isSelector) {
              fnQueryChild(result, request);
            }
          };

          var req = this.extendRequest(url, fnSuccess, fnFail);
          var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](req);

          ajax.beforeSend = function () {
            _this450.beforeSend(ajax.httpRequest, ajax);
          };

          req = ajax.send();
          req["catch"](function (e) {
            return true;
          }); // to handle failure remote requests.        

          this.requests.push(ajax);

          if (isSelector) {
            var promise;
            var res = query.subQuerySelector.call(this, {
              query: query.subQuery,
              parent: query
            });

            if (res && res.length) {
              promise = Promise.all([req, fnQueryChild(null, res)]);
              promise.then(function () {
                var result = arguments.length <= 0 ? undefined : arguments[0];

                var pResult = _this450.adaptor.processResponse(result[0], _this450, query, _this450.requests[0].httpRequest, _this450.requests[0]);

                var count = 0;

                if (query.isCountRequired) {
                  count = pResult.count;
                  pResult = pResult.result;
                }

                var cResult = _this450.adaptor.processResponse(result[1], _this450, query.subQuery, _this450.requests[1].httpRequest, _this450.requests[1]);

                count = 0;

                if (query.subQuery.isCountRequired) {
                  count = cResult.count;
                  cResult = cResult.result;
                }

                DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key);
                isSelector = false;
                process(pResult, count, _this450.requests[0].httpRequest);
              });
            } else {
              isSelector = false;
            }
          }

          return req;
        }
      }, {
        key: "beforeSend",
        value: function beforeSend(request, settings) {
          this.adaptor.beforeSend(this, request, settings);
          var headers = this.dataSource.headers;
          var props;

          for (var i = 0; headers && i < headers.length; i++) {
            props = [];
            var keys = Object.keys(headers[i]);

            for (var _i68 = 0, _keys19 = keys; _i68 < _keys19.length; _i68++) {
              var prop = _keys19[_i68];
              props.push(prop);
              request.setRequestHeader(prop, headers[i][prop]);
            }
          }
        }
        /**
         * Save bulk changes to the given table name.
         * User can add a new record, edit an existing record, and delete a record at the same time.
         * If the datasource from remote, then updated in a single post.
         * @param  {Object} changes - Defines the CrudOptions.
         * @param  {string} key - Defines the column field.
         * @param  {string|Query} tableName - Defines the table name.
         * @param  {Query} query - Sets default query for the DataManager.
         */

      }, {
        key: "saveChanges",
        value: function saveChanges(changes, key, tableName, query, original) {
          var _this451 = this;

          if (tableName instanceof Query) {
            query = tableName;
            tableName = null;
          }

          var args = {
            url: tableName,
            key: key || this.dataSource.key
          };
          var req = this.adaptor.batchRequest(this, changes, args, query || new Query(), original);
          var doAjaxRequest = 'doAjaxRequest';

          if (this.dataSource.offline) {
            return req;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[doAjaxRequest])) {
            return this.adaptor[doAjaxRequest](req);
          } else {
            var deff = new Deferred();
            var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](req);

            ajax.beforeSend = function () {
              _this451.beforeSend(ajax.httpRequest, ajax);
            };

            ajax.onSuccess = function (data, request) {
              deff.resolve(_this451.adaptor.processResponse(data, _this451, null, request.httpRequest, request, changes, args));
            };

            ajax.onFailure = function (e) {
              deff.reject([{
                error: e
              }]);
            };

            ajax.send()["catch"](function (e) {
              return true;
            }); // to handle the failure requests.        

            return deff.promise;
          }
        }
        /**
         * Inserts new record in the given table.
         * @param  {Object} data - Defines the data to insert.
         * @param  {string|Query} tableName - Defines the table name.
         * @param  {Query} query - Sets default query for the DataManager.
         */

      }, {
        key: "insert",
        value: function insert(data, tableName, query, position) {
          if (tableName instanceof Query) {
            query = tableName;
            tableName = null;
          }

          var req = this.adaptor.insert(this, data, tableName, query, position);
          var doAjaxRequest = 'doAjaxRequest';

          if (this.dataSource.offline) {
            return req;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[doAjaxRequest])) {
            return this.adaptor[doAjaxRequest](req);
          } else {
            return this.doAjaxRequest(req);
          }
        }
        /**
         * Removes data from the table with the given key.
         * @param  {string} keyField - Defines the column field.
         * @param  {Object} value - Defines the value to find the data in the specified column.
         * @param  {string|Query} tableName - Defines the table name
         * @param  {Query} query - Sets default query for the DataManager.
         */

      }, {
        key: "remove",
        value: function remove(keyField, value, tableName, query) {
          if (typeof value === 'object') {
            value = DataUtil.getObject(keyField, value);
          }

          if (tableName instanceof Query) {
            query = tableName;
            tableName = null;
          }

          var res = this.adaptor.remove(this, keyField, value, tableName, query);
          var doAjaxRequest = 'doAjaxRequest';

          if (this.dataSource.offline) {
            return res;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[doAjaxRequest])) {
            return this.adaptor[doAjaxRequest](res);
          } else {
            return this.doAjaxRequest(res);
          }
        }
        /**
         * Updates existing record in the given table.
         * @param  {string} keyField - Defines the column field.
         * @param  {Object} value - Defines the value to find the data in the specified column.
         * @param  {string|Query} tableName - Defines the table name
         * @param  {Query} query - Sets default query for the DataManager.
         */

      }, {
        key: "update",
        value: function update(keyField, value, tableName, query, original) {
          if (tableName instanceof Query) {
            query = tableName;
            tableName = null;
          }

          var res = this.adaptor.update(this, keyField, value, tableName, query, original);
          var doAjaxRequest = 'doAjaxRequest';

          if (this.dataSource.offline) {
            return res;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.adaptor[doAjaxRequest])) {
            return this.adaptor[doAjaxRequest](res);
          } else {
            return this.doAjaxRequest(res);
          }
        }
      }, {
        key: "doAjaxRequest",
        value: function doAjaxRequest(res) {
          var _this452 = this;

          var defer = new Deferred();
          res = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, {
            type: 'POST',
            contentType: 'application/json; charset=utf-8',
            processData: false
          }, res);
          var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](res);

          ajax.beforeSend = function () {
            _this452.beforeSend(ajax.httpRequest, ajax);
          };

          ajax.onSuccess = function (record, request) {
            try {
              DataUtil.parse.parseJson(record);
            } catch (e) {
              record = [];
            }

            record = _this452.adaptor.processResponse(DataUtil.parse.parseJson(record), _this452, null, request.httpRequest, request);
            defer.resolve(record);
          };

          ajax.onFailure = function (e) {
            defer.reject([{
              error: e
            }]);
          };

          ajax.send()["catch"](function (e) {
            return true;
          }); // to handle the failure requests.

          return defer.promise;
        }
      }], [{
        key: "getDeferedArgs",
        value: function getDeferedArgs(query, result, args) {
          if (query.isCountRequired) {
            args.result = result.result;
            args.count = result.count;
            args.aggregates = result.aggregates;
          } else {
            args.result = result;
          }

          return args;
        }
      }, {
        key: "nextTick",
        value: function nextTick(fn) {
          (window.setImmediate || window.setTimeout)(fn, 0);
        }
      }]);

      return DataManager;
    }();
    /**
     * Deferred is used to handle asynchronous operation.
     */


    var Deferred = function Deferred() {
      var _this453 = this;

      _classCallCheck(this, Deferred);

      /**
       * Promise is an object that represents a value that may not be available yet, but will be resolved at some point in the future.
       */
      this.promise = new Promise(function (resolve, reject) {
        _this453.resolve = resolve;
        _this453.reject = reject;
      });
      /**
       * Defines the callback function triggers when the Deferred object is resolved.
       */

      this.then = this.promise.then.bind(this.promise);
      /**
       * Defines the callback function triggers when the Deferred object is rejected.
       */

      this["catch"] = this.promise["catch"].bind(this.promise);
    };
    /**
     * Data modules
     */
    //# sourceMappingURL=ej2-data.es2015.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-dropdowns/dist/es6/ej2-dropdowns.es2015.js":
  /*!*********************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-dropdowns/dist/es6/ej2-dropdowns.es2015.js ***!
    \*********************************************************************************/

  /*! exports provided: incrementalSearch, Search, highlightSearch, revertHighlightSearch, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, SelectionSettings, ToolbarSettings, ListBox */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-data */
    "./node_modules/@syncfusion/ej2-data/dist/es6/ej2-data.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-lists */
    "./node_modules/@syncfusion/ej2-lists/dist/es6/ej2-lists.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @syncfusion/ej2-popups */
    "./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @syncfusion/ej2-inputs */
    "./node_modules/@syncfusion/ej2-inputs/dist/es6/ej2-inputs.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! @syncfusion/ej2-buttons */
    "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! @syncfusion/ej2-navigations */
    "./node_modules/@syncfusion/ej2-navigations/dist/es6/ej2-navigations.es2015.js");
    /**
     * IncrementalSearch module file
     */


    var queryString = '';
    var prevString = '';
    var matches$1 = [];
    var activeClass = 'e-active';
    var prevElementId = '';
    /**
     * Search and focus the list item based on key code matches with list text content
     * @param  { number } keyCode - Specifies the key code which pressed on keyboard events.
     * @param  { HTMLElement[]] } items - Specifies an array of HTMLElement, from which matches find has done.
     * @param { number } selectedIndex - Specifies the selected item in list item, so that search will happen
     * after selected item otherwise it will do from initial.
     * @param  { boolean } ignoreCase - Specifies the case consideration when search has done.
     */

    function _incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId, isBlazor$$1) {
      queryString += String.fromCharCode(keyCode);
      setTimeout(function () {
        queryString = '';
      }, 1000);
      var index;
      queryString = ignoreCase ? queryString.toLowerCase() : queryString;

      if (prevElementId === elementId && prevString === queryString) {
        for (var i = 0; i < matches$1.length; i++) {
          if (matches$1[i].classList.contains(activeClass)) {
            index = i;
            break;
          }
        }

        index = index + 1;
        return matches$1[index];
      } else {
        var listItems = items;
        var strLength = queryString.length;
        var text;
        var item;
        selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
        var _i69 = selectedIndex;
        matches$1 = [];

        do {
          if (_i69 === listItems.length) {
            _i69 = -1;
          }

          _i69 === -1 ? index = 0 : index = _i69;
          item = listItems[index];

          if (isBlazor$$1) {
            text = ignoreCase ? item.textContent.trim().toLowerCase() : item.textContent.trim();
          } else {
            text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
          }

          if (text.substr(0, strLength) === queryString) {
            matches$1.push(listItems[index]);
          }

          _i69++;
        } while (_i69 !== selectedIndex);

        prevString = queryString;
        prevElementId = elementId;
        return matches$1[0];
      }
    }

    function Search(inputVal, items, searchType, ignoreCase) {
      var listItems = items;
      ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
      var itemData = {
        item: null,
        index: null
      };

      if (inputVal && inputVal.length) {
        var strLength = inputVal.length;
        var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;

        for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
          var item = itemsData[i];
          var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');

          if (searchType === 'Equal' && text === queryStr || searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) {
            itemData.item = item;
            itemData.index = i;
            return {
              item: item,
              index: i
            };
          }
        }

        return itemData;
      }

      return itemData;
    }
    /**
     * Function helps to find which highlightSearch is to call based on your data.
     * @param  {HTMLElement} element - Specifies an li element.
     * @param  {string} query - Specifies the string to be highlighted.
     * @param  {boolean} ignoreCase - Specifies the ignoreCase option.
     * @param  {HightLightType} type - Specifies the type of highlight.
     */


    function highlightSearch(element, query, ignoreCase, type, isBlazor$$1) {
      if (query === '') {
        return;
      } else {
        var ignoreRegex = ignoreCase ? 'gim' : 'gm';
        query = /^[a-zA-Z0-9- ]*$/.test(query) ? query : query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
        var replaceQuery = type === 'StartsWith' ? '^(' + query + ')' : type === 'EndsWith' ? '(' + query + ')$' : '(' + query + ')';
        findTextNode(element, new RegExp(replaceQuery, ignoreRegex), isBlazor$$1);
      }
    }

    function findTextNode(element, pattern, isBlazor$$1) {
      for (var index = 0; element.childNodes && index < element.childNodes.length; index++) {
        if (element.childNodes[index].nodeType === 3 && element.childNodes[index].textContent.trim() !== '') {
          element = isBlazor$$1 && element.classList.contains('e-highlight') ? element.parentElement : element;

          if (isBlazor$$1 && element.getAttribute('data-value')) {
            element.innerHTML = element.getAttribute('data-value').replace(pattern, '<span class="e-highlight">$1</span>');
          } else {
            element.innerHTML = element.innerHTML.replace(pattern, '<span class="e-highlight">$1</span>');
          }

          break;
        } else {
          findTextNode(element.childNodes[index], pattern, isBlazor$$1);
        }
      }
    }
    /**
     * Function helps to remove highlighted element based on your data.
     * @param  {HTMLElement} content - Specifies an content element.
     */


    function revertHighlightSearch(content) {
      var contentElement = content.querySelectorAll('.e-highlight');

      for (var i = contentElement.length - 1; i >= 0; i--) {
        var parent = contentElement[i].parentNode;
        var text = document.createTextNode(contentElement[i].textContent);
        parent.replaceChild(text, contentElement[i]);
      }
    }
    /**
     * Common source
     */


    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var FieldSettings = /*#__PURE__*/function (_syncfusion_ej2_base_6) {
      _inherits(FieldSettings, _syncfusion_ej2_base_6);

      var _super184 = _createSuper(FieldSettings);

      function FieldSettings() {
        _classCallCheck(this, FieldSettings);

        return _super184.apply(this, arguments);
      }

      return FieldSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FieldSettings.prototype, "text", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FieldSettings.prototype, "value", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FieldSettings.prototype, "iconCss", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FieldSettings.prototype, "groupBy", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FieldSettings.prototype, "htmlAttributes", void 0);

    var dropDownBaseClasses = {
      root: 'e-dropdownbase',
      rtl: 'e-rtl',
      content: 'e-content',
      selected: 'e-active',
      hover: 'e-hover',
      noData: 'e-nodata',
      fixedHead: 'e-fixed-head',
      focus: 'e-item-focus',
      li: 'e-list-item',
      group: 'e-list-group-item',
      disabled: 'e-disabled',
      grouping: 'e-dd-group'
    };
    var ITEMTEMPLATE_PROPERTY = 'ItemTemplate';
    var VALUETEMPLATE_PROPERTY = 'ValueTemplate';
    var GROUPTEMPLATE_PROPERTY = 'GroupTemplate';
    var HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';
    var FOOTERTEMPLATE_PROPERTY = 'FooterTemplate';
    var NORECORDSTEMPLATE_PROPERTY = 'NoRecordsTemplate';
    var ACTIONFAILURETEMPLATE_PROPERTY = 'ActionFailureTemplate';
    /**
     * DropDownBase component will generate the list items based on given data and act as base class to drop-down related components
     */

    var DropDownBase = /*#__PURE__*/function (_syncfusion_ej2_base_7) {
      _inherits(DropDownBase, _syncfusion_ej2_base_7);

      var _super185 = _createSuper(DropDownBase);

      /**
       * * Constructor for DropDownBase class
       */
      function DropDownBase(options, element) {
        _classCallCheck(this, DropDownBase);

        return _super185.call(this, options, element);
      }

      _createClass2(DropDownBase, [{
        key: "getPropObject",
        value: function getPropObject(prop, newProp, oldProp) {
          var newProperty = new Object();
          var oldProperty = new Object(); // tslint:disable-next-line:no-function-constructor-with-string-args

          var propName = function propName(prop) {
            return prop;
          };

          newProperty[propName(prop)] = newProp[propName(prop)];
          oldProperty[propName(prop)] = oldProp[propName(prop)];
          var data = new Object();
          data.newProperty = newProperty;
          data.oldProperty = oldProperty;
          return data;
        }
      }, {
        key: "getValueByText",
        value: function getValueByText(text, ignoreCase, ignoreAccent) {
          var value = null;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            if (ignoreCase) {
              value = this.checkValueCase(text, true, ignoreAccent);
            } else {
              value = this.checkValueCase(text, false, ignoreAccent);
            }
          }

          return value;
        }
      }, {
        key: "checkValueCase",
        value: function checkValueCase(text, ignoreCase, ignoreAccent, isTextByValue) {
          var _this454 = this;

          var value = null;

          if (isTextByValue) {
            value = text;
          }

          var dataSource = this.listData;
          var fields = this.fields;
          var type = this.typeOfData(dataSource)["typeof"];

          if (type === 'string' || type === 'number' || type === 'boolean') {
            var _iterator82 = _createForOfIteratorHelper(dataSource),
                _step82;

            try {
              for (_iterator82.s(); !(_step82 = _iterator82.n()).done;) {
                var item = _step82.value;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                  if (ignoreAccent) {
                    value = this.checkingAccent(String(item), text, ignoreCase);
                  } else {
                    if (ignoreCase) {
                      if (this.checkIgnoreCase(String(item), text)) {
                        value = this.getItemValue(String(item), text, ignoreCase);
                      }
                    } else {
                      if (this.checkNonIgnoreCase(String(item), text)) {
                        value = this.getItemValue(String(item), text, ignoreCase, isTextByValue);
                      }
                    }
                  }
                }
              }
            } catch (err) {
              _iterator82.e(err);
            } finally {
              _iterator82.f();
            }
          } else {
            if (ignoreCase) {
              dataSource.filter(function (item) {
                var itemValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemValue) && _this454.checkIgnoreCase(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, item).toString(), text)) {
                  value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item);
                }
              });
            } else {
              if (isTextByValue) {
                dataSource.filter(function (item) {
                  var itemValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemValue) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && itemValue.toString() === value.toString()) {
                    value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, item);
                  }
                });
              } else {
                dataSource.filter(function (item) {
                  if (_this454.checkNonIgnoreCase(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, item), text)) {
                    value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item);
                  }
                });
              }
            }
          }

          return value;
        }
      }, {
        key: "checkingAccent",
        value: function checkingAccent(item, text, ignoreCase) {
          var dataItem = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].ignoreDiacritics(String(item));

          var textItem = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].ignoreDiacritics(text.toString());

          var value = null;

          if (ignoreCase) {
            if (this.checkIgnoreCase(dataItem, textItem)) {
              value = this.getItemValue(String(item), text, ignoreCase);
            }
          } else {
            if (this.checkNonIgnoreCase(String(item), text)) {
              value = this.getItemValue(String(item), text, ignoreCase);
            }
          }

          return value;
        }
      }, {
        key: "checkIgnoreCase",
        value: function checkIgnoreCase(item, text) {
          return String(item).toLowerCase() === text.toString().toLowerCase() ? true : false;
        }
      }, {
        key: "checkNonIgnoreCase",
        value: function checkNonIgnoreCase(item, text) {
          return String(item) === text.toString() ? true : false;
        }
      }, {
        key: "getItemValue",
        value: function getItemValue(dataItem, typedText, ignoreCase, isTextByValue) {
          var value = null;
          var dataSource = this.listData;
          var type = this.typeOfData(dataSource)["typeof"];

          if (isTextByValue) {
            value = dataItem.toString();
          } else {
            if (ignoreCase) {
              value = type === 'string' ? String(dataItem) : this.getFormattedValue(String(dataItem));
            } else {
              value = type === 'string' ? typedText : this.getFormattedValue(typedText);
            }
          }

          return value;
        }
      }, {
        key: "templateCompiler",
        value: function templateCompiler(baseTemplate) {
          var checkTemplate = false;

          if (baseTemplate) {
            try {
              checkTemplate = document.querySelectorAll(baseTemplate).length ? true : false;
            } catch (exception) {
              checkTemplate = false;
            }
          }

          return checkTemplate;
        }
      }, {
        key: "l10nUpdate",
        value: function l10nUpdate(actionFailure) {
          var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;

          if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {
            this.DropDownBaseresetBlazorTemplates(false, false, true, true);
            var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
            var compiledString;
            var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
            ele.innerHTML = '';
            var tempaltecheck = this.templateCompiler(template);

            if (tempaltecheck) {
              compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
            } else {
              compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            }

            var templateName = actionFailure ? 'actionFailureTemplate' : 'noRecordsTemplate';

            var _iterator83 = _createForOfIteratorHelper(compiledString({}, this, templateName, templateId, this.isStringTemplate)),
                _step83;

            try {
              for (_iterator83.s(); !(_step83 = _iterator83.n()).done;) {
                var item = _step83.value;
                ele.appendChild(item);
              }
            } catch (err) {
              _iterator83.e(err);
            } finally {
              _iterator83.f();
            }

            this.DropDownBaseupdateBlazorTemplates(false, false, !actionFailure, actionFailure, false, false, false, false);
          } else {
            var l10nLocale = {
              noRecordsTemplate: 'No records found',
              actionFailureTemplate: 'Request failed'
            };
            var componentLocale = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getLocaleName(), {}, this.locale);

            if (componentLocale.getConstant('actionFailureTemplate') !== '') {
              this.l10n = componentLocale;
            } else {
              this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName() === 'listbox' ? 'listbox' : 'dropdowns', l10nLocale, this.locale);
            }

            var content = actionFailure ? this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');

            if (this.getModuleName() === 'listbox') {
              var liElem = this.createElement('li');
              liElem.textContent = content;
              ele.appendChild(liElem);
              liElem.classList.add('e-list-nrt');
            } else {
              ele.innerHTML = content;
            }
          }
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'drop-down-base';
        }
      }, {
        key: "getTextByValue",
        value: function getTextByValue(value) {
          var text;
          text = this.checkValueCase(value, false, false, true);
          return text;
        }
      }, {
        key: "getFormattedValue",
        value: function getFormattedValue(value) {
          if (this.listData && this.listData.length) {
            var item = this.typeOfData(this.listData);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) || value === 'null') {
              return null;
            }

            if (typeof Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.value ? this.fields.value : 'value', item.item) === 'number' || item["typeof"] === 'number') {
              return parseFloat(value);
            }

            if (typeof Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.value ? this.fields.value : 'value', item.item) === 'boolean' || item["typeof"] === 'boolean') {
              return value === 'true';
            }
          }

          return value;
        }
        /**
         * Sets RTL to dropdownbase wrapper
         */

      }, {
        key: "setEnableRtl",
        value: function setEnableRtl() {
          if (this.list) {
            this.enableRtlElements.push(this.list);
          }

          this.enableRtl ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(this.enableRtlElements, dropDownBaseClasses.rtl) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.enableRtlElements, dropDownBaseClasses.rtl);
        }
      }, {
        key: "initialize",

        /**
         * Initialize the Component.
         */
        value: function initialize() {
          this.bindEvent = true;
          this.actionFailureTemplateId = "".concat(this.element.id).concat(ACTIONFAILURETEMPLATE_PROPERTY);

          if (this.element.tagName === 'UL') {
            var jsonElement = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createJsonFromElement(this.element);

            this.setProperties({
              fields: {
                text: 'text',
                value: 'text'
              }
            }, true);
            this.resetList(jsonElement, this.fields);
          } else if (this.element.tagName === 'SELECT') {
            var dataSource = this.dataSource instanceof Array ? this.dataSource.length > 0 ? true : false : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataSource) ? true : false;

            if (!dataSource) {
              this.renderItemsBySelect();
            }
          } else {
            this.setListData(this.dataSource, this.fields, this.query);
          }
        }
      }, {
        key: "DropDownBaseupdateBlazorTemplates",
        value: function DropDownBaseupdateBlazorTemplates(item, group, noRecord, action, value, header, footer, isEmpty) {
          if (!this.isStringTemplate) {
            if (this.itemTemplate && item) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.itemTemplateId, ITEMTEMPLATE_PROPERTY, this, isEmpty);
            }

            if (this.groupTemplate && group) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.groupTemplateId, GROUPTEMPLATE_PROPERTY, this, isEmpty);
            }

            if (this.noRecordsTemplate && noRecord) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.noRecordsTemplateId, NORECORDSTEMPLATE_PROPERTY, this, isEmpty);
            }

            if (this.actionFailureTemplate && action) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE_PROPERTY, this, isEmpty);
            }

            if (value) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.valueTemplateId, VALUETEMPLATE_PROPERTY, this, isEmpty);
            }

            if (header) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.headerTemplateId, HEADERTEMPLATE_PROPERTY, this);
            }

            if (footer) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.footerTemplateId, FOOTERTEMPLATE_PROPERTY, this);
            }
          }
        }
      }, {
        key: "DropDownBaseresetBlazorTemplates",
        value: function DropDownBaseresetBlazorTemplates(item, group, noRecord, action, value, header, footer) {
          if (!this.isStringTemplate) {
            if (this.itemTemplate && item) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.itemTemplateId, ITEMTEMPLATE_PROPERTY);
            }

            if (this.groupTemplate && group) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.groupTemplateId, GROUPTEMPLATE_PROPERTY);
            }

            if (this.noRecordsTemplate && noRecord) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.noRecordsTemplateId, NORECORDSTEMPLATE_PROPERTY);
            }

            if (this.actionFailureTemplate && action) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE_PROPERTY);
            }

            if (value) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.valueTemplateId, VALUETEMPLATE_PROPERTY);
            }

            if (header) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.headerTemplateId, HEADERTEMPLATE_PROPERTY);
            }

            if (footer) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.footerTemplateId, FOOTERTEMPLATE_PROPERTY);
            }
          }
        }
        /**
         * Get the properties to be maintained in persisted state.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
      }, {
        key: "setEnabled",

        /**
         * Sets the enabled state to DropDownBase.
         */
        value: function setEnabled() {
          this.element.setAttribute('aria-disabled', this.enabled ? 'false' : 'true');
        }
      }, {
        key: "updateDataAttribute",

        /**
         * Sets the enabled state to DropDownBase.
         */
        value: function updateDataAttribute(value) {
          var invalidAttr = ['class', 'style', 'id', 'type'];
          var attr = {};

          for (var a = 0; a < this.element.attributes.length; a++) {
            if (invalidAttr.indexOf(this.element.attributes[a].name) === -1 && !(this.getModuleName() === 'dropdownlist' && this.element.attributes[a].name === 'readonly')) {
              attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
            }
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(attr, value, attr);
          this.setProperties({
            htmlAttributes: attr
          }, true);
        }
      }, {
        key: "renderItemsBySelect",
        value: function renderItemsBySelect() {
          var element = this.element;
          var fields = {
            value: 'value',
            text: 'text'
          };
          var jsonElement = [];
          var group = element.querySelectorAll('select>optgroup');
          var option = element.querySelectorAll('select>option');
          this.getJSONfromOption(jsonElement, option, fields);

          if (group.length) {
            for (var i = 0; i < group.length; i++) {
              var item = group[i];
              var optionGroup = {};
              optionGroup[fields.text] = item.label;
              optionGroup.isHeader = true;
              var child = item.querySelectorAll('option');
              jsonElement.push(optionGroup);
              this.getJSONfromOption(jsonElement, child, fields);
            }

            var items = element.querySelectorAll('select>option');
          }

          this.fields.text = fields.text;
          this.fields.value = fields.value;
          this.resetList(jsonElement, fields);
        }
      }, {
        key: "getJSONfromOption",
        value: function getJSONfromOption(items, options, fields) {
          var _iterator84 = _createForOfIteratorHelper(options),
              _step84;

          try {
            for (_iterator84.s(); !(_step84 = _iterator84.n()).done;) {
              var option = _step84.value;
              var json = {};
              json[fields.text] = option.innerText;
              json[fields.value] = option.getAttribute(fields.value) ? option.getAttribute(fields.value) : option.innerText;
              items.push(json);
            }
          } catch (err) {
            _iterator84.e(err);
          } finally {
            _iterator84.f();
          }
        }
        /**
         * Execute before render the list items
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          // there is no event handler
          this.scrollTimer = -1;
          this.enableRtlElements = [];
          this.isRequested = false;
          this.isDataFetched = false;
          this.itemTemplateId = "".concat(this.element.id).concat(ITEMTEMPLATE_PROPERTY);
          this.valueTemplateId = "".concat(this.element.id).concat(VALUETEMPLATE_PROPERTY);
          this.groupTemplateId = "".concat(this.element.id).concat(GROUPTEMPLATE_PROPERTY);
          this.headerTemplateId = "".concat(this.element.id).concat(HEADERTEMPLATE_PROPERTY);
          this.footerTemplateId = "".concat(this.element.id).concat(FOOTERTEMPLATE_PROPERTY);
          this.noRecordsTemplateId = "".concat(this.element.id).concat(NORECORDSTEMPLATE_PROPERTY);
        }
        /**
         * Creates the list items of DropDownBase component.
         */

      }, {
        key: "setListData",
        value: function setListData(dataSource, fields, query) {
          var _this455 = this;

          fields = fields ? fields : this.fields;
          var ulElement;
          this.isActive = true;
          var eventArgs = {
            cancel: false,
            data: dataSource,
            query: query
          };
          this.trigger('actionBegin', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
              _this455.showSpinner();

              if (dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                _this455.isRequested = true;

                if (_this455.isDataFetched) {
                  _this455.emptyDataRequest(fields);

                  return;
                }

                eventArgs.data.executeQuery(_this455.getQuery(eventArgs.query)).then(function (e) {
                  _this455.trigger('actionComplete', e, function (e) {
                    if (!e.cancel) {
                      var listItems = e.result;

                      if (listItems.length === 0) {
                        _this455.isDataFetched = true;
                      }

                      ulElement = _this455.renderItems(listItems, fields);

                      _this455.onActionComplete(ulElement, listItems, e);

                      if (_this455.groupTemplate) {
                        _this455.renderGroupTemplate(ulElement);
                      }

                      _this455.isRequested = false;

                      _this455.bindChildItems(listItems, ulElement, fields, e);
                    }
                  });
                })["catch"](function (e) {
                  _this455.isRequested = false;

                  _this455.onActionFailure(e);

                  _this455.hideSpinner();
                });
              } else {
                var dataManager = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](eventArgs.data);

                var listItems = _this455.getQuery(eventArgs.query).executeLocal(dataManager);

                var localDataArgs = {
                  cancel: false,
                  result: listItems
                };

                _this455.trigger('actionComplete', localDataArgs, function (localDataArgs) {
                  if (!localDataArgs.cancel) {
                    ulElement = _this455.renderItems(localDataArgs.result, fields);

                    _this455.onActionComplete(ulElement, localDataArgs.result);

                    if (_this455.groupTemplate) {
                      _this455.renderGroupTemplate(ulElement);
                    }

                    _this455.bindChildItems(localDataArgs.result, ulElement, fields);
                  }
                });
              }
            }
          });
        }
      }, {
        key: "bindChildItems",
        value: function bindChildItems(listItems, ulElement, fields, e) {
          var _this456 = this;

          if (listItems.length >= 100 && this.getModuleName() === 'autocomplete') {
            setTimeout(function () {
              var childNode = _this456.remainingItems(_this456.sortedData, fields);

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(childNode, ulElement);

              _this456.DropDownBaseupdateBlazorTemplates(true, false, false, false);

              _this456.liCollections = _this456.list.querySelectorAll('.' + dropDownBaseClasses.li);

              _this456.updateListValues();

              _this456.raiseDataBound(listItems, e);
            }, 0);
          } else {
            this.raiseDataBound(listItems, e);
          }
        }
      }, {
        key: "updateListValues",
        value: function updateListValues() {// Used this method in component side.
        }
      }, {
        key: "findListElement",
        value: function findListElement(list, findNode, attribute, value) {
          var liElement = null;

          if (list) {
            var listArr = [].slice.call(list.querySelectorAll(findNode));

            for (var index = 0; index < listArr.length; index++) {
              if (listArr[index].getAttribute(attribute) === value + '') {
                liElement = listArr[index];
                break;
              }
            }
          }

          return liElement;
        }
      }, {
        key: "raiseDataBound",
        value: function raiseDataBound(listItems, e) {
          this.hideSpinner();
          var dataBoundEventArgs = {
            items: listItems,
            e: e
          };
          this.trigger('dataBound', dataBoundEventArgs);
        }
      }, {
        key: "remainingItems",
        value: function remainingItems(dataSource, fields) {
          var spliceData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().skip(100));

          if (this.itemTemplate) {
            var listElements = this.templateListItem(spliceData, fields);
            return [].slice.call(listElements.childNodes);
          }

          var type = this.typeOfData(spliceData)["typeof"];

          if (type === 'string' || type === 'number' || type === 'boolean') {
            return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createListItemFromArray(this.createElement, spliceData, true, this.listOption(spliceData, fields));
          }

          return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createListItemFromJson(this.createElement, spliceData, this.listOption(spliceData, fields), 1, true);
        }
      }, {
        key: "emptyDataRequest",
        value: function emptyDataRequest(fields) {
          var listItems = [];
          this.onActionComplete(this.renderItems(listItems, fields), listItems);
          this.isRequested = false;
          this.hideSpinner();
        }
      }, {
        key: "showSpinner",
        value: function showSpinner() {// Used this method in component side.
        }
      }, {
        key: "hideSpinner",
        value: function hideSpinner() {// Used this method in component side.
        }
      }, {
        key: "onActionFailure",
        value: function onActionFailure(e) {
          this.liCollections = [];
          this.trigger('actionFailure', e);
          this.l10nUpdate(true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], dropDownBaseClasses.noData);
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e) {
          this.listData = list;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.getModuleName() === 'listbox') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.list.querySelector('.e-list-parent'));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.list.querySelector('.e-hidden-select'));
          } else {
            this.list.innerHTML = '';
          }

          this.fixedHeaderElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
          this.list.appendChild(ulElement);
          this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
          this.ulElement = this.list.querySelector('ul');
          this.postRender(this.list, list, this.bindEvent);
        }
      }, {
        key: "postRender",
        value: function postRender(listElement, list, bindEvent) {
          var focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);
          var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);

          if (focusItem && !selectedItem) {
            focusItem.classList.add(dropDownBaseClasses.focus);
          }

          if (list.length <= 0) {
            this.l10nUpdate();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([listElement], dropDownBaseClasses.noData);
          } else {
            listElement.classList.remove(dropDownBaseClasses.noData);
          }
        }
        /**
         * Get the query to do the data operation before list item generation.
         */

      }, {
        key: "getQuery",
        value: function getQuery(query) {
          return query ? query : this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
        }
        /**
         * To render the template content for group header element.
         */

      }, {
        key: "renderGroupTemplate",
        value: function renderGroupTemplate(listEle) {
          if (this.fields.groupBy !== null && this.dataSource || this.element.querySelector('.' + dropDownBaseClasses.group)) {
            var dataSource = this.dataSource;
            var option = {
              groupTemplateID: this.groupTemplateId,
              isStringTemplate: this.isStringTemplate
            };
            var headerItems = listEle.querySelectorAll('.' + dropDownBaseClasses.group);
            var groupcheck = this.templateCompiler(this.groupTemplate);

            if (groupcheck) {
              var groupValue = document.querySelector(this.groupTemplate).innerHTML.trim();

              var tempHeaders = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option);
            } else {
              var _tempHeaders = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option);
            }

            this.DropDownBaseupdateBlazorTemplates(false, true, false, false, false, false, false, false);
          }
        }
        /**
         * To create the ul li list items
         */

      }, {
        key: "createListItems",
        value: function createListItems(dataSource, fields) {
          if (dataSource && fields.groupBy || this.element.querySelector('optgroup')) {
            if (fields.groupBy) {
              if (this.sortOrder !== 'None') {
                dataSource = this.getSortedDataSource(dataSource);
              }

              dataSource = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].groupDataSource(dataSource, fields.properties, this.sortOrder);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], dropDownBaseClasses.grouping);
          } else {
            dataSource = this.getSortedDataSource(dataSource);
          }

          var options = this.listOption(dataSource, fields);
          var spliceData = dataSource.length > 100 ? new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().take(100)) : dataSource;
          this.sortedData = dataSource;
          return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].createList(this.createElement, this.getModuleName() === 'autocomplete' ? spliceData : dataSource, options, true);
        }
      }, {
        key: "listOption",
        value: function listOption(dataSource, fields) {
          var iconCss = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.iconCss) ? false : true;
          var fieldValues = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.properties) ? fields.properties : fields;
          var options = fields.text !== null || fields.value !== null ? {
            fields: fieldValues,
            showIcon: iconCss,
            ariaAttributes: {
              groupItemRole: 'presentation'
            }
          } : {
            fields: {
              value: 'text'
            }
          };
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, options, fields, true);
        }
      }, {
        key: "setFloatingHeader",
        value: function setFloatingHeader(e) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement)) {
            this.fixedHeaderElement = this.createElement('div', {
              className: dropDownBaseClasses.fixedHead
            });

            if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
              this.fixedHeaderElement.style.display = 'none';
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.fixedHeaderElement], this.list);
            this.setFixedHeader();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
            this.setFixedHeader();
          }

          this.scrollStop(e);
        }
      }, {
        key: "scrollStop",
        value: function scrollStop(e) {
          var target = e.target;
          var liHeight = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
          var topIndex = Math.round(target.scrollTop / liHeight);
          var liCollections = this.list.querySelectorAll('li');

          for (var i = topIndex; i > -1; i--) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liCollections[i]) && liCollections[i].classList.contains(dropDownBaseClasses.group)) {
              var currentLi = liCollections[i];
              this.fixedHeaderElement.innerHTML = currentLi.innerHTML;
              this.fixedHeaderElement.style.top = e.target.scrollTop + 'px';
              this.fixedHeaderElement.style.display = 'block';
              break;
            } else {
              this.fixedHeaderElement.style.display = 'none';
              this.fixedHeaderElement.style.top = 'none';
            }
          }
        }
        /**
         * To render the list items
         */

      }, {
        key: "renderItems",
        value: function renderItems(listData, fields) {
          var ulElement;

          if (this.itemTemplate && listData) {
            var dataSource = listData;

            if (dataSource && fields.groupBy) {
              if (this.sortOrder !== 'None') {
                dataSource = this.getSortedDataSource(dataSource);
              }

              dataSource = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].groupDataSource(dataSource, fields.properties, this.sortOrder);
            } else {
              dataSource = this.getSortedDataSource(dataSource);
            }

            this.sortedData = dataSource;
            var spliceData = dataSource.length > 100 ? new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().take(100)) : dataSource;
            ulElement = this.templateListItem(this.getModuleName() === 'autocomplete' ? spliceData : dataSource, fields);
            var isTempEmpty = this.getModuleName() === 'listbox' ? true : false;
            this.DropDownBaseupdateBlazorTemplates(true, false, false, false, false, false, false, isTempEmpty);
          } else {
            ulElement = this.createListItems(listData, fields);
          }

          return ulElement;
        }
      }, {
        key: "templateListItem",
        value: function templateListItem(dataSource, fields) {
          this.DropDownBaseresetBlazorTemplates(true, false, false, false);
          var option = this.listOption(dataSource, fields);
          option.templateID = this.itemTemplateId;
          option.isStringTemplate = this.isStringTemplate;
          var itemcheck = this.templateCompiler(this.itemTemplate);

          if (itemcheck) {
            var itemValue = document.querySelector(this.itemTemplate).innerHTML.trim();
            return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderContentTemplate(this.createElement, itemValue, dataSource, fields.properties, option);
          } else {
            return _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].renderContentTemplate(this.createElement, this.itemTemplate, dataSource, fields.properties, option);
          }
        }
      }, {
        key: "typeOfData",
        value: function typeOfData(items) {
          var item = {
            "typeof": null,
            item: null
          };

          for (var i = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(items) && i < items.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(items[i])) {
              var listDataType = typeof items[i] === 'string' || typeof items[i] === 'number' || typeof items[i] === 'boolean';
              var isNullData = listDataType ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(items[i]) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.value ? this.fields.value : 'value', items[i]));

              if (!isNullData) {
                return item = {
                  "typeof": typeof items[i],
                  item: items[i]
                };
              }
            }
          }

          return item;
        }
      }, {
        key: "setFixedHeader",
        value: function setFixedHeader() {
          this.list.parentElement.style.display = 'block';
          var borderWidth = 0;

          if (this.list && this.list.parentElement) {
            borderWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-width'), 10);
          }

          var liWidth = this.liCollections[0].offsetWidth - borderWidth;
          this.fixedHeaderElement.style.width = liWidth.toString() + 'px';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.fixedHeaderElement, {
            zIndex: 10
          });
          var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group);
          this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
        }
      }, {
        key: "getSortedDataSource",
        value: function getSortedDataSource(dataSource) {
          if (dataSource && this.sortOrder !== 'None') {
            var textField = this.fields.text ? this.fields.text : 'text';
            dataSource = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].getDataSource(dataSource, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].addSorting(this.sortOrder, textField));
          }

          return dataSource;
        }
        /**
         * Return the index of item which matched with given value in data source
         */

      }, {
        key: "getIndexByValue",
        value: function getIndexByValue(value) {
          var index;
          var listItems = this.getItems();

          for (var i = 0; i < listItems.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && listItems[i].getAttribute('data-value') === value.toString()) {
              index = i;
              break;
            }
          }

          return index;
        }
      }, {
        key: "dispatchEvent",

        /**
         * To dispatch the event manually
         */
        value: function dispatchEvent(element, type) {
          var evt = document.createEvent('HTMLEvents');
          evt.initEvent(type, false, true);
          element.dispatchEvent(evt);
        }
        /**
         * To set the current fields
         */

      }, {
        key: "setFields",
        value: function setFields() {
          if (this.fields.value && !this.fields.text) {
            this.fields.text = this.fields.value;
          } else if (!this.fields.value && this.fields.text) {
            this.fields.value = this.fields.text;
          } else if (!this.fields.value && !this.fields.text) {
            this.fields.value = this.fields.text = 'text';
          }
        }
        /**
         * reset the items list.
         */

      }, {
        key: "resetList",
        value: function resetList(dataSource, fields, query) {
          if (this.list) {
            if (this.element.tagName === 'SELECT' && this.element.options.length > 0 || this.element.tagName === 'UL' && this.element.childNodes.length > 0) {
              var data = dataSource instanceof Array ? dataSource.length > 0 : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataSource);

              if (!data && this.selectData && this.selectData.length > 0) {
                dataSource = this.selectData;
              }
            }

            this.setListData(dataSource, fields, query);
          }
        }
      }, {
        key: "updateSelectElementData",
        value: function updateSelectElementData(isFiltering) {
          if (isFiltering && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectData) && this.listData && this.listData.length > 0) {
            this.selectData = this.listData;
          }
        }
      }, {
        key: "updateSelection",
        value: function updateSelection() {// This is for after added the item, need to update the selected index values.
        }
      }, {
        key: "renderList",
        value: function renderList() {
          // This is for render the list items.
          this.render();
        }
      }, {
        key: "updateDataSource",
        value: function updateDataSource(props) {
          this.resetList(this.dataSource);
        }
      }, {
        key: "setUpdateInitial",
        value: function setUpdateInitial(props, newProp) {
          this.isDataFetched = false;
          var updateData = {};

          for (var j = 0; props.length > j; j++) {
            if (newProp[props[j]] && props[j] === 'fields') {
              this.setFields();
            } else if (newProp[props[j]]) {
              updateData[props[j]] = newProp[props[j]];
            }
          }

          if (Object.keys(updateData).length > 0) {
            if (Object.keys(updateData).indexOf('dataSource') === -1) {
              updateData.dataSource = this.dataSource;
            }

            this.updateDataSource(updateData);
          }
        }
        /**
         * When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          if (this.getModuleName() === 'dropdownbase') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
          }

          this.setUpdateInitial(['sortOrder', 'itemTemplate'], newProp);

          for (var _i70 = 0, _Object$keys14 = Object.keys(newProp); _i70 < _Object$keys14.length; _i70++) {
            var prop = _Object$keys14[_i70];

            switch (prop) {
              case 'query':
              case 'sortOrder':
              case 'dataSource':
              case 'itemTemplate':
                break;

              case 'enableRtl':
                this.setEnableRtl();
                break;

              case 'enabled':
                this.setEnabled();
                break;

              case 'groupTemplate':
                this.renderGroupTemplate(this.list);

                if (this.ulElement && this.fixedHeaderElement) {
                  var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group);
                  this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
                }

                break;

              case 'locale':
                if (this.list && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length === 0) {
                  this.l10nUpdate();
                }

                break;

              case 'zIndex':
                this.setProperties({
                  zIndex: newProp.zIndex
                }, true);
                this.setZIndex();
                break;
            }
          }
        }
      }, {
        key: "render",

        /**
         * Build and render the component
         * @private
         */
        value: function render(isEmptyData) {
          this.list = this.createElement('div', {
            className: dropDownBaseClasses.content,
            attrs: {
              'tabindex': '0'
            }
          });
          this.list.classList.add(dropDownBaseClasses.root);
          this.setFields();
          var rippleModel = {
            duration: 300,
            selector: '.' + dropDownBaseClasses.li
          };
          this.rippleFun = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.list, rippleModel);
          var group = this.element.querySelector('select>optgroup');

          if ((this.fields.groupBy || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(group)) && !this.isGroupChecking) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'scroll', this.setFloatingHeader, this);
          }

          if (this.getModuleName() === 'dropdownbase') {
            if (this.element.getAttribute('tabindex')) {
              this.list.setAttribute('tabindex', this.element.getAttribute('tabindex'));
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], dropDownBaseClasses.root);
            this.element.style.display = 'none';
            var wrapperElement = this.createElement('div');
            this.element.parentElement.insertBefore(wrapperElement, this.element);
            wrapperElement.appendChild(this.element);
            wrapperElement.appendChild(this.list);
          }

          this.setEnableRtl();
          this.setEnabled();

          if (!isEmptyData) {
            this.initialize();
          }
        }
      }, {
        key: "getModuleName",

        /**
         * Return the module name of this component.
         * @private
         */
        value: function getModuleName() {
          return 'dropdownbase';
        }
      }, {
        key: "getItems",

        /**
         * Gets all the list items bound on this component.
         * @returns Element[].
         */
        value: function getItems() {
          return this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li);
        }
      }, {
        key: "addItem",

        /**
         * Adds a new item to the popup list. By default, new item appends to the list as the last item,
         * but you can insert based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
         * @return {void}.
         * @deprecated
         */
        value: function addItem(items, itemIndex) {
          if (!this.list || this.list.textContent === this.noRecordsTemplate && this.getModuleName() !== 'listbox') {
            this.renderList();
          }

          if (this.sortOrder !== 'None' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemIndex)) {
            var newList = [].slice.call(this.listData);
            newList.push(items);
            newList = this.getSortedDataSource(newList);

            if (this.fields.groupBy) {
              newList = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].groupDataSource(newList, this.fields.properties, this.sortOrder);
              itemIndex = newList.indexOf(items);
            } else {
              itemIndex = newList.indexOf(items);
            }
          }

          this.DropDownBaseresetBlazorTemplates(true, false, false, false);
          var itemsCount = this.getItems().length;
          var selectedItemValue = this.list.querySelector('.' + dropDownBaseClasses.selected);
          items = items instanceof Array ? items : [items];
          var index;
          index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemIndex) || itemIndex < 0 || itemIndex > itemsCount - 1 ? itemsCount : itemIndex;
          var fields = this.fields;

          if (items && fields.groupBy) {
            items = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["ListBase"].groupDataSource(items, fields.properties);
          }

          var liCollections = [];

          for (var i = 0; i < items.length; i++) {
            var item = items[i];
            var isHeader = item.isHeader;
            var li = this.createElement('li', {
              className: isHeader ? dropDownBaseClasses.group : dropDownBaseClasses.li,
              id: 'option-add-' + i
            });
            var itemText = item instanceof Object ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, item) : item;

            if (isHeader) {
              li.innerText = itemText;
            }

            if (this.itemTemplate && !isHeader) {
              var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.itemTemplate);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate), li);
              this.DropDownBaseupdateBlazorTemplates(true, false, false, false);
            } else if (!isHeader) {
              li.appendChild(document.createTextNode(itemText));
            }

            li.setAttribute('data-value', item instanceof Object ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item) : item);
            li.setAttribute('role', 'option');
            this.notify('addItem', {
              module: 'CheckBoxSelection',
              item: li
            });
            liCollections.push(li);
            this.listData.push(item);
            this.updateActionCompleteData(li, item, index); //Listbox event

            this.trigger('beforeItemRender', {
              element: li,
              item: item
            });
          }

          if (itemsCount === 0 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list.querySelector('ul'))) {
            this.list.innerHTML = '';
            this.list.classList.remove(dropDownBaseClasses.noData);
            this.list.appendChild(this.ulElement);
            this.liCollections = liCollections;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(liCollections, this.ulElement);
            this.updateAddItemList(this.list, itemsCount);
          } else {
            if (this.getModuleName() === 'listbox' && itemsCount === 0) {
              this.ulElement.innerHTML = '';
            }

            var attr = [];

            for (var _i71 = 0; _i71 < items.length; _i71++) {
              var listGroupItem = this.ulElement.querySelectorAll('.e-list-group-item');

              for (var j = 0; j < listGroupItem.length; j++) {
                attr[j] = listGroupItem[j].innerText;
              }

              if (attr.indexOf(liCollections[_i71].innerText) > -1 && fields.groupBy) {
                for (var _j2 = 0; _j2 < listGroupItem.length; _j2++) {
                  if (attr[_j2] === liCollections[_i71].innerText) {
                    if (this.sortOrder === 'None') {
                      this.ulElement.insertBefore(liCollections[_i71 + 1], listGroupItem[_j2 + 1]);
                    } else {
                      this.ulElement.insertBefore(liCollections[_i71 + 1], this.ulElement.childNodes[itemIndex]);
                    }

                    _i71 = _i71 + 1;
                    break;
                  }
                }
              } else {
                if (this.liCollections[index]) {
                  this.liCollections[index].parentNode.insertBefore(liCollections[_i71], this.liCollections[index]);
                } else {
                  this.ulElement.appendChild(liCollections[_i71]);
                }
              }

              var tempLi = [].slice.call(this.liCollections);
              tempLi.splice(index, 0, liCollections[_i71]);
              this.liCollections = tempLi;
              index += 1;

              if (this.getModuleName() === 'multiselect') {
                this.updateDataList();
              }
            }
          }

          if (selectedItemValue || itemIndex === 0) {
            this.updateSelection();
          }
        }
      }, {
        key: "validationAttribute",
        value: function validationAttribute(target, hidden) {
          var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
          hidden.setAttribute('name', name);
          target.removeAttribute('name');
          var attributes$$1 = ['required', 'aria-required', 'form'];

          for (var i = 0; i < attributes$$1.length; i++) {
            if (!target.getAttribute(attributes$$1[i])) {
              continue;
            }

            var attr = target.getAttribute(attributes$$1[i]);
            hidden.setAttribute(attributes$$1[i], attr);
            target.removeAttribute(attributes$$1[i]);
          }
        }
      }, {
        key: "setZIndex",
        value: function setZIndex() {// this is for component wise
        }
      }, {
        key: "updateActionCompleteData",
        value: function updateActionCompleteData(li, item, index) {// this is for ComboBox custom value
        }
      }, {
        key: "updateAddItemList",
        value: function updateAddItemList(list, itemCount) {// this is for multiselect add item
        }
      }, {
        key: "updateDataList",
        value: function updateDataList() {// this is for multiselect update list items
        }
        /**
         * Gets the data Object that matches the given value.
         * @param { string | number } value - Specifies the value of the list item.
         * @returns Object.
         * @blazorType object
         */

      }, {
        key: "getDataByValue",
        value: function getDataByValue(value) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            var type = this.typeOfData(this.listData)["typeof"];

            if (type === 'string' || type === 'number' || type === 'boolean') {
              var _iterator85 = _createForOfIteratorHelper(this.listData),
                  _step85;

              try {
                for (_iterator85.s(); !(_step85 = _iterator85.n()).done;) {
                  var item = _step85.value;

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) && item === value) {
                    return item;
                  }
                }
              } catch (err) {
                _iterator85.e(err);
              } finally {
                _iterator85.f();
              }
            } else {
              var _iterator86 = _createForOfIteratorHelper(this.listData),
                  _step86;

              try {
                for (_iterator86.s(); !(_step86 = _iterator86.n()).done;) {
                  var _item = _step86.value;

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_item) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.value ? this.fields.value : 'value', _item) === value) {
                    return _item;
                  }
                }
              } catch (err) {
                _iterator86.e(err);
              } finally {
                _iterator86.f();
              }
            }
          }

          return null;
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.
         * @method destroy
         * @return {void}.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (document.body.contains(this.list)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'scroll', this.setFloatingHeader);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rippleFun)) {
              this.rippleFun();
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.list);
          }

          _get(_getPrototypeOf(DropDownBase.prototype), "destroy", this).call(this);
        }
      }]);

      return DropDownBase;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      text: null,
      value: null,
      iconCss: null,
      groupBy: null
    }, FieldSettings)], DropDownBase.prototype, "fields", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownBase.prototype, "enablePersistence", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownBase.prototype, "itemTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownBase.prototype, "groupTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('No records found')], DropDownBase.prototype, "noRecordsTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Request failed')], DropDownBase.prototype, "actionFailureTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], DropDownBase.prototype, "sortOrder", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownBase.prototype, "enabled", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], DropDownBase.prototype, "dataSource", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownBase.prototype, "query", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('StartsWith')], DropDownBase.prototype, "filterType", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownBase.prototype, "ignoreCase", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], DropDownBase.prototype, "zIndex", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownBase.prototype, "ignoreAccent", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], DropDownBase.prototype, "locale", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "actionBegin", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "actionComplete", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "actionFailure", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "select", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "dataBound", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "created", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownBase.prototype, "destroyed", void 0);

    DropDownBase = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], DropDownBase);
    /**
     * export all modules from current location
     */

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>

    /* tslint:disable */
    // don't use space in classnames 


    var dropDownListClasses = {
      root: 'e-dropdownlist',
      hover: dropDownBaseClasses.hover,
      selected: dropDownBaseClasses.selected,
      rtl: dropDownBaseClasses.rtl,
      li: dropDownBaseClasses.li,
      disable: dropDownBaseClasses.disabled,
      base: dropDownBaseClasses.root,
      focus: dropDownBaseClasses.focus,
      input: 'e-input-group',
      inputFocus: 'e-input-focus',
      icon: 'e-input-group-icon e-ddl-icon',
      iconAnimation: 'e-icon-anim',
      value: 'e-input-value',
      device: 'e-ddl-device',
      backIcon: 'e-input-group-icon e-back-icon e-icons',
      filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',
      filterInput: 'e-input-filter',
      filterParent: 'e-filter-parent',
      mobileFilter: 'e-ddl-device-filter',
      footer: 'e-ddl-footer',
      header: 'e-ddl-header',
      clearIcon: 'e-clear-icon',
      clearIconHide: 'e-clear-icon-hide',
      popupFullScreen: 'e-popup-full-page',
      disableIcon: 'e-ddl-disable-icon',
      hiddenElement: 'e-ddl-hidden'
    };
    var inputObject = {
      container: null,
      buttons: []
    };
    /**
     * The DropDownList component contains a list of predefined values from which you can
     * choose a single value.
     * ```html
     * <input type="text" tabindex="1" id="list"> </input>
     * ```
     * ```typescript
     *   let dropDownListObj:DropDownList = new DropDownList();
     *   dropDownListObj.appendTo("#list");
     * ```
     */

    var DropDownList = /*#__PURE__*/function (_DropDownBase) {
      _inherits(DropDownList, _DropDownBase);

      var _super186 = _createSuper(DropDownList);

      /**
       * * Constructor for creating the DropDownList component.
       */
      function DropDownList(options, element) {
        var _this457;

        _classCallCheck(this, DropDownList);

        _this457 = _super186.call(this, options, element);
        _this457.previousValue = null;
        return _this457;
      }

      _createClass2(DropDownList, [{
        key: "preRender",

        /**
         * Initialize the event handler.
         * @private
         */
        value: function preRender() {
          var checkBlazor = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered;
          this.isServerBlazor = checkBlazor ? true : false;

          if (this.isServerBlazor) {
            this.initializeData();
          } else {
            this.element.style.opacity = '0';
            this.initializeData();

            _get(_getPrototypeOf(DropDownList.prototype), "preRender", this).call(this);
          }

          this.activeIndex = this.index;
          this.queryString = '';
        }
      }, {
        key: "initializeData",
        value: function initializeData() {
          this.isPopupOpen = false;
          this.isDocumentClick = false;
          this.isInteracted = false;
          this.isFilterFocus = false;
          this.beforePopupOpen = false;
          this.initial = true;
          this.initRemoteRender = false;
          this.isNotSearchList = false;
          this.isTyped = false;
          this.isSelected = false;
          this.preventFocus = false;
          this.preventAutoFill = false;
          this.isValidKey = false;
          this.typedString = '';
          this.isEscapeKey = false;
          this.isPreventBlur = false;
          this.isTabKey = false;
          this.actionCompleteData = {
            isUpdated: false
          };
          this.prevSelectPoints = {};
          this.isSelectCustom = false;
          this.isDropDownClick = false;
          this.preventAltUp = false;
          this.isCustomFilter = false;
          this.isSecondClick = false;
          this.keyConfigure = {
            tab: 'tab',
            enter: '13',
            escape: '27',
            end: '35',
            home: '36',
            down: '40',
            up: '38',
            pageUp: '33',
            pageDown: '34',
            open: 'alt+40',
            close: 'shift+tab',
            hide: 'alt+38',
            space: '32'
          };
        }
      }, {
        key: "setZIndex",
        value: function setZIndex() {
          if (this.popupObj) {
            this.popupObj.setProperties({
              'zIndex': this.zIndex
            });
          }
        }
      }, {
        key: "renderList",
        value: function renderList(isEmptyData) {
          if (!this.isServerBlazor) {
            _get(_getPrototypeOf(DropDownList.prototype), "render", this).call(this, isEmptyData);

            this.wireListEvents();
          } else {
            // tslint:disable-next-line
            this.interopAdaptor.invokeMethodAsync('OnServerRenderList', this.beforePopupOpen, false);
          }
        }
      }, {
        key: "floatLabelChange",
        value: function floatLabelChange() {
          if (this.getModuleName() === 'dropdownlist' && this.floatLabelType === 'Auto') {
            var floatElement = this.inputWrapper.container.querySelector('.e-float-text');

            if (this.inputElement.value !== '' || this.isInteracted) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(floatElement, ['e-label-top'], ['e-label-bottom']);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(floatElement, ['e-label-bottom'], ['e-label-top']);
            }
          }
        }
      }, {
        key: "resetHandler",
        value: function resetHandler(e) {
          e.preventDefault();
          this.clearAll(e);
        }
      }, {
        key: "resetFocusElement",
        value: function resetFocusElement() {
          this.removeHover();
          this.removeSelection();
          this.removeFocus();
          this.list.scrollTop = 0;

          if (this.getModuleName() !== 'autocomplete' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ulElement)) {
            var li = this.ulElement.querySelector('.' + dropDownListClasses.li);

            if (li) {
              li.classList.add(dropDownListClasses.focus);
            }
          }
        }
      }, {
        key: "clearAll",
        value: function clearAll(e, properties) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(properties) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(properties) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(properties.dataSource) || !(properties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && properties.dataSource.length === 0)) {
            this.isActive = true;
            this.resetSelection(properties);
          }

          var dataItem = this.getItemData();

          if (this.previousValue === dataItem.value) {
            return;
          }

          this.onChangeEvent(e);
        }
      }, {
        key: "resetSelection",
        value: function resetSelection(properties) {
          if (this.list) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(properties) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(properties.dataSource) || !(properties.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && properties.dataSource.length === 0)) {
              this.selectedLI = null;
              this.actionCompleteData.isUpdated = false;
              this.actionCompleteData.ulElement = null;
              this.actionCompleteData.list = null;
              this.resetList(properties.dataSource);
            } else {
              if (this.allowFiltering && this.getModuleName() !== 'autocomplete' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.actionCompleteData.ulElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.actionCompleteData.list)) {
                var actionList = this.actionCompleteData.ulElement.querySelector('li');
                var ulElement = this.ulElement && this.ulElement.querySelector('li');

                if (this.element.tagName === 'EJS-COMBOBOX' && actionList && ulElement && actionList.childElementCount > 0 && ulElement.childElementCount > 0 && actionList.textContent !== ulElement.textContent && this.itemTemplate) {
                  this.cloneElements();
                }

                this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
              }

              this.resetFocusElement();
            }
          }

          if (!this.isServerBlazor) {
            this.hiddenElement.innerHTML = '';
          }

          this.inputElement.value = '';
          this.value = null;
          this.itemData = null;
          this.text = null;
          this.index = null;
          this.activeIndex = null;
          this.item = null;
          this.queryString = '';

          if (this.valueTempElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.valueTempElement);
            this.inputElement.style.display = 'block';
            this.valueTempElement = null;
          }

          this.setSelection(null, null);
          this.isSelectCustom = false;
          this.updateIconState();
          this.cloneElements();
        }
      }, {
        key: "setHTMLAttributes",
        value: function setHTMLAttributes() {
          if (Object.keys(this.htmlAttributes).length) {
            for (var _i72 = 0, _Object$keys15 = Object.keys(this.htmlAttributes); _i72 < _Object$keys15.length; _i72++) {
              var htmlAttr = _Object$keys15[_i72];

              if (htmlAttr === 'class') {
                var updatedClassValue = this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ').trim();

                if (updatedClassValue !== '') {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], updatedClassValue.split(' '));
                }
              } else if (htmlAttr === 'disabled' && this.htmlAttributes[htmlAttr] === 'disabled') {
                this.enabled = false;
                this.setEnable();
              } else if (htmlAttr === 'readonly' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes[htmlAttr])) {
                this.readonly = true;
                this.dataBind();
              } else if (htmlAttr === 'style') {
                this.inputWrapper.container.setAttribute('style', this.htmlAttributes[htmlAttr]);
              } else {
                var defaultAttr = ['title', 'id', 'placeholder', 'aria-placeholder', 'role', 'autocorrect', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
                var validateAttr = ['name', 'required'];

                if (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') {
                  defaultAttr.push('tabindex');
                }

                if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
                  this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                } else if (defaultAttr.indexOf(htmlAttr) > -1) {
                  htmlAttr === 'placeholder' ? _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement) : this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                } else {
                  this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                }
              }
            }
          }

          if (this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') {
            this.inputWrapper.container.removeAttribute('tabindex');
          }
        }
      }, {
        key: "getAriaAttributes",
        value: function getAriaAttributes() {
          return {
            'aria-disabled': 'false',
            'aria-owns': this.element.id + '_options',
            'role': 'listbox',
            'aria-haspopup': 'true',
            'aria-expanded': 'false',
            'aria-activedescendant': 'null',
            'aria-live': 'polite',
            'aria-labelledby': this.hiddenElement.id
          };
        }
      }, {
        key: "setEnableRtl",
        value: function setEnableRtl() {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnableRtl(this.enableRtl, [this.inputElement.parentElement]);

          if (this.popupObj) {
            this.popupObj.enableRtl = this.enableRtl;
            this.popupObj.dataBind();
          }
        }
      }, {
        key: "setEnable",
        value: function setEnable() {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnabled(this.enabled, this.inputElement);

          if (this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], dropDownListClasses.disable);
            this.inputElement.setAttribute('aria-disabled', 'false');
            this.targetElement().setAttribute('tabindex', this.tabIndex);
          } else {
            this.hidePopup();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], dropDownListClasses.disable);
            this.inputElement.setAttribute('aria-disabled', 'true');
            this.targetElement().tabIndex = -1;
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['value']);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'drop-down-list';
        }
      }, {
        key: "preventTabIndex",
        value: function preventTabIndex(element) {
          if (this.getModuleName() === 'dropdownlist') {
            element.tabIndex = -1;
          }
        }
      }, {
        key: "targetElement",
        value: function targetElement() {
          return this.inputWrapper.container;
        }
      }, {
        key: "getNgDirective",
        value: function getNgDirective() {
          return 'EJS-DROPDOWNLIST';
        }
      }, {
        key: "getElementByText",
        value: function getElementByText(text) {
          return this.getElementByValue(this.getValueByText(text));
        }
      }, {
        key: "getElementByValue",
        value: function getElementByValue(value) {
          var item;
          var listItems = this.getItems();

          var _iterator87 = _createForOfIteratorHelper(listItems),
              _step87;

          try {
            for (_iterator87.s(); !(_step87 = _iterator87.n()).done;) {
              var liItem = _step87.value;

              if (this.getFormattedValue(liItem.getAttribute('data-value')) === value) {
                item = liItem;
                break;
              }
            }
          } catch (err) {
            _iterator87.e(err);
          } finally {
            _iterator87.f();
          }

          return item;
        }
      }, {
        key: "initValue",
        value: function initValue() {
          this.renderList();

          if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            this.initRemoteRender = true;
          } else {
            this.updateValues();
          }
        }
      }, {
        key: "updateValues",
        value: function updateValues() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.setSelection(this.getElementByValue(this.value), null);
          } else if (this.text && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            var element = this.getElementByText(this.text);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
              this.setProperties({
                text: null
              });
              return;
            } else {
              this.setSelection(element, null);
            }
          } else {
            this.setSelection(this.liCollections[this.activeIndex], null);
          }

          this.setHiddenValue();

          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }
      }, {
        key: "onBlur",
        value: function onBlur(e) {
          if (!this.enabled) {
            return;
          }

          var target = e.relatedTarget;
          var currentTarget = e.target;
          var isPreventBlur = this.isPreventBlur;
          this.isPreventBlur = false; //IE 11 - issue

          if (isPreventBlur && !this.isDocumentClick && this.isPopupOpen && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(currentTarget) || !this.isFilterLayout() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target))) {
            if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.isPopupOpen) {
              this.filterInput.focus();
            } else {
              this.targetElement().focus();
            }

            return;
          }

          if (this.isDocumentClick || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && document.body.contains(this.popupObj.element) && this.popupObj.element.classList.contains(dropDownListClasses.mobileFilter)) {
            if (!this.beforePopupOpen) {
              this.isDocumentClick = false;
            }

            return;
          }

          if (this.getModuleName() === 'dropdownlist' && !this.isFilterFocus && target !== this.inputElement && (document.activeElement !== target || document.activeElement === target && currentTarget.classList.contains(dropDownListClasses.inputFocus)) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) && this.getModuleName() === 'dropdownlist' && this.allowFiltering && currentTarget !== this.inputWrapper.container || this.getModuleName() !== 'dropdownlist' && !this.inputWrapper.container.contains(target) || this.isTabKey) {
            this.isDocumentClick = this.isPopupOpen ? true : false;
            this.focusOutAction(e);
            this.isTabKey = false;
          }

          if (this.isRequested && !this.isPopupOpen && !this.isPreventBlur) {
            this.isActive = false;
            this.beforePopupOpen = false;
          }
        }
      }, {
        key: "focusOutAction",
        value: function focusOutAction(e) {
          this.isInteracted = false;
          this.focusOut(e);
          this.onFocusOut();
        }
      }, {
        key: "onFocusOut",
        value: function onFocusOut() {
          if (!this.enabled) {
            return;
          }

          if (this.isSelected) {
            this.isSelectCustom = false;
            this.onChangeEvent(null);
          }

          this.floatLabelChange();
          this.dispatchEvent(this.hiddenElement, 'change');

          if (this.getModuleName() === 'dropdownlist' && this.element.tagName !== 'INPUT') {
            this.dispatchEvent(this.inputElement, 'blur');
          }

          if (this.inputWrapper.clearButton) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
          }

          this.trigger('blur');
        }
      }, {
        key: "onFocus",
        value: function onFocus(e) {
          if (!this.isInteracted) {
            this.isInteracted = true;
            var args = {
              isInteracted: e ? true : false,
              event: e
            };
            this.trigger('focus', args);
          }

          this.updateIconState();
        }
      }, {
        key: "resetValueHandler",
        value: function resetValueHandler(e) {
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement && e.target === formElement) {
            var val = this.element.tagName === this.getNgDirective() ? null : this.inputElement.getAttribute('value');
            this.text = val;
          }
        }
      }, {
        key: "wireEvent",
        value: function wireEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.container, 'mousedown', this.dropDownClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.container, 'focus', this.focusIn, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.container, 'keypress', this.onSearch, this);

          this.bindCommonEvent();
        }
      }, {
        key: "bindCommonEvent",
        value: function bindCommonEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.targetElement(), 'blur', this.onBlur, this);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(formElement, 'reset', this.resetValueHandler, this);
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.targetElement(), {
              keyAction: this.keyActionHandler.bind(this),
              keyConfigs: this.keyConfigure,
              eventName: 'keydown'
            });
          } else {
            this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.targetElement(), {
              keyAction: this.mobileKeyActionHandler.bind(this),
              keyConfigs: this.keyConfigure,
              eventName: 'keydown'
            });
          }

          this.bindClearEvent();
        }
      }, {
        key: "bindClearEvent",
        value: function bindClearEvent() {
          if (this.showClearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
          }
        }
      }, {
        key: "unBindCommonEvent",
        value: function unBindCommonEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.targetElement(), 'blur', this.onBlur);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(formElement, 'reset', this.resetValueHandler);
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.keyboardModule.destroy();
          }

          if (this.showClearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.clearButton, 'mousedown', this.resetHandler);
          }
        }
      }, {
        key: "updateIconState",
        value: function updateIconState() {
          if (this.showClearButton) {
            if (this.inputElement.value !== '' && !this.readonly) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
            }
          }
        }
        /**
         * Event binding for list
         */

      }, {
        key: "wireListEvents",
        value: function wireListEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'click', this.onMouseClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mouseover', this.onMouseOver, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mouseout', this.onMouseLeave, this);
        }
      }, {
        key: "onSearch",
        value: function onSearch(e) {
          if (e.charCode !== 32 && e.charCode !== 13) {
            if (this.list === undefined) {
              if (!this.isServerBlazor) {
                this.renderList();
              } else {
                this.isServerIncrementalSearch = true; // tslint:disable-next-line

                this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);
              }
            }

            this.searchKeyEvent = e;
            this.onServerIncrementalSearch(e);
          }
        }
      }, {
        key: "onServerIncrementalSearch",
        value: function onServerIncrementalSearch(e) {
          if (!this.isRequested && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list.querySelector('li')) && this.enabled && !this.readonly) {
            this.incrementalSearch(e);
          }
        }
      }, {
        key: "onMouseClick",
        value: function onMouseClick(e) {
          var target = e.target;
          var classList$$1 = target.classList;
          var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + dropDownBaseClasses.li);

          if (!this.isValidLI(li)) {
            return;
          }

          this.setSelection(li, e);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterLayout()) {
            history.back();
          } else {
            var delay = 100;
            this.closePopup(delay);
          }
        }
      }, {
        key: "onMouseOver",
        value: function onMouseOver(e) {
          var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + dropDownBaseClasses.li);
          this.setHover(currentLi);
        }
      }, {
        key: "setHover",
        value: function setHover(li) {
          if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], dropDownBaseClasses.hover);
          }
        }
      }, {
        key: "onMouseLeave",
        value: function onMouseLeave(e) {
          this.removeHover();
        }
      }, {
        key: "removeHover",
        value: function removeHover() {
          if (this.list) {
            var hoveredItem = this.isServerBlazor && this.popupObj && this.popupObj.element ? this.popupObj.element.querySelectorAll('.' + dropDownBaseClasses.hover) : this.list.querySelectorAll('.' + dropDownBaseClasses.hover);

            if (hoveredItem && hoveredItem.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, dropDownBaseClasses.hover);
            }
          }
        }
      }, {
        key: "isValidLI",
        value: function isValidLI(li) {
          return li && li.hasAttribute('role') && li.getAttribute('role') === 'option';
        }
      }, {
        key: "incrementalSearch",
        value: function incrementalSearch(e) {
          if (this.liCollections.length > 0) {
            var li = _incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id, this.isServerBlazor);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
              this.setSelection(li, e);
              this.setScrollPosition();
            }
          }
        }
      }, {
        key: "hideSpinner",

        /**
         * Hides the spinner loader.
         * @returns void.
         */
        value: function hideSpinner() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["hideSpinner"])(this.spinnerElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.spinnerElement], dropDownListClasses.disableIcon);
            this.spinnerElement.innerHTML = '';
            this.spinnerElement = null;
          }
        }
        /**
         * Shows the spinner loader.
         * @returns void.
         */

      }, {
        key: "showSpinner",
        value: function showSpinner() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            this.spinnerElement = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filterInputObj) && this.filterInputObj.buttons[1] || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filterInputObj) && this.filterInputObj.buttons[0] || this.inputWrapper.buttons[0];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.spinnerElement], dropDownListClasses.disableIcon);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["createSpinner"])({
              target: this.spinnerElement,
              width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? '16px' : '14px'
            }, this.createElement);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["showSpinner"])(this.spinnerElement);
          }
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          if (!this.enabled) {
            return;
          }

          var preventAction = e.action === 'pageUp' || e.action === 'pageDown';
          var preventHomeEnd = this.getModuleName() !== 'dropdownlist' && (e.action === 'home' || e.action === 'end');
          this.isEscapeKey = e.action === 'escape';
          this.isTabKey = !this.isPopupOpen && e.action === 'tab';
          var isNavAction = e.action === 'down' || e.action === 'up' || e.action === 'home' || e.action === 'end';
          var isNavigation = e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown' || e.action === 'home' || e.action === 'end';

          if ((this.isEditTextBox() || preventAction || preventHomeEnd) && !this.isPopupOpen) {
            return;
          }

          if (!this.readonly) {
            var isTabAction = e.action === 'tab' || e.action === 'close';

            if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {
              this.searchKeyEvent = e;
              this.renderList();
            }

            if (!(this.isServerBlazor && (e.action === 'open' || e.action === 'space')) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && isNavigation && this.liCollections.length === 0 || this.isRequested) {
              if (!(this.isServerBlazor && isNavAction)) {
                return;
              }
            }

            if (isTabAction && this.getModuleName() !== 'autocomplete' && this.isPopupOpen || e.action === 'escape') {
              e.preventDefault();
            }

            this.isSelected = e.action === 'escape' ? false : this.isSelected;
            this.isTyped = isNavigation || e.action === 'escape' ? false : this.isTyped;

            switch (e.action) {
              case 'down':
              case 'up':
                this.updateUpDownAction(e);
                break;

              case 'pageUp':
                this.pageUpSelection(this.activeIndex - this.getPageCount(), e);
                e.preventDefault();
                break;

              case 'pageDown':
                this.pageDownSelection(this.activeIndex + this.getPageCount(), e);
                e.preventDefault();
                break;

              case 'home':
                this.updateHomeEndAction(e);
                break;

              case 'end':
                this.updateHomeEndAction(e);
                break;

              case 'space':
                if (this.getModuleName() === 'dropdownlist') {
                  if (!this.beforePopupOpen) {
                    this.showPopup();
                  }
                }

                break;

              case 'open':
                this.showPopup();
                break;

              case 'hide':
                this.preventAltUp = this.isPopupOpen;
                this.hidePopup(e);
                this.focusDropDown(e);
                break;

              case 'enter':
                this.selectCurrentItem(e);
                break;

              case 'tab':
                this.selectCurrentValueOnTab(e);
                break;

              case 'escape':
              case 'close':
                if (this.isPopupOpen) {
                  this.hidePopup(e);
                  this.focusDropDown(e);
                }

                break;
            }
          }
        }
      }, {
        key: "updateUpDownAction",
        value: function updateUpDownAction(e) {
          if (this.isServerBlazor && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            this.isServerNavigation = true; // tslint:disable-next-line

            this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);
          } else {
            this.isServerNavigation = false;
            var focusEle = this.list.querySelector('.' + dropDownListClasses.focus);

            if (this.isSelectFocusItem(focusEle)) {
              this.setSelection(focusEle, e);
            } else {
              var nextItem;
              var index = e.action === 'down' ? this.activeIndex + 1 : this.activeIndex - 1;
              var startIndex = 0;

              if (this.getModuleName() === 'autocomplete') {
                startIndex = e.action === 'down' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) ? 0 : this.liCollections.length - 1;
                index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
              }

              nextItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index];

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nextItem)) {
                this.setSelection(nextItem, e);
              }
            }

            e.preventDefault();
          }
        }
      }, {
        key: "updateHomeEndAction",
        value: function updateHomeEndAction(e) {
          if (this.getModuleName() === 'dropdownlist') {
            if (this.isServerBlazor && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
              this.isServerNavigation = true; // tslint:disable-next-line

              this.interopAdaptor.invokeMethodAsync('OnServerRenderList', true, false);
            } else {
              this.isServerNavigation = false;
              var findLi = 0;

              if (e.action === 'home') {
                findLi = 0;
              } else {
                findLi = this.getItems().length - 1;
              }

              e.preventDefault();

              if (this.activeIndex === findLi) {
                return;
              }

              this.setSelection(this.liCollections[findLi], e);
            }
          }
        }
      }, {
        key: "selectCurrentValueOnTab",
        value: function selectCurrentValueOnTab(e) {
          if (this.getModuleName() === 'autocomplete') {
            this.selectCurrentItem(e);
          } else {
            if (this.isPopupOpen) {
              this.hidePopup(e);
              this.focusDropDown(e);
            }
          }
        }
      }, {
        key: "mobileKeyActionHandler",
        value: function mobileKeyActionHandler(e) {
          if (!this.enabled) {
            return;
          }

          if (this.isEditTextBox() && !this.isPopupOpen) {
            return;
          }

          if (!this.readonly) {
            if (this.list === undefined && !this.isRequested) {
              this.searchKeyEvent = e;
              this.renderList();
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length === 0 || this.isRequested) {
              return;
            }

            if (e.action === 'enter') {
              this.selectCurrentItem(e);
            }
          }
        }
      }, {
        key: "selectCurrentItem",
        value: function selectCurrentItem(e) {
          if (this.isPopupOpen) {
            var li = this.list.querySelector('.' + dropDownListClasses.focus);

            if (li) {
              this.setSelection(li, e);
              this.isTyped = false;
            }

            if (this.isSelected) {
              this.isSelectCustom = false;
              this.onChangeEvent(e);
            }

            this.hidePopup();
            this.focusDropDown(e);
          } else {
            this.showPopup();
          }
        }
      }, {
        key: "isSelectFocusItem",
        value: function isSelectFocusItem(element) {
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element);
        }
      }, {
        key: "getPageCount",
        value: function getPageCount() {
          var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
          return Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
        }
      }, {
        key: "pageUpSelection",
        value: function pageUpSelection(steps, event) {
          var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
          this.setSelection(previousItem, event);
        }
      }, {
        key: "pageDownSelection",
        value: function pageDownSelection(steps, event) {
          var list = this.getItems();
          var previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
          this.setSelection(previousItem, event);
        }
      }, {
        key: "unWireEvent",
        value: function unWireEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.container, 'keypress', this.onSearch);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.container, 'focus', this.focusIn);

          this.unBindCommonEvent();
        }
        /**
         * Event un binding for list items.
         */

      }, {
        key: "unWireListEvents",
        value: function unWireListEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'click', this.onMouseClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mouseover', this.onMouseOver);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mouseout', this.onMouseLeave);
        }
      }, {
        key: "checkSelector",
        value: function checkSelector(id) {
          return '#' + id.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g, '\\$1');
        }
      }, {
        key: "onDocumentClick",
        value: function onDocumentClick(e) {
          var target = e.target;

          if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, this.checkSelector(this.popupObj.element.id))) && !this.inputWrapper.container.contains(e.target)) {
            if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
              this.isDocumentClick = true;
              var isActive = this.isRequested;
              this.isInteracted = false;
              this.hidePopup(e);

              if (!isActive) {
                this.onFocusOut();
                this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
              }
            }
          } else if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput) && !(this.getModuleName() === 'combobox' && !this.allowFiltering && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && target === this.inputWrapper.buttons[0])) {
            this.isPreventBlur = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge') && (document.activeElement === this.targetElement() || document.activeElement === this.filterInput);
            e.preventDefault();
          }
        }
      }, {
        key: "activeStateChange",
        value: function activeStateChange() {
          if (this.isDocumentClick) {
            this.hidePopup();
            this.onFocusOut();
            this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus);
          }
        }
      }, {
        key: "focusDropDown",
        value: function focusDropDown(e) {
          if (!this.initial && this.isFilterLayout()) {
            this.focusIn(e);
          }
        }
      }, {
        key: "dropDownClick",
        value: function dropDownClick(e) {
          if (e.which === 3 || e.button === 2) {
            return;
          }

          if (this.targetElement().classList.contains(dropDownListClasses.disable) || this.inputWrapper.clearButton === e.target) {
            return;
          }

          var target = e.target;

          if (target !== this.inputElement && !(this.allowFiltering && target === this.filterInput) && this.getModuleName() !== 'combobox') {
            e.preventDefault();
          }

          if (!this.readonly) {
            if (this.isPopupOpen) {
              this.hidePopup();

              if (this.isFilterLayout()) {
                this.focusDropDown(e);
              }
            } else {
              this.focusIn(e);
              this.floatLabelChange();
              this.queryString = this.inputElement.value.trim() === '' ? null : this.inputElement.value;
              this.isDropDownClick = true;
              this.showPopup();
            }

            var proxy = this;
            var duration = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? 1000 : this.element.tagName === this.getNgDirective() && this.itemTemplate ? 500 : 100;

            if (!this.isSecondClick) {
              setTimeout(function () {
                proxy.cloneElements();
                proxy.isSecondClick = true;
              }, duration);
            }
          } else {
            this.focusIn(e);
          }
        }
      }, {
        key: "cloneElements",
        value: function cloneElements() {
          if (this.list) {
            var ulElement = this.list.querySelector('ul');

            if (ulElement) {
              ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
              this.actionCompleteData.ulElement = ulElement;
            }
          }
        }
      }, {
        key: "updateSelectedItem",
        value: function updateSelectedItem(li, e, preventSelect, isSelection) {
          var _this458 = this;

          this.removeSelection();
          li.classList.add(dropDownBaseClasses.selected);
          this.removeHover();
          var value = this.getFormattedValue(li.getAttribute('data-value'));
          var selectedData = this.getDataByValue(value);

          if (!this.initial && !preventSelect && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)) {
            var items = this.detachChanges(selectedData);
            this.isSelected = true;
            var eventArgs = {
              e: e,
              item: li,
              itemData: items,
              isInteracted: e ? true : false,
              cancel: false
            };
            this.trigger('select', eventArgs, function (eventArgs) {
              if (eventArgs.cancel) {
                li.classList.remove(dropDownBaseClasses.selected);
              } else {
                _this458.selectEventCallback(li, e, preventSelect, selectedData, value);

                if (_this458.isServerBlazor) {
                  // tslint:disable-next-line
                  _this458.interopAdaptor.invokeMethodAsync('OnServerItemData', _this458.itemData);
                }

                if (isSelection) {
                  _this458.setSelectOptions(li, e);
                }
              }
            });
          } else {
            this.selectEventCallback(li, e, preventSelect, selectedData, value);

            if (this.isServerBlazor) {
              // tslint:disable-next-line
              this.interopAdaptor.invokeMethodAsync('OnServerItemData', this.itemData);
            }

            if (isSelection) {
              this.setSelectOptions(li, e);
            }
          }
        }
      }, {
        key: "selectEventCallback",
        value: function selectEventCallback(li, e, preventSelect, selectedData, value) {
          this.previousItemData = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) ? this.itemData : null;
          this.item = li;
          this.itemData = selectedData;
          var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);

          if (focusedItem) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([focusedItem], dropDownBaseClasses.focus);
          }

          li.setAttribute('aria-selected', 'true');
          this.activeIndex = this.getIndexByValue(value);
        }
      }, {
        key: "activeItem",
        value: function activeItem(li) {
          if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
            this.removeSelection();
            li.classList.add(dropDownBaseClasses.selected);
            this.removeHover();
            li.setAttribute('aria-selected', 'true');
          }
        }
      }, {
        key: "setValue",
        value: function setValue(e) {
          var dataItem = this.getItemData();

          if (dataItem.value === null) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && dataItem.text !== null || dataItem.text !== '') {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);
            } else {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
            }
          } else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton);
          }

          if (this.isServerBlazor) {
            // tslint:disable-next-line
            this.interopAdaptor.invokeMethodAsync('OnServerValueTemplate', dataItem);
          }

          if (this.valueTemplate && this.itemData !== null && !this.isServerBlazor) {
            this.DropDownBaseresetBlazorTemplates(false, false, false, false, true);
            this.setValueTemplate();
          } else if (this.inputElement.previousSibling === this.valueTempElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.valueTempElement);
            this.inputElement.style.display = 'block';
          }

          if (this.previousValue === dataItem.value) {
            this.isSelected = false;
            return true;
          } else {
            this.isSelected = !this.initial ? true : false;
            this.isSelectCustom = false;

            if (this.getModuleName() === 'dropdownlist') {
              this.updateIconState();
            }

            return false;
          }
        }
      }, {
        key: "setSelection",
        value: function setSelection(li, e) {
          if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || this.isPopupOpen && this.isSelected && li.classList.contains(dropDownBaseClasses.selected))) {
            this.updateSelectedItem(li, e, false, true);
          } else {
            this.setSelectOptions(li, e);
          }
        }
      }, {
        key: "setSelectOptions",
        value: function setSelectOptions(li, e) {
          if (this.list) {
            this.removeHover();
          }

          this.previousSelectedLI = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI) ? this.selectedLI : null;
          this.selectedLI = li;

          if (this.setValue(e)) {
            return;
          }

          if (this.isPopupOpen) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), {
              'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null
            });

            if (this.isFilterLayout() && this.filterInput) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.filterInput, {
                'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null
              });
            }
          }

          if (!this.isPopupOpen && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) || this.isPopupOpen && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && (e.type !== 'keydown' || e.type === 'keydown' && e.action === 'enter')) {
            this.isSelectCustom = false;
            this.onChangeEvent(e);
          }

          if (this.isPopupOpen && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI) && this.itemData !== null && (!e || e.type !== 'click')) {
            this.setScrollPosition(e);
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name !== 'mozilla') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-label': this.inputElement.value
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), {
              'aria-describedby': this.inputElement.id
            });
            this.targetElement().removeAttribute('aria-live');
          }
        }
      }, {
        key: "dropdownCompiler",
        value: function dropdownCompiler(dropdownTemplate) {
          var checkTemplate = false;

          if (dropdownTemplate) {
            try {
              checkTemplate = document.querySelectorAll(dropdownTemplate).length ? true : false;
            } catch (exception) {
              checkTemplate = false;
            }
          }

          return checkTemplate;
        }
      }, {
        key: "setValueTemplate",
        value: function setValueTemplate() {
          var compiledString;

          if (!this.valueTempElement) {
            this.valueTempElement = this.createElement('span', {
              className: dropDownListClasses.value
            });
            this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);
            this.inputElement.style.display = 'none';
          }

          this.valueTempElement.innerHTML = '';
          var templateData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? JSON.parse(JSON.stringify(this.itemData)) : this.itemData;
          var valuecheck = this.dropdownCompiler(this.valueTemplate);

          if (valuecheck) {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.valueTemplate).innerHTML.trim());
          } else {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.valueTemplate);
          }

          var _iterator88 = _createForOfIteratorHelper(compiledString(templateData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate)),
              _step88;

          try {
            for (_iterator88.s(); !(_step88 = _iterator88.n()).done;) {
              var item = _step88.value;
              this.valueTempElement.appendChild(item);
            }
          } catch (err) {
            _iterator88.e(err);
          } finally {
            _iterator88.f();
          }

          this.DropDownBaseupdateBlazorTemplates(false, false, false, false, true, true, true);
        }
      }, {
        key: "removeSelection",
        value: function removeSelection() {
          if (this.list) {
            var selectedItems = this.list.querySelectorAll('.' + dropDownBaseClasses.selected);

            if (selectedItems.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectedItems, dropDownBaseClasses.selected);
              selectedItems[0].removeAttribute('aria-selected');
            }
          }
        }
      }, {
        key: "getItemData",
        value: function getItemData() {
          var fields = this.fields;
          var dataItem = null;
          dataItem = this.itemData;
          var dataValue;
          var dataText;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem)) {
            dataValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, dataItem);
            dataText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, dataItem);
          }

          var value = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(dataValue) ? dataValue : dataItem;
          var text = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(dataValue) ? dataText : dataItem;
          return {
            value: value,
            text: text
          };
        }
        /**
         * To trigger the change event for list.
         */

      }, {
        key: "onChangeEvent",
        value: function onChangeEvent(eve) {
          var dataItem = this.getItemData();
          var index = this.isSelectCustom ? null : this.activeIndex;
          this.setProperties({
            'index': index,
            'text': dataItem.text,
            'value': dataItem.value
          }, true);
          this.detachChangeEvent(eve);
        }
      }, {
        key: "detachChanges",
        value: function detachChanges(value) {
          var items;

          if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number') {
            items = Object.defineProperties({}, {
              value: {
                value: value,
                enumerable: true
              },
              text: {
                value: value,
                enumerable: true
              }
            });
          } else {
            items = value;
          }

          return items;
        }
      }, {
        key: "detachChangeEvent",
        value: function detachChangeEvent(eve) {
          this.isSelected = false;
          this.previousValue = this.value;
          this.activeIndex = this.index;
          this.typedString = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) ? this.text : '';

          if (!this.initial) {
            var items = this.detachChanges(this.itemData);
            var preItems;

            if (typeof this.previousItemData === 'string' || typeof this.previousItemData === 'boolean' || typeof this.previousItemData === 'number') {
              preItems = Object.defineProperties({}, {
                value: {
                  value: this.previousItemData,
                  enumerable: true
                },
                text: {
                  value: this.previousItemData,
                  enumerable: true
                }
              });
            } else {
              preItems = this.previousItemData;
            }

            this.setHiddenValue();
            var eventArgs = {
              e: eve,
              item: this.item,
              itemData: items,
              previousItem: this.previousSelectedLI,
              previousItemData: preItems,
              isInteracted: eve ? true : false,
              value: this.value,
              element: this.element
            };
            this.trigger('change', eventArgs);

            if (this.isServerBlazor && this.enablePersistence) {
              // tslint:disable-next-line
              this.interopAdaptor.invokeMethodAsync('ServerChange');
            }
          }

          if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value === '') && this.floatLabelType !== 'Always') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], 'e-valid-input');
          }
        }
      }, {
        key: "setHiddenValue",
        value: function setHiddenValue() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            if (this.isServerBlazor && this.hiddenElement.querySelector('option')) {
              var selectedElement = this.hiddenElement.querySelector('option');
              selectedElement.textContent = this.text;
              selectedElement.setAttribute('value', this.value.toString());
            } else if (!this.isServerBlazor) {
              this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';

              var _selectedElement = this.hiddenElement.querySelector('option');

              _selectedElement.setAttribute('value', this.value.toString());
            }
          } else if (!this.isServerBlazor) {
            this.hiddenElement.innerHTML = '';
          }
        }
        /**
         * Filter bar implementation
         */

      }, {
        key: "onFilterUp",
        value: function onFilterUp(e) {
          if (!(e.ctrlKey && e.keyCode === 86) && (this.isValidKey || e.keyCode === 40 || e.keyCode === 38)) {
            this.isValidKey = false;

            switch (e.keyCode) {
              case 38: //up arrow 

              case 40:
                //down arrow 
                if (this.getModuleName() === 'autocomplete' && !this.isPopupOpen && !this.preventAltUp && !this.isRequested) {
                  this.preventAutoFill = true;
                  this.searchLists(e);
                } else {
                  this.preventAutoFill = false;
                }

                this.preventAltUp = false;
                e.preventDefault();
                break;

              case 46: //delete

              case 8:
                //backspace
                this.typedString = this.filterInput.value;

                if (!this.isPopupOpen && this.typedString !== '' || this.isPopupOpen && this.queryString.length > 0) {
                  this.preventAutoFill = true;
                  this.searchLists(e);
                } else if (this.typedString === '' && this.queryString === '' && this.getModuleName() !== 'autocomplete') {
                  this.preventAutoFill = true;
                  this.searchLists(e);
                } else if (this.typedString === '') {
                  if (this.list) {
                    this.resetFocusElement();
                  }

                  this.activeIndex = null;

                  if (this.getModuleName() === 'autocomplete') {
                    this.hidePopup();
                  }
                }

                e.preventDefault();
                break;

              default:
                this.typedString = this.filterInput.value;
                this.preventAutoFill = false;
                this.searchLists(e);
                break;
            }
          } else {
            this.isValidKey = false;
          }
        }
      }, {
        key: "onFilterDown",
        value: function onFilterDown(e) {
          switch (e.keyCode) {
            case 13:
              //enter
              break;

            case 40: //down arrow

            case 38:
              //up arrow 
              this.queryString = this.filterInput.value;
              e.preventDefault();
              break;

            case 9:
              //tab 
              if (this.isPopupOpen && this.getModuleName() !== 'autocomplete') {
                e.preventDefault();
              }

              break;

            default:
              this.prevSelectPoints = this.getSelectionPoints();
              this.queryString = this.filterInput.value;
              break;
          }
        }
      }, {
        key: "removeFillSelection",
        value: function removeFillSelection() {
          if (this.isInteracted) {
            var selection = this.getSelectionPoints();
            this.inputElement.setSelectionRange(selection.end, selection.end);
          }
        }
      }, {
        key: "getQuery",
        value: function getQuery(query) {
          var filterQuery;

          if (!this.isCustomFilter && this.allowFiltering && this.filterInput) {
            filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
            var filterType = this.typedString === '' ? 'contains' : this.filterType;
            var dataType = this.typeOfData(this.dataSource)["typeof"];

            if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && dataType === 'string' || dataType === 'number') {
              filterQuery.where('', filterType, this.typedString, this.ignoreCase, this.ignoreAccent);
            } else {
              var fields = this.fields.text ? this.fields.text : '';
              filterQuery.where(fields, filterType, this.typedString, this.ignoreCase, this.ignoreAccent);
            }
          } else {
            filterQuery = query ? query : this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
          }

          return filterQuery;
        }
      }, {
        key: "getSelectionPoints",
        value: function getSelectionPoints() {
          var input = this.inputElement;
          return {
            start: Math.abs(input.selectionStart),
            end: Math.abs(input.selectionEnd)
          };
        }
      }, {
        key: "searchLists",
        value: function searchLists(e) {
          var _this459 = this;

          this.isTyped = true;
          this.activeIndex = null;

          if (this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon)) {
            var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
            clearElement.style.visibility = this.filterInput.value === '' ? 'hidden' : 'visible';
          }

          this.isDataFetched = false;

          if (this.isFiltering()) {
            if (this.isServerBlazor) {
              this.beforePopupOpen = this.getModuleName() === 'combobox' && this.isFiltering() && !this.beforePopupOpen ? !this.beforePopupOpen : this.beforePopupOpen;

              if (this.filterInput.value === '' && this.getModuleName() !== 'dropdownlist') {
                // tslint:disable-next-line
                this.interopAdaptor.invokeMethodAsync('OnServerRenderList', this.beforePopupOpen, false);
              } else {
                // tslint:disable-next-line
                this.interopAdaptor.invokeMethodAsync('OnServerFilter', this.filterInput.value);
              }
            } else {
              var eventArgs = {
                preventDefaultAction: false,
                text: this.filterInput.value,
                updateData: function updateData(dataSource, query, fields) {
                  if (eventArgs.cancel) {
                    return;
                  }

                  _this459.isCustomFilter = true;

                  _this459.filteringAction(dataSource, query, fields);
                },
                baseEventArgs: e,
                cancel: false
              };
              this.trigger('filtering', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel && !_this459.isCustomFilter && !eventArgs.preventDefaultAction) {
                  _this459.filteringAction(_this459.dataSource, null, _this459.fields);
                }
              });
            }
          }
        }
        /**
         * To filter the data from given data source by using query
         * @param  {Object[] | DataManager } dataSource - Set the data source to filter.
         * @param  {Query} query - Specify the query to filter the data.
         * @param  {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
         * @return {void}.
         * @deprecated
         */

      }, {
        key: "filter",
        value: function filter(dataSource, query, fields) {
          this.isCustomFilter = true;
          this.filteringAction(dataSource, query, fields);
        }
      }, {
        key: "filteringAction",
        value: function filteringAction(dataSource, query, fields) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filterInput)) {
            this.beforePopupOpen = true;

            if (this.filterInput.value.trim() === '' && !this.itemTemplate) {
              this.actionCompleteData.isUpdated = false;
              this.isTyped = false;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.actionCompleteData.ulElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.actionCompleteData.list)) {
                this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list);
              }

              this.isTyped = true;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) && this.getModuleName() === 'dropdownlist') {
                this.focusIndexItem();
                this.setScrollPosition();
              }

              this.isNotSearchList = true;
            } else {
              this.isNotSearchList = false;
              query = this.filterInput.value.trim() === '' ? null : query;
              this.resetList(dataSource, fields, query);
            }
          }
        }
      }, {
        key: "setSearchBox",
        value: function setSearchBox(popupElement) {
          if (this.isFiltering()) {
            var parentElement = popupElement.querySelector('.' + dropDownListClasses.filterParent) ? popupElement.querySelector('.' + dropDownListClasses.filterParent) : this.createElement('span', {
              className: dropDownListClasses.filterParent
            });

            if (this.isServerBlazor) {
              parentElement.innerHTML = '';
            }

            this.filterInput = this.createElement('input', {
              attrs: {
                type: 'text'
              },
              className: dropDownListClasses.filterInput
            });
            this.element.parentNode.insertBefore(this.filterInput, this.element);
            var backIcon = false;

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              backIcon = true;
            }

            this.filterInputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
              element: this.filterInput,
              buttons: backIcon ? [dropDownListClasses.backIcon, dropDownListClasses.filterBarClearIcon] : [dropDownListClasses.filterBarClearIcon],
              properties: {
                placeholder: this.filterBarPlaceholder
              }
            }, this.createElement);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass)) {
              if (this.cssClass.split(' ').indexOf('e-outline') !== -1) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.filterInputObj.container], 'e-outline');
              } else if (this.cssClass.split(' ').indexOf('e-filled') !== -1) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.filterInputObj.container], 'e-filled');
              }
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.filterInputObj.container], parentElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([parentElement], popupElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.filterInput, {
              'aria-disabled': 'false',
              'aria-owns': this.element.id + '_options',
              'role': 'listbox',
              'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null,
              'autocomplete': 'off',
              'autocorrect': 'off',
              'autocapitalize': 'off',
              'spellcheck': 'false'
            });
            this.clearIconElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.clearIconElement) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.clearIconElement, 'click', this.clearText, this);

              this.clearIconElement.style.visibility = 'hidden';
            }

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              this.searchKeyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.filterInput, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigure,
                eventName: 'keydown'
              });
            } else {
              this.searchKeyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.filterInput, {
                keyAction: this.mobileKeyActionHandler.bind(this),
                keyConfigs: this.keyConfigure,
                eventName: 'keydown'
              });
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'input', this.onInput, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keyup', this.onFilterUp, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keydown', this.onFilterDown, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'blur', this.onBlur, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'paste', this.pasteHandler, this);

            return this.filterInputObj;
          } else {
            return inputObject;
          }
        }
      }, {
        key: "onInput",
        value: function onInput(e) {
          this.isValidKey = true; // For filtering works in mobile firefox.

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'mozilla') {
            this.typedString = this.filterInput.value;
            this.preventAutoFill = true;
            this.searchLists(e);
          }
        }
      }, {
        key: "pasteHandler",
        value: function pasteHandler(e) {
          var _this460 = this;

          setTimeout(function () {
            _this460.typedString = _this460.filterInput.value;

            _this460.searchLists(e);
          });
        }
      }, {
        key: "onActionFailure",
        value: function onActionFailure(e) {
          _get(_getPrototypeOf(DropDownList.prototype), "onActionFailure", this).call(this, e);

          if (this.beforePopupOpen) {
            this.renderPopup();
          }
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e, isUpdated) {
          var _this461 = this;

          if (this.isNotSearchList) {
            this.isNotSearchList = false;
            return;
          }

          if (this.isActive) {
            var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(true) : null;

            _get(_getPrototypeOf(DropDownList.prototype), "onActionComplete", this).call(this, ulElement, list, e);

            this.updateSelectElementData(this.allowFiltering);

            if (this.isRequested && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.searchKeyEvent) && this.searchKeyEvent.type === 'keydown') {
              this.isRequested = false;
              this.keyActionHandler(this.searchKeyEvent);
              this.searchKeyEvent = null;
            }

            if (this.isRequested && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.searchKeyEvent)) {
              this.incrementalSearch(this.searchKeyEvent);
              this.searchKeyEvent = null;
            }

            this.list.scrollTop = 0;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ulElement)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(ulElement, {
                'id': this.element.id + '_options',
                'role': 'listbox',
                'aria-hidden': 'false'
              });
            }

            if (this.initRemoteRender) {
              this.initial = true;
              this.activeIndex = this.index;
              this.updateValues();
              this.initRemoteRender = false;
              this.initial = false;

              if (this.value && this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                var checkField = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.value) ? this.fields.text : this.fields.value;
                var checkVal = list.some(function (x) {
                  return x[checkField] === _this461.value;
                });

                if (!checkVal) {
                  this.dataSource.executeQuery(this.getQuery(this.query).where(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](checkField, 'equal', this.value))).then(function (e) {
                    if (e.result.length > 0) {
                      _this461.addItem(e.result, list.length);

                      _this461.updateValues();
                    }
                  });
                }
              }
            }

            if (this.getModuleName() !== 'autocomplete' && this.isFiltering() && !this.isTyped) {
              if (!this.actionCompleteData.isUpdated || !this.isCustomFilter && !this.isFilterFocus || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) && this.allowFiltering && (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataSource) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataSource.length) && this.dataSource.length !== 0)) {
                this.actionCompleteData = {
                  ulElement: ulElement.cloneNode(true),
                  list: list,
                  isUpdated: true
                };
              }

              this.addNewItem(list, selectedItem);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData)) {
                this.focusIndexItem();
              }
            }

            if (this.beforePopupOpen) {
              this.renderPopup();
            }
          }
        }
      }, {
        key: "addNewItem",
        value: function addNewItem(listData, newElement) {
          var _this462 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newElement)) {
            var value = this.getItemData().value;
            var isExist = listData.some(function (data) {
              return (typeof data === 'string' || typeof data === 'number') && data === value || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(_this462.fields.value, data) === value;
            });

            if (!isExist) {
              this.addItem(this.itemData);
            }
          }
        }
      }, {
        key: "updateActionCompleteData",
        value: function updateActionCompleteData(li, item, index) {
          if (this.getModuleName() !== 'autocomplete' && this.actionCompleteData.ulElement) {
            this.actionCompleteData.ulElement.insertBefore(li.cloneNode(true), this.actionCompleteData.ulElement.childNodes[index]);

            if (this.isFiltering() && this.actionCompleteData.list.indexOf(item) < 0) {
              this.actionCompleteData.list.push(item);
            }
          }
        }
      }, {
        key: "focusIndexItem",
        value: function focusIndexItem() {
          var value = this.getItemData().value;
          this.activeIndex = this.getIndexByValue(value);
          var element = this.findListElement(this.list, 'li', 'data-value', value);
          this.selectedLI = element;
          this.activeItem(element);
          this.removeFocus();
        }
      }, {
        key: "updateSelection",
        value: function updateSelection() {
          var selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);

          if (selectedItem) {
            this.setProperties({
              'index': this.getIndexByValue(selectedItem.getAttribute('data-value'))
            });
            this.activeIndex = this.index;
          } else {
            this.removeFocus();
            this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
          }
        }
      }, {
        key: "removeFocus",
        value: function removeFocus() {
          var highlightedItem = this.list.querySelectorAll('.' + dropDownListClasses.focus);

          if (highlightedItem && highlightedItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(highlightedItem, dropDownListClasses.focus);
          }
        }
      }, {
        key: "renderPopup",
        value: function renderPopup() {
          var _this463 = this;

          if (this.popupObj && document.body.contains(this.popupObj.element)) {
            this.refreshPopup();
            return;
          }

          var args = {
            cancel: false
          };
          this.trigger('beforeOpen', args, function (args) {
            if (!args.cancel) {
              var popupEle = _this463.serverPopupEle ? _this463.serverPopupEle : _this463.createElement('div', {
                id: _this463.element.id + '_popup',
                className: 'e-ddl e-popup ' + (_this463.cssClass != null ? _this463.cssClass : '')
              });

              var searchBox = _this463.setSearchBox(popupEle);

              _this463.listHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this463.popupHeight);

              if (_this463.headerTemplate && !_this463.isServerBlazor) {
                _this463.setHeaderTemplate(popupEle);
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([_this463.list], popupEle);

              if (_this463.footerTemplate && !_this463.isServerBlazor) {
                _this463.setFooterTemplate(popupEle);
              }

              if (_this463.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-footer')) {
                popupEle.appendChild(popupEle.querySelector('.e-ddl-footer'));
              }

              document.body.appendChild(popupEle);

              _this463.updateServerPopup(popupEle);

              popupEle.style.visibility = 'hidden';

              if (_this463.popupHeight !== 'auto') {
                _this463.searchBoxHeight = 0;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchBox.container)) {
                  _this463.searchBoxHeight = searchBox.container.parentElement.getBoundingClientRect().height;
                  _this463.listHeight = (parseInt(_this463.listHeight, 10) - _this463.searchBoxHeight).toString() + 'px';
                }

                if (_this463.headerTemplate || _this463.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-header')) {
                  _this463.header = _this463.header ? _this463.header : popupEle.querySelector('.e-ddl-header');
                  var height = Math.round(_this463.header.getBoundingClientRect().height);
                  _this463.listHeight = (parseInt(_this463.listHeight, 10) - (height + _this463.searchBoxHeight)).toString() + 'px';
                }

                if (_this463.footerTemplate || _this463.isServerRendered && popupEle && popupEle.querySelector('.e-ddl-footer')) {
                  _this463.footer = _this463.footer ? _this463.footer : popupEle.querySelector('.e-ddl-footer');

                  var _height = Math.round(_this463.footer.getBoundingClientRect().height);

                  _this463.listHeight = (parseInt(_this463.listHeight, 10) - (_height + _this463.searchBoxHeight)).toString() + 'px';
                }

                _this463.list.style.maxHeight = (parseInt(_this463.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property

                popupEle.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this463.popupHeight);
              } else {
                popupEle.style.height = 'auto';
              }

              var offsetValue = 0;
              var left;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this463.selectedLI) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this463.activeIndex) && _this463.activeIndex >= 0) {
                _this463.setScrollPosition();
              } else {
                _this463.list.scrollTop = 0;
              }

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !_this463.allowFiltering && (_this463.getModuleName() === 'dropdownlist' || _this463.isDropDownClick && _this463.getModuleName() === 'combobox')) {
                offsetValue = _this463.getOffsetValue(popupEle);
                var firstItem = _this463.isEmptyList() ? _this463.list : _this463.liCollections[0];
                left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(_this463.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(_this463.inputElement.parentElement).borderLeftWidth, 10));
              }

              _this463.getFocusElement();

              _this463.createPopup(popupEle, offsetValue, left);

              _this463.checkCollision(popupEle);

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                _this463.popupObj.element.classList.add(dropDownListClasses.device);

                if (_this463.getModuleName() === 'dropdownlist' || _this463.getModuleName() === 'combobox' && !_this463.allowFiltering && _this463.isDropDownClick) {
                  _this463.popupObj.collision = {
                    X: 'fit',
                    Y: 'fit'
                  };
                }

                if (_this463.isFilterLayout()) {
                  _this463.popupObj.element.classList.add(dropDownListClasses.mobileFilter);

                  _this463.popupObj.position = {
                    X: 0,
                    Y: 0
                  };

                  _this463.popupObj.dataBind();

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this463.popupObj.element, {
                    style: 'left:0px;right:0px;top:0px;bottom:0px;'
                  });
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body, _this463.popupObj.element], dropDownListClasses.popupFullScreen);

                  _this463.setSearchBoxPosition();

                  _this463.backIconElement = searchBox.container.querySelector('.e-back-icon');
                  _this463.clearIconElement = searchBox.container.querySelector('.' + dropDownListClasses.clearIcon);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this463.backIconElement, 'click', _this463.clickOnBackIcon, _this463);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this463.clearIconElement, 'click', _this463.clearText, _this463);
                }
              }

              popupEle.style.visibility = 'visible';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([popupEle], 'e-popup-close');

              var scrollParentElements = _this463.popupObj.getScrollableParent(_this463.inputWrapper.container);

              var _iterator89 = _createForOfIteratorHelper(scrollParentElements),
                  _step89;

              try {
                for (_iterator89.s(); !(_step89 = _iterator89.n()).done;) {
                  var element = _step89.value;

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'scroll', _this463.scrollHandler, _this463);
                }
              } catch (err) {
                _iterator89.e(err);
              } finally {
                _iterator89.f();
              }

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _this463.isFilterLayout()) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this463.list, 'scroll', _this463.listScroll, _this463);
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this463.targetElement(), {
                'aria-expanded': 'true'
              });
              var inputParent = _this463.isFiltering() ? _this463.filterInput.parentElement : _this463.inputWrapper.container;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([inputParent], [dropDownListClasses.inputFocus]);
              var animModel = {
                name: 'FadeIn',
                duration: 100
              };
              _this463.beforePopupOpen = true;
              var popupInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this463.isServerRendered ? null : _this463.popupObj;
              var eventArgs = {
                popup: popupInstance,
                cancel: false,
                animation: animModel
              };

              _this463.trigger('open', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel) {
                  _this463.serverBlazorUpdateSelection();

                  _this463.bindServerScrollEvent();

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this463.inputWrapper.container], [dropDownListClasses.iconAnimation]);

                  _this463.popupObj.show(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](eventArgs.animation), _this463.zIndex === 1000 ? _this463.element : null);
                } else {
                  _this463.beforePopupOpen = false;

                  _this463.destroyPopup();
                }
              });
            } else {
              _this463.beforePopupOpen = false;
            }
          });
        }
      }, {
        key: "checkCollision",
        value: function checkCollision(popupEle) {
          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !(this.getModuleName() === 'dropdownlist' || this.isDropDownClick)) {
            var collision = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["isCollide"])(popupEle);

            if (collision.length > 0) {
              popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
            }

            this.popupObj.resolveCollision();
          }
        }
      }, {
        key: "serverBlazorUpdateSelection",
        value: function serverBlazorUpdateSelection() {
          if (this.isServerBlazor && (this.value !== null || this.index !== null || this.text !== null) || this.getModuleName() !== 'dropdownlist' && !this.isTyped) {
            if (this.getModuleName() === 'dropdownlist') {
              this.removeSelection();
              this.removeFocus();
              this.removeHover();
              this.updateValues();
            }

            if (this.getModuleName() === 'combobox' && this.ulElement && this.findListElement(this.ulElement, 'li', 'data-value', this.value) && !this.isTyped) {
              this.updateValues();
            }

            if (this.isServerBlazor && this.getModuleName() !== 'dropdownlist' && (this.text === '' || this.text === null) && this.ulElement) {
              if (!this.ulElement.querySelector('li').classList.contains(dropDownBaseClasses.hover)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.ulElement.querySelector('li')], dropDownBaseClasses.hover);
              }
            }
          }
        }
      }, {
        key: "bindServerScrollEvent",
        value: function bindServerScrollEvent() {
          if (this.isServerBlazor && this.list) {
            if (this.fields.groupBy && !this.isGroupChecking) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'scroll', this.setFloatingHeader);

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'scroll', this.setFloatingHeader, this);
            }
          }
        }
      }, {
        key: "updateServerPopup",
        value: function updateServerPopup(popupEle) {
          if (this.isServerBlazor) {
            if (popupEle && popupEle.querySelector('li')) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([popupEle.querySelector('.e-content')], ['e-nodata']);
            }

            this.initial = false;
            popupEle.removeAttribute('style');
          }
        }
      }, {
        key: "getOffsetValue",
        value: function getOffsetValue(popupEle) {
          var popupStyles = getComputedStyle(popupEle);
          var borderTop = parseInt(popupStyles.borderTopWidth, 10);
          var borderBottom = parseInt(popupStyles.borderBottomWidth, 10);
          return this.setPopupPosition(borderTop + borderBottom);
        }
      }, {
        key: "createPopup",
        value: function createPopup(element, offsetValue, left) {
          var _this464 = this;

          this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["Popup"](element, {
            width: this.setWidth(),
            targetType: 'relative',
            relateTo: this.inputWrapper.container,
            collision: {
              X: 'flip',
              Y: 'flip'
            },
            offsetY: offsetValue,
            enableRtl: this.enableRtl,
            offsetX: left,
            position: {
              X: 'left',
              Y: 'bottom'
            },
            zIndex: this.zIndex,
            close: function close() {
              if (!_this464.isDocumentClick) {
                _this464.focusDropDown();
              }

              var isResetItem = _this464.getModuleName() === 'autocomplete' ? true : false;

              _this464.DropDownBaseresetBlazorTemplates(isResetItem, isResetItem, true, true, false, true, true);

              _this464.isNotSearchList = false;
              _this464.isDocumentClick = false;

              _this464.destroyPopup();

              var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this464.inputElement, 'form');

              if (_this464.isFiltering() && formElement && _this464.actionCompleteData.list && _this464.actionCompleteData.list[0]) {
                _this464.isActive = true;

                _this464.onActionComplete(_this464.actionCompleteData.ulElement, _this464.actionCompleteData.list, null, true);
              }
            },
            open: function open() {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', _this464.onDocumentClick, _this464);

              _this464.isPopupOpen = true;

              var actionList = _this464.actionCompleteData && _this464.actionCompleteData.ulElement && _this464.actionCompleteData.ulElement.querySelector('li');

              var ulElement = _this464.list.querySelector('ul li');

              if (_this464.isFiltering() && _this464.itemTemplate && _this464.element.tagName === _this464.getNgDirective() && actionList && ulElement && actionList.textContent !== ulElement.textContent) {
                _this464.cloneElements();
              }

              if (_this464.isFilterLayout()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this464.inputWrapper.container], [dropDownListClasses.inputFocus]);
                _this464.isFilterFocus = true;

                _this464.filterInput.focus();

                if (_this464.inputWrapper.clearButton) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this464.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
                }
              }

              _this464.activeStateChange();
            },
            targetExitViewport: function targetExitViewport() {
              if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                _this464.hidePopup();
              }
            }
          });
        }
      }, {
        key: "isEmptyList",
        value: function isEmptyList() {
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length === 0;
        }
      }, {
        key: "getFocusElement",
        value: function getFocusElement() {// combo-box used this method
        }
      }, {
        key: "isFilterLayout",
        value: function isFilterLayout() {
          return this.getModuleName() === 'dropdownlist' && this.allowFiltering;
        }
      }, {
        key: "scrollHandler",
        value: function scrollHandler() {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && (this.getModuleName() === 'dropdownlist' && !this.isFilterLayout() || this.getModuleName() === 'combobox' && !this.allowFiltering && this.isDropDownClick)) {
            this.hidePopup();
          }
        }
      }, {
        key: "setSearchBoxPosition",
        value: function setSearchBoxPosition() {
          var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
          this.popupObj.element.style.maxHeight = '100%';
          this.popupObj.element.style.width = '100%';
          this.list.style.maxHeight = window.innerHeight - searchBoxHeight + 'px';
          this.list.style.height = window.innerHeight - searchBoxHeight + 'px';
          var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.filterInput);
          clearElement.parentElement.insertBefore(this.filterInput, clearElement);
        }
      }, {
        key: "setPopupPosition",
        value: function setPopupPosition(border) {
          var offsetValue;
          var popupOffset = border;
          var selectedLI = this.list.querySelector('.' + dropDownListClasses.focus) || this.selectedLI;
          var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
          var lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1];
          var liHeight = firstItem.getBoundingClientRect().height;
          var listHeight = this.list.offsetHeight / 2;
          var height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedLI) ? firstItem.offsetTop : selectedLI.offsetTop;
          var lastItemOffsetValue = lastItem.offsetTop;

          if (lastItemOffsetValue - listHeight < height && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedLI)) {
            var count = this.list.offsetHeight / liHeight;
            var paddingBottom = parseInt(getComputedStyle(this.list).paddingBottom, 10);
            offsetValue = (count - (this.liCollections.length - this.activeIndex)) * liHeight - popupOffset + paddingBottom;
            this.list.scrollTop = selectedLI.offsetTop;
          } else if (height > listHeight) {
            offsetValue = listHeight - liHeight / 2;
            this.list.scrollTop = height - listHeight + liHeight / 2;
          } else {
            offsetValue = height;
          }

          var inputHeight = this.inputWrapper.container.offsetHeight;
          offsetValue = offsetValue + liHeight + popupOffset - (liHeight - inputHeight) / 2;
          return -offsetValue;
        }
      }, {
        key: "setWidth",
        value: function setWidth() {
          var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.popupWidth);

          if (width.indexOf('%') > -1) {
            var inputWidth = this.inputWrapper.container.offsetWidth * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering && (this.getModuleName() === 'dropdownlist' || this.isDropDownClick && this.getModuleName() === 'combobox')) {
            var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
            width = parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2 + 'px';
          }

          return width;
        }
      }, {
        key: "scrollBottom",
        value: function scrollBottom(isInitial) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI)) {
            var currentOffset = this.list.offsetHeight;
            var nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            var nextOffset = this.list.scrollTop + nextBottom - currentOffset;
            nextOffset = isInitial ? nextOffset + parseInt(getComputedStyle(this.list).paddingTop, 10) * 2 : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            boxRange = this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange;

            if (this.activeIndex === 0) {
              this.list.scrollTop = 0;
            } else if (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) {
              this.list.scrollTop = nextOffset;
            }
          }
        }
      }, {
        key: "scrollTop",
        value: function scrollTop() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI)) {
            var nextOffset = this.selectedLI.offsetTop - this.list.scrollTop;
            var nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            nextOffset = this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;

            if (this.activeIndex === 0) {
              this.list.scrollTop = 0;
            } else if (nextOffset < 0) {
              this.list.scrollTop = this.list.scrollTop + nextOffset;
            } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
              this.list.scrollTop = this.selectedLI.offsetTop - (this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0);
            }
          }
        }
      }, {
        key: "isEditTextBox",
        value: function isEditTextBox() {
          return false;
        }
      }, {
        key: "isFiltering",
        value: function isFiltering() {
          return this.allowFiltering;
        }
      }, {
        key: "isPopupButton",
        value: function isPopupButton() {
          return true;
        }
      }, {
        key: "setScrollPosition",
        value: function setScrollPosition(e) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)) {
            switch (e.action) {
              case 'pageDown':
              case 'down':
              case 'end':
                this.scrollBottom();
                break;

              default:
                this.scrollTop();
                break;
            }
          } else {
            this.scrollBottom(true);
          }
        }
      }, {
        key: "clearText",
        value: function clearText() {
          this.filterInput.value = '';
          this.searchLists(null);
        }
      }, {
        key: "listScroll",
        value: function listScroll() {
          this.filterInput.blur();
        }
      }, {
        key: "setEleWidth",
        value: function setEleWidth(width) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            if (typeof width === 'number') {
              this.inputWrapper.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            } else if (typeof width === 'string') {
              this.inputWrapper.container.style.width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            }
          }
        }
      }, {
        key: "closePopup",
        value: function closePopup(delay) {
          var _this465 = this;

          this.isTyped = false;

          if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
            return;
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown', this.onDocumentClick);

          this.isActive = false;
          this.filterInputObj = null;
          this.isDropDownClick = false;
          this.preventAutoFill = false;
          var scrollableParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);

          var _iterator90 = _createForOfIteratorHelper(scrollableParentElements),
              _step90;

          try {
            for (_iterator90.s(); !(_step90 = _iterator90.n()).done;) {
              var element = _step90.value;

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, 'scroll', this.scrollHandler);
            }
          } catch (err) {
            _iterator90.e(err);
          } finally {
            _iterator90.f();
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterLayout()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body, this.popupObj.element], dropDownListClasses.popupFullScreen);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'scroll', this.listScroll);
          }

          if (this.isFilterLayout()) {
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              this.searchKeyModule.destroy();

              if (this.clearIconElement) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.clearIconElement, 'click', this.clearText);
              }
            }

            if (this.backIconElement) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.backIconElement, 'click', this.clickOnBackIcon);

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.clearIconElement, 'click', this.clearText);
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.filterInput, 'input', this.onInput);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.filterInput, 'keyup', this.onFilterUp);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.filterInput, 'keydown', this.onFilterDown);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.filterInput, 'blur', this.onBlur);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.filterInput, 'paste', this.pasteHandler);

            this.filterInput = null;
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), {
            'aria-expanded': 'false',
            'aria-activedescendant': null
          });
          this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);

          if (this.isFiltering()) {
            this.actionCompleteData.isUpdated = false;
          }

          this.beforePopupOpen = false;
          var animModel = {
            name: 'FadeOut',
            duration: 100,
            delay: delay ? delay : 0
          };
          var popupInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered ? null : this.popupObj;
          var eventArgs = {
            popup: popupInstance,
            cancel: false,
            animation: animModel
          };
          this.trigger('close', eventArgs, function (eventArgs) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this465.popupObj) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this465.popupObj.element.querySelector('.e-fixed-head'))) {
              var fixedHeader = _this465.popupObj.element.querySelector('.e-fixed-head');

              fixedHeader.parentNode.removeChild(fixedHeader);
              _this465.fixedHeaderElement = null;
            }

            if (!eventArgs.cancel) {
              if (_this465.getModuleName() === 'autocomplete' && !_this465.isServerBlazor) {
                _this465.rippleFun();
              }

              if (_this465.isPopupOpen) {
                _this465.popupObj.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](eventArgs.animation));
              } else {
                _this465.destroyPopup();
              }
            }
          });
        }
      }, {
        key: "destroyPopup",
        value: function destroyPopup() {
          var popupHolderEle = document.querySelector('#' + this.element.id + '_popup_holder');

          if (this.isServerBlazor && this.serverPopupEle && popupHolderEle) {
            popupHolderEle.appendChild(this.serverPopupEle); // tslint:disable-next-line

            this.interopAdaptor.invokeMethodAsync('OnServerClosePopup');
          }

          this.isPopupOpen = false;
          this.isFilterFocus = false;
          this.popupObj.destroy();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupObj.element);
        }
      }, {
        key: "clickOnBackIcon",
        value: function clickOnBackIcon() {
          this.hidePopup();
          this.focusIn();
        }
        /**
         * To Initialize the control rendering
         * @private
         */
        // tslint:disable-next-line

      }, {
        key: "render",
        value: function render() {
          if (this.isServerBlazor) {
            this.inputElement = this.element;
            this.inputWrapper = {
              container: this.element.parentElement
            };
            this.hiddenElement = this.inputWrapper.container.querySelector('select');
            this.inputWrapper.buttons = [this.inputWrapper.container.querySelector('.e-input-group-icon.e-ddl-icon')];

            if (this.showClearButton) {
              this.inputWrapper.clearButton = this.inputWrapper.container.querySelector('.e-clear-icon');

              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);
            }

            if (this.floatLabelType === 'Auto') {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].wireFloatingEvents(this.element);
            }

            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].bindInitialEvent({
              element: this.element,
              buttons: null,
              customTag: null,
              floatLabelType: this.floatLabelType,
              properties: this.properties
            });

            this.setFields();
            this.wireEvent();
            this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';

            if (!this.enabled) {
              this.targetElement().tabIndex = -1;
            }

            if (this.element.hasAttribute('autofocus')) {
              this.focusIn();
            }

            this.initial = false;
          } else {
            if (this.element.tagName === 'INPUT') {
              this.inputElement = this.element;

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute('role'))) {
                this.inputElement.setAttribute('role', 'textbox');
              }

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputElement.getAttribute('type'))) {
                this.inputElement.setAttribute('type', 'text');
              }
            } else {
              this.inputElement = this.createElement('input', {
                attrs: {
                  role: 'textbox',
                  type: 'text'
                }
              });

              if (this.element.tagName !== this.getNgDirective()) {
                this.element.style.display = 'none';
              }

              this.element.parentElement.insertBefore(this.inputElement, this.element);
              this.preventTabIndex(this.inputElement);
            }

            var updatedCssClassValues = this.cssClass;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
              updatedCssClassValues = this.cssClass.replace(/\s+/g, ' ').trim();
            }

            this.inputWrapper = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
              element: this.inputElement,
              buttons: this.isPopupButton() ? [dropDownListClasses.icon] : null,
              floatLabelType: this.floatLabelType,
              properties: {
                readonly: this.getModuleName() === 'dropdownlist' ? true : this.readonly,
                placeholder: this.placeholder,
                cssClass: updatedCssClassValues,
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                showClearButton: this.showClearButton
              }
            }, this.createElement);

            if (this.element.tagName === this.getNgDirective()) {
              this.element.appendChild(this.inputWrapper.container);
            } else {
              this.inputElement.parentElement.insertBefore(this.element, this.inputElement);
            }

            this.hiddenElement = this.createElement('select', {
              attrs: {
                'aria-hidden': 'true',
                'tabindex': '-1',
                'class': dropDownListClasses.hiddenElement
              }
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.hiddenElement], this.inputWrapper.container);
            this.validationAttribute(this.element, this.hiddenElement);
            this.setFields();
            this.inputWrapper.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
            this.inputWrapper.container.classList.add('e-ddl');
            this.wireEvent();
            this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
            this.element.removeAttribute('tabindex');
            var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2_dropdownlist');
            this.element.id = id;
            this.hiddenElement.id = id + '_hidden';
            this.targetElement().setAttribute('tabindex', this.tabIndex);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), this.getAriaAttributes());
            this.updateDataAttribute(this.htmlAttributes);
            this.setHTMLAttributes();

            if (this.value !== null || this.activeIndex !== null || this.text !== null) {
              this.initValue();
            } else if (this.element.tagName === 'SELECT' && this.element.options[0]) {
              var selectElement = this.element;
              this.value = selectElement.options[selectElement.selectedIndex].value;
              this.text = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent;
              this.initValue();
            }

            this.preventTabIndex(this.element);

            if (!this.enabled) {
              this.targetElement().tabIndex = -1;
            }

            this.initial = false;
            this.element.style.opacity = '';

            this.inputElement.onselect = function (e) {
              e.stopImmediatePropagation();
            };

            this.inputElement.onchange = function (e) {
              e.stopImmediatePropagation();
            };

            if (this.element.hasAttribute('autofocus')) {
              this.focusIn();
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text)) {
              this.inputElement.setAttribute('value', this.text);
            }
          }

          this.renderComplete();
        }
      }, {
        key: "setFooterTemplate",
        value: function setFooterTemplate(popupEle) {
          var compiledString;

          if (this.footer) {
            this.footer.innerHTML = '';
          } else {
            this.footer = this.createElement('div');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.footer], dropDownListClasses.footer);
          }

          var footercheck = this.dropdownCompiler(this.footerTemplate);

          if (footercheck) {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.footerTemplate).innerHTML.trim());
          } else {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.footerTemplate);
          }

          var _iterator91 = _createForOfIteratorHelper(compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate)),
              _step91;

          try {
            for (_iterator91.s(); !(_step91 = _iterator91.n()).done;) {
              var item = _step91.value;
              this.footer.appendChild(item);
            }
          } catch (err) {
            _iterator91.e(err);
          } finally {
            _iterator91.f();
          }

          this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, false, true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.footer], popupEle);
        }
      }, {
        key: "setHeaderTemplate",
        value: function setHeaderTemplate(popupEle) {
          var compiledString;

          if (this.header) {
            this.header.innerHTML = '';
          } else {
            this.header = this.createElement('div');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.header], dropDownListClasses.header);
          }

          var headercheck = this.dropdownCompiler(this.headerTemplate);

          if (headercheck) {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.headerTemplate).innerHTML.trim());
          } else {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.headerTemplate);
          }

          var _iterator92 = _createForOfIteratorHelper(compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate)),
              _step92;

          try {
            for (_iterator92.s(); !(_step92 = _iterator92.n()).done;) {
              var item = _step92.value;
              this.header.appendChild(item);
            }
          } catch (err) {
            _iterator92.e(err);
          } finally {
            _iterator92.f();
          }

          this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, true, false);
          var contentEle = popupEle.querySelector('div.e-content');
          popupEle.insertBefore(this.header, contentEle);
        }
      }, {
        key: "setOldText",
        value: function setOldText(text) {
          this.text = text;
        }
      }, {
        key: "setOldValue",
        value: function setOldValue(value) {
          this.value = value;
        }
      }, {
        key: "refreshPopup",
        value: function refreshPopup() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && document.body.contains(this.popupObj.element) && (this.allowFiltering && !(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterLayout()) || this.getModuleName() === 'autocomplete')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.popupObj.element], 'e-popup-close');
            this.popupObj.refreshPosition(this.inputWrapper.container);
            this.popupObj.resolveCollision();
          }
        }
      }, {
        key: "checkData",
        value: function checkData(newProp) {
          if (newProp.dataSource && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering) {
            this.list = null;
            this.actionCompleteData = {
              ulElement: null,
              list: null,
              isUpdated: false
            };
          }

          var isChangeValue = Object.keys(newProp).indexOf('value') !== -1 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value);
          var isChangeText = Object.keys(newProp).indexOf('text') !== -1 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.text);

          if (this.getModuleName() !== 'autocomplete' && this.allowFiltering && (isChangeValue || isChangeText)) {
            this.itemData = null;
          }
        }
      }, {
        key: "updateDataSource",
        value: function updateDataSource(props) {
          if (this.inputElement.value !== '' || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(props) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(props.dataSource) || !(props.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && props.dataSource.length === 0)) {
            this.clearAll(null, props);
          }

          if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(props) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(props.dataSource) || !(props.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && props.dataSource.length === 0)) || !(props.dataSource === [])) {
            this.resetList(this.dataSource);
          }

          if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
            this.checkCustomValue();
          }
        }
      }, {
        key: "checkCustomValue",
        value: function checkCustomValue() {
          this.itemData = this.getDataByValue(this.value);
          var dataItem = this.getItemData();
          this.setProperties({
            'value': dataItem.value,
            'text': dataItem.text
          });
        }
      }, {
        key: "updateInputFields",
        value: function updateInputFields() {
          if (this.getModuleName() === 'dropdownlist') {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
          }
        }
        /**
         * Dynamically change the value of properties.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          if (this.getModuleName() === 'dropdownlist') {
            if (!this.isServerBlazor) {
              this.checkData(newProp);
              this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
            }
          }

          for (var _i73 = 0, _Object$keys16 = Object.keys(newProp); _i73 < _Object$keys16.length; _i73++) {
            var prop = _Object$keys16[_i73];

            switch (prop) {
              case 'query':
              case 'dataSource':
                break;

              case 'htmlAttributes':
                this.setHTMLAttributes();
                break;

              case 'width':
                this.setEleWidth(newProp.width);
                break;

              case 'placeholder':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(newProp.placeholder, this.inputElement);

                break;

              case 'filterBarPlaceholder':
                if (this.filterInput) {
                  _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
                }

                break;

              case 'readonly':
                if (this.getModuleName() !== 'dropdownlist') {
                  _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setReadonly(newProp.readonly, this.inputElement);
                }

                break;

              case 'cssClass':
                this.setCssClass(newProp.cssClass, oldProp.cssClass);
                break;

              case 'enableRtl':
                this.setEnableRtl();
                break;

              case 'enabled':
                this.setEnable();
                break;

              case 'text':
                if (newProp.text === null) {
                  this.clearAll();
                  break;
                }

                if (!this.list) {
                  if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                    this.initRemoteRender = true;
                  }

                  this.renderList();
                }

                if (!this.initRemoteRender) {
                  var li = this.getElementByText(newProp.text);

                  if (!this.checkValidLi(li)) {
                    if (this.liCollections && this.liCollections.length === 100 && this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                      this.setSelectionData(newProp.text, oldProp.text, 'text');
                    } else if (!this.isServerBlazor) {
                      this.setOldText(oldProp.text);
                    }
                  }

                  this.updateInputFields();
                }

                break;

              case 'value':
                if (newProp.value === null) {
                  this.clearAll();
                  break;
                }

                this.notify('beforeValueChange', {
                  newProp: newProp
                }); // gird component value type change

                if (!this.list) {
                  if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                    this.initRemoteRender = true;
                  }

                  this.renderList();
                }

                if (!this.initRemoteRender) {
                  var item = this.getElementByValue(newProp.value);

                  if (!this.checkValidLi(item)) {
                    if (this.liCollections && this.liCollections.length === 100 && this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                      this.setSelectionData(newProp.value, oldProp.value, 'value');
                    } else if (!this.isServerBlazor) {
                      this.setOldValue(oldProp.value);
                    }
                  }

                  this.updateInputFields();
                }

                break;

              case 'index':
                if (newProp.index === null) {
                  this.clearAll();
                  break;
                }

                if (!this.list) {
                  if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                    this.initRemoteRender = true;
                  }

                  this.renderList();
                }

                if (!this.initRemoteRender && this.liCollections) {
                  var element = this.liCollections[newProp.index];

                  if (!this.checkValidLi(element)) {
                    if (this.liCollections && this.liCollections.length === 100 && this.getModuleName() === 'autocomplete' && this.listData.length > 100) {
                      this.setSelectionData(newProp.index, oldProp.index, 'index');
                    } else if (!this.isServerBlazor) {
                      this.index = oldProp.index;
                    }
                  }

                  this.updateInputFields();
                }

                break;

              case 'footerTemplate':
                if (this.popupObj) {
                  this.setFooterTemplate(this.popupObj.element);
                }

                break;

              case 'headerTemplate':
                if (this.popupObj) {
                  this.setHeaderTemplate(this.popupObj.element);
                }

                break;

              case 'valueTemplate':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) && this.valueTemplate != null) {
                  this.setValueTemplate();
                }

                break;

              case 'allowFiltering':
                if (this.allowFiltering) {
                  this.actionCompleteData = {
                    ulElement: this.ulElement,
                    list: this.listData,
                    isUpdated: true
                  };
                  this.updateSelectElementData(this.allowFiltering);
                }

                break;

              case 'floatLabelType':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].removeFloating(this.inputWrapper);

                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].addFloating(this.inputElement, newProp.floatLabelType, this.placeholder, this.createElement);

                break;

              case 'showClearButton':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper, null, this.createElement);

                this.bindClearEvent();
                break;

              default:
                var ddlProps = void 0;
                ddlProps = this.getPropObject(prop, newProp, oldProp);

                _get(_getPrototypeOf(DropDownList.prototype), "onPropertyChanged", this).call(this, ddlProps.newProperty, ddlProps.oldProperty);

                break;
            }
          }
        }
      }, {
        key: "checkValidLi",
        value: function checkValidLi(element) {
          if (this.isValidLI(element)) {
            this.setSelection(element, null);
            return true;
          }

          return false;
        }
      }, {
        key: "setSelectionData",
        value: function setSelectionData(newProp, oldProp, prop) {
          var _this466 = this;

          var li;

          this.updateListValues = function () {
            if (prop === 'text') {
              li = _this466.getElementByText(newProp);

              if (!_this466.checkValidLi(li)) {
                _this466.setOldText(oldProp);
              }
            } else if (prop === 'value') {
              li = _this466.getElementByValue(newProp);

              if (!_this466.checkValidLi(li)) {
                _this466.setOldValue(oldProp);
              }
            } else if (prop === 'index') {
              li = _this466.liCollections[newProp];

              if (!_this466.checkValidLi(li)) {
                _this466.index = oldProp;
              }
            }
          };
        }
      }, {
        key: "setCssClass",
        value: function setCssClass(newClass, oldClass) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldClass)) {
            oldClass = oldClass.replace(/\s+/g, ' ').trim();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newClass)) {
            newClass = newClass.replace(/\s+/g, ' ').trim();
          }

          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setCssClass(newClass, [this.inputWrapper.container], oldClass);

          if (this.popupObj) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setCssClass(newClass, [this.popupObj.element], oldClass);
          }
        }
        /**
         * Return the module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'dropdownlist';
        }
        /**
         * Opens the popup that displays the list of items.
         * @returns void.
         */

      }, {
        key: "showPopup",
        value: function showPopup() {
          if (!this.enabled) {
            return;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.itemTemplate) {
            this.DropDownBaseupdateBlazorTemplates(true, false, false, false);
          }

          if (this.beforePopupOpen) {
            this.refreshPopup();
            return;
          }

          this.beforePopupOpen = true;

          if (this.isFiltering() && !this.isActive && this.actionCompleteData.list && this.actionCompleteData.list[0]) {
            this.isActive = true;
            this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, true);
          } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.list) && (this.list.classList.contains(dropDownBaseClasses.noData) || this.list.querySelectorAll('.' + dropDownBaseClasses.li).length <= 0)) {
            this.renderList();
          } else if (this.isFiltering() && this.isServerBlazor) {
            this.renderList();
          }

          if (!this.isServerBlazor) {
            this.invokeRenderPopup();
          }

          var popupHolderEle = !this.isFiltering() || document.querySelector('#' + this.element.id + '_popup_holder');
          var isDropdownComp = this.getModuleName() === 'dropdownlist' || !this.isFiltering();

          if (this.isServerBlazor && popupHolderEle && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) && isDropdownComp) {
            this.invokeRenderPopup();
          }
        }
      }, {
        key: "invokeRenderPopup",
        value: function invokeRenderPopup() {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isFilterLayout()) {
            var proxy = this;

            window.onpopstate = function () {
              proxy.hidePopup();
            };

            history.pushState({}, '');
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData)) {
            this.renderPopup();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.targetElement(), {
            'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null
          });
        }
      }, {
        key: "clientRenderPopup",
        value: function clientRenderPopup(data, popupEle) {
          if (popupEle) {
            this.serverPopupEle = popupEle;
            this.list = popupEle.querySelector('.e-dropdownbase.e-content') ? popupEle.querySelector('.e-dropdownbase.e-content') : this.list;
            this.ulElement = this.list.querySelector('ul');

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ulElement) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], [dropDownBaseClasses.noData]);
            }

            this.liCollections = this.ulElement ? this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li) : [];
            this.listData = data;

            if (this.getModuleName() === 'autocomplete' && this.liCollections.length > 0) {
              this.renderHightSearch();
            }

            this.initRemoteRender = false;

            if (!this.isPopupOpen) {
              this.serverBlazorUpdateSelection();
            }

            this.unWireListEvents();
            this.wireListEvents();

            if (this.isServerIncrementalSearch && this.searchKeyEvent) {
              this.isServerIncrementalSearch = false;
              this.initial = false;
              this.onServerIncrementalSearch(this.searchKeyEvent);
            }

            if (this.isServerNavigation && this.searchKeyEvent) {
              if (this.searchKeyEvent.action === 'down' || this.searchKeyEvent.action === 'up') {
                this.isServerNavigation = false;
                this.updateUpDownAction(this.searchKeyEvent);
              } else if (this.searchKeyEvent.action === 'home' || this.searchKeyEvent.action === 'end') {
                this.isServerNavigation = false;
                this.updateHomeEndAction(this.searchKeyEvent);
              }
            }

            if (this.beforePopupOpen) {
              this.invokeRenderPopup();
            }

            if (this.getModuleName() !== 'dropdownlist') {
              this.onActionComplete(this.ulElement, this.listData);
            }
          } else if (data != null && this.listData !== data) {
            this.listData = data;
            this.initRemoteRender = false;
          }
        }
      }, {
        key: "renderHightSearch",
        value: function renderHightSearch() {// update high light search 
        }
      }, {
        key: "updateclientItemData",
        value: function updateclientItemData(data) {
          this.listData = data;
        }
      }, {
        key: "initValueItemData",
        value: function initValueItemData(selectData) {
          this.itemData = selectData;
          this.previousValue = this.value;
          this.initial = false;
        }
      }, {
        key: "serverUpdateListElement",
        value: function serverUpdateListElement(data, popupEle) {
          this.listData = data;

          if (this.ulElement) {
            this.liCollections = this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li);
          }
        }
        /**
         * Hides the popup if it is in an open state.
         * @returns void.
         */

      }, {
        key: "hidePopup",
        value: function hidePopup(e) {
          var isHeader = this.headerTemplate ? true : false;
          var isFooter = this.headerTemplate ? true : false;
          this.DropDownBaseresetBlazorTemplates(false, false, false, false, false, isHeader, isFooter);

          if (this.isEscapeKey && this.getModuleName() === 'dropdownlist') {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);

            this.isEscapeKey = false;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.index)) {
              var element = this.findListElement(this.ulElement, 'li', 'data-value', this.value);
              this.selectedLI = this.liCollections[this.index] || element;

              if (this.selectedLI) {
                this.updateSelectedItem(this.selectedLI, null, true);

                if (this.valueTemplate && this.itemData !== null) {
                  this.setValueTemplate();
                }
              }
            } else {
              this.resetSelection();
            }
          }

          this.closePopup();
          var dataItem = this.getItemData();
          var isSelectVal = this.isServerBlazor ? !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI);

          if (this.inputElement.value.trim() === '' && !this.isInteracted && (this.isSelectCustom || isSelectVal && this.inputElement.value !== dataItem.text)) {
            this.isSelectCustom = false;
            this.clearAll(e);
          }
        }
        /**
         * Sets the focus on the component for interaction.
         * @returns void.
         */

      }, {
        key: "focusIn",
        value: function focusIn(e) {
          if (!this.enabled) {
            return;
          }

          if (this.targetElement().classList.contains(dropDownListClasses.disable)) {
            return;
          }

          var isFocused = false;

          if (this.preventFocus && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.inputWrapper.container.tabIndex = 1;
            this.inputWrapper.container.focus();
            this.preventFocus = false;
            isFocused = true;
          }

          if (!isFocused) {
            this.targetElement().focus();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
          this.onFocus(e);
        }
        /**
         * Moves the focus from the component if the component is already focused.
         * @returns void.
         */

      }, {
        key: "focusOut",
        value: function focusOut(e) {
          if (!this.enabled) {
            return;
          }

          this.isTyped = true;
          this.hidePopup(e);
          this.targetElement().blur();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
         * @method destroy
         * @return {void}.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.isActive = false;

          if (!this.isServerBlazor || this.popupObj && document.body.contains(this.popupObj.element)) {
            this.hidePopup();
          }

          this.unWireEvent();

          if (this.list) {
            this.unWireListEvents();

            if (this.isServerBlazor) {
              if (this.fields.groupBy && !this.isGroupChecking) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'scroll', this.setFloatingHeader);
              }
            }
          }

          if (!this.isServerBlazor) {
            if (this.element && !this.element.classList.contains('e-' + this.getModuleName())) {
              return;
            }

            var attrArray = ['readonly', 'aria-disabled', 'aria-placeholder', 'placeholder', 'aria-owns', 'aria-labelledby', 'aria-haspopup', 'aria-expanded', 'aria-activedescendant', 'autocomplete', 'aria-readonly', 'autocorrect', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label'];

            for (var i = 0; i < attrArray.length; i++) {
              this.inputElement.removeAttribute(attrArray[i]);
            }

            this.inputElement.setAttribute('tabindex', this.tabIndex);
            this.inputElement.classList.remove('e-input');

            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);

            this.element.style.display = 'block';

            if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper.container);
            } else {
              this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper.container);
            }

            _get(_getPrototypeOf(DropDownList.prototype), "destroy", this).call(this);
          }
        }
      }, {
        key: "getItems",

        /**
         * Gets all the list items bound on this component.
         * @returns Element[].
         */
        value: function getItems() {
          if (!this.list) {
            if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
              this.initRemoteRender = true;
            }

            this.renderList();
          }

          return this.ulElement ? _get(_getPrototypeOf(DropDownList.prototype), "getItems", this).call(this) : [];
        }
        /**
         * Gets the data Object that matches the given value.
         * @param { string | number } value - Specifies the value of the list item.
         * @returns Object.
         * @blazorType object
         */

      }, {
        key: "getDataByValue",
        value: function getDataByValue(value) {
          return _get(_getPrototypeOf(DropDownList.prototype), "getDataByValue", this).call(this, value);
        }
        /**
         * Allows you to clear the selected values from the component.
         * @returns void.
         */

      }, {
        key: "clear",
        value: function clear() {
          this.value = null;
        }
      }]);

      return DropDownList;
    }(DropDownBase);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "cssClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], DropDownList.prototype, "width", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('300px')], DropDownList.prototype, "popupHeight", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], DropDownList.prototype, "popupWidth", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "placeholder", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "filterBarPlaceholder", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], DropDownList.prototype, "htmlAttributes", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "query", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "valueTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "headerTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "footerTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownList.prototype, "allowFiltering", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownList.prototype, "readonly", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "text", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "value", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownList.prototype, "index", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], DropDownList.prototype, "floatLabelType", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownList.prototype, "showClearButton", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "filtering", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "change", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "beforeOpen", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "open", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "close", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "blur", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownList.prototype, "focus", void 0);

    DropDownList = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], DropDownList);
    /**
     * export all modules from current location
     */

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var RTL = 'e-rtl';
    var DROPDOWNTREE = 'e-ddt';
    var HIDDENELEMENT = 'e-ddt-hidden';
    var DROPDOWNICON = 'e-input-group-icon e-ddt-icon e-icons';
    var SHOW_CHIP = 'e-show-chip';
    var SHOW_CLEAR = 'e-show-clear';
    var SHOW_DD_ICON = 'e-show-dd-icon';
    var CHIP_INPUT = 'e-chip-input';
    var INPUTFOCUS = 'e-input-focus';
    var INPUTGROUP = 'e-input-group';
    var ICONANIMATION = 'e-icon-anim';
    var CLOSEICON_CLASS = 'e-clear-icon e-icons';
    var CHIP_WRAPPER = 'e-chips-wrapper';
    var CHIP_COLLECTION = 'e-chips-collection';
    var CHIP = 'e-chips';
    var CHIP_CONTENT = 'e-chipcontent';
    var CHIP_CLOSE = 'e-chips-close';
    var HIDEICON = 'e-icon-hide';
    var POPUP_CLASS = 'e-ddt e-popup';
    var PARENTITEM = 'e-list-parent';
    var CONTENT = 'e-popup-content';
    var DROPDOWN = 'e-dropdown';
    var DISABLED = 'e-disabled';
    var ICONS = 'e-icons';
    var CHECKALLPARENT = 'e-selectall-parent';
    var CHECKALLHIDE = 'e-hide-selectall';
    var BIGGER = 'e-bigger';
    var SMALL = 'e-small';
    var ALLTEXT = 'e-all-text';
    var CHECKBOXFRAME = 'e-frame';
    var CHECK = 'e-check';
    var CHECKBOXWRAP = 'e-checkbox-wrapper';
    var FILTERWRAP = 'e-filter-wrap';
    var DDTICON = 'e-ddt-icon';
    var FOOTER = 'e-ddt-footer';
    var HEADER = 'e-ddt-header';
    var NODATACONTAINER = 'e-ddt-nodata';
    var NODATA = 'e-no-data';
    var HEADERTEMPLATE = 'HeaderTemplate';
    var FOOTERTEMPLATE = 'FooterTemplate';
    var NORECORDSTEMPLATE = 'NoRecordsTemplate';
    var ACTIONFAILURETEMPLATE = 'ActionFailureTemplate';
    var REMAIN_WRAPPER = 'e-remain';
    var OVERFLOW_VIEW = 'e-overflow';
    var SHOW_TEXT = 'e-show-text';
    var TOTAL_COUNT_WRAPPER = 'e-total-count';
    var REMAIN_COUNT = 'e-wrap-count';

    var Fields = /*#__PURE__*/function (_syncfusion_ej2_base_8) {
      _inherits(Fields, _syncfusion_ej2_base_8);

      var _super187 = _createSuper(Fields);

      function Fields() {
        _classCallCheck(this, Fields);

        return _super187.apply(this, arguments);
      }

      return Fields;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('child')], Fields.prototype, "child", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], Fields.prototype, "dataSource", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('expanded')], Fields.prototype, "expanded", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('hasChildren')], Fields.prototype, "hasChildren", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('htmlAttributes')], Fields.prototype, "htmlAttributes", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('iconCss')], Fields.prototype, "iconCss", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('imageUrl')], Fields.prototype, "imageUrl", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('parentValue')], Fields.prototype, "parentValue", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Fields.prototype, "query", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('selected')], Fields.prototype, "selected", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Fields.prototype, "tableName", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], Fields.prototype, "text", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('tooltip')], Fields.prototype, "tooltip", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('value')], Fields.prototype, "value", void 0);

    var TreeSettings = /*#__PURE__*/function (_syncfusion_ej2_base_9) {
      _inherits(TreeSettings, _syncfusion_ej2_base_9);

      var _super188 = _createSuper(TreeSettings);

      function TreeSettings() {
        _classCallCheck(this, TreeSettings);

        return _super188.apply(this, arguments);
      }

      return TreeSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeSettings.prototype, "autoCheck", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')], TreeSettings.prototype, "expandOn", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeSettings.prototype, "loadOnDemand", void 0);
    /**
     * The Dropdown Tree control allows you to select single or multiple values from hierarchical data in a tree-like structure.
     * It has several out-of-the-box features, such as data binding, check boxes, templates, filter,
     * UI customization, accessibility, and preselected values.
     * ```html
     *  <input type="text" id="tree"></input>
     * ```
     * ```typescript
     *  let ddtObj: DropDownTree = new DropDownTree();
     *  ddtObj.appendTo("#tree");
     * ```
     */


    var DropDownTree = /*#__PURE__*/function (_syncfusion_ej2_base_10) {
      _inherits(DropDownTree, _syncfusion_ej2_base_10);

      var _super189 = _createSuper(DropDownTree);

      function DropDownTree(options, element) {
        var _this467;

        _classCallCheck(this, DropDownTree);

        _this467 = _super189.call(this, options, element);
        _this467.filterTimer = null;
        _this467.isFilteredData = false;
        _this467.isFilterRestore = false;
        _this467.selectedData = [];
        _this467.filterDelayTime = 300;
        return _this467;
      }
      /**
       * Get the properties to be maintained in the persisted state.
       * @returns string
       * @hidden
       */


      _createClass2(DropDownTree, [{
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['value'];
          return this.addOnPersist(keyEntity);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'drop-down-tree';
        }
        /**
         * Initialize the event handler.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          this.inputFocus = false;
          this.isPopupOpen = false;
          this.isFirstRender = true;
          this.isInitialized = false;
          this.currentText = null;
          this.currentValue = null;
          this.oldValue = null;
          this.removeValue = false;
          this.selectedText = [];
          this.treeItems = [];
          this.dataValue = null;
          this.isNodeSelected = false;
          this.isDynamicChange = false;
          this.clearIconWidth = 0;
          this.isBlazorPlatForm = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])();
          this.headerTemplateId = "".concat(this.element.id).concat(HEADERTEMPLATE);
          this.footerTemplateId = "".concat(this.element.id).concat(FOOTERTEMPLATE);
          this.actionFailureTemplateId = "".concat(this.element.id).concat(ACTIONFAILURETEMPLATE);
          this.noRecordsTemplateId = "".concat(this.element.id).concat(NORECORDSTEMPLATE);
          this.keyConfigs = {
            escape: 'escape',
            altUp: 'alt+uparrow',
            altDown: 'alt+downarrow',
            tab: 'tab',
            shiftTab: 'shift+tab',
            end: 'end',
            enter: 'enter',
            home: 'home',
            moveDown: 'downarrow',
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            moveUp: 'uparrow',
            ctrlDown: 'ctrl+downarrow',
            ctrlUp: 'ctrl+uparrow',
            ctrlEnter: 'ctrl+enter',
            ctrlHome: 'ctrl+home',
            ctrlEnd: 'ctrl+end',
            shiftDown: 'shift+downarrow',
            shiftUp: 'shift+uparrow',
            shiftEnter: 'shift+enter',
            shiftHome: 'shift+home',
            shiftEnd: 'shift+end',
            csDown: 'ctrl+shift+downarrow',
            csUp: 'ctrl+shift+uparrow',
            csEnter: 'ctrl+shift+enter',
            csHome: 'ctrl+shift+home',
            csEnd: 'ctrl+shift+end',
            space: 'space',
            ctrlA: 'ctrl+A'
          };
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.ensureAutoCheck();

          if (this.element.tagName === 'INPUT') {
            this.inputEle = this.element;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputEle.getAttribute('role'))) {
              this.inputEle.setAttribute('role', 'textbox');
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputEle.getAttribute('type'))) {
              this.inputEle.setAttribute('type', 'text');
            }
          } else {
            this.inputEle = this.createElement('input', {
              attrs: {
                role: 'textbox',
                type: 'text'
              }
            });
            this.element.parentElement.insertBefore(this.inputEle, this.element);
          }

          this.inputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
            element: this.inputEle,
            floatLabelType: this.floatLabelType,
            buttons: this.showDropDownIcon ? [DROPDOWNICON] : null,
            properties: {
              readonly: true,
              placeholder: this.placeholder,
              enabled: this.enabled,
              cssClass: this.cssClass,
              enableRtl: this.enableRtl
            }
          }, this.createElement);
          this.inputWrapper = this.inputObj.container;

          if (!this.inputWrapper.classList.contains(INPUTGROUP)) {
            this.inputWrapper.classList.add(INPUTGROUP);
          }

          if (this.showDropDownIcon) {
            this.inputWrapper.classList.add(SHOW_DD_ICON);
          }

          if (this.element.tagName === this.getDirective()) {
            this.element.appendChild(this.inputWrapper);
          }

          this.createHiddenElement();
          this.createClearIcon();
          this.inputWrapper.classList.add(DROPDOWNTREE);
          this.setElementWidth(this.width);
          this.setAttributes();
          this.updateDataAttribute();
          this.setHTMLAttributes();
          this.popupDiv = this.createElement('div', {
            className: CONTENT,
            attrs: {
              'tabindex': '0'
            }
          });
          this.popupDiv.classList.add(DROPDOWN);
          this.tree = this.createElement('div', {
            id: this.element.id + '_tree'
          });
          this.popupDiv.appendChild(this.tree);
          document.body.appendChild(this.popupDiv);
          this.wireTreeEvents();
          this.popupDiv.style.display = 'none';
          this.renderTree();
          this.isRemoteData = this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"];

          if (this.allowMultiSelection || this.showCheckBox) {
            if (this.mode !== 'Delimiter') {
              this.createChip();
            }

            if (!this.wrapText) {
              this.overFlowWrapper = this.createElement('span', {
                className: OVERFLOW_VIEW + ' ' + HIDEICON
              });
              this.inputWrapper.insertBefore(this.overFlowWrapper, this.hiddenElement);

              if (this.mode !== 'Box') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], SHOW_TEXT);
              }
            }
          }

          if (!this.isRemoteData) {
            this.setTreeValue();
            this.setTreeText();
            this.updateHiddenValue();
            this.setSelectedValue();

            if (!this.wrapText) {
              this.updateView();
            }
          }

          this.wireEvents();
          var firstUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.treeObj.element);

          if (firstUl && firstUl.getAttribute('aria-multiselectable')) {
            firstUl.removeAttribute('aria-multiselectable');
          }

          this.oldValue = this.value;
          this.isInitialized = true;
          this.renderComplete();
        }
      }, {
        key: "ensureAutoCheck",
        value: function ensureAutoCheck() {
          if (this.allowFiltering && this.treeSettings.autoCheck) {
            this.setProperties({
              treeSettings: {
                autoCheck: false
              }
            }, true);
          }
        }
      }, {
        key: "hideCheckAll",
        value: function hideCheckAll(flag) {
          var checkAllEle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupEle) ? this.popupEle.querySelector('.' + CHECKALLPARENT) : null;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(checkAllEle)) {
            if (flag && !checkAllEle.classList.contains(CHECKALLHIDE)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([checkAllEle], CHECKALLHIDE);
            } else if (!flag && checkAllEle.classList.contains(CHECKALLHIDE)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([checkAllEle], CHECKALLHIDE);
            }
          }
        }
      }, {
        key: "renderFilter",
        value: function renderFilter() {
          this.filterContainer = this.createElement('div', {
            id: this.element.id + '_filter_wrap',
            className: FILTERWRAP
          });
          var filterInput = this.createElement('input', {
            id: this.element.id + '_filter',
            attrs: {
              autocomplete: 'off',
              'aria-label': this.filterBarPlaceholder
            }
          });
          this.filterContainer.appendChild(filterInput);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.filterContainer], this.popupEle);
          this.filterObj = new _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["TextBox"]({
            value: '',
            showClearButton: true,
            placeholder: this.filterBarPlaceholder,
            input: this.filterChangeHandler.bind(this)
          });
          this.filterObj.appendTo('#' + this.element.id + '_filter');
        }
      }, {
        key: "filterChangeHandler",
        value: function filterChangeHandler(args) {
          var _this468 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.value)) {
            window.clearTimeout(this.filterTimer);
            this.filterTimer = window.setTimeout(function () {
              _this468.filterHandler(args.value, args.event);
            }, this.filterDelayTime);
          }
        }
      }, {
        key: "filterHandler",
        value: function filterHandler(value, event) {
          var _this469 = this;

          if (!this.isFilteredData) {
            this.treeData = this.treeObj.getTreeData();
          }

          var filterFields = this.cloneFields(this.fields);
          var args = {
            cancel: false,
            preventDefaultAction: false,
            event: event,
            text: value,
            fields: filterFields
          };
          this.trigger('filtering', args, function (args) {
            if (!args.cancel) {
              var flag = false;
              var fields;
              _this469.isFilteredData = true;

              if (value === '') {
                _this469.isFilteredData = false;
                _this469.isFilterRestore = true;
                fields = _this469.cloneFields(_this469.fields);
              } else if (args.preventDefaultAction) {
                fields = args.fields;
              } else {
                if (_this469.treeDataType === 1) {
                  fields = _this469.selfReferencefilter(value, args.fields);
                } else {
                  if (_this469.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
                    flag = true;
                  } else {
                    fields = _this469.nestedFilter(value, args.fields);
                  }
                }
              }

              _this469.hideCheckAll(_this469.isFilteredData);

              if (flag) {
                return;
              }

              _this469.treeObj.fields = _this469.getTreeFields(fields);

              _this469.treeObj.dataBind();
            }
          });
        }
      }, {
        key: "nestedFilter",
        value: function nestedFilter(value, filteredFields) {
          var matchedDataSource = [];

          for (var i = 0; i < this.treeData.length; i++) {
            var filteredChild = this.nestedChildFilter(value, this.treeData[i]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(filteredChild)) {
              matchedDataSource.push(filteredChild);
            }
          }

          filteredFields.dataSource = matchedDataSource;
          return filteredFields;
        }
      }, {
        key: "nestedChildFilter",
        value: function nestedChildFilter(value, node) {
          var children = node[this.fields.child];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(children)) {
            return this.isMatchedNode(value, node) ? node : null;
          } else {
            var matchedChildren = [];

            for (var i = 0; i < children.length; i++) {
              var filteredChild = this.nestedChildFilter(value, children[i]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(filteredChild)) {
                matchedChildren.push(filteredChild);
              }
            }

            if (matchedChildren.length !== 0) {
              node[this.fields.child] = matchedChildren;
              return node;
            } else {
              node[this.fields.child] = null;
              return this.isMatchedNode(value, node) ? node : null;
            }
          }
        }
      }, {
        key: "selfReferencefilter",
        value: function selfReferencefilter(value, filteredFields) {
          var matchedData = [];
          var matchedDataSource = [];

          for (var i = 0; i < this.treeData.length; i++) {
            if (this.isMatchedNode(value, this.treeData[i])) {
              matchedData.push(this.treeData[i]);
            }
          }

          for (var _i74 = 0; _i74 < matchedData.length; _i74++) {
            if (matchedDataSource.indexOf(matchedData[_i74]) === -1) {
              matchedDataSource.push(matchedData[_i74]);
              var parentId = matchedData[_i74][this.fields.parentValue];

              while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentId)) {
                var parent = null;

                for (var j = 0; j < this.treeData.length; j++) {
                  var _value12 = this.treeData[j][this.fields.value];

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_value12) && _value12 === parentId) {
                    parent = this.treeData[j];
                    break;
                  }
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parent) && matchedDataSource.indexOf(parent) === -1) {
                  matchedDataSource.push(parent);
                  parentId = parent[this.fields.parentValue];
                } else {
                  break;
                }
              }
            }
          }

          filteredFields.dataSource = matchedDataSource;
          return filteredFields;
        }
      }, {
        key: "isMatchedNode",
        value: function isMatchedNode(value, node) {
          var checkValue = node[this.fields.text];

          if (this.ignoreCase) {
            checkValue = checkValue.toLowerCase();
            value = value.toLowerCase();
          }

          if (this.ignoreAccent) {
            checkValue = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].ignoreDiacritics(checkValue);
            value = _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataUtil"].ignoreDiacritics(value);
          }

          if (this.filterType === 'StartsWith') {
            return checkValue.slice(0, value.length) === value;
          } else if (this.filterType === 'EndsWith') {
            return checkValue.slice(-value.length) === value;
          } else {
            return checkValue.indexOf(value) !== -1;
          }
        }
        /* To wire events for the dropdown tree */

      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper, 'mouseup', this.dropDownClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper, 'focus', this.focusIn, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper, 'blur', this.focusOut, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper, 'mousemove', this.mouseIn, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper, 'mouseout', this.onMouseLeave, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.overAllClear, 'mousedown', this.clearAll, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(window, 'resize', this.windowResize, this);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputWrapper, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(formElement, 'reset', this.resetValueHandler, this);
          }

          this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.inputWrapper, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
          });
        }
      }, {
        key: "wireTreeEvents",
        value: function wireTreeEvents() {
          this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.tree, {
            keyAction: this.treeAction.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
          });
        }
      }, {
        key: "wireCheckAllWrapperEvents",
        value: function wireCheckAllWrapperEvents() {
          this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.checkAllParent, {
            keyAction: this.checkAllAction.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
          });
        }
        /* To unwire events for the dropdown tree */

      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper, 'mouseup', this.dropDownClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper, 'focus', this.focusIn);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper, 'blur', this.focusOut);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper, 'mousemove', this.mouseIn);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper, 'mouseout', this.onMouseLeave);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.overAllClear, 'mousedown', this.clearAll);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(window, 'resize', this.windowResize);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputWrapper, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(formElement, 'reset', this.resetValueHandler);
          }
        }
        /* Trigger when the dropdown is clicked */

      }, {
        key: "dropDownClick",
        value: function dropDownClick(e) {
          if (!this.enabled || this.readonly) {
            return;
          }

          if (this.isClearButtonClick) {
            this.isClearButtonClick = false;
            return;
          }

          if (!this.wrapText && e.target.classList.contains(CHIP_CLOSE)) {
            this.removeChip(e);
          }

          if (this.isPopupOpen) {
            this.hidePopup();
          } else {
            this.focusIn(e);
            this.renderPopup();
          }

          this.showOverAllClear();
        }
      }, {
        key: "mouseIn",
        value: function mouseIn() {
          if (this.enabled || !this.readonly) {
            this.showOverAllClear();
          }
        }
      }, {
        key: "onMouseLeave",
        value: function onMouseLeave() {
          if (!this.inputFocus) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllClear], HIDEICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CLEAR);
          }
        }
      }, {
        key: "getDirective",
        value: function getDirective() {
          return 'EJS-DROPDOWNTREE';
        }
      }, {
        key: "focusOut",
        value: function focusOut(e) {
          if (!this.enabled || this.readonly || !this.inputFocus) {
            return;
          }

          if ((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge') && e.target === this.inputWrapper) {
            return;
          }

          var target = e.relatedTarget;

          if (target !== this.inputEle && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) && (e.target !== this.inputWrapper || !this.isPopupOpen)) {
            this.onFocusOut(e);
          }
        }
      }, {
        key: "onFocusOut",
        value: function onFocusOut(event) {
          this.inputFocus = false;

          if (this.isPopupOpen) {
            this.hidePopup();
          }

          if (this.isClearButtonClick) {
            this.isClearButtonClick = false;
          }

          if (this.showClearButton) {
            this.clearIconWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-clear-icon', this.inputWrapper).offsetWidth;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllClear], HIDEICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CLEAR);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], [INPUTFOCUS]);

          if (this.allowMultiSelection || this.showCheckBox) {
            var isValue = this.value ? this.value.length ? true : false : false;

            if (this.mode !== 'Delimiter') {
              if (this.chipWrapper && this.mode === 'Default') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
              }
            }

            if (!this.wrapText && isValue) {
              this.updateView();
            }
          }

          if (this.changeOnBlur) {
            this.triggerChangeEvent(event);
          }

          this.removeValue = false;
          this.oldValue = this.value;
          this.trigger('blur');
        }
      }, {
        key: "updateView",
        value: function updateView() {
          if (!this.showCheckBox && !this.allowMultiSelection) {
            return;
          }

          if (this.mode !== 'Box') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper, this.overFlowWrapper], SHOW_TEXT);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CHIP);
          }

          if (this.value && this.value.length !== 0) {
            if (this.inputWrapper.contains(this.chipWrapper)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);
            this.updateOverFlowView();
            this.ensurePlaceHolder();
          }
        }
      }, {
        key: "triggerChangeEvent",
        value: function triggerChangeEvent(event) {
          var isEqual = this.compareValues(this.oldValue, this.value);

          if ((!isEqual || this.isChipDelete) && !this.removeValue) {
            var eventArgs = {
              e: event,
              oldValue: this.oldValue,
              value: this.value,
              isInteracted: event ? true : false,
              element: this.element
            };
            this.trigger('change', eventArgs);
          }
        }
      }, {
        key: "compareValues",
        value: function compareValues(oldValue, newValue) {
          if (oldValue === null || oldValue.length === 0) {
            var isValid = oldValue === null ? newValue === oldValue ? true : false : oldValue.length === 0 ? newValue === oldValue : false;
            return isValid;
          } else if (oldValue.length !== newValue.length) {
            return false;
          }

          for (var i = 0; i < oldValue.length; i++) {
            if (oldValue[i] !== newValue[i]) {
              return false;
            }
          }

          return true;
        }
      }, {
        key: "focusIn",
        value: function focusIn(e) {
          if (!this.enabled || this.readonly || this.inputFocus) {
            return;
          }

          this.showOverAllClear();
          this.inputFocus = true;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], [INPUTFOCUS]);

          if (this.allowMultiSelection || this.showCheckBox) {
            if (this.mode !== 'Delimiter' && this.inputFocus) {
              if (this.chipWrapper && this.value && this.value.length !== 0) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.chipWrapper], HIDEICON);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CHIP);

              if (this.popupObj) {
                this.popupObj.refreshPosition();
              }
            }

            if (!this.wrapText) {
              if (this.inputWrapper.contains(this.overFlowWrapper)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], HIDEICON);
              }

              if (this.mode === 'Delimiter') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CHIP);
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_TEXT);
              this.ensurePlaceHolder();
            }
          }

          var args = {
            isInteracted: e ? true : false,
            event: e
          };
          this.trigger('focus', args);
        }
      }, {
        key: "treeAction",
        value: function treeAction(e) {
          var _this470 = this;

          var eventArgs = {
            cancel: false,
            event: e
          };
          this.trigger('keyPress', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              switch (e.action) {
                case 'escape':
                case 'altUp':
                  _this470.inputWrapper.focus();

                  e.preventDefault();

                  if (_this470.isPopupOpen) {
                    _this470.hidePopup();
                  }

                  break;

                case 'tab':
                case 'shiftTab':
                  if (_this470.isPopupOpen) {
                    _this470.hidePopup();
                  }

                  break;

                case 'enter':
                case 'ctrlEnter':
                case 'shiftEnter':
                case 'csEnter':
                  if (!_this470.showCheckBox) {
                    _this470.isValueChange = true;
                    _this470.keyEventArgs = e;
                  }

                  break;

                case 'space':
                  _this470.isValueChange = true;
                  _this470.keyEventArgs = e;
                  break;

                case 'ctrlA':
                  if (_this470.allowMultiSelection) {
                    _this470.selectAll(true);
                  }

                  break;

                case 'moveRight':
                case 'moveLeft':
                case 'shiftDown':
                case 'moveDown':
                case 'ctrlDown':
                case 'csDown':
                case 'shiftUp':
                case 'moveUp':
                case 'ctrlUp':
                case 'csUp':
                case 'home':
                case 'shiftHome':
                case 'ctrlHome':
                case 'csHome':
                case 'end':
                case 'shiftEnd':
                case 'ctrlEnd':
                case 'csEnd':
              }
            } else {
              e.stopImmediatePropagation();
            }
          });
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          var _this471 = this;

          var eventArgs = {
            cancel: false,
            event: e
          };
          this.trigger('keyPress', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              switch (e.action) {
                case 'escape':
                case 'altUp':
                case 'shiftTab':
                case 'tab':
                  if (_this471.isPopupOpen) {
                    _this471.hidePopup();
                  }

                  break;

                case 'altDown':
                  if (!_this471.isPopupOpen) {
                    _this471.showPopup();

                    e.preventDefault();
                  }

                  break;

                case 'moveDown':
                  if (_this471.showSelectAll && _this471.showCheckBox) {
                    _this471.checkAllParent.focus();
                  }

                  break;
              }
            }
          });
        }
      }, {
        key: "checkAllAction",
        value: function checkAllAction(e) {
          var _this472 = this;

          var eventArgs = {
            cancel: false,
            event: e
          };
          this.trigger('keyPress', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              switch (e.action) {
                case 'space':
                  _this472.clickHandler(e);

                  break;

                case 'moveDown':
                  _this472.treeObj.element.focus();

              }
            }
          });
        }
      }, {
        key: "windowResize",
        value: function windowResize() {
          if (this.popupObj) {
            this.popupObj.setProperties({
              width: this.setWidth()
            });
            this.popupObj.refreshPosition();
          }
        }
      }, {
        key: "resetValueHandler",
        value: function resetValueHandler(e) {
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputWrapper, 'form');

          if (formElement && e.target === formElement) {
            this.resetValue(true);
          }
        }
      }, {
        key: "getAriaAttributes",
        value: function getAriaAttributes() {
          var disable = this.enabled ? 'false' : 'true';
          return {
            'aria-disabled': disable,
            'aria-owns': this.element.id + '_options',
            'role': 'listbox',
            'aria-haspopup': 'true',
            'aria-expanded': 'false',
            'aria-activedescendant': 'null',
            'aria-labelledby': this.hiddenElement.id
          };
        }
      }, {
        key: "updateOverFlowView",
        value: function updateOverFlowView() {
          this.overFlowWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overFlowWrapper], HIDEICON);

          if (this.value && this.value.length) {
            var data = '';
            var overAllContainer;
            var temp;
            var tempData;
            var tempIndex = 1;
            var wrapperleng;
            var remaining;
            var downIconWidth = 0;
            this.overFlowWrapper.innerHTML = '';
            var l10nLocale = {
              overflowCountTemplate: '+${count} more..',
              totalCountTemplate: '${count} selected'
            };
            this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getLocaleName(), l10nLocale, this.locale);
            var remainContent = this.l10n.getConstant('overflowCountTemplate');
            var remainElement = this.createElement('span', {
              className: REMAIN_WRAPPER
            });
            var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(remainContent);
            var totalCompiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.l10n.getConstant('totalCountTemplate'));
            remainElement.appendChild(compiledString({
              'count': this.value.length
            }, null, null, null, !this.isStringTemplate)[0]);
            this.overFlowWrapper.appendChild(remainElement);
            var remainSize = remainElement.offsetWidth;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(remainElement);

            if (this.showDropDownIcon) {
              downIconWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + DDTICON, this.inputWrapper).offsetWidth;
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
              if (this.mode !== 'Box') {
                for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value[index]); index++) {
                  data += index === 0 ? '' : this.delimiterChar + ' ';
                  temp = this.getOverflowVal(index);
                  data += temp;
                  temp = this.overFlowWrapper.innerHTML;
                  this.overFlowWrapper.innerHTML = data;
                  wrapperleng = this.overFlowWrapper.offsetWidth;
                  overAllContainer = this.inputWrapper.offsetWidth;

                  if (wrapperleng + downIconWidth + this.clearIconWidth > overAllContainer) {
                    if (tempData !== undefined && tempData !== '') {
                      temp = tempData;
                      index = tempIndex + 1;
                    }

                    this.overFlowWrapper.innerHTML = temp;
                    remaining = this.value.length - index;
                    wrapperleng = this.overFlowWrapper.offsetWidth;

                    while (wrapperleng + remainSize + downIconWidth + this.clearIconWidth >= overAllContainer && wrapperleng !== 0 && this.overFlowWrapper.innerHTML !== '') {
                      var textArr = this.overFlowWrapper.innerHTML.split(this.delimiterChar);
                      textArr.pop();
                      this.overFlowWrapper.innerHTML = textArr.join(this.delimiterChar);
                      remaining++;
                      wrapperleng = this.overFlowWrapper.offsetWidth;
                    }

                    break;
                  } else if (wrapperleng + remainSize + downIconWidth + this.clearIconWidth <= overAllContainer) {
                    tempData = data;
                    tempIndex = index;
                  } else if (index === 0) {
                    tempData = '';
                    tempIndex = -1;
                  }
                }
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
                var ele = this.chipWrapper.cloneNode(true);
                var chips = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CHIP, ele);

                for (var i = 0; i < chips.length; i++) {
                  temp = this.overFlowWrapper.innerHTML;
                  this.overFlowWrapper.appendChild(chips[i]);
                  data = this.overFlowWrapper.innerHTML;
                  wrapperleng = this.overFlowWrapper.offsetWidth;
                  overAllContainer = this.inputWrapper.offsetWidth;

                  if (wrapperleng + downIconWidth + this.clearIconWidth > overAllContainer) {
                    if (tempData !== undefined && tempData !== '') {
                      temp = tempData;
                      i = tempIndex + 1;
                    }

                    this.overFlowWrapper.innerHTML = temp;
                    remaining = this.value.length - i;
                    wrapperleng = this.overFlowWrapper.offsetWidth;

                    while (wrapperleng + remainSize + downIconWidth + this.clearIconWidth >= overAllContainer && wrapperleng !== 0 && this.overFlowWrapper.innerHTML !== '') {
                      this.overFlowWrapper.removeChild(this.overFlowWrapper.lastChild);
                      remaining++;
                      wrapperleng = this.overFlowWrapper.offsetWidth;
                    }

                    break;
                  } else if (wrapperleng + remainSize + downIconWidth + this.clearIconWidth <= overAllContainer) {
                    tempData = data;
                    tempIndex = i;
                  } else if (i === 0) {
                    tempData = '';
                    tempIndex = -1;
                  }
                }
              }
            }

            if (remaining > 0) {
              var totalWidth = overAllContainer - (downIconWidth + this.clearIconWidth);
              this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining, compiledString, totalCompiledString, totalWidth));
            }

            if (this.mode === 'Box' && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([remainElement], REMAIN_COUNT);
            }
          } else {
            this.overFlowWrapper.innerHTML = '';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], HIDEICON);
          }

          this.updateDelimMode();
        }
      }, {
        key: "updateRemainTemplate",
        value: function updateRemainTemplate(remainElement, remaining, compiledString, totalCompiledString, totalWidth) {
          if (this.overFlowWrapper.firstChild && this.overFlowWrapper.firstChild.nodeType === 3 && this.overFlowWrapper.firstChild.nodeValue === '') {
            this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild);
          }

          remainElement.innerHTML = '';
          remainElement.appendChild(this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box') ? compiledString({
            'count': remaining
          }, null, null, null, !this.isStringTemplate)[0] : totalCompiledString({
            'count': remaining
          }, null, null, null, !this.isStringTemplate)[0]);

          if (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overFlowWrapper], REMAIN_COUNT);
          }

          return remainElement;
        }
      }, {
        key: "getOverflowVal",
        value: function getOverflowVal(index) {
          var temp;
          var selectedData = this.getSelectedData(this.value[index]);
          temp = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
          return temp;
        }
      }, {
        key: "updateDelimMode",
        value: function updateDelimMode() {
          if (this.mode !== 'Box') {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + REMAIN_WRAPPER, this.overFlowWrapper) && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], REMAIN_COUNT);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], SHOW_TEXT);
            } else {
              this.overFlowWrapper.classList.remove(REMAIN_COUNT);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overFlowWrapper], REMAIN_COUNT);
            }
          } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + REMAIN_WRAPPER, this.overFlowWrapper)) {
            this.overFlowWrapper.classList.remove(REMAIN_COUNT);
          }
        }
      }, {
        key: "createHiddenElement",
        value: function createHiddenElement() {
          if (this.allowMultiSelection || this.showCheckBox) {
            this.hiddenElement = this.createElement('select', {
              attrs: {
                'aria-hidden': 'true',
                'class': HIDDENELEMENT,
                'tabindex': '-1',
                'multiple': ''
              }
            });
          } else {
            this.hiddenElement = this.createElement('select', {
              attrs: {
                'aria-hidden': 'true',
                'tabindex': '-1',
                'class': HIDDENELEMENT
              }
            });
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.hiddenElement], this.inputWrapper);
          this.validationAttribute();
        }
      }, {
        key: "createClearIcon",
        value: function createClearIcon() {
          this.overAllClear = this.createElement('span', {
            className: CLOSEICON_CLASS
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllClear], HIDEICON);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CLEAR);

          if (this.showClearButton) {
            this.inputWrapper.insertBefore(this.overAllClear, this.inputObj.buttons[0]);
          }
        }
      }, {
        key: "validationAttribute",
        value: function validationAttribute() {
          var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
          this.hiddenElement.setAttribute('name', name);
          this.inputEle.removeAttribute('name');
          var attributes$$1 = ['required', 'aria-required', 'form'];

          for (var i = 0; i < attributes$$1.length; i++) {
            var attr = this.inputEle.getAttribute(attributes$$1[i]);

            if (attr) {
              this.hiddenElement.setAttribute(attributes$$1[i], attr);
              this.inputEle.removeAttribute(attributes$$1[i]);
            }
          }
        }
      }, {
        key: "createChip",
        value: function createChip() {
          if (!this.inputWrapper.contains(this.chipWrapper)) {
            this.chipWrapper = this.createElement('span', {
              className: CHIP_WRAPPER
            });
            this.chipCollection = this.createElement('span', {
              className: CHIP_COLLECTION
            });
            this.chipWrapper.appendChild(this.chipCollection);
            this.inputWrapper.insertBefore(this.chipWrapper, this.hiddenElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CHIP);
            var isValid = this.getValidMode();

            if (isValid && this.value !== null) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);
            } else if (this.value === null) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
            }
          }
        }
      }, {
        key: "getValidMode",
        value: function getValidMode() {
          if (this.allowMultiSelection || this.showCheckBox) {
            return this.mode === 'Box' ? true : this.mode === 'Default' && this.inputFocus ? true : false;
          } else {
            return false;
          }
        }
      }, {
        key: "createSelectAllWrapper",
        value: function createSelectAllWrapper() {
          this.checkAllParent = this.createElement('div', {
            className: CHECKALLPARENT,
            attrs: {
              'tabindex': '0'
            }
          });
          this.selectAllSpan = this.createElement('span', {
            className: ALLTEXT
          });
          this.selectAllSpan.textContent = '';
          var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + BIGGER);
          var touchClass = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? '' : SMALL;
          this.checkBoxElement = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["createCheckBox"])(this.createElement, true, {
            cssClass: touchClass
          });
          this.checkBoxElement.setAttribute('role', 'checkbox');
          this.checkAllParent.appendChild(this.checkBoxElement);
          this.checkAllParent.appendChild(this.selectAllSpan);
          this.setLocale();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.checkAllParent, 'mouseup', this.clickHandler, this);

          this.wireCheckAllWrapperEvents();
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var target;

          if (e.currentTarget && e.currentTarget.classList.contains(CHECKALLPARENT)) {
            target = e.currentTarget.firstElementChild.lastElementChild;
          } else {
            target = e.target;
          }

          this.checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + CHECKBOXWRAP);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkWrapper)) {
            var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME, this.checkWrapper);
            this.changeState(this.checkWrapper, checkElement.classList.contains(CHECK) ? 'uncheck' : 'check', e);
          }

          e.preventDefault();
        }
      }, {
        key: "changeState",
        value: function changeState(wrapper, state, e) {
          var ariaState;
          var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME)[0];

          if (state === 'check' && !frameSpan.classList.contains(CHECK)) {
            frameSpan.classList.add(CHECK);
            ariaState = 'true';

            if (!this.isReverseUpdate) {
              this.treeObj.checkAll();

              if (!this.changeOnBlur) {
                this.triggerChangeEvent(e);
              }
            }

            this.setLocale(true);
          } else if (state === 'uncheck' && frameSpan.classList.contains(CHECK)) {
            frameSpan.classList.remove(CHECK);
            ariaState = 'false';

            if (!this.isReverseUpdate) {
              this.treeObj.uncheckAll();

              if (!this.changeOnBlur) {
                this.triggerChangeEvent(e);
              }
            }

            this.setLocale(false);
          }

          this.setMultiSelect();
          this.ensurePlaceHolder();
          ariaState = state === 'check' ? 'true' : 'false';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
            wrapper.setAttribute('aria-checked', ariaState);
          }
        }
      }, {
        key: "setLocale",
        value: function setLocale(unSelect) {
          if (!this.selectAllSpan) {
            return;
          }

          if (this.selectAllText !== 'Select All' || this.unSelectAllText !== 'Unselect All') {
            var template = unSelect ? this.unSelectAllText : this.selectAllText;
            var compiledString;
            this.selectAllSpan.textContent = '';
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);

            var _iterator93 = _createForOfIteratorHelper(compiledString({}, null, null, null, !this.isStringTemplate)),
                _step93;

            try {
              for (_iterator93.s(); !(_step93 = _iterator93.n()).done;) {
                var item = _step93.value;
                this.selectAllSpan.textContent = item.textContent;
              }
            } catch (err) {
              _iterator93.e(err);
            } finally {
              _iterator93.f();
            }
          } else {
            this.selectAllSpan.textContent = unSelect ? this.unSelectAllText : this.selectAllText;
          }
        }
      }, {
        key: "setAttributes",
        value: function setAttributes() {
          this.element.removeAttribute('tabindex');
          var id = this.element.getAttribute('id');
          this.hiddenElement.id = id + '_hidden';
          this.inputWrapper.setAttribute('tabindex', '0');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputWrapper, this.getAriaAttributes());
        }
      }, {
        key: "setHTMLAttributes",
        value: function setHTMLAttributes() {
          if (Object.keys(this.htmlAttributes).length) {
            for (var _i75 = 0, _Object$keys17 = Object.keys(this.htmlAttributes); _i75 < _Object$keys17.length; _i75++) {
              var htmlAttr = _Object$keys17[_i75];

              if (htmlAttr === 'class') {
                this.inputWrapper.classList.add(this.htmlAttributes[htmlAttr]);
              } else if (htmlAttr === 'disabled' && this.htmlAttributes[htmlAttr] === 'disabled') {
                this.setProperties({
                  enabled: false
                }, true);
                this.setEnable();
              } else if (htmlAttr === 'readonly' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes[htmlAttr])) {
                this.setProperties({
                  readonly: true
                }, true);
                this.dataBind();
              } else if (htmlAttr === 'style') {
                this.inputWrapper.setAttribute('style', this.htmlAttributes[htmlAttr]);
              } else {
                var defaultAttr = ['title', 'id', 'placeholder', 'aria-placeholder', 'role', 'autocorrect', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
                var validateAttr = ['name', 'required'];

                if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
                  this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                } else if (defaultAttr.indexOf(htmlAttr) > -1) {
                  htmlAttr === 'placeholder' ? _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(this.htmlAttributes[htmlAttr], this.inputEle) : this.inputEle.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                } else {
                  this.inputWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                }
              }
            }
          }
        }
      }, {
        key: "updateDataAttribute",
        value: function updateDataAttribute() {
          var value = this.htmlAttributes;
          var invalidAttr = ['class', 'style', 'id', 'type'];
          var attr = {};

          for (var a = 0; a < this.element.attributes.length; a++) {
            if (invalidAttr.indexOf(this.element.attributes[a].name) === -1 && !(this.element.attributes[a].name === 'readonly')) {
              attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
            }
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(attr, value, attr);
          this.setProperties({
            htmlAttributes: attr
          }, true);
        }
      }, {
        key: "showOverAllClear",
        value: function showOverAllClear() {
          if (!this.enabled || this.readonly) {
            return;
          }

          if (this.overAllClear) {
            var isValue = this.value ? this.value.length ? true : false : false;

            if (isValue && this.showClearButton) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overAllClear], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CLEAR);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllClear], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CLEAR);
            }
          }
        }
      }, {
        key: "setTreeValue",
        value: function setTreeValue() {
          if (this.value !== null && this.value.length !== 0) {
            var data;

            if (this.showCheckBox || this.allowMultiSelection) {
              for (var i = 0; i < this.value.length; i++) {
                data = this.treeObj.getTreeData(this.value[i])[0];

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
                  this.value.splice(this.value.indexOf(this.value[i]), 1);
                }
              }

              if (this.value.length !== 0) {
                this.setValidValue();
              }
            } else {
              data = this.treeObj.getTreeData(this.value[0])[0];

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
                this.setProperties({
                  text: data[this.fields.text]
                }, true);
                this.setValidValue();
              } else {
                this.setProperties({
                  value: this.currentValue
                }, true);
              }
            }
          }
        }
      }, {
        key: "setTreeText",
        value: function setTreeText() {
          if (this.value !== null && !this.isInitialized) {
            return;
          }

          if (this.text !== null) {
            var data;
            var valArr = [];

            if (this.showCheckBox || this.allowMultiSelection) {
              var textArr = this.text.split(this.delimiterChar);

              for (var i = 0; i < textArr.length; i++) {
                data = this.getItems(textArr[i]);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
                  valArr.push(data[this.fields.value].toString());
                }
              }

              if (valArr.length !== 0) {
                this.oldValue = this.value;
                this.setProperties({
                  value: valArr
                }, true);
                this.setValidValue();
              } else {
                this.setProperties({
                  text: this.currentText
                }, true);
              }
            } else {
              data = this.getItems(this.text);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
                this.oldValue = this.value;
                this.setProperties({
                  value: [data[this.fields.value].toString()]
                }, true);
                this.setValidValue();
              } else {
                this.setProperties({
                  text: this.currentText
                }, true);
              }
            }
          }
        }
      }, {
        key: "setSelectedValue",
        value: function setSelectedValue() {
          if (this.value != null) {
            return;
          }

          if (!this.isInitialized) {
            this.oldValue = this.value;

            if (this.treeObj.selectedNodes.length > 0 && !this.showCheckBox) {
              this.setProperties({
                value: this.treeObj.selectedNodes
              }, true);

              if (this.allowMultiSelection) {
                this.updateMode();
              }
            } else if (this.showCheckBox && this.treeObj.checkedNodes) {
              if (this.treeObj.checkedNodes.length > 0) {
                this.setProperties({
                  value: this.treeObj.checkedNodes
                }, true);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('selectedNodes', [], this.treeObj);
                this.treeObj.dataBind();
                this.updateMode();
              }
            }

            this.updateSelectedValues();
            this.currentText = this.text;
            this.currentValue = this.value;
          }
        }
      }, {
        key: "setValidValue",
        value: function setValidValue() {
          if (!this.showCheckBox && !this.allowMultiSelection) {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputEle, this.floatLabelType);

            var id = this.value[0].toString();

            if (this.treeObj.selectedNodes[0] !== id) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('selectedNodes', [id], this.treeObj);
            }
          } else {
            if (this.showCheckBox) {
              this.treeObj.checkedNodes = this.value.slice();
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('selectedNodes', [], this.treeObj);
              this.treeObj.dataBind();
              this.setMultiSelect();
            } else {
              this.treeObj.selectedNodes = this.value.slice();
              this.selectedText = [];
              this.updateSelectedValues();
            }

            this.treeObj.dataBind();
          }

          this.currentText = this.text;
          this.currentValue = this.value;

          if (this.isInitialized) {
            this.triggerChangeEvent();
          }
        }
      }, {
        key: "getItems",
        value: function getItems(givenText) {
          var data;

          if (this.treeDataType === 1) {
            for (var i = 0; i < this.treeItems.length; i++) {
              var text = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.text, this.treeItems[i]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.treeItems[i]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(text) && text === givenText) {
                data = this.treeItems[i];
                break;
              }
            }
          } else {
            data = this.getNestedItems(this.treeItems, this.fields, givenText);
          }

          return data;
        }
      }, {
        key: "getNestedItems",
        value: function getNestedItems(data, field, givenText) {
          var newData;

          for (var i = 0, objlen = data.length; i < objlen; i++) {
            var dataId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.text, data[i]);

            if (data[i] && dataId && dataId.toString() === givenText) {
              return data[i];
            } else if (typeof field.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.child, data[i]))) {
              var childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.child, data[i]);
              newData = this.getNestedItems(childData, this.getChildType(field), givenText);

              if (newData !== undefined) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', data[i]))) {
              var child = 'child';
              newData = this.getNestedItems(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(child, data[i]), this.getChildType(field), givenText);

              if (newData !== undefined) {
                break;
              }
            }
          }

          return newData;
        }
      }, {
        key: "getChildType",
        value: function getChildType(mapper) {
          return typeof mapper.child === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.child) ? mapper : mapper.child;
        }
        /* To render the treeview */

      }, {
        key: "renderTree",
        value: function renderTree() {
          this.treeObj = new _syncfusion_ej2_navigations__WEBPACK_IMPORTED_MODULE_6__["TreeView"]({
            fields: this.getTreeFields(this.fields),
            enableRtl: this.enableRtl,
            nodeSelected: this.onNodeSelected.bind(this),
            nodeChecked: this.onNodeChecked.bind(this),
            nodeChecking: this.beforeCheck.bind(this),
            actionFailure: this.onActionFailure.bind(this),
            nodeClicked: this.onNodeClicked.bind(this),
            dataBound: this.OnDataBound.bind(this),
            allowMultiSelection: this.allowMultiSelection,
            showCheckBox: this.showCheckBox,
            autoCheck: this.treeSettings.autoCheck,
            sortOrder: this.sortOrder,
            expandOn: this.treeSettings.expandOn,
            loadOnDemand: this.treeSettings.loadOnDemand,
            nodeSelecting: this.onBeforeSelect.bind(this),
            nodeTemplate: this.itemTemplate
          });
          this.treeObj.appendTo('#' + this.tree.id);
        }
        /* To render the popup element */

      }, {
        key: "renderPopup",
        value: function renderPopup() {
          var _this473 = this;

          if (this.isFilteredData) {
            this.filterObj.value = '';
            this.treeObj.fields = this.getTreeFields(this.fields);
            this.isFilterRestore = true;
            this.isFilteredData = false;
            this.hideCheckAll(false);
          }

          var isCancelled = false;
          var args = {
            cancel: false
          };
          this.trigger('beforeOpen', args, function (args) {
            if (!args.cancel) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this473.inputWrapper], [ICONANIMATION]);

              if (_this473.isFirstRender) {
                _this473.popupEle = _this473.createElement('div', {
                  id: _this473.element.id + '_popup',
                  className: POPUP_CLASS + ' ' + (_this473.cssClass != null ? _this473.cssClass : '')
                });
                document.body.appendChild(_this473.popupEle);

                _this473.createPopup(_this473.popupEle);
              } else {
                _this473.popupEle = _this473.popupObj.element;
              }
            } else {
              isCancelled = true;
            }

            if (_this473.isFirstRender && !isCancelled) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([_this473.popupDiv], _this473.popupEle);
              _this473.popupDiv.style.display = 'block';

              if (_this473.allowFiltering) {
                _this473.renderFilter();
              }

              if (_this473.showCheckBox && _this473.showSelectAll && !_this473.popupDiv.classList.contains(NODATA)) {
                _this473.createSelectAllWrapper();

                _this473.popupEle.insertBefore(_this473.checkAllParent, _this473.popupDiv);
              }

              if (_this473.headerTemplate) {
                _this473.setHeaderTemplate();
              }

              if (_this473.footerTemplate) {
                _this473.setFooterTemplate();
              }

              _this473.isFirstRender = false;
            }

            if (!isCancelled) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this473.inputWrapper, {
                'aria-expanded': 'true'
              });

              _this473.popupObj.show(null, _this473.zIndex === 1000 ? _this473.inputEle : null);

              _this473.popupEle.style.display = 'block';

              _this473.updatePopupHeight();

              _this473.popupObj.refreshPosition();

              if (!(_this473.showCheckBox && _this473.showSelectAll) && !_this473.popupDiv.classList.contains(NODATA) && _this473.treeItems.length > 0) {
                _this473.treeObj.element.focus();
              }

              if (_this473.checkSelectAll && _this473.checkBoxElement) {
                var wrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this473.checkBoxElement, '.' + CHECKBOXWRAP);

                _this473.changeState(wrap, 'check');

                _this473.checkSelectAll = false;
              }

              if (_this473.allowFiltering) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this473.inputWrapper], [INPUTFOCUS]);

                _this473.filterObj.element.focus();
              }

              var eventArgs = {
                popup: _this473.popupObj
              };

              _this473.trigger('open', eventArgs);
            }
          });
        }
      }, {
        key: "updatePopupHeight",
        value: function updatePopupHeight() {
          if (this.isFirstRender) {
            return;
          }

          var popupHeight = this.getHeight();
          this.popupEle.style.maxHeight = popupHeight;

          if (this.allowFiltering) {
            var height = Math.round(this.filterContainer.getBoundingClientRect().height);
            popupHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(parseInt(popupHeight, 10) - height + 'px');
          }

          if (this.headerTemplate) {
            var _height2 = Math.round(this.header.getBoundingClientRect().height);

            popupHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(parseInt(popupHeight, 10) - _height2 + 'px');
          }

          if (this.showCheckBox && this.showSelectAll) {
            var _height3 = Math.round(this.checkAllParent.getBoundingClientRect().height);

            popupHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(parseInt(popupHeight, 10) - _height3 + 'px');
          }

          if (this.footerTemplate) {
            var _height4 = Math.round(this.footer.getBoundingClientRect().height);

            popupHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(parseInt(popupHeight, 10) - _height4 + 'px');
          }

          var border = parseInt(window.getComputedStyle(this.popupEle).borderTopWidth, 10);
          border = border + parseInt(window.getComputedStyle(this.popupEle).borderBottomWidth, 10);
          popupHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(parseInt(popupHeight, 10) - border + 'px');
          this.popupDiv.style.maxHeight = popupHeight;
        }
      }, {
        key: "createPopup",
        value: function createPopup(element) {
          var _this474 = this;

          if (this.isFirstRender) {
            this.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["Popup"](element, {
              width: this.setWidth(),
              targetType: 'relative',
              collision: {
                X: 'flip',
                Y: 'flip'
              },
              relateTo: this.inputWrapper,
              zIndex: this.zIndex,
              enableRtl: this.enableRtl,
              position: {
                X: 'left',
                Y: 'bottom'
              },
              close: function close() {
                _this474.isPopupOpen = false;
              },
              open: function open() {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', _this474.onDocumentClick, _this474);

                _this474.isPopupOpen = true;
              },
              targetExitViewport: function targetExitViewport() {
                if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                  _this474.hidePopup();
                }
              }
            });
          }
        }
        /* To calculate the width when change via set model */

      }, {
        key: "setElementWidth",
        value: function setElementWidth(inputWidth) {
          var ddElement = this.inputWrapper;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputWidth)) {
            if (typeof inputWidth === 'number') {
              ddElement.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(inputWidth);
            } else if (typeof inputWidth === 'string') {
              ddElement.style.width = inputWidth.match(/px|%|em/) ? inputWidth : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(inputWidth);
            }
          }
        }
        /* To calculate the width of the popup */

      }, {
        key: "setWidth",
        value: function setWidth() {
          var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.popupWidth);

          if (width.indexOf('%') > -1) {
            var inputWidth = this.inputWrapper.offsetWidth * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
          } else if (typeof this.popupWidth === 'string') {
            width = this.popupWidth.match(/px|em/) ? this.popupWidth : width;
          }

          return width;
        }
        /* To calculate the height of the popup */

      }, {
        key: "getHeight",
        value: function getHeight() {
          var height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.popupHeight);

          if (height.indexOf('%') > -1) {
            // Will set the height of the popup according to the view port height
            var viewPortHeight = document.documentElement.clientHeight * parseFloat(height) / 100;
            height = viewPortHeight.toString() + 'px';
          } else if (typeof this.popupHeight === 'string') {
            height = this.popupHeight.match(/px|em/) ? this.popupHeight : height;
          }

          return height;
        }
      }, {
        key: "onDocumentClick",
        value: function onDocumentClick(e) {
          var target = e.target;
          var isTree = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + PARENTITEM);
          var isFilter = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + FILTERWRAP);
          var isScroller = target.classList.contains(DROPDOWN) ? true : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["matches"])(target, '.e-ddt .e-popup') || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["matches"])(target, '.e-ddt .e-treeview');

          if (this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isFilter || isScroller) || (this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) || this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT) || target.classList.contains(CHECKBOXFRAME)))) {
            this.isDocumentClick = false;
            e.preventDefault();
          } else if (!this.inputWrapper.contains(target) && this.inputFocus) {
            this.focusOut(e);
          }
        }
      }, {
        key: "onActionFailure",
        value: function onActionFailure(e) {
          this.trigger('actionFailure', e);
          this.l10nUpdate(true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupDiv], NODATA);
        }
      }, {
        key: "OnDataBound",
        value: function OnDataBound(args) {
          this.treeItems = args.data;

          if (this.treeItems.length <= 0) {
            this.l10nUpdate();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupDiv], NODATA);
            this.hideCheckAll(true);
          } else if (this.popupDiv.classList.contains(NODATA) && this.treeItems.length >= 1) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.popupDiv], NODATA);
            this.hideCheckAll(false);
          }

          this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);

          if (this.isFirstRender && this.isRemoteData) {
            this.setTreeValue();
            this.setTreeText();
            this.updateHiddenValue();
            this.setSelectedValue();

            if (!this.wrapText) {
              this.updateView();
            }

            this.treeObj.element.focus();
          }

          var eventArgs = {
            data: args.data
          };
          this.trigger('dataBound', eventArgs);

          if (this.isFilteredData) {
            this.treeObj.expandAll();
          }

          if (this.isFilterRestore) {
            this.restoreFilterSelection();
            this.isFilterRestore = false;
          }
        }
      }, {
        key: "restoreFilterSelection",
        value: function restoreFilterSelection() {
          if (this.showCheckBox) {
            this.treeObj.checkedNodes = this.value ? this.value : [];
          } else {
            this.treeObj.selectedNodes = this.value ? this.value : [];
          }
        }
        /* To set cssclass for the dropdowntree */

      }, {
        key: "setCssClass",
        value: function setCssClass(newClass, oldClass) {
          var elements = this.popupObj ? [this.inputWrapper, this.popupObj.element] : [this.inputWrapper];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldClass) && oldClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, oldClass.split(' '));
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newClass) && newClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(elements, newClass.split(' '));
          }
        }
      }, {
        key: "setEnableRTL",
        value: function setEnableRTL(state) {
          if (state) {
            this.inputWrapper.classList.add(RTL);
          } else {
            this.inputWrapper.classList.remove(RTL);
          }

          if (this.popupObj) {
            this.popupObj.enableRtl = state;
            this.popupObj.dataBind();
          }

          if (this.treeObj) {
            this.treeObj.enableRtl = state;
            this.treeObj.dataBind();
          }
        }
        /* To set enable property */

      }, {
        key: "setEnable",
        value: function setEnable() {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setEnabled(this.enabled, this.inputEle);

          if (this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], DISABLED);
            this.inputEle.setAttribute('aria-disabled', 'false');
            this.inputWrapper.setAttribute('aria-disabled', 'false');
          } else {
            if (this.isPopupOpen) {
              this.hidePopup();
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], DISABLED);

            if (this.inputWrapper && this.inputWrapper.classList.contains(INPUTFOCUS)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], [INPUTFOCUS]);
            }

            this.inputEle.setAttribute('aria-disabled', 'true');
            this.inputWrapper.setAttribute('aria-disabled', 'true');
          }
        }
      }, {
        key: "cloneFields",
        value: function cloneFields(fields) {
          var clonedField = {
            dataSource: fields.dataSource,
            value: fields.value,
            text: fields.text,
            parentValue: fields.parentValue,
            child: this.cloneChildField(fields.child),
            hasChildren: fields.hasChildren,
            expanded: fields.expanded,
            iconCss: fields.iconCss,
            imageUrl: fields.imageUrl,
            htmlAttributes: fields.htmlAttributes,
            query: fields.query,
            selected: fields.selected,
            tableName: fields.tableName,
            tooltip: fields.tooltip
          };
          return clonedField;
        }
      }, {
        key: "cloneChildField",
        value: function cloneChildField(fields) {
          if (typeof fields === 'string') {
            return fields;
          } else {
            var clonedField = {
              dataSource: fields.dataSource,
              value: fields.value,
              text: fields.text,
              parentValue: fields.parentValue,
              child: fields.child ? this.cloneChildField(fields.child) : null,
              hasChildren: fields.hasChildren,
              expanded: fields.expanded,
              iconCss: fields.iconCss,
              imageUrl: fields.imageUrl,
              htmlAttributes: fields.htmlAttributes,
              query: fields.query,
              selected: fields.selected,
              tableName: fields.tableName,
              tooltip: fields.tooltip
            };
            return clonedField;
          }
        }
      }, {
        key: "getTreeFields",
        value: function getTreeFields(fields) {
          var treeFields = {
            dataSource: fields.dataSource,
            id: fields.value,
            text: fields.text,
            parentID: fields.parentValue,
            child: this.getTreeChildren(fields.child),
            hasChildren: fields.hasChildren,
            expanded: fields.expanded,
            iconCss: fields.iconCss,
            imageUrl: fields.imageUrl,
            isChecked: fields.selected,
            htmlAttributes: fields.htmlAttributes,
            query: fields.query,
            selected: fields.selected,
            tableName: fields.tableName,
            tooltip: fields.tooltip
          };
          return treeFields;
        }
      }, {
        key: "getTreeChildren",
        value: function getTreeChildren(mapper) {
          if (typeof mapper === 'string') {
            return mapper;
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper)) {
            var childFields;
            mapper = this.getActualProperties(mapper);
            childFields = mapper;

            if (mapper.value) {
              childFields.id = mapper.value;
            }

            if (mapper.parentValue) {
              childFields.parentID = mapper.parentValue;
            }

            if (mapper.child) {
              childFields.child = this.getTreeChildren(mapper.child);
            }

            if (mapper.selected && this.showCheckBox) {
              childFields.isChecked = mapper.selected;
            }

            return childFields;
          }

          return null;
        }
      }, {
        key: "getTreeDataType",
        value: function getTreeDataType(ds, field) {
          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            for (var i = 0; i < ds.length; i++) {
              if (typeof field.child === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.child, ds[i]))) {
                return 1;
              }
            }

            return 2;
          }

          for (var _i76 = 0, _len32 = ds.length; _i76 < _len32; _i76++) {
            if (typeof field.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.child, ds[_i76]))) {
              return 2;
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.parentValue, ds[_i76])) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(field.hasChildren, ds[_i76]))) {
              return 1;
            }
          }

          return 1;
        }
        /* Triggers when the tree fields is changed dynamically */

      }, {
        key: "setFields",
        value: function setFields() {
          this.resetValue();
          this.treeObj.fields = this.getTreeFields(this.fields);
          this.treeObj.dataBind();
        }
      }, {
        key: "getEventArgs",
        value: function getEventArgs(args) {
          var checkData = args.data;
          var selectData = args.nodeData;
          var state;

          if (this.showCheckBox) {
            if (args.action === 'check') {
              state = 'select';
            } else if (args.action === 'uncheck') {
              state = 'un-select';
            }
          }

          var eventArgs = {
            action: this.showCheckBox ? state : args.action,
            isInteracted: args.isInteracted,
            item: args.node,
            itemData: this.showCheckBox ? checkData[0] : selectData
          };
          return eventArgs;
        }
      }, {
        key: "onBeforeSelect",
        value: function onBeforeSelect(args) {
          if (args.isInteracted) {
            this.oldValue = this.value ? this.value.slice() : this.value;

            if (this.value === null) {
              this.setProperties({
                value: []
              }, true);
            }
          }
        }
      }, {
        key: "updateHiddenValue",
        value: function updateHiddenValue() {
          if (this.allowMultiSelection || this.showCheckBox) {
            return;
          }

          if (this.value && this.value.length) {
            this.hiddenElement.innerHTML = '<option selected value ="' + this.value[0] + '">' + this.text + '</option>';
          } else {
            this.hiddenElement.innerHTML = '';
          }
        }
        /* Triggers when the tree node is selected */

      }, {
        key: "onNodeSelected",
        value: function onNodeSelected(args) {
          if (this.showCheckBox) {
            return;
          }

          var selectedText;

          if (args.isInteracted) {
            var id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('id', args.nodeData).toString();

            if (!this.allowMultiSelection) {
              this.hiddenElement.innerHTML = '';
              this.setProperties({
                value: [id]
              }, true);

              if (this.itemTemplate) {
                selectedText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('text', this.treeObj.getNode(id));
              } else {
                selectedText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('text', args.nodeData).toString();
              }

              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(selectedText, this.inputEle, this.floatLabelType);

              this.setProperties({
                text: selectedText
              }, true);
              this.currentText = this.text;
              this.currentValue = this.value;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputWrapper, {
                'aria-describedby': this.element.id
              });
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputWrapper, {
                'aria-activedescendant': id.toString()
              });
              this.updateHiddenValue();
              this.showOverAllClear();
              this.hidePopup();
              this.isNodeSelected = true;
            } else if (this.allowMultiSelection) {
              this.setMultiSelect();
            }
          }

          var eventArgs = this.getEventArgs(args);
          this.trigger('select', eventArgs);

          if (this.isValueChange && !this.changeOnBlur) {
            this.triggerChangeEvent(this.keyEventArgs);
            this.isValueChange = false;
          }
        }
      }, {
        key: "onNodeClicked",
        value: function onNodeClicked(args) {
          if (!this.changeOnBlur && this.isNodeSelected) {
            this.triggerChangeEvent(args.event);
            this.isNodeSelected = false;
          }

          var target = args.event.target;

          if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
            var getNodeDetails = this.treeObj.getNode(args.node);

            if (getNodeDetails.isChecked === 'true') {
              this.treeObj.uncheckAll([args.node]);
            } else {
              this.treeObj.checkAll([args.node]);
            }

            this.setMultiSelect();
            this.ensurePlaceHolder();
          }

          if (!this.changeOnBlur && (this.allowMultiSelection || this.showCheckBox)) {
            this.triggerChangeEvent(args.event);
          }
        }
      }, {
        key: "onNodeChecked",
        value: function onNodeChecked(args) {
          var eventArgs = this.getEventArgs(args);
          this.trigger('select', eventArgs);

          if (this.isFilteredData && args.action === 'uncheck') {
            var id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('id', args.data[0]).toString();
            this.removeSelectedData(id, true);
          }

          if (!this.isChipDelete && args.isInteracted) {
            this.setMultiSelect();
            this.ensurePlaceHolder();
          }

          if (this.showSelectAll && this.checkBoxElement) {
            var nodes = this.treeObj.element.querySelectorAll('li');
            var checkedNodes = this.treeObj.element.querySelectorAll('li .e-checkbox-wrapper[aria-checked=true]');
            var wrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.checkBoxElement, '.' + CHECKBOXWRAP);

            if (wrap && args.action === 'uncheck') {
              this.isReverseUpdate = true;
              this.changeState(wrap, 'uncheck');
              this.isReverseUpdate = false;
            } else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length) {
              this.isReverseUpdate = true;
              this.changeState(wrap, 'check');
              this.isReverseUpdate = false;
            }
          }
        }
      }, {
        key: "beforeCheck",
        value: function beforeCheck(args) {
          if (args.isInteracted) {
            this.oldValue = this.value ? this.value.slice() : this.value;
          }
        }
      }, {
        key: "updateClearButton",
        value: function updateClearButton(state) {
          if (state) {
            if (!this.inputWrapper.contains(this.overAllClear)) {
              this.inputEle.parentElement.insertBefore(this.overAllClear, this.inputEle.nextSibling);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overAllClear], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CLEAR);
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllClear], HIDEICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CLEAR);
          }

          if ((this.allowMultiSelection || this.showCheckBox) && this.chipWrapper) {
            var chipClose = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CHIP_CLOSE, this.chipWrapper);

            for (var i = 0; i < chipClose.length; i++) {
              if (!state) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([chipClose[i]], HIDEICON);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([chipClose[i]], HIDEICON);
              }
            }
          }
        }
      }, {
        key: "updateDropDownIconState",
        value: function updateDropDownIconState(state) {
          var spinIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + DDTICON, this.inputWrapper);

          if (state) {
            if (!spinIcon) {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].appendSpan(DROPDOWNICON, this.inputWrapper, this.createElement);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([spinIcon], HIDEICON);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_DD_ICON);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([spinIcon], HIDEICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_DD_ICON);
          }
        }
      }, {
        key: "updateMode",
        value: function updateMode() {
          if (this.mode !== 'Delimiter') {
            if (!this.inputWrapper.contains(this.chipWrapper)) {
              this.createChip();
            }

            var isValid = this.getValidMode();

            if (this.chipWrapper.classList.contains(HIDEICON) && isValid) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.chipWrapper], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], SHOW_CHIP);
            } else if (!isValid) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
            }

            var isValue = this.value !== null ? this.value.length !== 0 ? true : false : false;

            if (isValid && isValue) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
            }
          } else if (this.inputEle.classList.contains(CHIP_INPUT)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);

            if (this.chipWrapper) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
            }
          }
        }
      }, {
        key: "ensurePlaceHolder",
        value: function ensurePlaceHolder() {
          if (this.value && this.value.length === 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);

            if (this.chipWrapper) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
            }
          }
        }
      }, {
        key: "ensureClearIconPosition",
        value: function ensureClearIconPosition(floatLabelType) {
          if (floatLabelType !== 'Never') {
            this.inputWrapper.insertBefore(this.overAllClear, this.inputObj.buttons[0]);
          }
        }
      }, {
        key: "setMultiSelectValue",
        value: function setMultiSelectValue(newValues) {
          if (!this.isFilteredData) {
            this.setProperties({
              value: newValues
            }, true);

            if (newValues && newValues.length !== 0 && !this.showCheckBox) {
              this.treeObj.selectedNodes = this.value.slice();
              this.treeObj.dataBind();
            }
          } else {
            var selectedValues = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? [] : this.value;

            for (var i = 0; i < newValues.length; i++) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.indexOf(newValues[i]) === -1) {
                selectedValues.push(newValues[i]);
              }
            }

            this.setProperties({
              value: selectedValues
            }, true);
          }
        }
      }, {
        key: "setMultiSelect",
        value: function setMultiSelect() {
          if (this.showCheckBox && !this.isDynamicChange) {
            this.setMultiSelectValue(this.treeObj.checkedNodes);
          } else {
            var ddtValue = this.allowMultiSelection ? this.showCheckBox ? this.treeObj.checkedNodes : this.treeObj.selectedNodes : this.value ? this.showCheckBox ? this.value : [this.value[0]] : null;
            this.setMultiSelectValue(ddtValue);

            if (this.showCheckBox && this.value !== null) {
              this.treeObj.checkedNodes = this.value;
              this.treeObj.dataBind();
            }
          }

          this.selectedText = [];
          var checkSelection = this.allowMultiSelection ? true : this.showCheckBox ? true : false;

          if (this.inputWrapper.contains(this.chipWrapper) && !checkSelection) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.chipWrapper);
          }

          var isValid = this.getValidMode();

          if (isValid && this.value !== null) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);

            if (this.chipWrapper) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.chipWrapper], HIDEICON);
            }
          }

          var isValue = this.value ? this.value.length ? true : false : false;

          if (this.chipWrapper && this.mode === 'Box' && !isValue) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
          }

          this.updateSelectedValues();
        }
      }, {
        key: "getSelectedData",
        value: function getSelectedData(value) {
          var data = null;

          if (this.isFilteredData) {
            for (var i = 0; i < this.selectedData.length; i++) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.treeSettings.loadOnDemand ? this.fields.value : 'id', this.selectedData[i]).toString() === value) {
                data = this.selectedData[i];
                break;
              }
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
            if (this.treeSettings.loadOnDemand) {
              data = this.treeObj.getTreeData(value)[0];
            } else {
              data = this.treeObj.getNode(value);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
              this.selectedData.push(data);
            }
          }

          return data;
        }
      }, {
        key: "removeSelectedData",
        value: function removeSelectedData(value, muteOnChange) {
          var selectedValues = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? [] : this.value.slice();
          selectedValues.splice(selectedValues.indexOf(value), 1);
          this.setProperties({
            value: selectedValues
          }, muteOnChange);

          for (var i = 0; i < this.selectedData.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.treeSettings.loadOnDemand ? this.fields.value : 'id', this.selectedData[i]).toString() === value) {
              this.selectedData.splice(i, 1);
              break;
            }
          }
        }
      }, {
        key: "updateSelectedValues",
        value: function updateSelectedValues() {
          this.dataValue = '';
          var temp;
          var text;
          var textValue = '';
          var selectedData;
          this.hiddenElement.innerHTML = '';

          if ((!this.isChipDelete || this.treeSettings.autoCheck) && this.inputWrapper.contains(this.chipWrapper)) {
            this.chipCollection.innerHTML = '';
          }

          if (!this.isFilteredData) {
            this.selectedData = [];
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            for (var i = 0, _len33 = this.value.length; i < _len33; i++) {
              selectedData = this.getSelectedData(this.value[i]);
              text = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
              this.selectedText.push(text);
              temp = this.selectedText[this.selectedText.length - 1];

              if (this.selectedText.length > 1) {
                this.dataValue += this.delimiterChar + ' ' + temp;
                textValue += ',' + temp;
                this.setProperties({
                  text: textValue
                }, true);
              } else {
                this.dataValue += temp;
                textValue += temp;
              }

              if (this.mode !== 'Delimiter' && (!this.isChipDelete || this.treeSettings.autoCheck) && (this.allowMultiSelection || this.showCheckBox)) {
                this.setChipValues(temp, this.value[i]);
              }

              this.hiddenElement.innerHTML += '<option selected value ="' + this.value[i] + '">' + this.selectedText[this.selectedText.length - 1] + '</option>';
            }
          }

          var isValid = this.getValidMode();

          if (this.mode !== 'Box' && (this.allowMultiSelection || this.showCheckBox) && !isValid) {
            if (this.chipWrapper) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.chipWrapper], HIDEICON);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
            }
          }

          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.dataValue, this.inputEle, this.floatLabelType);

          if (textValue === '') {
            this.setProperties({
              text: null
            }, true);
          } else {
            this.setProperties({
              text: textValue
            }, true);
          }

          if (this.showClearButton && this.inputFocus) {
            this.showOverAllClear();
          }

          if ((this.allowMultiSelection || this.showCheckBox) && this.popupObj) {
            this.popupObj.refreshPosition();
          }

          this.currentText = this.text;
          this.currentValue = this.value;
        }
      }, {
        key: "setChipValues",
        value: function setChipValues(text, value) {
          if (!this.inputWrapper.contains(this.chipWrapper)) {
            this.createChip();
          }

          var chip = this.createElement('span', {
            className: CHIP,
            attrs: {
              'data-value': value
            }
          });
          var chipContent = this.createElement('span', {
            className: CHIP_CONTENT
          });
          var chipClose = this.createElement('span', {
            className: CHIP_CLOSE + ' ' + ICONS
          });
          chipContent.innerHTML = text;
          chip.appendChild(chipContent);
          this.chipCollection.appendChild(chip);

          if (this.showClearButton) {
            chip.appendChild(chipClose);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(chipClose, 'mousedown', this.removeChip, this);
          }
        }
      }, {
        key: "setSelectAllWrapper",
        value: function setSelectAllWrapper(state) {
          if (this.isFirstRender) {
            return;
          }

          if (state && !this.popupEle.contains(this.checkAllParent) && this.showCheckBox) {
            this.createSelectAllWrapper();
            this.popupEle.insertBefore(this.checkAllParent, this.popupDiv);
          } else if (this.popupEle.contains(this.checkAllParent)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.checkAllParent);
            this.checkAllParent = null;
          }
        }
      }, {
        key: "setHeaderTemplate",
        value: function setHeaderTemplate() {
          var compiledString;

          if (this.header) {
            this.header.innerHTML = '';
          } else {
            this.header = this.createElement('div');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.header], HEADER);
          }

          compiledString = this.templateComplier(this.headerTemplate);

          var _iterator94 = _createForOfIteratorHelper(compiledString({}, null, null, this.headerTemplateId, this.isStringTemplate)),
              _step94;

          try {
            for (_iterator94.s(); !(_step94 = _iterator94.n()).done;) {
              var item = _step94.value;
              this.header.appendChild(item);
            }
          } catch (err) {
            _iterator94.e(err);
          } finally {
            _iterator94.f();
          }

          this.ddtupdateBlazorTemplates(false, false, true, false);
          this.popupEle.insertBefore(this.header, this.checkAllParent ? this.checkAllParent : this.popupDiv);
        }
      }, {
        key: "templateComplier",
        value: function templateComplier(template) {
          if (template) {
            try {
              if (document.querySelectorAll(template).length) {
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
              }
            } catch (e) {
              return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            }
          }

          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
        }
      }, {
        key: "setFooterTemplate",
        value: function setFooterTemplate() {
          var compiledString;

          if (this.footer) {
            this.footer.innerHTML = '';
          } else {
            this.footer = this.createElement('div');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.footer], FOOTER);
          }

          compiledString = this.templateComplier(this.footerTemplate);

          var _iterator95 = _createForOfIteratorHelper(compiledString({}, null, null, this.footerTemplateId, this.isStringTemplate)),
              _step95;

          try {
            for (_iterator95.s(); !(_step95 = _iterator95.n()).done;) {
              var item = _step95.value;
              this.footer.appendChild(item);
            }
          } catch (err) {
            _iterator95.e(err);
          } finally {
            _iterator95.f();
          }

          this.ddtupdateBlazorTemplates(false, false, false, true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.footer], this.popupEle);
        }
      }, {
        key: "clearAll",
        value: function clearAll(e) {
          if (!this.enabled || this.readonly) {
            return;
          }

          this.resetValue();
          this.showOverAllClear();

          if (this.allowMultiSelection || this.showCheckBox) {
            if (this.popupObj) {
              this.popupObj.refreshPosition();
            }

            if (!this.wrapText) {
              this.updateOverflowWrapper(true);
            }
          }

          if (e) {
            this.isClearButtonClick = true;
          }

          if (!this.changeOnBlur) {
            this.triggerChangeEvent(e);
          }
        }
      }, {
        key: "removeChip",
        value: function removeChip(e) {
          if (!this.enabled || this.readonly) {
            return;
          }

          var element = e.target.parentElement;
          var value = element.getAttribute('data-value');

          if (this.chipCollection) {
            if (element) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
            }
          }

          this.isChipDelete = true;
          this.isClearButtonClick = true;
          this.removeSelectedData(value, true);
          this.selectedText = [];

          if (this.allowMultiSelection) {
            this.treeObj.selectedNodes = this.value.slice();
            this.updateSelectedValues();
          }

          if (this.showCheckBox) {
            this.treeObj.uncheckAll([value]);
            this.clearCheckAll();
            this.setMultiSelect();
          }

          this.triggerChangeEvent(e);
          this.isChipDelete = false;
          this.ensurePlaceHolder();
        }
      }, {
        key: "resetValue",
        value: function resetValue(isDynamicChange) {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(null, this.inputEle, this.floatLabelType);

          this.oldValue = this.value;
          this.dataValue = null;
          this.setProperties({
            value: []
          }, true);
          this.setProperties({
            text: null
          }, true);
          this.selectedData = [];
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('selectedNodes', [], this.treeObj);
          this.hiddenElement.innerHTML = '';

          if (this.showCheckBox) {
            this.treeObj.uncheckAll();
            this.setMultiSelect();
            this.clearCheckAll();
          }

          if (this.oldValue === null && !isDynamicChange) {
            this.removeValue = true;
          } else if (isDynamicChange) {
            this.triggerChangeEvent();
          }

          if ((this.allowMultiSelection || this.showCheckBox) && this.chipWrapper) {
            this.chipCollection.innerHTML = '';
            this.ensurePlaceHolder();
          }
        }
      }, {
        key: "clearCheckAll",
        value: function clearCheckAll() {
          if (this.showSelectAll && this.value.length === 0) {
            this.setLocale(false);
          }
        }
      }, {
        key: "selectAllItems",
        value: function selectAllItems(state) {
          if (this.showCheckBox) {
            state ? this.treeObj.checkAll() : this.treeObj.uncheckAll();
            this.checkSelectAll = true;
          } else if (this.allowMultiSelection) {
            if (!state) {
              this.treeObj.selectedNodes = [];
            } else {
              var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('li', this.treeObj.element);
              var id;
              var arr = [];

              for (var i = 0; i < li.length; i++) {
                id = li[i].getAttribute('data-uid').toString();
                arr.push(id);
              }

              this.treeObj.selectedNodes = arr;
            }
          }

          this.updateMode();
          this.setMultiSelect();

          if (!this.wrapText) {
            state ? this.updateView() : this.updateOverflowWrapper(true);
          }
        }
      }, {
        key: "updateTreeSettings",
        value: function updateTreeSettings(prop) {
          var value = Object.keys(prop.treeSettings)[0];

          if (value === 'autoCheck') {
            this.ensureAutoCheck();
            this.treeObj.autoCheck = this.treeSettings.autoCheck;
          } else if (value === 'loadOnDemand') {
            this.treeObj.loadOnDemand = this.treeSettings.loadOnDemand;
          } else if (value === 'expandOn') {
            this.treeObj.expandOn = this.treeSettings.expandOn;
            this.treeObj.dataBind();
            return;
          }

          this.treeObj.dataBind();
          this.setMultiSelect();
        }
      }, {
        key: "updateCheckBoxState",
        value: function updateCheckBoxState(checkBox) {
          if (!this.wrapText) {
            this.updateOverflowWrapper(false);
          }

          this.treeObj.showCheckBox = checkBox;
          this.treeObj.dataBind();
          this.isDynamicChange = true;
          this.setSelectAllWrapper(this.showSelectAll);

          if (this.showSelectAll) {
            this.setLocale();
          }

          if (this.showCheckBox) {
            this.updateMode();
          }

          this.setMultiSelect();
          this.isDynamicChange = false;
        }
      }, {
        key: "updateTemplate",
        value: function updateTemplate() {
          if (this.popupObj) {
            this.popupObj.destroy();

            if (this.isPopupOpen) {
              this.hidePopup();
              this.isFirstRender = true;
              this.renderPopup();
            } else {
              this.isFirstRender = true;
            }
          }
        }
      }, {
        key: "l10nUpdate",
        value: function l10nUpdate(actionFailure) {
          if (this.noRecord) {
            this.noRecord.innerHTML = '';
          } else {
            this.noRecord = this.createElement('div');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.noRecord], NODATACONTAINER);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.noRecord], this.popupDiv);
          }

          if (this.noRecordsTemplate !== 'No Records Found' || this.actionFailureTemplate !== 'The Request Failed') {
            var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
            var compiledString;
            var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
            compiledString = this.templateComplier(template);

            var _iterator96 = _createForOfIteratorHelper(compiledString({}, null, null, templateId, this.isStringTemplate)),
                _step96;

            try {
              for (_iterator96.s(); !(_step96 = _iterator96.n()).done;) {
                var item = _step96.value;
                this.noRecord.appendChild(item);
              }
            } catch (err) {
              _iterator96.e(err);
            } finally {
              _iterator96.f();
            }

            this.ddtupdateBlazorTemplates(!actionFailure, actionFailure);
          } else {
            var l10nLocale = {
              noRecordsTemplate: 'No Records Found',
              actionFailureTemplate: 'The Request Failed'
            };
            this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getLocaleName(), l10nLocale, this.locale);
            this.noRecord.innerHTML = actionFailure ? this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');
          }
        }
      }, {
        key: "ddtupdateBlazorTemplates",
        value: function ddtupdateBlazorTemplates(noRecord, action, header, footer, isEmpty) {
          if (!this.isStringTemplate) {
            if (this.noRecordsTemplate && noRecord) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.noRecordsTemplateId, NORECORDSTEMPLATE, this, isEmpty);
            }

            if (this.actionFailureTemplate && action) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE, this, isEmpty);
            }

            if (header) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.headerTemplateId, HEADERTEMPLATE, this);
            }

            if (footer) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.footerTemplateId, FOOTERTEMPLATE, this);
            }
          }
        }
      }, {
        key: "ddtresetBlazorTemplates",
        value: function ddtresetBlazorTemplates(noRecord, action, header, footer) {
          if (!this.isStringTemplate) {
            if (this.noRecordsTemplate && noRecord) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.noRecordsTemplateId, NORECORDSTEMPLATE);
            }

            if (this.actionFailureTemplate && action) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.actionFailureTemplateId, ACTIONFAILURETEMPLATE);
            }

            if (header) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.headerTemplateId, HEADERTEMPLATE);
            }

            if (footer) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.footerTemplateId, FOOTERTEMPLATE);
            }
          }
        }
      }, {
        key: "updateRecordTemplate",
        value: function updateRecordTemplate(action) {
          if (this.treeItems && this.treeItems.length <= 0) {
            this.l10nUpdate(action);
            this.updateTemplate();
          }
        }
      }, {
        key: "updateOverflowWrapper",
        value: function updateOverflowWrapper(state) {
          if (!state) {
            if (!this.inputWrapper.contains(this.overFlowWrapper)) {
              this.overFlowWrapper = this.createElement('span', {
                className: OVERFLOW_VIEW + ' ' + HIDEICON
              });
              this.inputWrapper.insertBefore(this.overFlowWrapper, this.hiddenElement);
            }
          } else if (this.inputWrapper.contains(this.overFlowWrapper) && state) {
            this.overFlowWrapper.innerHTML = '';
          }
        }
      }, {
        key: "updateMultiSelection",
        value: function updateMultiSelection(state) {
          if (!this.wrapText) {
            this.updateOverflowWrapper(false);
          }

          this.treeObj.allowMultiSelection = state;
          this.treeObj.dataBind();
          this.updateOption();

          if (this.allowMultiSelection) {
            this.updateMode();
          }

          this.setMultiSelect();
        }
      }, {
        key: "updateAllowFiltering",
        value: function updateAllowFiltering(state) {
          if (!this.isFirstRender) {
            if (state) {
              this.renderFilter();
            } else {
              this.destroyFilter();
            }
          }

          this.ensureAutoCheck();
        }
      }, {
        key: "updateFilterPlaceHolder",
        value: function updateFilterPlaceHolder() {
          if (this.filterObj) {
            this.filterObj.placeholder = this.filterBarPlaceholder;
            this.filterObj.element.setAttribute('aria-label', this.filterBarPlaceholder);
          }
        }
      }, {
        key: "updateValue",
        value: function updateValue(value) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) || value.length === 0) {
            this.resetValue(true);
          } else {
            this.setTreeValue();

            if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
              this.updateOverflowWrapper(false);
              this.updateView();
            }
          }

          this.updateHiddenValue();
        }
      }, {
        key: "updateText",
        value: function updateText(text) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(text)) {
            this.resetValue();
          } else {
            this.setTreeText();

            if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
              this.updateOverflowWrapper(false);
              this.updateView();
            }
          }

          this.updateHiddenValue();
        }
      }, {
        key: "updateModelMode",
        value: function updateModelMode() {
          var validMode = this.allowMultiSelection ? true : this.showCheckBox ? true : false;

          if (!validMode) {
            return;
          }

          if (!this.wrapText) {
            var overFlow = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + OVERFLOW_VIEW, this.inputWrapper);

            if (overFlow) {
              overFlow.innerHTML = '';
            }
          }

          this.updateMode();
          this.setMultiSelect();

          if (!this.wrapText && this.value && this.value.length !== 0) {
            this.updateOverFlowView();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputEle], CHIP_INPUT);

            if (this.mode === 'Box') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overFlowWrapper, this.inputWrapper], SHOW_TEXT);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper, this.inputWrapper], SHOW_TEXT);
            }
          }
        }
      }, {
        key: "updateOption",
        value: function updateOption() {
          if (!this.hiddenElement.hasAttribute('multiple') && (this.allowMultiSelection || this.showCheckBox)) {
            this.hiddenElement.setAttribute('multiple', '');
          } else if (this.hiddenElement.hasAttribute('multiple') && !this.allowMultiSelection && !this.showCheckBox) {
            this.hiddenElement.removeAttribute('multiple');
          }
        }
        /**
         * Dynamically change the value of properties.
         * @private
         */
        // tslint:disable-next-line:max-func-body-length

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i77 = 0, _Object$keys18 = Object.keys(newProp); _i77 < _Object$keys18.length; _i77++) {
            var prop = _Object$keys18[_i77];

            switch (prop) {
              case 'width':
                this.setElementWidth(newProp.width);

                if (this.popupObj) {
                  this.popupObj.element.style.width = this.setWidth();
                }

                break;

              case 'placeholder':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(newProp.placeholder, this.inputEle);

                break;

              case 'cssClass':
                this.setCssClass(newProp.cssClass, oldProp.cssClass);
                break;

              case 'enableRtl':
                this.setEnableRTL(this.enableRtl);
                break;

              case 'fields':
                this.setFields();
                break;

              case 'readonly':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setReadonly(newProp.readonly, this.inputEle);

                break;

              case 'enabled':
                this.setEnable();
                break;

              case 'floatLabelType':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].removeFloating(this.inputObj);

                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].addFloating(this.inputEle, newProp.floatLabelType, this.placeholder, this.createElement);

                this.ensureClearIconPosition(newProp.floatLabelType);
                break;

              case 'showClearButton':
                this.updateClearButton(newProp.showClearButton);
                break;

              case 'allowFiltering':
                this.updateAllowFiltering(newProp.allowFiltering);
                break;

              case 'filterBarPlaceholder':
                this.updateFilterPlaceHolder();
                break;

              case 'value':
                this.updateValue(newProp.value);
                break;

              case 'text':
                this.updateText(newProp.text);
                break;

              case 'allowMultiSelection':
                this.updateMultiSelection(newProp.allowMultiSelection);
                break;

              case 'mode':
                this.updateModelMode();
                break;

              case 'delimiterChar':
                if (this.mode === 'Box') {
                  return;
                }

                if (this.showCheckBox || this.allowMultiSelection) {
                  this.setMultiSelect();
                }

                break;

              case 'selectAllText':
                if (this.showCheckBox && this.showSelectAll) {
                  this.setLocale();
                }

                break;

              case 'unSelectAllText':
                if (this.showCheckBox && this.showSelectAll) {
                  this.setLocale(false);
                }

                break;

              case 'showSelectAll':
                if (this.showCheckBox) {
                  this.setSelectAllWrapper(newProp.showSelectAll);
                  this.updatePopupHeight();
                }

                break;

              case 'showCheckBox':
                this.updateCheckBoxState(newProp.showCheckBox);
                this.updatePopupHeight();
                this.updateOption();
                break;

              case 'treeSettings':
                this.updateTreeSettings(newProp);
                break;

              case 'sortOrder':
                this.treeObj.sortOrder = newProp.sortOrder;
                this.treeObj.dataBind();
                break;

              case 'showDropDownIcon':
                this.updateDropDownIconState(newProp.showDropDownIcon);
                break;

              case 'popupWidth':
                if (this.popupObj) {
                  this.popupObj.element.style.width = this.setWidth();
                }

                break;

              case 'popupHeight':
                if (this.popupObj) {
                  this.updatePopupHeight();
                }

                break;

              case 'zIndex':
                if (this.popupObj) {
                  this.popupObj.zIndex = newProp.zIndex;
                  this.popupObj.dataBind();
                }

                break;

              case 'headerTemplate':
                this.updateTemplate();
                break;

              case 'footerTemplate':
                this.updateTemplate();
                break;

              case 'itemTemplate':
                this.treeObj.nodeTemplate = newProp.itemTemplate;
                this.treeObj.dataBind();
                break;

              case 'noRecordsTemplate':
                this.updateRecordTemplate();
                break;

              case 'actionFailureTemplate':
                this.updateRecordTemplate(true);
                break;

              case 'htmlAttributes':
                this.setHTMLAttributes();
                break;

              case 'wrapText':
                this.updateOverflowWrapper(this.wrapText);

                if ((this.allowMultiSelection || this.showCheckBox) && !this.wrapText) {
                  this.updateView();
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overFlowWrapper], HIDEICON);

                  if (this.chipWrapper && this.mode === 'Box') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.chipWrapper], HIDEICON);
                  } else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper], SHOW_CHIP);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputEle], CHIP_INPUT);
                  }

                  this.ensurePlaceHolder();
                }

                break;
            }
          }
        }
        /**
         * Allows you to clear the selected values from the Dropdown Tree component.
         * @method clear
         * @return {void}.
         */

      }, {
        key: "clear",
        value: function clear() {
          this.clearAll();

          if (this.inputFocus) {
            this.onFocusOut();
          } else {
            if (this.changeOnBlur) {
              this.triggerChangeEvent();
            }

            this.removeValue = false;
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. Also, it removes the attributes and classes.
         * @method destroy
         * @return {void}.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.ddtresetBlazorTemplates(true, true, true, true);
          this.unWireEvents();
          this.setCssClass(null, this.cssClass);
          this.resetValue();
          this.treeObj.destroy();
          this.destroyFilter();

          if (this.popupObj) {
            this.popupObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupObj.element);
          }

          if (this.element.tagName !== this.getDirective()) {
            this.inputWrapper.parentElement.insertBefore(this.element, this.inputWrapper);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popupDiv);
          this.element.classList.remove('e-input');

          _get(_getPrototypeOf(DropDownTree.prototype), "destroy", this).call(this);
        }
      }, {
        key: "destroyFilter",
        value: function destroyFilter() {
          if (this.filterObj) {
            this.filterObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.filterObj.element);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.filterContainer);
            this.filterObj = null;
          }
        }
        /**
         * Ensures visibility of the Dropdown Tree item by using item value or item element.
         * If many Dropdown Tree items are present, and we are in need to find a particular item, then the `ensureVisible` property
         * helps you to bring the item to visibility by expanding the Dropdown Tree and scrolling to the specific item.
         * @param  {string | Element} item - Specifies the value of Dropdown Tree item/ Dropdown Tree item element.
         */

      }, {
        key: "ensureVisible",
        value: function ensureVisible(item) {
          this.treeObj.ensureVisible(item);
        }
        /**
         * To get the updated data of source of the Dropdown Tree.
         * @param  {string | Element} item - Specifies the value of Dropdown Tree item/ Dropdown Tree item element.
         * @returns { { [key: string]: Object }[] }.
         */

      }, {
        key: "getData",
        value: function getData(item) {
          return this.treeObj.getTreeData(item);
        }
        /**
         * Close the Dropdown tree pop-up.
         * @returns void.
         */

      }, {
        key: "hidePopup",
        value: function hidePopup() {
          var eventArgs = {
            popup: this.popupObj
          };
          this.inputWrapper.classList.remove(ICONANIMATION);

          if (this.popupEle) {
            this.popupEle.style.display = 'none';
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputWrapper, {
            'aria-expanded': 'false'
          });

          if (this.popupObj && this.isPopupOpen) {
            this.popupObj.hide();

            if (this.inputFocus) {
              this.inputWrapper.focus();

              if (this.allowFiltering) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper], [INPUTFOCUS]);
              }
            }

            this.trigger('close', eventArgs);
          }
        }
        /**
         * Based on the state parameter, entire list item will be selected or deselected.
         * parameter
         * `true`   - Selects entire Dropdown Tree items.
         * `false`  - Unselects entire Dropdown Tree items.
         * @returns void
         */

      }, {
        key: "selectAll",
        value: function selectAll(state) {
          this.selectAllItems(state);
        }
        /**
         * Opens the popup that displays the Dropdown Tree items.
         * @returns void.
         */

      }, {
        key: "showPopup",
        value: function showPopup() {
          if (!this.enabled || this.readonly || this.isPopupOpen) {
            return;
          }

          this.renderPopup();
          this.focusIn();
        }
        /**
         * Return the module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'dropdowntree';
        }
      }]);

      return DropDownTree;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('The Request Failed')], DropDownTree.prototype, "actionFailureTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "allowFiltering", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "allowMultiSelection", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownTree.prototype, "changeOnBlur", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], DropDownTree.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(',')], DropDownTree.prototype, "delimiterChar", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownTree.prototype, "enabled", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Fields)], DropDownTree.prototype, "fields", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "filterBarPlaceholder", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('StartsWith')], DropDownTree.prototype, "filterType", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], DropDownTree.prototype, "floatLabelType", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "footerTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "ignoreAccent", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownTree.prototype, "ignoreCase", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "headerTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], DropDownTree.prototype, "htmlAttributes", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "itemTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')], DropDownTree.prototype, "mode", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('No Records Found')], DropDownTree.prototype, "noRecordsTemplate", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "placeholder", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('300px')], DropDownTree.prototype, "popupHeight", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], DropDownTree.prototype, "popupWidth", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "readonly", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "showSelectAll", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Select All')], DropDownTree.prototype, "selectAllText", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "showCheckBox", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownTree.prototype, "showClearButton", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], DropDownTree.prototype, "showDropDownIcon", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], DropDownTree.prototype, "sortOrder", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "text", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TreeSettings)], DropDownTree.prototype, "treeSettings", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Unselect All')], DropDownTree.prototype, "unSelectAllText", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], DropDownTree.prototype, "value", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], DropDownTree.prototype, "width", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], DropDownTree.prototype, "zIndex", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownTree.prototype, "wrapText", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "actionFailure", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "beforeOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "change", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "close", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "blur", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "created", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "dataBound", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "destroyed", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "filtering", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "focus", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "keyPress", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "open", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownTree.prototype, "select", void 0);

    DropDownTree = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], DropDownTree);
    /**
     * export all modules from current location
     */

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>

    /* tslint:disable */

    /* tslint:enable */


    var SPINNER_CLASS = 'e-atc-spinner-icon';
    dropDownListClasses.root = 'e-combobox';
    var inputObject$1 = {
      container: null,
      buttons: []
    };
    /**
     * The ComboBox component allows the user to type a value or choose an option from the list of predefined options.
     * ```html
     * <select id="list">
     *      <option value='1'>Badminton</option>
     *      <option value='2'>Basketball</option>
     *      <option value='3'>Cricket</option>
     *      <option value='4'>Football</option>
     *      <option value='5'>Tennis</option>
     * </select>
     * ```
     * ```typescript
     *   let games:ComboBox = new ComboBox();
     *   games.appendTo("#list");
     * ```
     */

    var ComboBox = /*#__PURE__*/function (_DropDownList) {
      _inherits(ComboBox, _DropDownList);

      var _super190 = _createSuper(ComboBox);

      /**
       * *Constructor for creating the component
       */
      function ComboBox(options, element) {
        _classCallCheck(this, ComboBox);

        return _super190.call(this, options, element);
      }

      _createClass2(ComboBox, [{
        key: "preRender",

        /**
         * Initialize the event handler
         * @private
         */
        value: function preRender() {
          _get(_getPrototypeOf(ComboBox.prototype), "preRender", this).call(this);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'combo-box';
        }
      }, {
        key: "wireEvent",
        value: function wireEvent() {
          if (this.getModuleName() === 'combobox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown', this.preventBlur, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.container, 'blur', this.onBlur, this);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputWrapper.buttons[0])) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'mousedown', this.dropDownClick, this);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.targetFocus, this);

          if (!this.readonly) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'input', this.onInput, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keyup', this.onFilterUp, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keydown', this.onFilterDown, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'paste', this.pasteHandler, this);
          }

          this.bindCommonEvent();
        }
      }, {
        key: "preventBlur",
        value: function preventBlur(e) {
          if (!this.allowFiltering && document.activeElement !== this.inputElement && !document.activeElement.classList.contains(dropDownListClasses.input) && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice || !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            e.preventDefault();
          }
        }
      }, {
        key: "onBlur",
        value: function onBlur(e) {
          var inputValue = this.inputElement.value === '' ? null : this.inputElement.value;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputValue) && inputValue !== this.text) {
            this.customValue(e);
          }

          _get(_getPrototypeOf(ComboBox.prototype), "onBlur", this).call(this, e);
        }
      }, {
        key: "targetElement",
        value: function targetElement() {
          return this.inputElement;
        }
      }, {
        key: "setOldText",
        value: function setOldText(text) {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);

          this.customValue();
          this.removeSelection();
        }
      }, {
        key: "setOldValue",
        value: function setOldValue(value) {
          if (this.allowCustom) {
            this.valueMuteChange(this.value);
          } else {
            this.valueMuteChange(null);
          }

          this.removeSelection();
          this.setHiddenValue();
        }
      }, {
        key: "valueMuteChange",
        value: function valueMuteChange(value) {
          var inputValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? null : value.toString();

          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);

          this.setProperties({
            value: value,
            text: value,
            index: null
          }, true);
          this.activeIndex = this.index;
          var fields = this.fields;
          var dataItem = {};
          dataItem[fields.text] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? null : value.toString();
          dataItem[fields.value] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? null : value.toString();
          this.itemData = dataItem;
          this.item = null;

          if (this.previousValue !== this.value) {
            this.detachChangeEvent(null);
          }
        }
      }, {
        key: "updateValues",
        value: function updateValues() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            var li = this.getElementByValue(this.value);

            if (li) {
              this.setSelection(li, null);
            } else if (this.allowCustom) {
              this.valueMuteChange(this.value);
            } else {
              this.valueMuteChange(null);
            }
          } else if (this.text && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            var _li = this.getElementByText(this.text);

            if (_li) {
              this.setSelection(_li, null);
            } else {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);

              this.customValue();
            }
          } else {
            this.setSelection(this.liCollections[this.activeIndex], null);
          }

          this.setHiddenValue();

          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }
      }, {
        key: "updateIconState",
        value: function updateIconState() {
          if (this.showClearButton) {
            if (this.inputElement.value !== '' && !this.readonly) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);
            }
          }
        }
      }, {
        key: "getAriaAttributes",
        value: function getAriaAttributes() {
          var ariaAttributes = {
            'aria-owns': this.element.id + '_options',
            'role': 'combobox',
            'aria-autocomplete': 'both',
            'aria-labelledby': this.hiddenElement.id,
            'aria-hasPopup': 'true',
            'aria-expanded': 'false',
            'aria-readonly': this.readonly.toString(),
            'autocomplete': 'off',
            'autocorrect': 'off',
            'autocapitalize': 'off',
            'spellcheck': 'false'
          };
          return ariaAttributes;
        }
      }, {
        key: "searchLists",
        value: function searchLists(e) {
          this.isTyped = true;

          if (this.isFiltering()) {
            _get(_getPrototypeOf(ComboBox.prototype), "searchLists", this).call(this, e);

            if (this.ulElement && this.filterInput.value.trim() === '') {
              this.setHoverList(this.ulElement.querySelector('.' + dropDownListClasses.li));
            }
          } else {
            if (this.ulElement && this.inputElement.value === '' && this.preventAutoFill) {
              this.setHoverList(this.ulElement.querySelector('.' + dropDownListClasses.li));
            }

            this.incrementalSearch(e);
          }
        }
      }, {
        key: "getNgDirective",
        value: function getNgDirective() {
          return 'EJS-COMBOBOX';
        }
      }, {
        key: "setSearchBox",
        value: function setSearchBox() {
          this.filterInput = this.inputElement;
          return this.isFiltering() ? this.inputWrapper : inputObject$1;
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e, isUpdated) {
          if (!this.isServerBlazor) {
            _get(_getPrototypeOf(ComboBox.prototype), "onActionComplete", this).call(this, ulElement, list, e);
          }

          if (this.isSelectCustom) {
            this.removeSelection();
          }

          if (!this.preventAutoFill && this.getModuleName() === 'combobox' && this.isTyped) {
            this.inlineSearch();
          }
        }
      }, {
        key: "getFocusElement",
        value: function getFocusElement() {
          var dataItem = this.isSelectCustom ? {
            text: ''
          } : this.getItemData();
          var selected = this.list.querySelector('.' + dropDownListClasses.selected);
          var isSelected = dataItem.text === this.inputElement.value && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selected);

          if (isSelected) {
            return selected;
          }

          if ((_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.isDropDownClick || !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections) && this.liCollections.length > 0) {
            var inputValue = this.inputElement.value;
            var activeItem = Search(inputValue, this.liCollections, 'StartsWith', true);
            var activeElement = activeItem.item;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement)) {
              var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
              var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);

              if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
                this.removeFocus();
                var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;
                this.list.scrollTop = count * height + fixedHead;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([activeElement], dropDownListClasses.focus);
              }
            } else {
              if (this.isSelectCustom && this.inputElement.value.trim() !== '') {
                this.removeFocus();
                this.list.scrollTop = 0;
              }
            }

            return activeElement;
          } else {
            return null;
          }
        }
      }, {
        key: "setValue",
        value: function setValue(e) {
          if (e && e.type === 'keydown' && e.action === 'enter') {
            this.removeFillSelection();
          }

          if (this.autofill && this.getModuleName() === 'combobox' && e && e.type === 'keydown' && e.action !== 'enter') {
            this.preventAutoFill = false;
            this.inlineSearch(e);
            return false;
          } else {
            return _get(_getPrototypeOf(ComboBox.prototype), "setValue", this).call(this, e);
          }
        }
      }, {
        key: "checkCustomValue",
        value: function checkCustomValue() {
          this.itemData = this.getDataByValue(this.value);
          var dataItem = this.getItemData();

          if (!(this.allowCustom && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem.value) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem.text))) {
            this.setProperties({
              'value': dataItem.value,
              'text': dataItem.text
            }, !this.allowCustom);
          }
        }
        /**
         * Shows the spinner loader.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "showSpinner",
        value: function showSpinner() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            this.spinnerElement = this.getModuleName() === 'autocomplete' ? this.inputWrapper.buttons[0] || this.inputWrapper.clearButton || _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].appendSpan('e-input-group-icon ' + SPINNER_CLASS, this.inputWrapper.container, this.createElement) : this.inputWrapper.buttons[0] || this.inputWrapper.clearButton;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.spinnerElement], dropDownListClasses.disableIcon);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["createSpinner"])({
              target: this.spinnerElement,
              width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? '16px' : '14px'
            }, this.createElement);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["showSpinner"])(this.spinnerElement);
          }
        }
        /**
         * Hides the spinner loader.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "hideSpinner",
        value: function hideSpinner() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["hideSpinner"])(this.spinnerElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.spinnerElement], dropDownListClasses.disableIcon);

            if (this.spinnerElement.classList.contains(SPINNER_CLASS)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinnerElement);
            } else {
              this.spinnerElement.innerHTML = '';
            }

            this.spinnerElement = null;
          }
        }
      }, {
        key: "setAutoFill",
        value: function setAutoFill(activeElement, isHover) {
          if (!isHover) {
            this.setHoverList(activeElement);
          }

          if (this.autofill && !this.preventAutoFill) {
            var currentValue = this.getTextByValue(activeElement.getAttribute('data-value')).toString();
            var currentFillValue = this.getFormattedValue(activeElement.getAttribute('data-value'));

            if (this.getModuleName() === 'combobox') {
              if (!this.isSelected && this.previousValue !== currentFillValue) {
                this.updateSelectedItem(activeElement, null);
                this.isSelected = true;
                this.previousValue = this.getFormattedValue(activeElement.getAttribute('data-value'));
              } else {
                this.updateSelectedItem(activeElement, null, true);
              }
            }

            if (!this.isAndroidAutoFill(currentValue)) {
              this.setAutoFillSelection(currentValue);
            }
          }
        }
      }, {
        key: "isAndroidAutoFill",
        value: function isAndroidAutoFill(value) {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid) {
            var currentPoints = this.getSelectionPoints();
            var prevEnd = this.prevSelectPoints.end;
            var curEnd = currentPoints.end;
            var prevStart = this.prevSelectPoints.start;
            var curStart = currentPoints.start;

            if (prevEnd !== 0 && (prevEnd === value.length && prevStart === value.length || prevStart > curStart && prevEnd > curEnd || prevEnd === curEnd && prevStart === curStart)) {
              return true;
            } else {
              return false;
            }
          } else {
            return false;
          }
        }
      }, {
        key: "clearAll",
        value: function clearAll(e, property) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property.dataSource) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.itemData) && this.allowFiltering) {
            _get(_getPrototypeOf(ComboBox.prototype), "clearAll", this).call(this, e);

            if (this.isServerBlazor && this.isFiltering() && this.isPopupOpen && e) {
              // tslint:disable-next-line
              this.interopAdaptor.invokeMethodAsync('OnServerRenderList', this.beforePopupOpen, true);
            }
          }
        }
      }, {
        key: "isSelectFocusItem",
        value: function isSelectFocusItem(element) {
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element);
        }
      }, {
        key: "inlineSearch",
        value: function inlineSearch(e) {
          var isKeyNavigate = e && (e.action === 'down' || e.action === 'up' || e.action === 'home' || e.action === 'end' || e.action === 'pageUp' || e.action === 'pageDown');
          var activeElement = isKeyNavigate ? this.liCollections[this.activeIndex] : this.getFocusElement();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement)) {
            if (!isKeyNavigate) {
              var value = this.getFormattedValue(activeElement.getAttribute('data-value'));
              this.activeIndex = this.getIndexByValue(value);
              this.activeIndex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) ? this.activeIndex : null;
            }

            this.preventAutoFill = this.inputElement.value === '' ? false : this.preventAutoFill;
            this.setAutoFill(activeElement, isKeyNavigate);
          } else if (this.inputElement.value === '') {
            this.activeIndex = null;
            this.list.scrollTop = 0;
            var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
            this.setHoverList(focusItem);
          } else {
            this.activeIndex = null;
            this.removeSelection();

            if (this.liCollections && this.liCollections.length < 0) {
              this.removeFocus();
            }
          }
        }
      }, {
        key: "incrementalSearch",
        value: function incrementalSearch(e) {
          this.showPopup();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            this.inlineSearch(e);
            e.preventDefault();
          }
        }
      }, {
        key: "setAutoFillSelection",
        value: function setAutoFillSelection(currentValue) {
          var selection = this.getSelectionPoints();
          var value = this.inputElement.value.substr(0, selection.start);

          if (value && value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase()) {
            var inputValue = value + currentValue.substr(value.length, currentValue.length);

            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);

            this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);
          } else {
            _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton);

            this.inputElement.setSelectionRange(0, this.inputElement.value.length);
          }
        }
      }, {
        key: "getValueByText",
        value: function getValueByText(text) {
          return _get(_getPrototypeOf(ComboBox.prototype), "getValueByText", this).call(this, text, true, this.ignoreAccent);
        }
      }, {
        key: "unWireEvent",
        value: function unWireEvent() {
          if (this.getModuleName() === 'combobox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown', this.preventBlur);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.container, 'blur', this.onBlur);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.inputWrapper.buttons[0])) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputWrapper.buttons[0], 'mousedown', this.dropDownClick);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.targetFocus);

          if (!this.readonly) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'input', this.onInput);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keyup', this.onFilterUp);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keydown', this.onFilterDown);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'paste', this.pasteHandler);
          }

          this.unBindCommonEvent();
        }
      }, {
        key: "setSelection",
        value: function setSelection(li, e) {
          _get(_getPrototypeOf(ComboBox.prototype), "setSelection", this).call(this, li, e);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && !this.autofill && !this.isDropDownClick) {
            this.removeFocus();
          }
        }
      }, {
        key: "selectCurrentItem",
        value: function selectCurrentItem(e) {
          var li;

          if (this.isPopupOpen) {
            if (this.isSelected) {
              li = this.list.querySelector('.' + dropDownListClasses.selected);
            } else {
              li = this.list.querySelector('.' + dropDownListClasses.focus);
            }

            if (li) {
              this.setSelection(li, e);
              this.isTyped = false;
            }

            if (this.isSelected) {
              this.isSelectCustom = false;
              this.onChangeEvent(e);
            }
          }

          if (e.action === 'enter' && this.inputElement.value.trim() === '') {
            this.clearAll(e);
          } else if (this.isTyped && !this.isSelected && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            this.customValue(e);
          }

          this.hidePopup();
        }
      }, {
        key: "setHoverList",
        value: function setHoverList(li) {
          this.removeSelection();

          if (this.isValidLI(li) && !li.classList.contains(dropDownListClasses.selected)) {
            this.removeFocus();
            li.classList.add(dropDownListClasses.focus);
          }
        }
      }, {
        key: "targetFocus",
        value: function targetFocus(e) {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = false;
          }

          this.onFocus(e);
        }
      }, {
        key: "dropDownClick",
        value: function dropDownClick(e) {
          e.preventDefault();

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = true;
          }

          _get(_getPrototypeOf(ComboBox.prototype), "dropDownClick", this).call(this, e);
        }
      }, {
        key: "customValue",
        value: function customValue(e) {
          var _this475 = this;

          var value = this.getValueByText(this.inputElement.value);

          if (!this.allowCustom && this.inputElement.value !== '') {
            var previousValue = this.previousValue;
            var currentValue = this.value;
            this.setProperties({
              value: value
            });

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
            }

            if (this.autofill && previousValue === this.value && currentValue !== this.value) {
              this.onChangeEvent(null);
            }
          } else if (this.inputElement.value.trim() !== '') {
            var _previousValue = this.value;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
              var _value13 = this.inputElement.value === '' ? null : this.inputElement.value;

              var eventArgs;
              eventArgs = {
                text: _value13,
                item: {}
              };

              if (!this.initial) {
                this.trigger('customValueSpecifier', eventArgs, function (eventArgs) {
                  _this475.updateCustomValueCallback(_value13, eventArgs, _previousValue, e);
                });
              } else {
                this.updateCustomValueCallback(_value13, eventArgs, _previousValue);
              }
            } else {
              this.isSelectCustom = false;
              this.setProperties({
                value: value
              });

              if (_previousValue !== this.value) {
                this.onChangeEvent(e);
              }
            }
          } else if (this.allowCustom) {
            this.isSelectCustom = true;
          }
        }
      }, {
        key: "updateCustomValueCallback",
        value: function updateCustomValueCallback(value, eventArgs, previousValue, e) {
          var fields = this.fields;
          var item = eventArgs.item;
          var dataItem = {};

          if (item && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, item) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, item)) {
            dataItem = item;
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(fields.text, value, dataItem);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(fields.value, value, dataItem);
          }

          this.itemData = dataItem;
          var changeData = {
            text: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.text, this.itemData),
            value: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, this.itemData),
            index: null
          };
          this.setProperties(changeData, true);
          this.setSelection(null, null);
          this.isSelectCustom = true;

          if (previousValue !== this.value) {
            this.onChangeEvent(e);
          }
        }
        /**
         * Dynamically change the value of properties.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          if (this.getModuleName() === 'combobox') {
            this.checkData(newProp);
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
          }

          for (var _i78 = 0, _Object$keys19 = Object.keys(newProp); _i78 < _Object$keys19.length; _i78++) {
            var prop = _Object$keys19[_i78];

            switch (prop) {
              case 'readonly':
                _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setReadonly(this.readonly, this.inputElement);

                if (this.readonly) {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'input', this.onInput);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keyup', this.onFilterUp);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keydown', this.onFilterDown);
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'input', this.onInput, this);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keyup', this.onFilterUp, this);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keydown', this.onFilterDown, this);
                }

                break;

              case 'allowFiltering':
                this.setSearchBox();

                if (this.isFiltering() && this.getModuleName() === 'combobox' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
                  _get(_getPrototypeOf(ComboBox.prototype), "renderList", this).call(this);
                }

                break;

              case 'allowCustom':
                break;

              default:
                var comboProps = void 0;
                comboProps = this.getPropObject(prop, newProp, oldProp);

                _get(_getPrototypeOf(ComboBox.prototype), "onPropertyChanged", this).call(this, comboProps.newProperty, comboProps.oldProperty);

                break;
            }
          }
        }
        /**
         * To initialize the control rendering.
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          _get(_getPrototypeOf(ComboBox.prototype), "render", this).call(this);

          this.setSearchBox();

          if (this.isFiltering() && this.getModuleName() === 'combobox' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            _get(_getPrototypeOf(ComboBox.prototype), "renderList", this).call(this);
          }

          this.renderComplete();
        }
      }, {
        key: "getModuleName",

        /**
         * Return the module name of this component.
         * @private
         */
        value: function getModuleName() {
          return 'combobox';
        }
        /**
         * Adds a new item to the combobox popup list. By default, new item appends to the list as the last item,
         * but you can insert based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
         * @return {void}.
         * @deprecated
         */

      }, {
        key: "addItem",
        value: function addItem(items, itemIndex) {
          _get(_getPrototypeOf(ComboBox.prototype), "addItem", this).call(this, items, itemIndex);
        }
        /**
         * To filter the data from given data source by using query
         * @param  {Object[] | DataManager } dataSource - Set the data source to filter.
         * @param  {Query} query - Specify the query to filter the data.
         * @param  {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
         * @return {void}.
         * @deprecated
         */

      }, {
        key: "filter",
        value: function filter(dataSource, query, fields) {
          _get(_getPrototypeOf(ComboBox.prototype), "filter", this).call(this, dataSource, query, fields);
        }
        /**
         * Opens the popup that displays the list of items.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "showPopup",
        value: function showPopup() {
          _get(_getPrototypeOf(ComboBox.prototype), "showPopup", this).call(this);
        }
        /**
         * Hides the popup if it is in open state.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "hidePopup",
        value: function hidePopup(e) {
          var inputValue = this.inputElement.value === '' ? null : this.inputElement.value;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            var isEscape = this.isEscapeKey;

            if (this.isEscapeKey) {
              _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setValue(this.typedString, this.inputElement, this.floatLabelType, this.showClearButton);

              this.isEscapeKey = false;
            }

            if (this.autofill) {
              this.removeFillSelection();
            }

            var dataItem = this.isSelectCustom ? {
              text: ''
            } : this.getItemData();
            var selected = this.list.querySelector('.' + dropDownListClasses.selected);

            if (dataItem.text === this.inputElement.value && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selected)) {
              if (this.isSelected) {
                this.onChangeEvent(e);
                this.isSelectCustom = false;
              }

              _get(_getPrototypeOf(ComboBox.prototype), "hidePopup", this).call(this, e);

              return;
            }

            if (this.getModuleName() === 'combobox' && this.inputElement.value.trim() !== '') {
              var searchItem = Search(this.inputElement.value, this.liCollections, 'Equal', true);
              this.selectedLI = searchItem.item;

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchItem.index)) {
                searchItem.index = Search(this.inputElement.value, this.liCollections, 'StartsWith', true).index;
              }

              this.activeIndex = searchItem.index;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedLI)) {
                this.updateSelectedItem(this.selectedLI, null, true);
              } else if (isEscape) {
                this.isSelectCustom = true;
                this.removeSelection();
              }
            }

            if (!this.isEscapeKey && this.isTyped && !this.isInteracted) {
              this.customValue(e);
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData) && this.allowCustom && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputValue) && inputValue !== this.value) {
            this.customValue();
          }

          _get(_getPrototypeOf(ComboBox.prototype), "hidePopup", this).call(this, e);
        }
        /**
         * Sets the focus to the component for interaction.
         * @returns void.
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          if (!this.enabled) {
            return;
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.allowFiltering) {
            this.preventFocus = true;
          }

          _get(_getPrototypeOf(ComboBox.prototype), "focusIn", this).call(this);
        }
        /**
         * Allows you to clear the selected values from the component.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "clear",
        value: function clear() {
          this.value = null;
        }
        /**
         * Moves the focus from the component if the component is already focused.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "focusOut",
        value: function focusOut(e) {
          _get(_getPrototypeOf(ComboBox.prototype), "focusOut", this).call(this, e);
        }
        /**
         * Gets all the list items bound on this component.
         * @returns Element[].
         * @deprecated
         */

      }, {
        key: "getItems",
        value: function getItems() {
          return _get(_getPrototypeOf(ComboBox.prototype), "getItems", this).call(this);
        }
        /**
         * Gets the data Object that matches the given value.
         * @param { string | number } value - Specifies the value of the list item.
         * @returns Object.
         * @blazorType object
         * @deprecated
         */

      }, {
        key: "getDataByValue",
        value: function getDataByValue(value) {
          return _get(_getPrototypeOf(ComboBox.prototype), "getDataByValue", this).call(this, value);
        }
      }, {
        key: "renderHightSearch",
        value: function renderHightSearch() {// update high light search 
        }
      }]);

      return ComboBox;
    }(DropDownList);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ComboBox.prototype, "autofill", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ComboBox.prototype, "allowCustom", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], ComboBox.prototype, "htmlAttributes", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ComboBox.prototype, "allowFiltering", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "query", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "index", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ComboBox.prototype, "showClearButton", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ComboBox.prototype, "enableRtl", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ComboBox.prototype, "customValueSpecifier", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ComboBox.prototype, "filtering", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "valueTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], ComboBox.prototype, "floatLabelType", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "filterBarPlaceholder", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "cssClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "headerTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "footerTemplate", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "placeholder", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], ComboBox.prototype, "width", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('300px')], ComboBox.prototype, "popupHeight", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], ComboBox.prototype, "popupWidth", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ComboBox.prototype, "readonly", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "text", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ComboBox.prototype, "value", void 0);

    ComboBox = __decorate$3([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ComboBox);
    /**
     * export all modules from current location
     */

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../combo-box/combo-box-model.d.ts'/>

    /* tslint:disable */

    /* tslint:enable */


    dropDownListClasses.root = 'e-autocomplete';
    dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
    /**
     * The AutoComplete component provides the matched suggestion list when type into the input,
     * from which the user can select one.
     * ```html
     * <input id="list" type="text"/>
     * ```
     * ```typescript
     *   let atcObj:AutoComplete = new AutoComplete();
     *   atcObj.appendTo("#list");
     * ```
     */

    var AutoComplete = /*#__PURE__*/function (_ComboBox) {
      _inherits(AutoComplete, _ComboBox);

      var _super191 = _createSuper(AutoComplete);

      /**
       * * Constructor for creating the widget
       */
      function AutoComplete(options, element) {
        var _this476;

        _classCallCheck(this, AutoComplete);

        _this476 = _super191.call(this, options, element);
        _this476.isFiltered = false;
        return _this476;
      }

      _createClass2(AutoComplete, [{
        key: "preRender",

        /**
         * Initialize the event handler
         * @private
         */
        value: function preRender() {
          _get(_getPrototypeOf(AutoComplete.prototype), "preRender", this).call(this);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'auto-complete';
        }
      }, {
        key: "getNgDirective",
        value: function getNgDirective() {
          return 'EJS-AUTOCOMPLETE';
        }
      }, {
        key: "getQuery",
        value: function getQuery(query) {
          var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
          var filterType = this.queryString === '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? 'equal' : this.filterType;
          var queryString = this.queryString === '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? this.value : this.queryString;

          if (this.isFiltered) {
            return filterQuery;
          }

          if (this.queryString !== null && this.queryString !== '') {
            var dataType = this.typeOfData(this.dataSource)["typeof"];

            if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && dataType === 'string' || dataType === 'number') {
              filterQuery.where('', filterType, queryString, this.ignoreCase, this.ignoreAccent);
            } else {
              var mapping = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.value) ? this.fields.value : '';
              filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.suggestionCount)) {
            // Since defualt value of suggestioncount is 20, checked the condition
            if (this.suggestionCount !== 20) {
              for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {
                if (filterQuery.queries[queryElements].fn === 'onTake') {
                  filterQuery.queries.splice(queryElements, 1);
                }
              }
            }

            filterQuery.take(this.suggestionCount);
          }

          return filterQuery;
        }
      }, {
        key: "searchLists",
        value: function searchLists(e) {
          var _this477 = this;

          this.isTyped = true;
          this.isDataFetched = this.isSelectCustom = false;

          if (this.isServerBlazor) {
            this.beforePopupOpen = this.isFiltering() && !this.beforePopupOpen ? !this.beforePopupOpen : this.beforePopupOpen;
            this.queryString = this.filterInput.value;

            if (this.queryString !== '' && this.queryString.length >= this.minLength) {
              // tslint:disable-next-line
              this.interopAdaptor.invokeMethodAsync('OnServerFilter', this.filterInput.value);
            } else {
              this.hidePopup();
            }
          } else {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
              _get(_getPrototypeOf(AutoComplete.prototype), "renderList", this).call(this, true);
            }

            this.queryString = this.filterInput.value;

            if (e.keyCode === 40 || e.keyCode === 38) {
              this.queryString = this.queryString === '' ? null : this.queryString;
              this.beforePopupOpen = true;
              this.resetList(this.dataSource, this.fields);
              return;
            }

            this.isSelected = false;
            this.activeIndex = null;
            var eventArgs = {
              preventDefaultAction: false,
              text: this.filterInput.value,
              updateData: function updateData(dataSource, query, fields) {
                if (eventArgs.cancel) {
                  return;
                }

                _this477.isFiltered = true;

                _this477.filterAction(dataSource, query, fields);
              },
              cancel: false
            };
            this.trigger('filtering', eventArgs, function (eventArgs) {
              if (!eventArgs.cancel && !_this477.isFiltered && !eventArgs.preventDefaultAction) {
                _this477.filterAction(_this477.dataSource, null, _this477.fields);
              }
            });
          }
        }
        /**
         * To filter the data from given data source by using query
         * @param  {Object[] | DataManager } dataSource - Set the data source to filter.
         * @param  {Query} query - Specify the query to filter the data.
         * @param  {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
         * @return {void}.
         * @deprecated
         */

      }, {
        key: "filter",
        value: function filter(dataSource, query, fields) {
          this.isFiltered = true;
          this.filterAction(dataSource, query, fields);
        }
      }, {
        key: "filterAction",
        value: function filterAction(dataSource, query, fields) {
          this.beforePopupOpen = true;

          if (this.queryString !== '' && this.queryString.length >= this.minLength) {
            this.resetList(dataSource, fields, query);
          } else {
            this.hidePopup();
          }
        }
      }, {
        key: "clearAll",
        value: function clearAll(e, property) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(property.dataSource)) {
            _get(_getPrototypeOf(AutoComplete.prototype), "clearAll", this).call(this, e);
          }

          if (this.beforePopupOpen) {
            this.hidePopup();
          }
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e, isUpdated) {
          this.fixedHeaderElement = null;

          _get(_getPrototypeOf(AutoComplete.prototype), "onActionComplete", this).call(this, ulElement, list, e);

          var item = this.list.querySelector('.' + dropDownListClasses.li);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([item], dropDownListClasses.focus);
          }

          this.postBackAction();
        }
      }, {
        key: "postBackAction",
        value: function postBackAction() {
          if (this.autofill && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.liCollections[0])) {
            var items = [this.liCollections[0]];
            var searchItem = Search(this.inputElement.value, items, 'StartsWith', this.ignoreCase);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchItem.item)) {
              _get(_getPrototypeOf(AutoComplete.prototype), "setAutoFill", this).call(this, this.liCollections[0], true);
            }
          }
        }
      }, {
        key: "setSelection",
        value: function setSelection(li, e) {
          if (!this.isValidLI(li)) {
            return;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && e.type === 'keydown' && e.action !== 'enter' && e.action !== 'tab' && this.isValidLI(li)) {
            var value = this.getFormattedValue(li.getAttribute('data-value'));
            this.activeIndex = this.getIndexByValue(value);

            if (this.isServerBlazor) {
              this.removeHover();
            }

            this.setHoverList(li);
            this.selectedLI = li;
            this.setScrollPosition(e);

            if (this.autofill && this.isPopupOpen) {
              this.preventAutoFill = false;

              _get(_getPrototypeOf(AutoComplete.prototype), "setAutoFill", this).call(this, li);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null
            });
          } else {
            _get(_getPrototypeOf(AutoComplete.prototype), "setSelection", this).call(this, li, e);
          }
        }
      }, {
        key: "listOption",
        value: function listOption(dataSource, fieldsSettings) {
          var _this478 = this;

          var fields = _get(_getPrototypeOf(AutoComplete.prototype), "listOption", this).call(this, dataSource, fieldsSettings);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.itemCreated)) {
            fields.itemCreated = function (e) {
              if (_this478.highlight) {
                if (_this478.element.tagName === _this478.getNgDirective() && _this478.itemTemplate) {
                  setTimeout(function () {
                    highlightSearch(e.item, _this478.queryString, _this478.ignoreCase, _this478.filterType);
                  }, 0);
                } else {
                  highlightSearch(e.item, _this478.queryString, _this478.ignoreCase, _this478.filterType);
                }
              }
            };
          } else {
            var itemCreated = fields.itemCreated;

            fields.itemCreated = function (e) {
              if (_this478.highlight) {
                highlightSearch(e.item, _this478.queryString, _this478.ignoreCase, _this478.filterType);
              }

              itemCreated.apply(_this478, [e]);
            };
          }

          return fields;
        }
      }, {
        key: "isFiltering",
        value: function isFiltering() {
          return true;
        }
      }, {
        key: "renderPopup",
        value: function renderPopup() {
          this.list.scrollTop = 0;

          _get(_getPrototypeOf(AutoComplete.prototype), "renderPopup", this).call(this);
        }
      }, {
        key: "isEditTextBox",
        value: function isEditTextBox() {
          return true && this.inputElement.value.trim() !== '';
        }
      }, {
        key: "isPopupButton",
        value: function isPopupButton() {
          return this.showPopupButton;
        }
      }, {
        key: "isSelectFocusItem",
        value: function isSelectFocusItem(element) {
          return false;
        }
        /**
         * Search the entered text and show it in the suggestion list if available.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "showPopup",
        value: function showPopup() {
          if (!this.enabled) {
            return;
          }

          if (this.beforePopupOpen && !this.isServerBlazor) {
            this.refreshPopup();
            return;
          }

          this.beforePopupOpen = true;
          this.preventAutoFill = true;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list) || this.isServerBlazor) {
            this.renderList();
          } else {
            this.resetList(this.dataSource, this.fields);
          }
        }
        /**
         * Hides the popup if it is in open state.
         * @returns void.
         */

      }, {
        key: "hidePopup",
        value: function hidePopup() {
          this.DropDownBaseresetBlazorTemplates(true, false, false, false);

          _get(_getPrototypeOf(AutoComplete.prototype), "hidePopup", this).call(this);

          this.activeIndex = -1;
        }
        /**
         * Dynamically change the value of properties.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          if (this.getModuleName() === 'autocomplete') {
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
          }

          for (var _i79 = 0, _Object$keys20 = Object.keys(newProp); _i79 < _Object$keys20.length; _i79++) {
            var prop = _Object$keys20[_i79];

            switch (prop) {
              case 'showPopupButton':
                if (this.showPopupButton) {
                  if (!this.isServerBlazor) {
                    var button = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].appendSpan(dropDownListClasses.icon, this.inputWrapper.container, this.createElement);

                    this.inputWrapper.buttons[0] = button;
                  } else if (this.inputWrapper && this.inputWrapper.container) {
                    var _button = this.inputWrapper.container.querySelector('.e-input-group-icon.e-ddl-icon');

                    this.inputWrapper.buttons[0] = _button;
                  }

                  if (this.inputWrapper && this.inputWrapper.buttons && this.inputWrapper.buttons[0]) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.buttons[0], 'click', this.dropDownClick, this);
                  }
                } else if (!this.isServerBlazor) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputWrapper.buttons[0]);
                  this.inputWrapper.buttons[0] = null;
                }

                break;

              default:
                var atcProps = void 0;
                atcProps = this.getPropObject(prop, newProp, oldProp);

                _get(_getPrototypeOf(AutoComplete.prototype), "onPropertyChanged", this).call(this, atcProps.newProperty, atcProps.oldProperty);

                break;
            }
          }
        }
      }, {
        key: "renderHightSearch",
        value: function renderHightSearch() {
          if (this.highlight) {
            for (var i = 0; i < this.liCollections.length; i++) {
              var isHighlight = this.ulElement.querySelector('.e-active');

              if (!isHighlight) {
                revertHighlightSearch(this.liCollections[i]);
                highlightSearch(this.liCollections[i], this.queryString, this.ignoreCase, this.filterType, this.isServerBlazor);
              }
            }
          }
        }
        /**
         * Return the module name of this component.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'autocomplete';
        }
        /**
         * To initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          _get(_getPrototypeOf(AutoComplete.prototype), "render", this).call(this);
        }
      }]);

      return AutoComplete;
    }(ComboBox);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      value: null,
      iconCss: null,
      groupBy: null
    }, FieldSettings)], AutoComplete.prototype, "fields", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], AutoComplete.prototype, "ignoreCase", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], AutoComplete.prototype, "showPopupButton", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], AutoComplete.prototype, "highlight", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(20)], AutoComplete.prototype, "suggestionCount", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], AutoComplete.prototype, "htmlAttributes", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AutoComplete.prototype, "query", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)], AutoComplete.prototype, "minLength", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Contains')], AutoComplete.prototype, "filterType", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], AutoComplete.prototype, "filtering", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AutoComplete.prototype, "index", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], AutoComplete.prototype, "floatLabelType", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AutoComplete.prototype, "valueTemplate", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AutoComplete.prototype, "filterBarPlaceholder", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], AutoComplete.prototype, "allowFiltering", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AutoComplete.prototype, "text", void 0);

    AutoComplete = __decorate$4([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], AutoComplete);
    /**
     * export all modules from current location
     */

    /**
     * FloatLable Moduel
     * Specifies whether to display the floating label above the input element.
     */

    var FLOATLINE = 'e-float-line';
    var FLOATTEXT = 'e-float-text';
    var LABELTOP = 'e-label-top';
    var LABELBOTTOM = 'e-label-bottom';
    /**
     * Function to create Float Label element.
     * @param overAllWrapper - overall wrapper of multiselect.
     * @param element - the given html element.
     * @param inputElement - specify the input wrapper.
     * @param value - Value of the MultiSelect.
     * @param floatLabelType - Specify the FloatLabel Type.
     * @param placeholder - Specify the PlaceHolder text.
     */

    function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {
      var floatLinelement;
      var floatLabelElement;
      floatLinelement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('span', {
        className: FLOATLINE
      });
      floatLabelElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('label', {
        className: FLOATTEXT
      });

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.id) && element.id !== '') {
        floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
          'aria-labelledby': floatLabelElement.id
        });
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputElement.placeholder) && inputElement.placeholder !== '') {
        floatLabelElement.innerText = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(inputElement.placeholder);
        inputElement.removeAttribute('placeholder');
      }

      floatLabelElement.innerText = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(placeholder);
      searchWrapper.appendChild(floatLinelement);
      searchWrapper.appendChild(floatLabelElement);
      overAllWrapper.classList.add('e-float-input');
      updateFloatLabelState(value, floatLabelElement);

      if (floatLabelType === 'Always') {
        if (floatLabelElement.classList.contains(LABELBOTTOM)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([floatLabelElement], LABELBOTTOM);
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([floatLabelElement], LABELTOP);
      }
    }
    /**
     * Function to update status of the Float Label element.
     * @param value - Value of the MultiSelect.
     * @param label - float label element.
     */


    function updateFloatLabelState(value, label) {
      if (value && value.length > 0) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], LABELTOP);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], LABELBOTTOM);
      } else {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], LABELTOP);
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], LABELBOTTOM);
      }
    }
    /**
     * Function to remove Float Label element.
     * @param overAllWrapper - overall wrapper of multiselect.
     * @param componentWrapper - wrapper element of multiselect.
     * @param searchWrapper - search wrapper of multiselect.
     * @param inputElement - specify the input wrapper.
     * @param value - Value of the MultiSelect.
     * @param floatLabelType - Specify the FloatLabel Type.
     * @param placeholder - Specify the PlaceHolder text.
     */


    function removeFloating(overAllWrapper, componentWrapper, searchWrapper, inputElement, value, floatLabelType, placeholder) {
      var placeholderElement = componentWrapper.querySelector('.' + FLOATTEXT);
      var floatLine = componentWrapper.querySelector('.' + FLOATLINE);
      var placeholderText;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(placeholderElement)) {
        placeholderText = placeholderElement.innerText;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(searchWrapper.querySelector('.' + FLOATTEXT));
        setPlaceHolder(value, inputElement, placeholderText);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(floatLine)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(searchWrapper.querySelector('.' + FLOATLINE));
        }
      } else {
        placeholderText = placeholder !== null ? placeholder : '';
        setPlaceHolder(value, inputElement, placeholderText);
      }

      overAllWrapper.classList.remove('e-float-input');
    }
    /**
     * Function to set the placeholder to the element.
     * @param value - Value of the MultiSelect.
     * @param inputElement - specify the input wrapper.
     * @param placeholder - Specify the PlaceHolder text.
     */


    function setPlaceHolder(value, inputElement, placeholder) {
      if (value && value.length) {
        inputElement.placeholder = '';
      } else {
        inputElement.placeholder = placeholder;
      }
    }
    /**
     * Function for focusing the Float Element.
     * @param overAllWrapper - overall wrapper of multiselect.
     * @param componentWrapper - wrapper element of multiselect.
     */


    function floatLabelFocus(overAllWrapper, componentWrapper) {
      overAllWrapper.classList.add('e-input-focus');
      var label = componentWrapper.querySelector('.' + FLOATTEXT);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], LABELTOP);

        if (label.classList.contains(LABELBOTTOM)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], LABELBOTTOM);
        }
      }
    }
    /**
     * Function to focus the Float Label element.
     * @param overAllWrapper - overall wrapper of multiselect.
     * @param componentWrapper - wrapper element of multiselect.
     * @param value - Value of the MultiSelect.
     * @param floatLabelType - Specify the FloatLabel Type.
     * @param placeholder - Specify the PlaceHolder text.
     */


    function floatLabelBlur(overAllWrapper, componentWrapper, value, floatLabelType, placeholder) {
      overAllWrapper.classList.remove('e-input-focus');
      var label = componentWrapper.querySelector('.' + FLOATTEXT);

      if (value && value.length <= 0 && floatLabelType === 'Auto' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
        if (label.classList.contains(LABELTOP)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], LABELTOP);
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], LABELBOTTOM);
      }
    }

    var __decorate$5 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>

    /* tslint:disable */

    /* tslint:enable */


    var FOCUS = 'e-input-focus';
    var DISABLED$1 = 'e-disabled';
    var OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
    var ELEMENT_WRAPPER = 'e-multi-select-wrapper';
    var ELEMENT_MOBILE_WRAPPER = 'e-mob-wrapper';
    var HIDE_LIST = 'e-hide-listitem';
    var DELIMITER_VIEW = 'e-delim-view';
    var CHIP_WRAPPER$1 = 'e-chips-collection';
    var CHIP$1 = 'e-chips';
    var CHIP_CONTENT$1 = 'e-chipcontent';
    var CHIP_CLOSE$1 = 'e-chips-close';
    var CHIP_SELECTED = 'e-chip-selected';
    var SEARCHBOX_WRAPPER = 'e-searcher';
    var DELIMITER_VIEW_WRAPPER = 'e-delimiter';
    var ZERO_SIZE = 'e-zero-size';
    var REMAIN_WRAPPER$1 = 'e-remain';
    var CLOSEICON_CLASS$1 = 'e-chips-close e-close-hooker';
    var DELIMITER_WRAPPER = 'e-delim-values';
    var POPUP_WRAPPER = 'e-ddl e-popup e-multi-select-list-wrapper';
    var INPUT_ELEMENT = 'e-dropdownbase';
    var RTL_CLASS = 'e-rtl';
    var CLOSE_ICON_HIDE = 'e-close-icon-hide';
    var MOBILE_CHIP = 'e-mob-chip';
    var FOOTER$1 = 'e-ddl-footer';
    var HEADER$1 = 'e-ddl-header';
    var DISABLE_ICON = 'e-ddl-disable-icon';
    var SPINNER_CLASS$1 = 'e-ms-spinner-icon';
    var HIDDEN_ELEMENT = 'e-multi-hidden';
    var _destroy2 = 'destroy';
    var dropdownIcon = 'e-input-group-icon e-ddl-icon';
    var iconAnimation = 'e-icon-anim';
    var TOTAL_COUNT_WRAPPER$1 = 'e-delim-total';
    var BOX_ELEMENT = 'e-multiselect-box';
    var FILTERPARENT = 'e-filter-parent';
    var CUSTOM_WIDTH = 'e-search-custom-width';
    /**
     * The Multiselect allows the user to pick a more than one value from list of predefined values.
     * ```html
     * <select id="list">
     *      <option value='1'>Badminton</option>
     *      <option value='2'>Basketball</option>
     *      <option value='3'>Cricket</option>
     *      <option value='4'>Football</option>
     *      <option value='5'>Tennis</option>
     * </select>
     * ```
     * ```typescript
     * <script>
     *   var multiselectObj = new Multiselect();
     *   multiselectObj.appendTo("#list");
     * </script>
     * ```
     */

    var MultiSelect = /*#__PURE__*/function (_DropDownBase2) {
      _inherits(MultiSelect, _DropDownBase2);

      var _super192 = _createSuper(MultiSelect);

      /**
       * Constructor for creating the DropDownList widget.
       */
      function MultiSelect(option, element) {
        var _this479;

        _classCallCheck(this, MultiSelect);

        _this479 = _super192.call(this, option, element);
        _this479.isValidKey = false;
        _this479.selectAllEventData = [];
        _this479.selectAllEventEle = [];
        _this479.isDynamicDataChange = false;
        _this479.scrollFocusStatus = false;
        _this479.keyDownStatus = false;
        return _this479;
      }

      _createClass2(MultiSelect, [{
        key: "enableRTL",
        value: function enableRTL(state) {
          if (state) {
            this.overAllWrapper.classList.add(RTL_CLASS);
          } else {
            this.overAllWrapper.classList.remove(RTL_CLASS);
          }

          if (this.popupObj) {
            this.popupObj.enableRtl = state;
            this.popupObj.dataBind();
          }
        }
      }, {
        key: "requiredModules",
        value: function requiredModules() {
          var modules = [];

          if (this.mode === 'CheckBox') {
            this.isGroupChecking = this.enableGroupCheckBox;

            if (this.enableGroupCheckBox) {
              var prevOnChange = this.isProtectedOnChange;
              this.isProtectedOnChange = true;
              this.enableSelectionOrder = false;
              this.isProtectedOnChange = prevOnChange;
            }

            this.allowCustomValue = false;
            this.hideSelectedItem = false;
            this.closePopupOnSelect = false;
            modules.push({
              member: 'CheckBoxSelection',
              args: [this]
            });
          }

          return modules;
        }
      }, {
        key: "updateHTMLAttribute",
        value: function updateHTMLAttribute() {
          if (Object.keys(this.htmlAttributes).length) {
            for (var _i80 = 0, _Object$keys21 = Object.keys(this.htmlAttributes); _i80 < _Object$keys21.length; _i80++) {
              var htmlAttr = _Object$keys21[_i80];

              switch (htmlAttr) {
                case 'class':
                  var updatedClassValue = this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ').trim();

                  if (updatedClassValue !== '') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllWrapper], updatedClassValue.split(' '));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], updatedClassValue.split(' '));
                  }

                  break;

                case 'disabled':
                  this.enable(false);
                  break;

                case 'placeholder':
                  if (!this.placeholder) {
                    this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                    this.setProperties({
                      placeholder: this.inputElement.placeholder
                    }, true);
                    this.refreshPlaceHolder();
                  }

                  break;

                default:
                  var defaultAttr = ['id'];
                  var validateAttr = ['name', 'required', 'aria-required', 'form'];
                  var containerAttr = ['title', 'role', 'style', 'class'];

                  if (defaultAttr.indexOf(htmlAttr) > -1) {
                    this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                  } else if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
                    this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                  } else if (containerAttr.indexOf(htmlAttr) > -1) {
                    this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                  } else {
                    this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                  }

                  break;
              }
            }
          }
        }
      }, {
        key: "updateReadonly",
        value: function updateReadonly(state) {
          if (state || this.mode === 'CheckBox') {
            this.inputElement.setAttribute('readonly', 'true');
          } else {
            this.inputElement.removeAttribute('readonly');
          }
        }
      }, {
        key: "updateClearButton",
        value: function updateClearButton(state) {
          if (state) {
            if (this.overAllClear.parentNode) {
              this.overAllClear.style.display = '';
            } else {
              this.componentWrapper.appendChild(this.overAllClear);
            }

            this.componentWrapper.classList.remove(CLOSE_ICON_HIDE);
          } else {
            this.overAllClear.style.display = 'none';
            this.componentWrapper.classList.add(CLOSE_ICON_HIDE);
          }
        }
      }, {
        key: "updateCssClass",
        value: function updateCssClass() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            var updatedCssClassValues = this.cssClass;
            updatedCssClassValues = this.cssClass.replace(/\s+/g, ' ').trim();

            if (updatedCssClassValues !== '') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllWrapper], updatedCssClassValues.split(' '));
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], updatedCssClassValues.split(' '));
            }
          }
        }
      }, {
        key: "updateOldPropCssClass",
        value: function updateOldPropCssClass(oldClass) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldClass) && oldClass !== '') {
            oldClass = oldClass.replace(/\s+/g, ' ').trim();

            if (oldClass !== '') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overAllWrapper], oldClass.split(' '));
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.popupWrapper], oldClass.split(' '));
            }
          }
        }
      }, {
        key: "onPopupShown",
        value: function onPopupShown() {
          var _this480 = this;

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.mode === 'CheckBox' && this.allowFiltering) {
            var proxy = this;

            window.onpopstate = function () {
              proxy.hidePopup();
              proxy.inputElement.focus();
            };

            history.pushState({}, '');
          }

          var animModel = {
            name: 'FadeIn',
            duration: 100
          };
          var eventArgs = {
            popup: this.popupObj,
            cancel: false,
            animation: animModel
          };
          this.trigger('open', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
              _this480.focusAtFirstListItem();

              document.body.appendChild(_this480.popupObj.element);

              if (_this480.mode === 'CheckBox' && _this480.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this480.fields.groupBy)) {
                _this480.updateListItems(_this480.list.querySelectorAll('li.e-list-item'), _this480.mainList.querySelectorAll('li.e-list-item'));
              }

              if (_this480.mode === 'CheckBox' || _this480.showDropDownIcon) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this480.overAllWrapper], [iconAnimation]);
              }

              _this480.refreshPopup();

              _this480.popupObj.show(eventArgs.animation, _this480.zIndex === 1000 ? _this480.element : null);

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this480.inputElement, {
                'aria-expanded': 'true'
              });

              if (_this480.isFirstClick) {
                _this480.loadTemplate();
              }
            }
          });
        }
      }, {
        key: "updateListItems",
        value: function updateListItems(listItems, mainListItems) {
          for (var i = 0; i < listItems.length; i++) {
            this.findGroupStart(listItems[i]);
            this.findGroupStart(mainListItems[i]);
          }

          this.deselectHeader();
        }
      }, {
        key: "loadTemplate",
        value: function loadTemplate() {
          var _this481 = this;

          if (this.mode === 'CheckBox' && this.itemTemplate && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.mainData && this.mainData.length > 0) {
            setTimeout(function () {
              _this481.refreshListItems(null);

              if (_this481.mode === 'CheckBox') {
                _this481.removeFocus();
              }

              _this481.notify('reOrder', {
                module: 'CheckBoxSelection',
                enable: _this481.mode === 'CheckBox',
                e: _this481
              });
            }, this.mainData.length < 100 ? 100 : this.mainData.length);
          } else {
            this.refreshListItems(null);

            if (this.mode === 'CheckBox') {
              this.removeFocus();
            }

            this.notify('reOrder', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              e: this
            });
          }
        }
      }, {
        key: "setScrollPosition",
        value: function setScrollPosition() {
          if ((!this.hideSelectedItem && this.mode !== 'CheckBox' || this.mode === 'CheckBox' && !this.enableSelectionOrder) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value.length > 0) {
            var valueEle = this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, 'li', 'data-value', this.value[this.value.length - 1]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(valueEle)) {
              this.scrollBottom(valueEle);
            }
          }
        }
      }, {
        key: "focusAtFirstListItem",
        value: function focusAtFirstListItem() {
          if (this.ulElement && this.ulElement.querySelector('li.' + dropDownBaseClasses.li)) {
            var element;

            if (this.mode === 'CheckBox') {
              this.removeFocus();
              return;
            } else {
              element = this.ulElement.querySelector('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');
            }

            if (element !== null) {
              this.removeFocus();
              this.addListFocus(element);
            }
          }
        }
      }, {
        key: "focusAtLastListItem",
        value: function focusAtLastListItem(data) {
          var activeElement;

          if (data) {
            activeElement = Search(data, this.liCollections, 'StartsWith', this.ignoreCase);
          } else {
            if (this.value && this.value.length) {
              Search(this.value[this.value.length - 1], this.liCollections, 'StartsWith', this.ignoreCase);
            } else {
              activeElement = null;
            }
          }

          if (activeElement && activeElement.item !== null) {
            this.addListFocus(activeElement.item);
            this.scrollBottom(activeElement.item, activeElement.index);
          }
        }
      }, {
        key: "getAriaAttributes",
        value: function getAriaAttributes() {
          var ariaAttributes = {
            'aria-disabled': 'false',
            'aria-owns': this.element.id + '_options',
            'role': 'listbox',
            'aria-multiselectable': 'true',
            'aria-activedescendant': 'null',
            'aria-haspopup': 'true',
            'aria-expanded': 'false'
          };
          return ariaAttributes;
        }
      }, {
        key: "updateListARIA",
        value: function updateListARIA() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.ulElement, {
            'id': this.element.id + '_options',
            'role': 'listbox',
            'aria-hidden': 'false'
          });
          var disableStatus = this.inputElement.disabled ? true : false;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, this.getAriaAttributes());

          if (disableStatus) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-disabled': 'true'
            });
          }

          this.ensureAriaDisabled(disableStatus ? 'true' : 'false');
        }
      }, {
        key: "ensureAriaDisabled",
        value: function ensureAriaDisabled(status) {
          if (this.htmlAttributes && this.htmlAttributes['aria-disabled']) {
            var attr = this.htmlAttributes;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(attr, {
              'aria-disabled': status
            }, attr);
            this.setProperties({
              htmlAttributes: attr
            }, true);
          }
        }
      }, {
        key: "removelastSelection",
        value: function removelastSelection(e) {
          var elements;
          elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1);
          var value = elements[elements.length - 1].getAttribute('data-value');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.tempValues = this.value.slice();
          }

          this.removeValue(value, e);
          this.removeChipSelection();
          this.updateDelimeter(this.delimiterChar, e);
          this.makeTextBoxEmpty();

          if (this.mainList && this.listData) {
            this.refreshSelection();
          }

          this.checkPlaceholderSize();
        }
      }, {
        key: "onActionFailure",
        value: function onActionFailure(e) {
          _get(_getPrototypeOf(MultiSelect.prototype), "onActionFailure", this).call(this, e);

          this.renderPopup();
          this.onPopupShown();
        }
      }, {
        key: "targetElement",
        value: function targetElement() {
          this.targetInputElement = this.inputElement;

          if (this.mode === 'CheckBox' && this.allowFiltering) {
            this.notify('targetElement', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox'
            });
          }

          return this.targetInputElement.value;
        }
      }, {
        key: "getForQuery",
        value: function getForQuery(valuecheck) {
          var predicate;
          var field = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.value) ? this.fields.text : this.fields.value;

          for (var i = 0; i < valuecheck.length; i++) {
            if (i === 0) {
              predicate = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Predicate"](field, 'equal', valuecheck[i]);
            } else {
              predicate = predicate.or(field, 'equal', valuecheck[i]);
            }
          }

          return this.getQuery(this.query).where(predicate);
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e, isUpdated) {
          _get(_getPrototypeOf(MultiSelect.prototype), "onActionComplete", this).call(this, ulElement, list, e);

          this.updateSelectElementData(this.allowFiltering);
          var proxy = this;
          var valuecheck = [];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.isDynamicDataChange && this.value !== null && this.value.length > 0) {
            var items = [];

            for (var k = 0; k < this.value.length; k++) {
              var itemsData = this.getDataByValue(this.value[k]);

              if (itemsData) {
                // tslint:disable-next-line
                items.push(itemsData[this.fields.value]); // remove the condition for hybrid
              }
            }

            if (items.length === 0) {
              this.setProperties({
                'value': null
              });
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && !this.allowCustomValue) {
            for (var i = 0; i < this.value.length; i++) {
              var checkEle = this.findListElement(this.allowFiltering && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mainList) ? this.mainList : ulElement, 'li', 'data-value', proxy.value[i]);

              if (!checkEle) {
                valuecheck.push(proxy.value[i]);
              }
            }
          }

          if (valuecheck.length > 0 && this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
              proxy.addItem(e.result, list.length);
              proxy.updateActionList(ulElement, list, e);
            });
          } else {
            this.updateActionList(ulElement, list, e);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.allowFiltering && this.mode === 'CheckBox') {
            this.removeFocus();
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.isDynamicDataChange && this.value && this.value.length > 0) {
            this.updateVal(this.value, null, 'value');
            this.addValidInputClass();
            this.isDynamicDataChange = false;
          }

          if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] && this.mode === 'CheckBox' && this.allowFiltering && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.removeFocus();
          }
        }
      }, {
        key: "updateActionList",
        value: function updateActionList(ulElement, list, e, isUpdated) {
          if (this.mode === 'CheckBox' && this.showSelectAll) {
            this.notify('selectAll', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox'
            });
          }

          if (!this.mainList && !this.mainData) {
            this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
            this.mainData = list;
            this.mainListCollection = this.liCollections;
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mainData) && this.mainData.length === 0) {
            this.mainData = list;
          }

          if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering && this.inputElement.value && this.inputElement.value !== '') {
            this.checkForCustomValue(this.tempQuery, this.fields);
            return;
          }

          if (this.value && this.value.length && (this.mode !== 'CheckBox' && this.inputElement.value !== '' || this.mode === 'CheckBox')) {
            this.refreshSelection();
          }

          this.updateListARIA();
          this.unwireListEvents();
          this.wireListEvents();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.setInitialValue)) {
            this.setInitialValue();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectAllAction)) {
            this.selectAllAction();
          }

          if (this.setDynValue) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
              this.initialTextUpdate();
            }

            this.initialValueUpdate();
            this.initialUpdate();
            this.refreshPlaceHolder();

            if (this.mode !== 'CheckBox' && this.changeOnBlur) {
              this.updateValueState(null, this.value, null);
            }
          }

          this.renderPopup();

          if (this.beforePopupOpen) {
            this.beforePopupOpen = false;
            this.onPopupShown();
          }
        }
      }, {
        key: "refreshSelection",
        value: function refreshSelection() {
          var value;
          var element;
          var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value[index]); index++) {
              value = this.value[index];
              element = this.findListElement(this.list, 'li', 'data-value', value);

              if (element) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], className);

                if (this.hideSelectedItem && element.previousSibling && element.previousElementSibling.classList.contains(dropDownBaseClasses.group) && (!element.nextElementSibling || element.nextElementSibling.classList.contains(dropDownBaseClasses.group))) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element.previousElementSibling], className);
                }

                if (this.hideSelectedItem && this.fields.groupBy && !element.previousElementSibling.classList.contains(HIDE_LIST)) {
                  this.hideGroupItem(value);
                }

                if (this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], dropDownBaseClasses.focus);
                  var listEle = element.parentElement.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');

                  if (listEle.length > 0) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([listEle[0]], dropDownBaseClasses.focus);
                  } else {
                    this.ulElement = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
                    this.l10nUpdate();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], dropDownBaseClasses.noData);
                  }
                }

                element.setAttribute('aria-selected', 'true');

                if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
                  var ariaValue = element.firstElementChild.getAttribute('aria-checked');

                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaValue) || ariaValue === 'false') {
                    var args = {
                      module: 'CheckBoxSelection',
                      enable: this.mode === 'CheckBox',
                      li: element,
                      e: null
                    };
                    this.notify('updatelist', args);
                  }
                }
              }
            }
          }

          this.checkSelectAll();
          this.checkMaxSelection();
        }
      }, {
        key: "hideGroupItem",
        value: function hideGroupItem(value) {
          var element;
          var element1;
          var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
          element1 = element = this.findListElement(this.ulElement, 'li', 'data-value', value);
          var i = 0;
          var j = 0;
          var temp = true;
          var temp1 = true;

          do {
            if (element && element.previousElementSibling && !element.previousElementSibling.classList.contains(HIDE_LIST) && element.previousElementSibling.classList.contains(dropDownBaseClasses.li)) {
              temp = false;
            }

            if (!temp || !element || element.previousElementSibling && element.previousElementSibling.classList.contains(dropDownBaseClasses.group)) {
              i = 10;
            } else {
              element = element.previousElementSibling;
            }

            if (element1 && element1.nextElementSibling && !element1.nextElementSibling.classList.contains(HIDE_LIST) && element1.nextElementSibling.classList.contains(dropDownBaseClasses.li)) {
              temp1 = false;
            }

            if (!temp1 || !element1 || element1.nextElementSibling && element1.nextElementSibling.classList.contains(dropDownBaseClasses.group)) {
              j = 10;
            } else {
              element1 = element1.nextElementSibling;
            }
          } while (i < 10 || j < 10);

          if (temp && temp1 && !element.previousElementSibling.classList.contains(HIDE_LIST)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element.previousElementSibling], className);
          } else if (temp && temp1 && element.previousElementSibling.classList.contains(HIDE_LIST)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element.previousElementSibling], className);
          }
        }
      }, {
        key: "checkSelectAll",
        value: function checkSelectAll() {
          var groupItemLength = this.list.querySelectorAll('li.e-list-group-item.e-active').length;
          var listItem = this.list.querySelectorAll('li.e-list-item');
          var searchCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;
          var searchActiveCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.selected).length;

          if (this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            searchActiveCount = searchActiveCount - groupItemLength;
          }

          if ((searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength) && this.mode === 'CheckBox' && this.showSelectAll) {
            this.notify('checkSelectAll', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              value: 'check'
            });
          } else if (searchCount !== searchActiveCount && this.mode === 'CheckBox' && this.showSelectAll) {
            this.notify('checkSelectAll', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              value: 'uncheck'
            });
          }

          if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {
            for (var i = 0; i < listItem.length; i++) {
              this.findGroupStart(listItem[i]);
            }

            this.deselectHeader();
          }
        }
      }, {
        key: "openClick",
        value: function openClick(e) {
          if (!this.openOnClick && this.mode !== 'CheckBox') {
            if (this.targetElement() !== '') {
              this.showPopup();
            } else {
              this.hidePopup();
            }
          } else if (!this.openOnClick && this.mode === 'CheckBox' && !this.isPopupOpen()) {
            this.showPopup();
          }
        }
      }, {
        key: "KeyUp",
        value: function KeyUp(e) {
          if (this.mode === 'CheckBox' && !this.openOnClick) {
            var _char11 = String.fromCharCode(e.keyCode);

            var isWordCharacter = _char11.match(/\w/);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isWordCharacter)) {
              this.isValidKey = true;
            }
          }

          this.isValidKey = this.isPopupOpen() && e.keyCode === 8 || this.isValidKey;
          this.isValidKey = e.ctrlKey && e.keyCode === 86 ? false : this.isValidKey;

          if (this.isValidKey) {
            this.isValidKey = false;
            this.expandTextbox();
            this.showOverAllClear();

            switch (e.keyCode) {
              default:
                // For filtering works in mobile firefox
                this.search(e);
            }
          }
        }
        /**
         * To filter the multiselect data from given data source by using query
         * @param  {Object[] | DataManager } dataSource - Set the data source to filter.
         * @param  {Query} query - Specify the query to filter the data.
         * @param  {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
         * @return {void}.
         */

      }, {
        key: "filter",
        value: function filter(dataSource, query, fields) {
          this.isFiltered = true;
          this.remoteFilterAction = true;
          this.dataUpdater(dataSource, query, fields);
        }
      }, {
        key: "getQuery",
        value: function getQuery(query) {
          var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();

          if (this.filterAction) {
            if (this.targetElement() !== null) {
              var dataType = this.typeOfData(this.dataSource)["typeof"];

              if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && dataType === 'string' || dataType === 'number') {
                filterQuery.where('', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
              } else {
                var fields = this.fields;
                filterQuery.where(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.text) ? fields.text : '', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);
              }
            }

            return filterQuery;
          } else {
            return query ? query : this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
          }
        }
      }, {
        key: "dataUpdater",
        value: function dataUpdater(dataSource, query, fields) {
          this.isDataFetched = false;

          if (this.targetElement().trim() === '') {
            var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;

            if (this.backCommand) {
              this.remoteCustomValue = false;
              this.onActionComplete(list, this.mainData);

              if (this.value && this.value.length) {
                this.refreshSelection();
              }

              if (this.keyCode !== 8) {
                this.focusAtFirstListItem();
              }

              this.notify('reOrder', {
                module: 'CheckBoxSelection',
                enable: this.mode === 'CheckBox',
                e: this
              });
            }
          } else {
            this.resetList(dataSource, fields, query);

            if (this.allowCustomValue) {
              if (!(dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
                this.checkForCustomValue(query, fields);
              } else {
                this.remoteCustomValue = true;
                this.tempQuery = query;
              }
            }
          }

          this.refreshPopup();

          if (this.mode === 'CheckBox') {
            this.removeFocus();
          }
        }
      }, {
        key: "checkForCustomValue",
        value: function checkForCustomValue(query, fields) {
          var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);

          if (this.allowCustomValue && dataChecks) {
            var value = this.inputElement.value;
            var field = fields ? fields : this.fields;
            var customData = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mainData) && this.mainData.length > 0 ? this.mainData[0] : this.mainData;

            if (typeof customData !== 'string') {
              var dataItem = {};
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(field.text, value, dataItem);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(field.value, value, dataItem);
              var tempData = JSON.parse(JSON.stringify(this.listData));
              tempData.splice(0, 0, dataItem);
              this.resetList(tempData, field, query);
            } else {
              var _tempData = [this.inputElement.value];
              this.resetList(_tempData, field);
            }
          }

          if (this.value && this.value.length) {
            this.refreshSelection();
          }
        }
      }, {
        key: "getNgDirective",
        value: function getNgDirective() {
          return 'EJS-MULTISELECT';
        }
      }, {
        key: "wrapperClick",
        value: function wrapperClick(e) {
          this.setDynValue = false;

          if (!this.enabled) {
            return;
          }

          if (e.target === this.overAllClear) {
            e.preventDefault();
            return;
          }

          if (!this.inputFocus) {
            this.inputElement.focus();
          }

          if (!this.readonly) {
            if (e.target && e.target.classList.toString().indexOf(CHIP_CLOSE$1) !== -1) {
              if (this.isPopupOpen()) {
                this.refreshPopup();
              }

              return;
            }

            if (!this.isPopupOpen() && (this.openOnClick || this.showDropDownIcon && e.target && e.target.className === dropdownIcon)) {
              this.showPopup();
            } else {
              this.hidePopup();

              if (this.mode === 'CheckBox') {
                this.showOverAllClear();
                this.inputFocus = true;

                if (!this.overAllWrapper.classList.contains(FOCUS)) {
                  this.overAllWrapper.classList.add(FOCUS);
                }
              }
            }
          }

          if (!(this.targetElement() && this.targetElement() !== '')) {
            e.preventDefault();
          }
        }
      }, {
        key: "enable",
        value: function enable(state) {
          if (state) {
            this.overAllWrapper.classList.remove(DISABLED$1);
            this.inputElement.removeAttribute('disabled');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-disabled': 'false'
            });
            this.ensureAriaDisabled('false');
          } else {
            this.overAllWrapper.classList.add(DISABLED$1);
            this.inputElement.setAttribute('disabled', 'true');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-disabled': 'true'
            });
            this.ensureAriaDisabled('true');
          }

          if (this.enabled !== state) {
            this.enabled = state;
          }

          this.hidePopup();
        }
      }, {
        key: "onBlur",
        value: function onBlur(eve, isDocClickFromCheck) {
          var target;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eve)) {
            target = eve.relatedTarget;
          }

          if (this.popupObj && document.body.contains(this.popupObj.element) && this.popupObj.element.contains(target)) {
            if (this.mode !== 'CheckBox') {
              this.inputElement.focus();
            } else if (this.floatLabelType === 'Auto' && (this.overAllWrapper.classList.contains('e-outline') || this.overAllWrapper.classList.contains('e-filled'))) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllWrapper], 'e-valid-input');
            }

            return;
          }

          if (this.floatLabelType === 'Auto' && this.overAllWrapper.classList.contains('e-outline') && this.mode === 'CheckBox' && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overAllWrapper], 'e-valid-input');
          }

          if (this.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eve) && !isDocClickFromCheck) {
            this.inputFocus = false;
            this.overAllWrapper.classList.remove(FOCUS);
            return;
          }

          if (this.scrollFocusStatus) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eve)) {
              eve.preventDefault();
            }

            this.inputElement.focus();
            this.scrollFocusStatus = false;
            return;
          }

          this.inputFocus = false;
          this.overAllWrapper.classList.remove(FOCUS);
          this.refreshListItems(null);

          if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
            this.updateDelimView();
          }

          if (this.changeOnBlur) {
            this.updateValueState(eve, this.value, this.tempValues);
            this.dispatchEvent(this.hiddenElement, 'change');
          }

          this.overAllClear.style.display = 'none';

          if (this.isPopupOpen()) {
            this.DropDownBaseresetBlazorTemplates(false, false, true, true, false, true, true);
            this.hidePopup();
          }

          this.makeTextBoxEmpty();
          this.trigger('blur');
          this.focused = true;

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
            this.removeChipFocus();
          }

          this.removeChipSelection();
          this.refreshInputHight();
          floatLabelBlur(this.overAllWrapper, this.componentWrapper, this.value, this.floatLabelType, this.placeholder);
          this.refreshPlaceHolder();

          if ((this.allowFiltering || this.enableSelectionOrder === true && this.mode === 'CheckBox') && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mainList)) {
            this.ulElement = this.mainList;
          }

          this.checkPlaceholderSize();
        }
      }, {
        key: "checkPlaceholderSize",
        value: function checkPlaceholderSize() {
          if (this.showDropDownIcon) {
            var downIconWidth = this.dropIcon.offsetWidth + parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
            this.setPlaceholderSize(downIconWidth);
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dropIcon)) {
              this.setPlaceholderSize(this.showDropDownIcon ? this.dropIcon.offsetWidth : 0);
            }
          }
        }
      }, {
        key: "setPlaceholderSize",
        value: function setPlaceholderSize(downIconWidth) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0) {
            if (this.dropIcon.offsetWidth !== 0) {
              this.searchWrapper.style.width = 'calc(100% - ' + (downIconWidth + 10) + 'px';
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.searchWrapper], CUSTOM_WIDTH);
            }
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.searchWrapper.removeAttribute('style');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.searchWrapper], CUSTOM_WIDTH);
          }
        }
      }, {
        key: "refreshInputHight",
        value: function refreshInputHight() {
          if ((!this.value || !this.value.length) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) || this.text === '')) {
            this.searchWrapper.classList.remove(ZERO_SIZE);
          } else {
            this.searchWrapper.classList.add(ZERO_SIZE);
          }
        }
      }, {
        key: "validateValues",
        value: function validateValues(newValue, oldValue) {
          return JSON.stringify(newValue.slice().sort()) !== JSON.stringify(oldValue.slice().sort());
        }
      }, {
        key: "updateValueState",
        value: function updateValueState(event, newVal, oldVal) {
          var newValue = newVal ? newVal : [];
          var oldValue = oldVal ? oldVal : [];

          if (this.initStatus && this.validateValues(newValue, oldValue)) {
            var eventArgs = {
              e: event,
              oldValue: oldVal,
              value: newVal,
              isInteracted: event ? true : false,
              element: this.element
            };
            this.trigger('change', eventArgs);
            this.updateTempValue();

            if (!this.changeOnBlur) {
              this.dispatchEvent(this.hiddenElement, 'change');
            }
          }
        }
      }, {
        key: "updateTempValue",
        value: function updateTempValue() {
          if (!this.value) {
            this.tempValues = this.value;
          } else {
            this.tempValues = this.value.slice();
          }
        }
      }, {
        key: "getPagingCount",
        value: function getPagingCount() {
          var height = this.list.classList.contains(dropDownBaseClasses.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
          return Math.round(this.list.offsetHeight / parseInt(height, 10));
        }
      }, {
        key: "pageUpSelection",
        value: function pageUpSelection(steps) {
          var collection = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
          var previousItem;
          previousItem = steps >= 0 ? collection[steps + 1] : collection[0];
          this.addListFocus(previousItem);
          this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute('data-value')));
        }
      }, {
        key: "pageDownSelection",
        value: function pageDownSelection(steps) {
          var list = this.getItems();
          var collection = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
          var previousItem;
          previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];
          this.addListFocus(previousItem);
          this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute('data-value')));
        }
      }, {
        key: "getItems",
        value: function getItems() {
          if (!this.list) {
            _get(_getPrototypeOf(MultiSelect.prototype), "render", this).call(this);
          }

          return this.ulElement && this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li).length > 0 ? this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')') : [];
        }
      }, {
        key: "focusInHandler",
        value: function focusInHandler(e) {
          if (this.enabled) {
            this.showOverAllClear();
            this.inputFocus = true;

            if (this.value && this.value.length) {
              if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
                this.chipCollectionWrapper.style.display = '';
              } else {
                this.showDelimWrapper();
              }

              if (this.mode !== 'CheckBox') {
                this.viewWrapper.style.display = 'none';
              }
            }

            if (this.mode !== 'CheckBox') {
              this.searchWrapper.classList.remove(ZERO_SIZE);
            }

            this.checkPlaceholderSize();

            if (this.focused) {
              var args = {
                isInteracted: e ? true : false,
                event: e
              };
              this.trigger('focus', args);
              this.focused = false;
            }

            if (!this.overAllWrapper.classList.contains(FOCUS)) {
              this.overAllWrapper.classList.add(FOCUS);
            }

            floatLabelFocus(this.overAllWrapper, this.componentWrapper);

            if (this.isPopupOpen()) {
              this.refreshPopup();
            }

            return true;
          } else {
            return false;
          }
        }
      }, {
        key: "showDelimWrapper",
        value: function showDelimWrapper() {
          if (this.mode === 'CheckBox') {
            this.viewWrapper.style.display = '';
          } else {
            this.delimiterWrapper.style.display = '';
          }

          this.componentWrapper.classList.add(DELIMITER_VIEW_WRAPPER);
        }
      }, {
        key: "hideDelimWrapper",
        value: function hideDelimWrapper() {
          this.delimiterWrapper.style.display = 'none';
          this.componentWrapper.classList.remove(DELIMITER_VIEW_WRAPPER);
        }
      }, {
        key: "expandTextbox",
        value: function expandTextbox() {
          var size = 5;

          if (this.placeholder) {
            size = size > this.inputElement.placeholder.length ? size : this.inputElement.placeholder.length;
          }

          if (this.inputElement.value.length > size) {
            this.inputElement.size = this.inputElement.value.length;
          } else {
            this.inputElement.size = size;
          }
        }
      }, {
        key: "isPopupOpen",
        value: function isPopupOpen() {
          return this.popupWrapper !== null && this.popupWrapper.parentElement !== null;
        }
      }, {
        key: "refreshPopup",
        value: function refreshPopup() {
          if (this.popupObj && this.mobFilter) {
            this.popupObj.setProperties({
              width: this.calcPopupWidth()
            });
            this.popupObj.refreshPosition(this.overAllWrapper);
            this.popupObj.resolveCollision();
          }
        }
      }, {
        key: "checkTextLength",
        value: function checkTextLength() {
          return this.targetElement().length < 1;
        }
      }, {
        key: "popupKeyActions",
        value: function popupKeyActions(e) {
          switch (e.keyCode) {
            case 38:
              this.hidePopup();

              if (this.mode === 'CheckBox') {
                this.inputElement.focus();
              }

              e.preventDefault();
              break;

            case 40:
              if (!this.isPopupOpen()) {
                this.showPopup();
                e.preventDefault();
              }

              break;
          }
        }
      }, {
        key: "updateAriaAttribute",
        value: function updateAriaAttribute() {
          var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(focusedItem)) {
            this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
          }
        }
      }, {
        key: "homeNavigation",
        value: function homeNavigation(isHome) {
          this.removeFocus();
          var scrollEle = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');

          if (scrollEle.length > 0) {
            var element = scrollEle[isHome ? 0 : scrollEle.length - 1];
            element.classList.add(dropDownBaseClasses.focus);
            this.scrollBottom(element);
          }
        }
      }, {
        key: "onKeyDown",
        value: function onKeyDown(e) {
          if (this.readonly || !this.enabled && this.mode !== 'CheckBox') {
            return;
          }

          this.keyDownStatus = true;

          if (e.keyCode > 111 && e.keyCode < 124) {
            return;
          }

          if (e.altKey) {
            this.popupKeyActions(e);
            return;
          } else if (this.isPopupOpen()) {
            var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
            var activeIndex;

            switch (e.keyCode) {
              case 36:
              case 35:
                this.homeNavigation(e.keyCode === 36 ? true : false);
                break;

              case 33:
                e.preventDefault();

                if (focusedItem) {
                  this.getIndexByValue(focusedItem.getAttribute('data-value'));
                  this.pageUpSelection(activeIndex - this.getPagingCount());
                  this.updateAriaAttribute();
                }

                return;

              case 34:
                e.preventDefault();

                if (focusedItem) {
                  this.getIndexByValue(focusedItem.getAttribute('data-value'));
                  this.pageDownSelection(activeIndex + this.getPagingCount());
                  this.updateAriaAttribute();
                }

                return;

              case 38:
                this.arrowUp(e);
                break;

              case 40:
                this.arrowDown(e);
                break;

              case 27:
                e.preventDefault();
                this.hidePopup();

                if (this.mode === 'CheckBox') {
                  this.inputElement.focus();
                }

                return;

              case 13:
                e.preventDefault();

                if (this.mode !== 'CheckBox') {
                  this.selectByKey(e);
                }

                this.checkPlaceholderSize();
                return;

              case 32:
                this.spaceKeySelection(e);
                return;

              case 9:
                e.preventDefault();
                this.hidePopup();
                this.inputElement.focus();
                this.overAllWrapper.classList.add(FOCUS);
            }
          } else {
            switch (e.keyCode) {
              case 13:
              case 9:
              case 16:
              case 17:
              case 20:
                return;

              case 40:
                if (this.openOnClick) {
                  this.showPopup();
                }

                break;

              case 27:
                e.preventDefault();
                this.escapeAction();
                return;
            }
          }

          if (this.checkTextLength()) {
            this.keyNavigation(e);
          }

          if (this.mode === 'CheckBox' && this.enableSelectionOrder) {
            this.checkBackCommand(e);
          }

          this.expandTextbox();
          this.refreshPopup();
        }
      }, {
        key: "arrowDown",
        value: function arrowDown(e) {
          e.preventDefault();
          this.moveByList(1);
          this.keyAction = true;

          if (document.activeElement.classList.contains('e-input-filter') || this.mode === 'CheckBox' && !this.allowFiltering && document.activeElement !== this.list) {
            this.list.focus();

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'keydown', this.onKeyDown, this);
          }

          this.updateAriaAttribute();
        }
      }, {
        key: "arrowUp",
        value: function arrowUp(e) {
          e.preventDefault();
          this.keyAction = true;
          var list = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');

          if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            list = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
          }

          var focuseElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
          var index = Array.prototype.slice.call(list).indexOf(focuseElem);

          if (index <= 0 && this.mode === 'CheckBox' && this.allowFiltering) {
            this.keyAction = false;
            this.notify('inputFocus', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              value: 'focus'
            });
          } else {
            this.list.focus();
          }

          this.moveByList(-1);
          this.updateAriaAttribute();
        }
      }, {
        key: "spaceKeySelection",
        value: function spaceKeySelection(e) {
          if (this.mode === 'CheckBox') {
            if (!document.activeElement.classList.contains('e-input-filter')) {
              e.preventDefault();
              this.keyAction = true;
              this.list.focus();
            }

            this.selectByKey(e);
          }

          this.checkPlaceholderSize();
        }
      }, {
        key: "checkBackCommand",
        value: function checkBackCommand(e) {
          if (e.keyCode === 8 && this.targetElement() === '') {
            this.backCommand = false;
          } else {
            this.backCommand = true;
          }
        }
      }, {
        key: "keyNavigation",
        value: function keyNavigation(e) {
          if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox' && this.value && this.value.length) {
            switch (e.keyCode) {
              case 37:
                //left arrow   
                e.preventDefault();
                this.moveBy(-1, e);
                break;

              case 39:
                //right arrow  
                e.preventDefault();
                this.moveBy(1, e);
                break;

              case 8:
                this.removelastSelection(e);
                break;

              case 46:
                //del
                this.removeSelectedChip(e);
                break;
            }
          } else if (e.keyCode === 8 && this.mode === 'Delimiter') {
            if (this.value && this.value.length) {
              e.preventDefault();
              var temp = this.value[this.value.length - 1];
              this.removeValue(temp, e);
              this.updateDelimeter(this.delimiterChar, e);
              this.focusAtLastListItem(temp);
            }
          }
        }
      }, {
        key: "selectByKey",
        value: function selectByKey(e) {
          this.removeChipSelection();
          this.selectListByKey(e);

          if (this.hideSelectedItem) {
            this.focusAtFirstListItem();
          }
        }
      }, {
        key: "escapeAction",
        value: function escapeAction() {
          var temp = this.tempValues ? this.tempValues.slice() : [];

          if (this.value && this.validateValues(this.value, temp)) {
            if (this.mode !== 'CheckBox') {
              this.value = temp;
              this.initialValueUpdate();
            }

            if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
              this.chipCollectionWrapper.style.display = '';
            } else {
              this.showDelimWrapper();
            }

            this.refreshPlaceHolder();

            if (this.value.length) {
              this.showOverAllClear();
            } else {
              this.hideOverAllClear();
            }
          }

          this.makeTextBoxEmpty();
        }
      }, {
        key: "scrollBottom",
        value: function scrollBottom(selectedLI, activeIndex) {
          var currentOffset = this.list.offsetHeight;
          var nextBottom = selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop;
          var nextOffset = this.list.scrollTop + nextBottom - currentOffset;
          var boxRange = selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop;
          boxRange = this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange;

          if (activeIndex === 0) {
            this.list.scrollTop = 0;
          } else if (nextBottom > currentOffset) {
            this.list.scrollTop = nextOffset;
          } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
            this.list.scrollTop = nextOffset;
          }
        }
      }, {
        key: "scrollTop",
        value: function scrollTop(selectedLI, activeIndex) {
          var nextOffset = selectedLI.offsetTop - this.list.scrollTop;
          var nextBottom = selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop;
          nextOffset = this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
          var boxRange = selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop;

          if (activeIndex === 0) {
            this.list.scrollTop = 0;
          } else if (nextOffset < 0) {
            this.list.scrollTop = this.list.scrollTop + nextOffset;
          } else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {
            this.list.scrollTop = selectedLI.offsetTop - (this.fields.groupBy && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0);
          }
        }
      }, {
        key: "selectListByKey",
        value: function selectListByKey(e) {
          var li = this.list.querySelector('li.' + dropDownBaseClasses.focus);
          var limit = this.value && this.value.length ? this.value.length : 0;
          var target;

          if (li !== null) {
            if (li.classList.contains('e-active')) {
              limit = limit - 1;
            }

            if (this.isValidLI(li) && limit < this.maximumSelectionLength) {
              this.updateListSelection(li, e);
              this.addListFocus(li);

              if (this.mode === 'CheckBox') {
                this.updateDelimView();
                this.updateDelimeter(this.delimiterChar, e);
                this.refreshInputHight();
                this.checkPlaceholderSize();

                if (this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
                  target = li.firstElementChild.lastElementChild;
                  this.findGroupStart(target);
                  this.deselectHeader();
                }
              } else {
                this.updateDelimeter(this.delimiterChar, e);
              }

              this.makeTextBoxEmpty();

              if (this.mode !== 'CheckBox') {
                this.refreshListItems(li.textContent);
              }

              if (!this.changeOnBlur) {
                this.updateValueState(e, this.value, this.tempValues);
              }

              this.refreshPopup();
            } else {
              if (!this.isValidLI(li) && limit < this.maximumSelectionLength) {
                target = li.firstElementChild.lastElementChild;
                target.classList.contains('e-check') ? this.selectAllItem(false, e, li) : this.selectAllItem(true, e, li);
              }
            }

            this.refreshSelection();

            if (this.closePopupOnSelect) {
              this.hidePopup();
            }
          }

          this.refreshPlaceHolder();
        }
      }, {
        key: "refreshListItems",
        value: function refreshListItems(data) {
          if ((this.allowFiltering || this.mode === 'CheckBox' && this.enableSelectionOrder === true || this.allowCustomValue) && this.mainList && this.listData) {
            var list;
            list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
            this.onActionComplete(list, this.mainData);
            this.focusAtLastListItem(data);

            if (this.value && this.value.length) {
              this.refreshSelection();
            }
          }
        }
      }, {
        key: "removeSelectedChip",
        value: function removeSelectedChip(e) {
          var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);
          var temp;

          if (selectedElem !== null) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
              this.tempValues = this.value.slice();
            }

            temp = selectedElem.nextElementSibling;

            if (temp !== null) {
              this.removeChipSelection();
              this.addChipSelection(temp, e);
            }

            this.removeValue(selectedElem.getAttribute('data-value'), e);
            this.makeTextBoxEmpty();
          }

          if (this.closePopupOnSelect) {
            this.hidePopup();
          }

          this.checkPlaceholderSize();
        }
      }, {
        key: "moveByTop",
        value: function moveByTop(state) {
          var elements = this.list.querySelectorAll('li.' + dropDownBaseClasses.li);
          var index;

          if (elements.length > 1) {
            this.removeFocus();
            index = state ? 0 : elements.length - 1;
            this.addListFocus(elements[index]);
            this.scrollBottom(elements[index], index);
          }

          this.updateAriaAttribute();
        }
      }, {
        key: "moveByList",
        value: function moveByList(position) {
          if (this.list) {
            var elements = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');

            if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
              elements = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');
            }

            var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);
            var temp = -1;

            if (elements.length) {
              for (var index = 0; index < elements.length; index++) {
                if (elements[index] === selectedElem) {
                  temp = index;
                  break;
                }
              }

              if (position > 0) {
                if (temp < elements.length - 1) {
                  this.removeFocus();
                  this.addListFocus(elements[++temp]);
                  this.updateCheck(elements[temp]);
                  this.scrollBottom(elements[temp], temp);
                }
              } else {
                if (temp > 0) {
                  this.removeFocus();
                  this.addListFocus(elements[--temp]);
                  this.updateCheck(elements[temp]);
                  this.scrollTop(elements[temp], temp);
                }
              }
            }
          }
        }
      }, {
        key: "updateCheck",
        value: function updateCheck(element) {
          if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            var checkElement = element.firstElementChild.lastElementChild;

            if (checkElement.classList.contains('e-check')) {
              element.classList.add('e-active');
            } else {
              element.classList.remove('e-active');
            }
          }
        }
      }, {
        key: "moveBy",
        value: function moveBy(position, e) {
          var elements;
          var selectedElem;
          var temp;
          elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1);
          selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);

          if (selectedElem === null) {
            if (position < 0) {
              this.addChipSelection(elements[elements.length - 1], e);
            }
          } else {
            if (position < 0) {
              temp = selectedElem.previousElementSibling;

              if (temp !== null) {
                this.removeChipSelection();
                this.addChipSelection(temp, e);
              }
            } else {
              temp = selectedElem.nextElementSibling;
              this.removeChipSelection();

              if (temp !== null) {
                this.addChipSelection(temp, e);
              }
            }
          }
        }
      }, {
        key: "chipClick",
        value: function chipClick(e) {
          if (this.enabled) {
            var elem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CHIP$1);
            this.removeChipSelection();
            this.addChipSelection(elem, e);
          }
        }
      }, {
        key: "removeChipSelection",
        value: function removeChipSelection() {
          if (this.chipCollectionWrapper) {
            this.removeChipFocus();
          }
        }
      }, {
        key: "addChipSelection",
        value: function addChipSelection(element, e) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], CHIP_SELECTED);
          this.trigger('chipSelection', e);
        }
      }, {
        key: "onChipRemove",
        value: function onChipRemove(e) {
          if (e.which === 3 || e.button === 2) {
            return;
          }

          if (this.enabled && !this.readonly) {
            var element = e.target.parentElement;
            var customVal = element.getAttribute('data-value');
            var value = this.getFormattedValue(customVal);

            if (this.allowCustomValue && (customVal !== 'false' && value === false || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.toString() === 'NaN')) {
              value = customVal;
            }

            if (this.isPopupOpen() && this.mode !== 'CheckBox') {
              this.hidePopup();
            }

            if (!this.inputFocus) {
              this.inputElement.focus();
            }

            this.removeValue(value, e);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.findListElement(this.list, 'li', 'data-value', value)) && this.mainList && this.listData) {
              var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
              this.onActionComplete(list, this.mainData);
            }

            this.updateDelimeter(this.delimiterChar, e);

            if (this.placeholder && this.floatLabelType === 'Never') {
              this.makeTextBoxEmpty();
              this.checkPlaceholderSize();
            } else {
              this.inputElement.value = '';
            }

            e.preventDefault();
          }
        }
      }, {
        key: "makeTextBoxEmpty",
        value: function makeTextBoxEmpty() {
          this.inputElement.value = '';
          this.refreshPlaceHolder();
        }
      }, {
        key: "refreshPlaceHolder",
        value: function refreshPlaceHolder() {
          if (this.placeholder && this.floatLabelType === 'Never') {
            if (this.value && this.value.length || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) && this.text !== '') {
              this.inputElement.placeholder = '';
            } else {
              this.inputElement.placeholder = this.placeholder;
            }
          } else {
            this.setFloatLabelType();
          }

          this.expandTextbox();
        }
      }, {
        key: "removeValue",
        value: function removeValue(value, eve, length, isClearAll) {
          var _this482 = this;

          var index = this.value.indexOf(this.getFormattedValue(value));

          if (index === -1 && this.allowCustomValue && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            index = this.value.indexOf(value.toString());
          }

          var targetEle = eve && eve.target;
          isClearAll = isClearAll || targetEle && targetEle.classList.contains('e-close-hooker') ? true : null;
          var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;

          if (index !== -1) {
            var element = this.findListElement(this.list, 'li', 'data-value', value);
            var val = this.getDataByValue(value);
            var eventArgs = {
              e: eve,
              item: element,
              itemData: val,
              isInteracted: eve ? true : false,
              cancel: false
            };
            this.trigger('removing', eventArgs, function (eventArgs) {
              if (eventArgs.cancel) {
                _this482.removeIndex++;
              } else {
                var removeVal = _this482.value.slice(0);

                removeVal.splice(index, 1);

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this482.isServerRendered) {
                  var removedValues = [].concat([], removeVal);

                  _this482.setProperties({
                    value: removedValues.length === 0 ? null : removedValues
                  }, true);
                } else {
                  _this482.setProperties({
                    value: [].concat([], removeVal)
                  }, true);
                }

                if (element !== null) {
                  var hideElement = _this482.findListElement(_this482.mainList, 'li', 'data-value', value);

                  element.setAttribute('aria-selected', 'false');
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], className);

                  if (hideElement) {
                    hideElement.setAttribute('aria-selected', 'false');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element, hideElement], className);
                  }

                  _this482.notify('activeList', {
                    module: 'CheckBoxSelection',
                    enable: _this482.mode === 'CheckBox',
                    li: element,
                    e: _this482,
                    index: index
                  });

                  _this482.notify('updatelist', {
                    module: 'CheckBoxSelection',
                    enable: _this482.mode === 'CheckBox',
                    li: element,
                    e: eve
                  });

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this482.inputElement, {
                    'aria-activedescendant': element.id
                  });

                  if (_this482.value && _this482.value.length !== _this482.mainData.length && _this482.mode === 'CheckBox' && _this482.showSelectAll) {
                    _this482.notify('checkSelectAll', {
                      module: 'CheckBoxSelection',
                      enable: _this482.mode === 'CheckBox',
                      value: 'uncheck'
                    });
                  }
                }

                if (_this482.hideSelectedItem && _this482.fields.groupBy) {
                  _this482.hideGroupItem(value);
                }

                _this482.updateMainList(true, value);

                _this482.removeChip(value);

                _this482.updateChipStatus();

                var limit = _this482.value && _this482.value.length ? _this482.value.length : 0;

                if (limit < _this482.maximumSelectionLength) {
                  var collection = _this482.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-active)');

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(collection, 'e-disable');
                }

                _this482.trigger('removed', eventArgs);

                var _targetEle = eve && eve.currentTarget;

                var isSelectAll = _targetEle && _targetEle.classList.contains('e-selectall-parent') ? true : null;

                if (!_this482.changeOnBlur && !isClearAll && eve && length && !isSelectAll) {
                  _this482.updateValueState(eve, _this482.value, _this482.tempValues);
                }

                if (length) {
                  _this482.selectAllEventData.push(val);

                  _this482.selectAllEventEle.push(element);
                }

                if (length === 1) {
                  if (!_this482.changeOnBlur) {
                    _this482.updateValueState(eve, _this482.value, _this482.tempValues);
                  }

                  var args = {
                    event: eve,
                    items: _this482.selectAllEventEle,
                    itemData: _this482.selectAllEventData,
                    isInteracted: eve ? true : false,
                    isChecked: false
                  };

                  _this482.trigger('selectedAll', args);

                  _this482.selectAllEventData = [];
                  _this482.selectAllEventEle = [];
                }

                if (isClearAll && (length === 1 || length === null)) {
                  _this482.clearAllCallback(eve, isClearAll);
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this482.isServerRendered && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this482.value) || _this482.value.length === 0)) {
                  _this482.updatedataValueItems(eve);
                }
              }
            });
          }
        }
      }, {
        key: "updateMainList",
        value: function updateMainList(state, value) {
          if (this.allowFiltering || this.mode === 'CheckBox') {
            var element2 = this.findListElement(this.mainList, 'li', 'data-value', value);

            if (element2) {
              if (state) {
                element2.setAttribute('aria-selected', 'false');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element2], this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected);

                if (this.mode === 'CheckBox') {
                  element2.firstElementChild.setAttribute('aria-checked', 'false');
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element2.firstElementChild.lastElementChild], 'e-check');
                }
              } else {
                element2.setAttribute('aria-selected', 'true');
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element2], this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected);

                if (this.mode === 'CheckBox') {
                  element2.firstElementChild.setAttribute('aria-checked', 'true');
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element2.firstElementChild.lastElementChild], 'e-check');
                }
              }
            }
          }
        }
      }, {
        key: "removeChip",
        value: function removeChip(value) {
          if (this.chipCollectionWrapper) {
            var element = this.findListElement(this.chipCollectionWrapper, 'span', 'data-value', value);

            if (element) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(element);
            }
          }
        }
      }, {
        key: "setWidth",
        value: function setWidth(width) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            if (typeof width === 'number') {
              this.overAllWrapper.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            } else if (typeof width === 'string') {
              this.overAllWrapper.style.width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            }
          }
        }
      }, {
        key: "updateChipStatus",
        value: function updateChipStatus() {
          if (this.value && this.value.length) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.chipCollectionWrapper)) {
              this.chipCollectionWrapper.style.display = '';
            }

            if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
              this.showDelimWrapper();
            }

            this.showOverAllClear();
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.chipCollectionWrapper)) {
              this.chipCollectionWrapper.style.display = 'none';
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.delimiterWrapper)) {
              this.delimiterWrapper.style.display = 'none';
            }

            this.hideOverAllClear();
          }
        }
      }, {
        key: "addValue",
        value: function addValue(value, text, eve) {
          if (!this.value) {
            this.value = [];
          }

          if (this.value.indexOf(value) < 0) {
            this.setProperties({
              value: [].concat([], this.value, [value])
            }, true);
          }

          var element = this.findListElement(this.list, 'li', 'data-value', value);
          this.removeFocus();

          if (element) {
            this.addListFocus(element);
            this.addListSelection(element);
          }

          if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {
            this.addChip(text, value, eve);
          }

          if (this.hideSelectedItem && this.fields.groupBy) {
            this.hideGroupItem(value);
          }

          this.updateChipStatus();
          this.checkMaxSelection();
        }
      }, {
        key: "checkMaxSelection",
        value: function checkMaxSelection() {
          var limit = this.value && this.value.length ? this.value.length : 0;

          if (limit === this.maximumSelectionLength) {
            var collection = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-active)');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(collection, 'e-disable');
          }
        }
      }, {
        key: "dispatchSelect",
        value: function dispatchSelect(value, eve, element, isNotTrigger, length) {
          var _this483 = this;

          if (this.initStatus && !isNotTrigger) {
            var val = this.getDataByValue(value);
            var eventArgs = {
              e: eve,
              item: element,
              itemData: val,
              isInteracted: eve ? true : false,
              cancel: false
            };
            this.trigger('select', eventArgs, function (eventArgs) {
              if (!eventArgs.cancel) {
                if (length) {
                  _this483.selectAllEventData.push(val);

                  _this483.selectAllEventEle.push(element);
                }

                if (length === 1) {
                  var args = {
                    event: eve,
                    items: _this483.selectAllEventEle,
                    itemData: _this483.selectAllEventData,
                    isInteracted: eve ? true : false,
                    isChecked: true
                  };

                  _this483.trigger('selectedAll', args);

                  _this483.selectAllEventData = [];
                }

                _this483.updateListSelectEventCallback(value, element, eve);
              }
            });
          }
        }
      }, {
        key: "addChip",
        value: function addChip(text, value, e) {
          if (this.chipCollectionWrapper) {
            this.getChip(text, value, e);
          }
        }
      }, {
        key: "removeChipFocus",
        value: function removeChipFocus() {
          var elements;
          var closeElements;
          elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1);
          closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, CHIP_SELECTED);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            for (var index = 0; index < closeElements.length; index++) {
              closeElements[index].style.display = 'none';
            }
          }
        }
      }, {
        key: "onMobileChipInteraction",
        value: function onMobileChipInteraction(e) {
          var chipElem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CHIP$1);
          var chipClose = chipElem.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);

          if (this.enabled && !this.readonly) {
            if (!chipElem.classList.contains(CHIP_SELECTED)) {
              this.removeChipFocus();
              chipClose.style.display = '';
              chipElem.classList.add(CHIP_SELECTED);
            }

            this.refreshPopup();
            e.preventDefault();
          }
        }
      }, {
        key: "multiCompiler",
        value: function multiCompiler(multiselectTemplate) {
          var checkTemplate = false;

          if (multiselectTemplate) {
            try {
              checkTemplate = document.querySelectorAll(multiselectTemplate).length ? true : false;
            } catch (exception) {
              checkTemplate = false;
            }
          }

          return checkTemplate;
        }
      }, {
        key: "getChip",
        value: function getChip(data, value, e) {
          var _this484 = this;

          var itemData = {
            text: value,
            value: value
          };
          var chip = this.createElement('span', {
            className: CHIP$1,
            attrs: {
              'data-value': value,
              'title': data
            }
          });
          var compiledString;
          var chipContent = this.createElement('span', {
            className: CHIP_CONTENT$1
          });
          var chipClose = this.createElement('span', {
            className: CHIP_CLOSE$1
          });

          if (this.mainData) {
            itemData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered ? JSON.parse(JSON.stringify(this.getDataByValue(value))) : this.getDataByValue(value);
          }

          if (this.valueTemplate && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemData)) {
            var valuecheck = this.multiCompiler(this.valueTemplate);

            if (valuecheck) {
              compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.valueTemplate).innerHTML.trim());
            } else {
              compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.valueTemplate);
            }

            var _iterator97 = _createForOfIteratorHelper(compiledString(itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate)),
                _step97;

            try {
              for (_iterator97.s(); !(_step97 = _iterator97.n()).done;) {
                var item = _step97.value;
                chipContent.appendChild(item);
              }
            } catch (err) {
              _iterator97.e(err);
            } finally {
              _iterator97.f();
            }

            this.DropDownBaseupdateBlazorTemplates(false, false, false, false, true, false, false, false);
          } else if (this.enableHtmlSanitizer) {
            chipContent.innerText = data;
          } else {
            chipContent.innerHTML = data;
          }

          chip.appendChild(chipContent);
          var eventArgs = {
            isInteracted: e ? true : false,
            itemData: itemData,
            e: e,
            setClass: function setClass(classes) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([chip], classes);
            },
            cancel: false
          };
          this.trigger('tagging', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
              if (eventArgs.setClass && typeof eventArgs.setClass === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this484.isServerRendered) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([chip], eventArgs.setClass);
              }

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                chip.classList.add(MOBILE_CHIP);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([chipClose], chip);
                chipClose.style.display = 'none';

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(chip, 'click', _this484.onMobileChipInteraction, _this484);
              } else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(chip, 'mousedown', _this484.chipClick, _this484);

                if (_this484.showClearButton) {
                  chip.appendChild(chipClose);
                }
              }

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(chipClose, 'mousedown', _this484.onChipRemove, _this484);

              _this484.chipCollectionWrapper.appendChild(chip);

              if (!_this484.changeOnBlur && e) {
                _this484.updateValueState(e, _this484.value, _this484.tempValues);
              }
            }
          });
        }
      }, {
        key: "calcPopupWidth",
        value: function calcPopupWidth() {
          var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.popupWidth);

          if (width.indexOf('%') > -1) {
            var inputWidth = this.componentWrapper.offsetWidth * parseFloat(width) / 100;
            width = inputWidth.toString() + 'px';
          }

          return width;
        }
      }, {
        key: "mouseIn",
        value: function mouseIn() {
          if (this.enabled && !this.readonly) {
            this.showOverAllClear();
          }
        }
      }, {
        key: "mouseOut",
        value: function mouseOut() {
          if (!this.inputFocus) {
            this.overAllClear.style.display = 'none';
          }
        }
      }, {
        key: "listOption",
        value: function listOption(dataSource, fields) {
          var iconCss = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.iconCss) ? false : true;
          var fieldProperty = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields.properties) ? fields : fields.properties;
          this.listCurrentOptions = fields.text !== null || fields.value !== null ? {
            fields: fieldProperty,
            showIcon: iconCss,
            ariaAttributes: {
              groupItemRole: 'presentation'
            }
          } : {
            fields: {
              value: 'text'
            }
          };
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.listCurrentOptions, this.listCurrentOptions, fields, true);

          if (this.mode === 'CheckBox') {
            this.notify('listoption', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              dataSource: dataSource,
              fieldProperty: fieldProperty
            });
          }

          return this.listCurrentOptions;
        }
      }, {
        key: "renderPopup",
        value: function renderPopup() {
          var _this485 = this;

          if (!this.list) {
            _get(_getPrototypeOf(MultiSelect.prototype), "render", this).call(this);
          }

          if (!this.popupObj) {
            var args = {
              cancel: false
            };
            this.trigger('beforeOpen', args, function (args) {
              if (!args.cancel) {
                document.body.appendChild(_this485.popupWrapper);

                var checkboxFilter = _this485.popupWrapper.querySelector('.' + FILTERPARENT);

                if (_this485.mode === 'CheckBox' && !_this485.allowFiltering && checkboxFilter && _this485.filterParent) {
                  checkboxFilter.remove();
                  _this485.filterParent = null;
                }

                var overAllHeight = parseInt(_this485.popupHeight, 10);
                _this485.popupWrapper.style.visibility = 'hidden';

                if (_this485.headerTemplate) {
                  _this485.setHeaderTemplate();

                  overAllHeight -= _this485.header.offsetHeight;
                }

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([_this485.list], _this485.popupWrapper);

                if (_this485.footerTemplate) {
                  _this485.setFooterTemplate();

                  overAllHeight -= _this485.footer.offsetHeight;
                }

                if (_this485.mode === 'CheckBox' && _this485.showSelectAll) {
                  _this485.notify('selectAll', {
                    module: 'CheckBoxSelection',
                    enable: _this485.mode === 'CheckBox'
                  });

                  overAllHeight -= _this485.selectAllHeight;
                } else if (_this485.mode === 'CheckBox' && !_this485.showSelectAll && (!_this485.headerTemplate || !_this485.footerTemplate)) {
                  _this485.notify('selectAll', {
                    module: 'CheckBoxSelection',
                    enable: _this485.mode === 'CheckBox'
                  });

                  overAllHeight = parseInt(_this485.popupHeight, 10);
                } else if (_this485.mode === 'CheckBox' && !_this485.showSelectAll) {
                  _this485.notify('selectAll', {
                    module: 'CheckBoxSelection',
                    enable: _this485.mode === 'CheckBox'
                  });

                  overAllHeight = parseInt(_this485.popupHeight, 10);

                  if (_this485.headerTemplate && _this485.header) {
                    overAllHeight -= _this485.header.offsetHeight;
                  }

                  if (_this485.footerTemplate && _this485.footer) {
                    overAllHeight -= _this485.footer.offsetHeight;
                  }
                }

                if (_this485.mode === 'CheckBox') {
                  var _args3 = {
                    module: 'CheckBoxSelection',
                    enable: _this485.mode === 'CheckBox',
                    popupElement: _this485.popupWrapper
                  };

                  if (_this485.allowFiltering) {
                    _this485.notify('searchBox', _args3);

                    overAllHeight -= _this485.searchBoxHeight;
                  }

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this485.popupWrapper], 'e-checkbox');
                }

                if (_this485.popupHeight !== 'auto') {
                  _this485.list.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(overAllHeight);
                  _this485.popupWrapper.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this485.popupHeight);
                } else {
                  _this485.list.style.maxHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this485.popupHeight);
                }

                _this485.popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["Popup"](_this485.popupWrapper, {
                  width: _this485.calcPopupWidth(),
                  targetType: 'relative',
                  position: {
                    X: 'left',
                    Y: 'bottom'
                  },
                  relateTo: _this485.overAllWrapper,
                  collision: {
                    X: 'flip',
                    Y: 'flip'
                  },
                  offsetY: 1,
                  enableRtl: _this485.enableRtl,
                  zIndex: _this485.zIndex,
                  close: function close() {
                    if (_this485.popupObj.element.parentElement) {
                      _this485.popupObj.unwireScrollEvents();

                      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this485.popupObj.element);
                    }
                  },
                  open: function open() {
                    _this485.popupObj.resolveCollision();

                    if (!_this485.isFirstClick) {
                      var ulElement = _this485.list.querySelector('ul');

                      if (ulElement) {
                        if (_this485.itemTemplate && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this485.isServerRendered) {
                          setTimeout(function () {
                            _this485.mainList = _this485.ulElement;
                          }, 0);
                        } else if (!(_this485.mode !== 'CheckBox' && (_this485.allowFiltering || _this485.allowCustomValue) && _this485.targetElement().trim() !== '')) {
                          _this485.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
                        }
                      }

                      _this485.isFirstClick = true;
                    }

                    _this485.popupObj.wireScrollEvents();

                    if (!(_this485.mode !== 'CheckBox' && (_this485.allowFiltering || _this485.allowCustomValue) && _this485.targetElement().trim() !== '')) {
                      _this485.loadTemplate();
                    }

                    _this485.setScrollPosition();

                    if (_this485.allowFiltering) {
                      _this485.notify('inputFocus', {
                        module: 'CheckBoxSelection',
                        enable: _this485.mode === 'CheckBox',
                        value: 'focus'
                      });
                    }
                  },
                  targetExitViewport: function targetExitViewport() {
                    if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                      _this485.hidePopup();
                    }
                  }
                });

                if (_this485.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _this485.allowFiltering) {
                  _this485.notify('deviceSearchBox', {
                    module: 'CheckBoxSelection',
                    enable: _this485.mode === 'CheckBox'
                  });
                }

                _this485.popupObj.close();

                _this485.popupWrapper.style.visibility = '';
              }
            });
          }
        }
      }, {
        key: "setHeaderTemplate",
        value: function setHeaderTemplate() {
          var compiledString;

          if (this.header) {
            this.header.remove();
          }

          this.header = this.createElement('div');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.header], HEADER$1);
          var headercheck = this.multiCompiler(this.headerTemplate);

          if (headercheck) {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.headerTemplate).innerHTML.trim());
          } else {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.headerTemplate);
          }

          var elements = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate);

          for (var temp = 0; temp < elements.length; temp++) {
            this.header.appendChild(elements[temp]);
          }

          this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, true, false);

          if (this.mode === 'CheckBox' && this.showSelectAll) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.header], this.popupWrapper);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.header], this.popupWrapper);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.header, 'mousedown', this.onListMouseDown, this);
        }
      }, {
        key: "setFooterTemplate",
        value: function setFooterTemplate() {
          var compiledString;

          if (this.footer) {
            this.footer.remove();
          }

          this.footer = this.createElement('div');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.footer], FOOTER$1);
          var footercheck = this.multiCompiler(this.footerTemplate);

          if (footercheck) {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(this.footerTemplate).innerHTML.trim());
          } else {
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.footerTemplate);
          }

          var elements = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate);

          for (var temp = 0; temp < elements.length; temp++) {
            this.footer.appendChild(elements[temp]);
          }

          this.DropDownBaseupdateBlazorTemplates(false, false, false, false, false, false, true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.footer], this.popupWrapper);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.footer, 'mousedown', this.onListMouseDown, this);
        }
      }, {
        key: "ClearAll",
        value: function ClearAll(e) {
          if (this.enabled && !this.readonly) {
            var temp;

            if (this.value && this.value.length > 0) {
              var liElement = this.list && this.list.querySelectorAll('li.e-list-item');

              if (liElement && liElement.length > 0) {
                this.selectAllItems(false, e);
              } else {
                this.removeIndex = 0;

                for (temp = this.value[this.removeIndex]; this.removeIndex < this.value.length; temp = this.value[this.removeIndex]) {
                  this.removeValue(temp, e, null, true);

                  if (this.value === null && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                    break;
                  }
                }
              }
            } else {
              this.clearAllCallback(e);
            }
          }
        }
      }, {
        key: "clearAllCallback",
        value: function clearAllCallback(e, isClearAll) {
          var tempValues = this.value ? this.value.slice() : [];

          if (this.mainList && this.listData && (this.allowFiltering && this.mode !== 'CheckBox' || this.allowCustomValue)) {
            var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
            this.onActionComplete(list, this.mainData);
          }

          this.focusAtFirstListItem();
          this.updateDelimeter(this.delimiterChar, e);

          if (this.mode !== 'Box' && (!this.inputFocus || this.mode === 'CheckBox')) {
            this.updateDelimView();
          }

          this.makeTextBoxEmpty();
          this.checkPlaceholderSize();

          if (this.isPopupOpen()) {
            this.refreshPopup();
          }

          if (!this.inputFocus) {
            if (this.changeOnBlur) {
              this.updateValueState(e, this.value, tempValues);
            }

            if (this.mode !== 'CheckBox') {
              this.inputElement.focus();
            }
          }

          if (this.mode === 'CheckBox') {
            this.refreshPlaceHolder();
            this.refreshInputHight();

            if (this.changeOnBlur && isClearAll && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
              this.updateValueState(e, this.value, this.tempValues);
            }
          }

          if (!this.changeOnBlur && isClearAll && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
            this.updateValueState(e, this.value, this.tempValues);
          }

          if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            this.updateListItems(this.list.querySelectorAll('li.e-list-item'), this.mainList.querySelectorAll('li.e-list-item'));
          }

          e.preventDefault();
        }
      }, {
        key: "windowResize",
        value: function windowResize() {
          this.refreshPopup();

          if ((!this.inputFocus || this.mode === 'CheckBox') && this.viewWrapper && this.viewWrapper.parentElement) {
            this.updateDelimView();
          }
        }
      }, {
        key: "resetValueHandler",
        value: function resetValueHandler(e) {
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement && e.target === formElement) {
            var textVal = this.element.tagName === this.getNgDirective() ? null : this.element.getAttribute('data-initial-value');
            this.text = textVal;
          }
        }
      }, {
        key: "wireEvent",
        value: function wireEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.componentWrapper, 'mousedown', this.wrapperClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(window, 'resize', this.windowResize, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'focus', this.focusInHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keydown', this.onKeyDown, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'keyup', this.KeyUp, this);

          if (this.mode !== 'CheckBox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'input', this.onInput, this);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'blur', this.onBlur, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.componentWrapper, 'mousemove', this.mouseIn, this);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(formElement, 'reset', this.resetValueHandler, this);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.componentWrapper, 'mouseout', this.mouseOut, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.overAllClear, 'mouseup', this.ClearAll, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputElement, 'paste', this.pasteHandler, this);
        }
      }, {
        key: "onInput",
        value: function onInput(e) {
          if (this.keyDownStatus) {
            this.isValidKey = true;
          } else {
            this.isValidKey = false;
          }

          this.keyDownStatus = false; // For Filtering works in mobile firefox

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'mozilla') {
            this.search(e);
          }
        }
      }, {
        key: "pasteHandler",
        value: function pasteHandler(event) {
          var _this486 = this;

          setTimeout(function () {
            _this486.search(event);
          });
        }
      }, {
        key: "search",
        value: function search(e) {
          var _this487 = this;

          if (!this.isPopupOpen() && this.openOnClick) {
            this.showPopup();
          }

          this.openClick(e);

          if (this.checkTextLength() && !this.allowFiltering && e.keyCode !== 8) {
            this.focusAtFirstListItem();
          } else {
            var text = this.targetElement();
            this.keyCode = e.keyCode;

            if (this.allowFiltering) {
              var eventArgs = {
                preventDefaultAction: false,
                text: this.targetElement(),
                updateData: function updateData(dataSource, query, fields) {
                  if (eventArgs.cancel) {
                    return;
                  }

                  _this487.isFiltered = true;
                  _this487.remoteFilterAction = true;

                  _this487.dataUpdater(dataSource, query, fields);
                },
                event: e,
                cancel: false
              };
              this.trigger('filtering', eventArgs, function (eventArgs) {
                if (!eventArgs.cancel) {
                  if (!_this487.isFiltered && !eventArgs.preventDefaultAction) {
                    _this487.filterAction = true;

                    _this487.dataUpdater(_this487.dataSource, null, _this487.fields);
                  }
                }
              });
            } else if (this.allowCustomValue) {
              var query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
              query = text !== '' ? query.where(this.fields.text, 'startswith', text, this.ignoreCase, this.ignoreAccent) : query;
              this.dataUpdater(this.mainData, query, this.fields);
            } else {
              var liCollections;
              liCollections = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-hide-listitem)');
              var activeElement = Search(this.targetElement(), liCollections, 'StartsWith', this.ignoreCase);

              if (activeElement && activeElement.item !== null) {
                this.addListFocus(activeElement.item);
                this.list.scrollTop = activeElement.item.offsetHeight * activeElement.index;
              } else if (this.targetElement() !== '') {
                this.removeFocus();
              } else {
                this.focusAtFirstListItem();
              }
            }
          }
        }
      }, {
        key: "preRender",
        value: function preRender() {
          if (this.allowFiltering === null) {
            this.allowFiltering = this.mode === 'CheckBox' ? true : false;
          }

          this.initializeData();
          this.updateDataAttribute(this.htmlAttributes);

          _get(_getPrototypeOf(MultiSelect.prototype), "preRender", this).call(this);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'multi-select';
        }
      }, {
        key: "initializeData",
        value: function initializeData() {
          this.mainListCollection = [];
          this.beforePopupOpen = false;
          this.filterAction = false;
          this.remoteFilterAction = false;
          this.isFirstClick = false;
          this.mobFilter = true;
          this.isFiltered = false;
          this.focused = true;
          this.initial = true;
          this.backCommand = true;
        }
      }, {
        key: "updateData",
        value: function updateData(delimiterChar, e) {
          var data = '';
          var delim = this.mode === 'Delimiter' || this.mode === 'CheckBox';
          var text = [];
          var temp;
          var tempData = this.listData;
          this.listData = this.mainData;
          this.hiddenElement.innerHTML = '';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value[index]); index++) {
              var listValue = this.findListElement(this.mainList, 'li', 'data-value', this.value[index]);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(listValue) && !this.allowCustomValue) {
                this.value.splice(index, 1);
              }

              if (this.listData) {
                temp = this.getTextByValue(this.value[index]);
              } else {
                temp = this.value[index];
              }

              data += temp + delimiterChar + ' ';
              text.push(temp);
              this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + '</option>';
            }
          }

          this.setProperties({
            text: text.toString()
          }, true);

          if (delim) {
            this.updateWrapperText(this.delimiterWrapper, data);
            this.delimiterWrapper.setAttribute('id', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('delim_val'));
            this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
          }

          var targetEle = e && e.target;
          var isClearAll = targetEle && targetEle.classList.contains('e-close-hooker') ? true : null;

          if (!this.changeOnBlur && e && !isClearAll || this.isSelectAll) {
            this.isSelectAll = false;
            this.updateValueState(e, this.value, this.tempValues);
          }

          this.listData = tempData;
          this.addValidInputClass();
        }
      }, {
        key: "initialTextUpdate",
        value: function initialTextUpdate() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text)) {
            var textArr = this.text.split(this.delimiterChar);
            var textVal = [];

            for (var index = 0; textArr.length > index; index++) {
              var val = this.getValueByText(textArr[index]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(val)) {
                textVal.push(val);
              } else if (this.allowCustomValue) {
                textVal.push(textArr[index]);
              }
            }

            if (textVal && textVal.length) {
              this.setProperties({
                value: textVal
              }, true);
            }
          } else {
            this.setProperties({
              value: null
            }, true);
          }
        }
      }, {
        key: "renderList",
        value: function renderList(isEmptyData) {
          if (!isEmptyData && this.allowCustomValue && this.list && (this.list.textContent === this.noRecordsTemplate || this.list.querySelector('.e-ul') && this.list.querySelector('.e-ul').childElementCount === 0)) {
            isEmptyData = true;
          }

          _get(_getPrototypeOf(MultiSelect.prototype), "render", this).call(this, isEmptyData);

          this.unwireListEvents();
          this.wireListEvents();
        }
      }, {
        key: "initialValueUpdate",
        value: function initialValueUpdate() {
          if (this.list) {
            var text;
            var element;
            var value;

            if (this.chipCollectionWrapper) {
              this.chipCollectionWrapper.innerHTML = '';
            }

            this.removeListSelection();

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
              for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value[index]); index++) {
                value = this.value[index];
                element = this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, 'li', 'data-value', value);
                text = this.getTextByValue(value);

                if (element && element.getAttribute('aria-selected') !== 'true' || element && element.getAttribute('aria-selected') === 'true' && this.hideSelectedItem && (this.mode === 'Box' || this.mode === 'Default')) {
                  this.addChip(text, value);
                  this.addListSelection(element);
                } else if (value && this.allowCustomValue) {
                  var indexItem = this.listData.length;
                  var newValue = {};
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.fields.text, value, newValue);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.fields.value, value, newValue);
                  var noDataEle = this.popupWrapper.querySelector('.' + dropDownBaseClasses.noData);
                  this.addItem(newValue, indexItem);

                  if (this.popupWrapper.contains(noDataEle)) {
                    this.list.setAttribute('style', noDataEle.getAttribute('style'));
                    this.popupWrapper.replaceChild(this.list, noDataEle);
                    this.wireListEvents();
                  }

                  this.addChip(text, value);
                  this.addListSelection(element);
                }
              }
            }

            if (this.mode === 'CheckBox') {
              this.updateDelimView();

              if (this.changeOnBlur) {
                this.updateValueState(null, this.value, this.tempValues);
              }

              this.updateDelimeter(this.delimiterChar);
              this.refreshInputHight();
            } else {
              this.updateDelimeter(this.delimiterChar);
            }

            if (this.mode === 'CheckBox' && this.showSelectAll && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || !this.value.length)) {
              this.notify('checkSelectAll', {
                module: 'CheckBoxSelection',
                enable: this.mode === 'CheckBox',
                value: 'uncheck'
              });
            }

            if (this.mode === 'Box') {
              this.chipCollectionWrapper.style.display = '';
            } else if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
              this.showDelimWrapper();
            }
          }
        }
      }, {
        key: "updateActionCompleteData",
        value: function updateActionCompleteData(li, item) {
          if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
            this.mainList = this.ulElement;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HIDE_LIST);
          }
        }
      }, {
        key: "updateAddItemList",
        value: function updateAddItemList(list, itemCount) {
          if (this.popupObj && this.popupObj.element && this.popupObj.element.querySelector('.' + dropDownBaseClasses.noData) && list) {
            this.list = list;
            this.mainList = this.ulElement = list.querySelector('ul');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.popupWrapper.querySelector('.e-content'));
            this.popupObj = null;
            this.renderPopup();
          }
        }
      }, {
        key: "updateDataList",
        value: function updateDataList() {
          if (this.mainList && this.ulElement && this.mainList.childElementCount < this.ulElement.childElementCount) {
            this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
          }
        }
      }, {
        key: "isValidLI",
        value: function isValidLI(li) {
          return li && !li.classList.contains(dropDownBaseClasses.disabled) && !li.classList.contains(dropDownBaseClasses.group) && li.classList.contains(dropDownBaseClasses.li);
        }
      }, {
        key: "updateListSelection",
        value: function updateListSelection(li, e, length) {
          var customVal = li.getAttribute('data-value');
          var value = this.getFormattedValue(customVal);

          if (this.allowCustomValue && (customVal !== 'false' && value === false || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && value.toString() === 'NaN')) {
            value = customVal;
          }

          var text = this.getTextByValue(value);
          this.removeHover();

          if (!this.value || this.value.indexOf(value) === -1) {
            this.dispatchSelect(value, e, li, li.getAttribute('aria-selected') === 'true', length);
          } else {
            this.removeValue(value, e, length);
          }
        }
      }, {
        key: "updateListSelectEventCallback",
        value: function updateListSelectEventCallback(value, li, e) {
          var _this488 = this;

          var text = this.getTextByValue(value);

          if ((this.allowCustomValue || this.allowFiltering) && !this.findListElement(this.mainList, 'li', 'data-value', value)) {
            var temp = li.cloneNode(true);
            var data = this.getDataByValue(value);
            var eventArgs = {
              newData: data,
              cancel: false
            };
            this.trigger('customValueSelection', eventArgs, function (eventArgs) {
              if (!eventArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([temp], _this488.mainList);

                _this488.mainData.push(data);

                _this488.remoteCustomValue = false;

                _this488.addValue(value, text, e);
              }
            });
          } else {
            this.remoteCustomValue = false;
            this.addValue(value, text, e);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.value && this.list && this.value.length === this.list.querySelectorAll('li.e-list-item').length || this.value.length === this.maximumSelectionLength) {
            this.updatedataValueItems(e);
            this.checkPlaceholderSize();
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.checkPlaceholderSize();
            this.makeTextBoxEmpty();
          }
        }
      }, {
        key: "removeListSelection",
        value: function removeListSelection() {
          var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
          var selectedItems = this.list.querySelectorAll('.' + className);
          var temp = selectedItems.length;

          if (selectedItems && selectedItems.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectedItems, className);

            while (temp > 0) {
              selectedItems[temp - 1].setAttribute('aria-selected', 'false');
              temp--;
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.mainList)) {
            var selectItems = this.mainList.querySelectorAll('.' + className);
            var temp1 = selectItems.length;

            if (selectItems && selectItems.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectItems, className);

              while (temp1 > 0) {
                selectItems[temp1 - 1].setAttribute('aria-selected', 'false');

                if (this.mode === 'CheckBox') {
                  if (selectedItems && selectedItems.length > temp1 - 1) {
                    selectedItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
                  }

                  selectItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
                }

                temp1--;
              }
            }
          }
        }
      }, {
        key: "removeHover",
        value: function removeHover() {
          var hoveredItem = this.list.querySelectorAll('.' + dropDownBaseClasses.hover);

          if (hoveredItem && hoveredItem.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, dropDownBaseClasses.hover);
          }
        }
      }, {
        key: "removeFocus",
        value: function removeFocus() {
          if (this.list && this.mainList) {
            var hoveredItem = this.list.querySelectorAll('.' + dropDownBaseClasses.focus);
            var mainlist = this.mainList.querySelectorAll('.' + dropDownBaseClasses.focus);

            if (hoveredItem && hoveredItem.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredItem, dropDownBaseClasses.focus);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(mainlist, dropDownBaseClasses.focus);
            }
          }
        }
      }, {
        key: "addListHover",
        value: function addListHover(li) {
          if (this.enabled && this.isValidLI(li)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], dropDownBaseClasses.hover);
          } else {
            if (li !== null && li.classList.contains('e-list-group-item') && this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
              this.removeHover();
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], dropDownBaseClasses.hover);
            }
          }
        }
      }, {
        key: "addListFocus",
        value: function addListFocus(element) {
          if (this.enabled && this.isValidLI(element)) {
            this.removeFocus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], dropDownBaseClasses.focus);
          } else {
            if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], dropDownBaseClasses.focus);
            }
          }
        }
      }, {
        key: "addListSelection",
        value: function addListSelection(element) {
          var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;

          if (this.isValidLI(element) && !element.classList.contains(dropDownBaseClasses.hover)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], className);
            this.updateMainList(false, element.getAttribute('data-value'));
            element.setAttribute('aria-selected', 'true');

            if (this.mode === 'CheckBox') {
              var ariaCheck = element.firstElementChild.getAttribute('aria-checked');

              if (ariaCheck === 'false' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaCheck)) {
                this.notify('updatelist', {
                  module: 'CheckBoxSelection',
                  enable: this.mode === 'CheckBox',
                  li: element,
                  e: this
                });
              }
            }

            this.notify('activeList', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox',
              li: element,
              e: this
            });

            if (this.chipCollectionWrapper !== null) {
              this.removeChipSelection();
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.inputElement, {
              'aria-activedescendant': element.id
            });
          }
        }
      }, {
        key: "updateDelimeter",
        value: function updateDelimeter(delimChar, e) {
          this.updateData(delimChar, e);
        }
      }, {
        key: "onMouseClick",
        value: function onMouseClick(e) {
          this.scrollFocusStatus = false;
          var target = e.target;
          var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + dropDownBaseClasses.li);
          var headerLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + dropDownBaseClasses.group);

          if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {
            target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild : e.target;

            if (target.classList.contains('e-check')) {
              this.selectAllItem(false, e);
              target.classList.remove('e-check');
              target.classList.remove('e-stop');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + 'e-list-group-item').classList.remove('e-active');
              target.setAttribute('aria-selected', 'false');
            } else {
              this.selectAllItem(true, e);
              target.classList.remove('e-stop');
              target.classList.add('e-check');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + 'e-list-group-item').classList.add('e-active');
              target.setAttribute('aria-selected', 'true');
            }

            this.refreshSelection();
            this.checkSelectAll();
          } else {
            if (this.isValidLI(li)) {
              var limit = this.value && this.value.length ? this.value.length : 0;

              if (li.classList.contains('e-active')) {
                limit = limit - 1;
              }

              if (limit < this.maximumSelectionLength) {
                this.updateListSelection(li, e);
                this.checkPlaceholderSize();
                this.addListFocus(li);

                if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {
                  if (this.mode !== 'CheckBox') {
                    this.focusAtLastListItem(li.getAttribute('data-value'));
                  }

                  this.refreshSelection();
                } else {
                  this.makeTextBoxEmpty();
                }
              }

              if (this.mode === 'CheckBox') {
                this.updateDelimView();
                this.updateDelimeter(this.delimiterChar, e);
                this.refreshInputHight();
              } else {
                this.updateDelimeter(this.delimiterChar, e);
              }

              this.checkSelectAll();
              this.refreshPopup();

              if (this.hideSelectedItem) {
                this.focusAtFirstListItem();
              }

              if (this.closePopupOnSelect) {
                this.hidePopup();
              } else {
                e.preventDefault();
              }

              this.makeTextBoxEmpty();
              this.findGroupStart(target);
            } else {
              e.preventDefault();
            }

            if (this.mode !== 'CheckBox') {
              this.refreshListItems(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) ? null : li.textContent);
            }

            this.refreshPlaceHolder();
            this.deselectHeader();
          }
        }
      }, {
        key: "findGroupStart",
        value: function findGroupStart(target) {
          if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            var count = 0;
            var liChecked = 0;
            var liUnchecked = 0;
            var groupValues;

            if (this.itemTemplate && !target.getElementsByClassName('e-frame').length) {
              while (!target.getElementsByClassName('e-frame').length) {
                target = target.parentElement;
              }
            }

            if (target.classList.contains('e-frame')) {
              target = target.parentElement.parentElement;
            }

            groupValues = this.findGroupAttrtibutes(target, liChecked, liUnchecked, count, 0);
            groupValues = this.findGroupAttrtibutes(target, groupValues[0], groupValues[1], groupValues[2], 1);

            while (!target.classList.contains('e-list-group-item')) {
              if (target.classList.contains('e-list-icon')) {
                target = target.parentElement;
              }

              target = target.previousElementSibling;

              if (target == null) {
                break;
              }
            }

            this.updateCheckBox(target, groupValues[0], groupValues[1], groupValues[2]);
          }
        }
      }, {
        key: "findGroupAttrtibutes",
        value: function findGroupAttrtibutes(listElement, checked, unChecked, count, position) {
          while (!listElement.classList.contains('e-list-group-item')) {
            if (listElement.classList.contains('e-list-icon')) {
              listElement = listElement.parentElement;
            }

            if (listElement.getElementsByClassName('e-frame')[0].classList.contains('e-check') && listElement.classList.contains('e-list-item')) {
              checked++;
            } else if (listElement.classList.contains('e-list-item')) {
              unChecked++;
            }

            count++;
            listElement = position ? listElement.nextElementSibling : listElement.previousElementSibling;

            if (listElement == null) {
              break;
            }
          }

          return [checked, unChecked, count];
        }
      }, {
        key: "updateCheckBox",
        value: function updateCheckBox(groupHeader, checked, unChecked, count) {
          if (groupHeader === null) {
            return;
          }

          var checkBoxElement = groupHeader.getElementsByClassName('e-frame')[0];

          if (count === checked) {
            checkBoxElement.classList.remove('e-stop');
            checkBoxElement.classList.add('e-check');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');
            groupHeader.setAttribute('aria-selected', 'true');
          } else if (count === unChecked) {
            checkBoxElement.classList.remove('e-check');
            checkBoxElement.classList.remove('e-stop');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkBoxElement, '.' + 'e-list-group-item').classList.remove('e-active');
            groupHeader.setAttribute('aria-selected', 'false');
          } else if (this.maximumSelectionLength === checked - 1) {
            checkBoxElement.classList.remove('e-stop');
            groupHeader.setAttribute('aria-selected', 'true');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');
            checkBoxElement.classList.add('e-check');
          } else {
            checkBoxElement.classList.remove('e-check');
            checkBoxElement.classList.add('e-stop');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');
            groupHeader.setAttribute('aria-selected', 'false');
          }
        }
      }, {
        key: "deselectHeader",
        value: function deselectHeader() {
          var limit = this.value && this.value.length ? this.value.length : 0;
          var collection = this.list.querySelectorAll('li.e-list-group-item:not(.e-active)');

          if (limit < this.maximumSelectionLength) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(collection, 'e-disable');
          }

          if (limit === this.maximumSelectionLength) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(collection, 'e-disable');
          }
        }
      }, {
        key: "onMouseOver",
        value: function onMouseOver(e) {
          var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + dropDownBaseClasses.li);

          if (currentLi === null && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy) && this.enableGroupCheckBox) {
            currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + dropDownBaseClasses.group);
          }

          this.addListHover(currentLi);
        }
      }, {
        key: "onMouseLeave",
        value: function onMouseLeave(e) {
          this.removeHover();
        }
      }, {
        key: "onListMouseDown",
        value: function onListMouseDown(e) {
          e.preventDefault();
          this.scrollFocusStatus = true;
        }
      }, {
        key: "onDocumentClick",
        value: function onDocumentClick(e) {
          if (this.mode !== 'CheckBox') {
            var target = e.target;

            if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + this.popupObj.element.id)) && !this.overAllWrapper.contains(e.target)) {
              this.scrollFocusStatus = false;
            } else {
              this.scrollFocusStatus = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge') && document.activeElement === this.inputElement;
            }
          }
        }
      }, {
        key: "wireListEvents",
        value: function wireListEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', this.onDocumentClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mousedown', this.onListMouseDown, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mouseup', this.onMouseClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mouseover', this.onMouseOver, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'mouseout', this.onMouseLeave, this);
        }
      }, {
        key: "unwireListEvents",
        value: function unwireListEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown', this.onDocumentClick);

          if (this.list) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mousedown', this.onListMouseDown);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mouseup', this.onMouseClick);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mouseover', this.onMouseOver);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'mouseout', this.onMouseLeave);
          }
        }
      }, {
        key: "hideOverAllClear",
        value: function hideOverAllClear() {
          if (!this.value || !this.value.length || this.inputElement.value === '') {
            this.overAllClear.style.display = 'none';
          }
        }
      }, {
        key: "showOverAllClear",
        value: function showOverAllClear() {
          if ((this.value && this.value.length || this.inputElement.value !== '') && this.showClearButton && this.readonly !== true) {
            this.overAllClear.style.display = '';
          } else {
            this.overAllClear.style.display = 'none';
          }
        }
        /**
         * Sets the focus to widget for interaction.
         * @returns void
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          if (document.activeElement !== this.inputElement && this.enabled) {
            this.inputElement.focus();
          }
        }
        /**
         * Remove the focus from widget, if the widget is in focus state.
         * @returns void
         */

      }, {
        key: "focusOut",
        value: function focusOut() {
          if (document.activeElement === this.inputElement && this.enabled) {
            this.inputElement.blur();
          }
        }
        /**
         * Shows the spinner loader.
         * @returns void.
         */

      }, {
        key: "showSpinner",
        value: function showSpinner() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            if (this.overAllClear.style.display !== 'none') {
              this.spinnerElement = this.overAllClear;
            } else {
              this.spinnerElement = this.createElement('span', {
                className: CLOSEICON_CLASS$1 + ' ' + SPINNER_CLASS$1
              });
              this.componentWrapper.appendChild(this.spinnerElement);
            }

            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["createSpinner"])({
              target: this.spinnerElement,
              width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? '16px' : '14px'
            }, this.createElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.spinnerElement], DISABLE_ICON);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["showSpinner"])(this.spinnerElement);
          }
        }
        /**
         * Hides the spinner loader.
         * @returns void.
         */

      }, {
        key: "hideSpinner",
        value: function hideSpinner() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinnerElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["hideSpinner"])(this.spinnerElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.spinnerElement], DISABLE_ICON);

            if (this.spinnerElement.classList.contains(SPINNER_CLASS$1)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinnerElement);
            } else {
              this.spinnerElement.innerHTML = '';
            }

            this.spinnerElement = null;
          }
        }
      }, {
        key: "updateWrapperText",
        value: function updateWrapperText(wrapperType, wrapperData) {
          if (this.valueTemplate || !this.enableHtmlSanitizer) {
            wrapperType.innerHTML = wrapperData;
          } else {
            wrapperType.innerText = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(wrapperData);
          }
        }
      }, {
        key: "updateDelimView",
        value: function updateDelimView() {
          if (this.delimiterWrapper) {
            this.hideDelimWrapper();
          }

          if (this.chipCollectionWrapper) {
            this.chipCollectionWrapper.style.display = 'none';
          }

          this.viewWrapper.style.display = '';
          this.viewWrapper.style.width = '';
          this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);

          if (this.value && this.value.length) {
            var data = '';
            var temp;
            var tempData;
            var tempIndex = 1;
            var wrapperleng;
            var remaining;
            var downIconWidth = 0;
            var overAllContainer;
            this.updateWrapperText(this.viewWrapper, data);
            var l10nLocale = {
              noRecordsTemplate: 'No records found',
              actionFailureTemplate: 'Request failed',
              overflowCountTemplate: '+${count} more..',
              totalCountTemplate: '${count} selected'
            };
            var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getLocaleName(), {}, this.locale);

            if (l10n.getConstant('actionFailureTemplate') === '') {
              l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('dropdowns', l10nLocale, this.locale);
            }

            var remainContent = l10n.getConstant('overflowCountTemplate');
            var raminElement = this.createElement('span', {
              className: REMAIN_WRAPPER$1
            });
            var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(remainContent);
            var totalCompiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(l10n.getConstant('totalCountTemplate'));
            raminElement.appendChild(compiledString({
              'count': this.value.length
            }, this, 'overflowCountTemplate', null, !this.isStringTemplate)[0]);
            this.viewWrapper.appendChild(raminElement);
            var remainSize = raminElement.offsetWidth;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(raminElement);

            if (this.showDropDownIcon) {
              downIconWidth = this.dropIcon.offsetWidth + parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
              for (var index = 0; !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value[index]); index++) {
                data += index === 0 ? '' : this.delimiterChar + ' ';
                temp = this.getOverflowVal(index);
                data += temp;
                temp = this.viewWrapper.innerHTML;
                this.updateWrapperText(this.viewWrapper, data);
                wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
                overAllContainer = this.componentWrapper.offsetWidth - parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);

                if (wrapperleng + downIconWidth > overAllContainer) {
                  if (tempData !== undefined && tempData !== '') {
                    temp = tempData;
                    index = tempIndex + 1;
                  }

                  this.updateWrapperText(this.viewWrapper, temp);
                  remaining = this.value.length - index;
                  wrapperleng = this.viewWrapper.offsetWidth;

                  while (wrapperleng + remainSize + downIconWidth > overAllContainer && wrapperleng !== 0 && this.viewWrapper.innerHTML !== '') {
                    var textArr = this.viewWrapper.innerHTML.split(this.delimiterChar);
                    textArr.pop();
                    this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);

                    if (this.viewWrapper.innerHTML === '') {
                      remaining++;
                    }

                    wrapperleng = this.viewWrapper.offsetWidth;
                  }

                  break;
                } else if (wrapperleng + remainSize + downIconWidth <= overAllContainer) {
                  tempData = data;
                  tempIndex = index;
                } else if (index === 0) {
                  tempData = '';
                  tempIndex = -1;
                }
              }
            }

            if (remaining > 0) {
              var totalWidth = overAllContainer - downIconWidth;
              this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, compiledString, totalCompiledString, totalWidth));
              this.updateRemainWidth(this.viewWrapper, totalWidth);
              this.updateRemainingText(raminElement, downIconWidth, remaining, compiledString, totalCompiledString);
            }
          } else {
            this.viewWrapper.innerHTML = '';
            this.viewWrapper.style.display = 'none';
          }
        }
      }, {
        key: "updateRemainWidth",
        value: function updateRemainWidth(viewWrapper, totalWidth) {
          if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER$1) && totalWidth < viewWrapper.offsetWidth + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10) + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)) {
            viewWrapper.style.width = totalWidth + 'px';
          }
        }
      }, {
        key: "updateRemainTemplate",
        value: function updateRemainTemplate(raminElement, viewWrapper, remaining, compiledString, totalCompiledString, totalWidth) {
          if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === '') {
            viewWrapper.removeChild(viewWrapper.firstChild);
          }

          raminElement.innerHTML = '';
          raminElement.appendChild(viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 ? compiledString({
            'count': remaining
          }, this, 'overflowCountTemplate', null, !this.isStringTemplate)[0] : totalCompiledString({
            'count': remaining
          }, this, 'totalCountTemplate', null, !this.isStringTemplate)[0]);

          if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
            viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
          } else {
            viewWrapper.classList.add(TOTAL_COUNT_WRAPPER$1);
            this.updateRemainWidth(viewWrapper, totalWidth);
          }

          return raminElement;
        }
      }, {
        key: "updateRemainingText",
        value: function updateRemainingText(raminElement, downIconWidth, remaining, compiledString, totalCompiledString) {
          var overAllContainer = this.componentWrapper.offsetWidth - parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
          var wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);

          if (wrapperleng + downIconWidth >= overAllContainer && wrapperleng !== 0 && this.viewWrapper.firstChild && this.viewWrapper.firstChild.nodeType === 3) {
            while (wrapperleng + downIconWidth > overAllContainer && wrapperleng !== 0 && this.viewWrapper.firstChild && this.viewWrapper.firstChild.nodeType === 3) {
              var textArr = this.viewWrapper.firstChild.nodeValue.split(this.delimiterChar);
              textArr.pop();
              this.viewWrapper.firstChild.nodeValue = textArr.join(this.delimiterChar);

              if (this.viewWrapper.firstChild.nodeValue === '') {
                this.viewWrapper.removeChild(this.viewWrapper.firstChild);
              }

              remaining++;
              wrapperleng = this.viewWrapper.offsetWidth;
            }

            var totalWidth = overAllContainer - downIconWidth;
            this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, compiledString, totalCompiledString, totalWidth);
          }
        }
      }, {
        key: "getOverflowVal",
        value: function getOverflowVal(index) {
          var temp;

          if (this.mainData && this.mainData.length) {
            if (this.mode === 'CheckBox') {
              var newTemp = this.listData;
              this.listData = this.mainData;
              temp = this.getTextByValue(this.value[index]);
              this.listData = newTemp;
            } else {
              temp = this.getTextByValue(this.value[index]);
            }
          } else {
            temp = this.value[index];
          }

          return temp;
        }
      }, {
        key: "unWireEvent",
        value: function unWireEvent() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.componentWrapper, 'mousedown', this.wrapperClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(window, 'resize', this.windowResize);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'focus', this.focusInHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keydown', this.onKeyDown);

          if (this.mode !== 'CheckBox') {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'input', this.onInput);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'keyup', this.KeyUp);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.inputElement, 'form');

          if (formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(formElement, 'reset', this.resetValueHandler);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'blur', this.onBlur);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.componentWrapper, 'mousemove', this.mouseIn);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.componentWrapper, 'mouseout', this.mouseOut);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.overAllClear, 'mousedown', this.ClearAll);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.inputElement, 'paste', this.pasteHandler);
        }
      }, {
        key: "selectAllItem",
        value: function selectAllItem(state, event, list) {
          var li;
          li = this.list.querySelectorAll(state ? 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' : 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');

          if (this.value && this.value.length && this.isPopupOpen() && event && event.target && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(event.target, '.e-close-hooker') && this.allowFiltering) {
            li = this.mainList.querySelectorAll(state ? 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' : 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
          }

          if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.groupBy)) {
            var target = event ? event.target : null;
            target = event && event.keyCode === 32 ? list : target;
            target = target && target.classList.contains('e-frame') ? target.parentElement.parentElement : target;

            if (target && target.classList.contains('e-list-group-item')) {
              var listElement = target.nextElementSibling;

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(listElement)) {
                return;
              }

              while (listElement.classList.contains('e-list-item')) {
                if (state) {
                  if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
                    var selectionLimit = this.value && this.value.length ? this.value.length : 0;

                    if (listElement.classList.contains('e-active')) {
                      selectionLimit -= 1;
                    }

                    if (selectionLimit < this.maximumSelectionLength) {
                      this.updateListSelection(listElement, event);
                    }
                  }
                } else {
                  if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
                    this.updateListSelection(listElement, event);
                  }
                }

                listElement = listElement.nextElementSibling;

                if (listElement == null) {
                  break;
                }
              }

              if (target.classList.contains('e-list-group-item')) {
                var focusedElement = this.list.getElementsByClassName('e-item-focus')[0];

                if (focusedElement) {
                  focusedElement.classList.remove('e-item-focus');
                }

                state ? target.classList.add('e-active') : target.classList.remove('e-active');
                target.classList.add('e-item-focus');
              }

              this.textboxValueUpdate();
              this.checkPlaceholderSize();

              if (!this.changeOnBlur && event) {
                this.updateValueState(event, this.value, this.tempValues);
              }
            } else {
              this.updateValue(event, li, state);
            }
          } else {
            this.updateValue(event, li, state);
          }
        }
      }, {
        key: "updateValue",
        value: function updateValue(event, li, state) {
          var _this489 = this;

          var length = li.length;

          if (li && li.length) {
            var index = 0;
            var count = 0;

            if (this.enableGroupCheckBox) {
              count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
            } else {
              count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
            }

            while (index < length && index <= 50 && index < count) {
              this.updateListSelection(li[index], event, length - index);
              this.findGroupStart(li[index]);
              index++;
            }

            if (length > 50) {
              setTimeout(function () {
                while (index < length && index < count) {
                  _this489.updateListSelection(li[index], event, length - index);

                  _this489.findGroupStart(li[index]);

                  index++;
                }

                if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this489.isServerRendered)) {
                  _this489.updatedataValueItems(event);
                }
              }, 0);
            }
          }

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.updatedataValueItems(event);
            this.checkPlaceholderSize();
          }
        }
      }, {
        key: "updatedataValueItems",
        value: function updatedataValueItems(event) {
          this.deselectHeader();
          this.textboxValueUpdate(event);
        }
      }, {
        key: "textboxValueUpdate",
        value: function textboxValueUpdate(event) {
          if (this.mode !== 'Box' && !this.isPopupOpen()) {
            this.updateDelimView();
          } else {
            this.searchWrapper.classList.remove(ZERO_SIZE);
          }

          if (this.mode === 'CheckBox') {
            this.updateDelimView();
            this.updateDelimeter(this.delimiterChar, event);
            this.refreshInputHight();
          } else {
            this.updateDelimeter(this.delimiterChar, event);
          }

          this.refreshPlaceHolder();
        }
      }, {
        key: "setZIndex",
        value: function setZIndex() {
          if (this.popupObj) {
            this.popupObj.setProperties({
              'zIndex': this.zIndex
            });
          }
        }
      }, {
        key: "updateDataSource",
        value: function updateDataSource(prop) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            this.renderPopup();
          } else {
            this.resetList(this.dataSource);
          }

          if (this.value && this.value.length && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.setProperties({
              'value': this.value
            });
            this.refreshSelection();
          }
        }
      }, {
        key: "onLoadSelect",
        value: function onLoadSelect() {
          this.setDynValue = true;
          this.renderPopup();
        }
      }, {
        key: "selectAllItems",
        value: function selectAllItems(state, event) {
          var _this490 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.list)) {
            this.selectAllAction = function () {
              if (_this490.mode === 'CheckBox' && _this490.showSelectAll) {
                var args = {
                  module: 'CheckBoxSelection',
                  enable: _this490.mode === 'CheckBox',
                  value: state ? 'check' : 'uncheck'
                };

                _this490.notify('checkSelectAll', args);
              }

              _this490.selectAllItem(state, event);

              _this490.selectAllAction = null;
            };

            _get(_getPrototypeOf(MultiSelect.prototype), "render", this).call(this);
          } else {
            this.selectAllAction = null;

            if (this.mode === 'CheckBox' && this.showSelectAll) {
              var args = {
                value: state ? 'check' : 'uncheck',
                enable: this.mode === 'CheckBox',
                module: 'CheckBoxSelection'
              };
              this.notify('checkSelectAll', args);
            }

            this.selectAllItem(state, event);
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['value']);
        }
      }, {
        key: "onPropertyChanged",

        /**
         * Dynamically change the value of properties.
         * @private
         */
        value: function onPropertyChanged(newProp, oldProp) {
          if (newProp.dataSource && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object.keys(newProp.dataSource)) || newProp.query && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object.keys(newProp.query))) {
            this.mainList = null;
            this.mainData = null;
            this.isFirstClick = false;
            this.isDynamicDataChange = true;
          }

          if (this.getModuleName() === 'multiselect') {
            this.filterAction = false;
            this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
          }

          for (var _i81 = 0, _Object$keys22 = Object.keys(newProp); _i81 < _Object$keys22.length; _i81++) {
            var prop = _Object$keys22[_i81];

            switch (prop) {
              case 'query':
              case 'dataSource':
                if (this.mode === 'CheckBox' && this.showSelectAll) {
                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popupObj)) {
                    this.popupObj.destroy();
                    this.popupObj = null;
                  }

                  this.renderPopup();
                }

                break;

              case 'htmlAttributes':
                this.updateHTMLAttribute();
                break;

              case 'showClearButton':
                this.updateClearButton(newProp.showClearButton);
                break;

              case 'text':
                this.updateVal(this.value, this.value, 'text');
                break;

              case 'value':
                this.updateVal(this.value, oldProp.value, 'value');
                this.addValidInputClass();
                break;

              case 'width':
                this.setWidth(newProp.width);
                this.popupObj.setProperties({
                  width: this.calcPopupWidth()
                });
                break;

              case 'placeholder':
                this.refreshPlaceHolder();
                break;

              case 'filterBarPlaceholder':
                if (this.allowFiltering) {
                  this.notify('filterBarPlaceholder', {
                    filterBarPlaceholder: newProp.filterBarPlaceholder
                  });
                }

                break;

              case 'delimiterChar':
                if (this.mode !== 'Box') {
                  this.updateDelimView();
                }

                this.updateData(newProp.delimiterChar);
                break;

              case 'cssClass':
                this.updateOldPropCssClass(oldProp.cssClass);
                this.updateCssClass();
                break;

              case 'enableRtl':
                this.enableRTL(newProp.enableRtl);

                _get(_getPrototypeOf(MultiSelect.prototype), "onPropertyChanged", this).call(this, newProp, oldProp);

                break;

              case 'readonly':
                this.updateReadonly(newProp.readonly);
                this.hidePopup();
                break;

              case 'enabled':
                this.hidePopup();
                this.enable(newProp.enabled);
                break;

              case 'showSelectAll':
                if (this.popupObj) {
                  this.popupObj.destroy();
                  this.popupObj = null;
                }

                this.renderPopup();
                break;

              case 'showDropDownIcon':
                this.dropDownIcon();
                break;

              case 'floatLabelType':
                this.setFloatLabelType();
                this.addValidInputClass();
                break;

              case 'enableSelectionOrder':
                break;

              case 'selectAllText':
                this.notify('selectAllText', false);
                break;

              case 'popupHeight':
              case 'headerTemplate':
              case 'footerTemplate':
                this.reInitializePoup();
                break;

              case 'allowFiltering':
                if (this.mode === 'CheckBox' && this.popupObj) {
                  this.reInitializePoup();
                }

                this.updateSelectElementData(this.allowFiltering);
                break;

              default:
                var msProps = void 0;
                msProps = this.getPropObject(prop, newProp, oldProp);

                _get(_getPrototypeOf(MultiSelect.prototype), "onPropertyChanged", this).call(this, msProps.newProperty, msProps.oldProperty);

                break;
            }
          }
        }
      }, {
        key: "reInitializePoup",
        value: function reInitializePoup() {
          if (this.popupObj) {
            this.popupObj.destroy();
            this.popupObj = null;
          }

          this.renderPopup();
        }
      }, {
        key: "updateVal",
        value: function updateVal(newProp, oldProp, prop) {
          if (!this.list) {
            this.onLoadSelect();
          } else if (!this.inputFocus) {
            if (prop === 'text') {
              this.initialTextUpdate();
              newProp = this.value;
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0) {
              this.tempValues = oldProp;
            }

            this.initialValueUpdate();

            if (this.mode !== 'Box') {
              this.updateDelimView();
            }

            this.refreshInputHight();
            this.refreshPlaceHolder();

            if (this.mode !== 'CheckBox' && this.changeOnBlur) {
              this.updateValueState(null, newProp, oldProp);
            }

            this.checkPlaceholderSize();
          }

          if (!this.changeOnBlur) {
            this.updateValueState(null, newProp, oldProp);
          }
        }
        /**
         * Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
         * but you can insert based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
         * @return {void}.
         */

      }, {
        key: "addItem",
        value: function addItem(items, itemIndex) {
          _get(_getPrototypeOf(MultiSelect.prototype), "addItem", this).call(this, items, itemIndex);
        }
        /**
         * Hides the popup, if the popup in a open state.
         * @returns void
         */

      }, {
        key: "hidePopup",
        value: function hidePopup() {
          var _this491 = this;

          var delay = 100;

          if (this.isPopupOpen()) {
            var animModel = {
              name: 'FadeOut',
              duration: 100,
              delay: delay ? delay : 0
            };
            var eventArgs = {
              popup: this.popupObj,
              cancel: false,
              animation: animModel
            };
            this.trigger('close', eventArgs, function (eventArgs) {
              if (!eventArgs.cancel) {
                _this491.beforePopupOpen = false;

                _this491.overAllWrapper.classList.remove(iconAnimation);

                _this491.popupObj.hide(new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](eventArgs.animation));

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(_this491.inputElement, {
                  'aria-expanded': 'false'
                });

                if (_this491.allowFiltering) {
                  _this491.notify('inputFocus', {
                    module: 'CheckBoxSelection',
                    enable: _this491.mode === 'CheckBox',
                    value: 'clear'
                  });
                }

                _this491.popupObj.hide();

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body, _this491.popupObj.element], 'e-popup-full-page');

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(_this491.list, 'keydown', _this491.onKeyDown);
              }
            });
          }
        }
        /**
         * Shows the popup, if the popup in a closed state.
         * @returns void
         */

      }, {
        key: "showPopup",
        value: function showPopup() {
          if (!this.enabled) {
            return;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.itemTemplate) {
            this.DropDownBaseupdateBlazorTemplates(true, false, false, false, false, false, false, false);

            if (this.mode !== 'CheckBox' && this.list) {
              this.refreshSelection();
            }
          }

          if (!this.ulElement) {
            this.beforePopupOpen = true;

            _get(_getPrototypeOf(MultiSelect.prototype), "render", this).call(this);

            if (this.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowFiltering) {
              this.notify('popupFullScreen', {
                module: 'CheckBoxSelection',
                enable: this.mode === 'CheckBox'
              });
            }

            return;
          }

          if (this.mode === 'CheckBox' && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.allowFiltering) {
            this.notify('popupFullScreen', {
              module: 'CheckBoxSelection',
              enable: this.mode === 'CheckBox'
            });
          }

          var mainLiLength = this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
          var liLength = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li + '.' + HIDE_LIST).length;

          if (mainLiLength > 0 && mainLiLength === liLength && liLength === this.mainData.length) {
            this.beforePopupOpen = false;
            return;
          }

          this.onPopupShown();
        }
        /**
         * Based on the state parameter, entire list item will be selected/deselected.
         * parameter
         * `true`   - Selects entire list items.
         * `false`  - Un Selects entire list items.
         * @returns void
         */

      }, {
        key: "selectAll",
        value: function selectAll(state) {
          this.isSelectAll = true;
          this.selectAllItems(state);
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'multiselect';
        }
      }, {
        key: "clear",

        /**
         * Allows you to clear the selected values from the Multiselect component.
         * @returns void
         */
        value: function clear() {
          this.selectAll(false);
          this.setProperties({
            value: null
          }, true);
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.setDynValue = this.initStatus = false;
          this.isSelectAll = false;
          this.searchWrapper = this.createElement('span', {
            className: SEARCHBOX_WRAPPER + ' ' + (this.mode === 'Box' ? BOX_ELEMENT : '')
          });
          this.viewWrapper = this.createElement('span', {
            className: DELIMITER_VIEW + ' ' + DELIMITER_WRAPPER,
            styles: 'display:none;'
          });
          this.overAllClear = this.createElement('span', {
            className: CLOSEICON_CLASS$1,
            styles: 'display:none;'
          });
          this.componentWrapper = this.createElement('div', {
            className: ELEMENT_WRAPPER
          });
          this.overAllWrapper = this.createElement('div', {
            className: OVER_ALL_WRAPPER
          });

          if (this.mode === 'CheckBox') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllWrapper], 'e-checkbox');
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.componentWrapper.classList.add(ELEMENT_MOBILE_WRAPPER);
          }

          this.setWidth(this.width);
          this.overAllWrapper.appendChild(this.componentWrapper);
          this.popupWrapper = this.createElement('div', {
            id: this.element.id + '_popup',
            className: POPUP_WRAPPER
          });

          if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
            this.delimiterWrapper = this.createElement('span', {
              className: DELIMITER_WRAPPER,
              styles: 'display:none'
            });
            this.componentWrapper.appendChild(this.delimiterWrapper);
          } else {
            this.chipCollectionWrapper = this.createElement('span', {
              className: CHIP_WRAPPER$1,
              styles: 'display:none'
            });

            if (this.mode === 'Default') {
              this.chipCollectionWrapper.setAttribute('id', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('chip_default'));
            } else if (this.mode === 'Box') {
              this.chipCollectionWrapper.setAttribute('id', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('chip_box'));
            }

            this.componentWrapper.appendChild(this.chipCollectionWrapper);
          }

          if (this.mode !== 'Box') {
            this.componentWrapper.appendChild(this.viewWrapper);
          }

          this.componentWrapper.appendChild(this.searchWrapper);

          if (this.showClearButton && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.componentWrapper.appendChild(this.overAllClear);
          } else {
            this.componentWrapper.classList.add(CLOSE_ICON_HIDE);
          }

          this.dropDownIcon();
          this.inputElement = this.createElement('input', {
            className: INPUT_ELEMENT,
            attrs: {
              spellcheck: 'false',
              type: 'text',
              autocomplete: 'off',
              tabindex: '0'
            }
          });

          if (this.mode === 'Default' || this.mode === 'Box') {
            this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
          }

          if (this.element.tagName !== this.getNgDirective()) {
            this.element.style.display = 'none';
          }

          if (this.element.tagName === this.getNgDirective()) {
            this.element.appendChild(this.overAllWrapper);
            this.searchWrapper.appendChild(this.inputElement);
          } else {
            this.element.parentElement.insertBefore(this.overAllWrapper, this.element);
            this.searchWrapper.appendChild(this.inputElement);
            this.searchWrapper.appendChild(this.element);
            this.element.removeAttribute('tabindex');
          }

          if (this.floatLabelType !== 'Never') {
            createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
          } else if (this.floatLabelType === 'Never') {
            this.refreshPlaceHolder();
          }

          this.addValidInputClass();
          this.element.style.opacity = '';
          var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2_dropdownlist');
          this.element.id = id;
          this.hiddenElement = this.createElement('select', {
            attrs: {
              'aria-hidden': 'true',
              'class': HIDDEN_ELEMENT,
              'tabindex': '-1',
              'multiple': ''
            }
          });
          this.componentWrapper.appendChild(this.hiddenElement);
          this.validationAttribute(this.element, this.hiddenElement);

          if (this.mode !== 'CheckBox') {
            this.hideOverAllClear();
          }

          this.wireEvent();
          this.enable(this.enabled);
          this.enableRTL(this.enableRtl);
          this.checkInitialValue();
          this.renderComplete();
        }
      }, {
        key: "checkInitialValue",
        value: function checkInitialValue() {
          var _this492 = this;

          var isData = this.dataSource instanceof Array ? this.dataSource.length > 0 : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dataSource);

          if (!(this.value && this.value.length) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) && !isData && this.element.tagName === 'SELECT' && this.element.options.length > 0) {
            var optionsElement = this.element.options;
            var valueCol = [];
            var textCol = '';

            for (var index = 0, optionsLen = optionsElement.length; index < optionsLen; index++) {
              var opt = optionsElement[index];

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(opt.getAttribute('selected'))) {
                opt.getAttribute('value') ? valueCol.push(opt.getAttribute('value')) : textCol += opt.text + this.delimiterChar;
              }
            }

            if (valueCol.length > 0) {
              this.setProperties({
                value: valueCol
              }, true);
            } else if (textCol !== '') {
              this.setProperties({
                text: textCol
              }, true);
            }

            if (valueCol.length > 0 || textCol !== '') {
              this.refreshInputHight();
              this.refreshPlaceHolder();
            }
          }

          if (this.value && this.value.length || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text)) {
            this.renderPopup();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) || this.value.length === 0)) {
            this.initialTextUpdate();
          }

          if (this.value && this.value.length) {
            if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"])) {
              this.initialValueUpdate();
              this.initialUpdate();
            } else {
              this.setInitialValue = function () {
                _this492.initStatus = false;

                _this492.initialValueUpdate();

                _this492.initialUpdate();

                _this492.setInitialValue = null;
                _this492.initStatus = true;
              };
            }

            this.updateTempValue();
          } else {
            this.initialUpdate();
          }

          this.initStatus = true;
          this.checkAutoFocus();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.text)) {
            this.element.setAttribute('data-initial-value', this.text);
          }
        }
      }, {
        key: "checkAutoFocus",
        value: function checkAutoFocus() {
          if (this.element.hasAttribute('autofocus')) {
            this.inputElement.focus();
          }
        }
      }, {
        key: "setFloatLabelType",
        value: function setFloatLabelType() {
          removeFloating(this.overAllWrapper, this.componentWrapper, this.searchWrapper, this.inputElement, this.value, this.floatLabelType, this.placeholder);

          if (this.floatLabelType !== 'Never') {
            createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);
          }
        }
      }, {
        key: "addValidInputClass",
        value: function addValidInputClass() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) && this.value.length || this.floatLabelType === 'Always') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.overAllWrapper], 'e-valid-input');
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.overAllWrapper], 'e-valid-input');
          }
        }
      }, {
        key: "dropDownIcon",
        value: function dropDownIcon() {
          if (this.showDropDownIcon) {
            this.dropIcon = this.createElement('span', {
              className: dropdownIcon
            });
            this.componentWrapper.appendChild(this.dropIcon);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.componentWrapper], ['e-down-icon']);
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dropIcon)) {
              this.dropIcon.parentElement.removeChild(this.dropIcon);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.componentWrapper], ['e-down-icon']);
            }
          }
        }
      }, {
        key: "initialUpdate",
        value: function initialUpdate() {
          if (this.mode !== 'Box') {
            this.updateDelimView();
          }

          this.updateCssClass();
          this.updateHTMLAttribute();
          this.updateReadonly(this.readonly);
          this.refreshInputHight();
          this.checkPlaceholderSize();
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (this.popupObj) {
            this.popupObj.hide();
          }

          this.notify(_destroy2, {});
          this.unwireListEvents();
          this.unWireEvent();
          this.list = null;
          this.popupObj = null;
          this.mainList = null;
          this.mainData = null;
          this.filterParent = null;
          this.ulElement = null;

          _get(_getPrototypeOf(MultiSelect.prototype), "destroy", this).call(this);

          var temp = ['readonly', 'aria-disabled', 'aria-placeholder', 'placeholder'];
          var length = temp.length;

          while (length > 0) {
            this.inputElement.removeAttribute(temp[length - 1]);
            length--;
          }

          this.element.removeAttribute('data-initial-value');
          this.element.style.display = 'block';

          if (this.overAllWrapper.parentElement) {
            if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.overAllWrapper);
            } else {
              this.overAllWrapper.parentElement.insertBefore(this.element, this.overAllWrapper);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.overAllWrapper);
            }
          }
        }
      }]);

      return MultiSelect;
    }(DropDownBase);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      text: null,
      value: null,
      iconCss: null,
      groupBy: null
    }, FieldSettings)], MultiSelect.prototype, "fields", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "enablePersistence", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "groupTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('No records found')], MultiSelect.prototype, "noRecordsTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Request failed')], MultiSelect.prototype, "actionFailureTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], MultiSelect.prototype, "sortOrder", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "enabled", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "enableHtmlSanitizer", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], MultiSelect.prototype, "dataSource", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "query", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('StartsWith')], MultiSelect.prototype, "filterType", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], MultiSelect.prototype, "zIndex", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "ignoreAccent", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], MultiSelect.prototype, "locale", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "enableGroupCheckBox", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "cssClass", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], MultiSelect.prototype, "width", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('300px')], MultiSelect.prototype, "popupHeight", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], MultiSelect.prototype, "popupWidth", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "placeholder", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "filterBarPlaceholder", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], MultiSelect.prototype, "htmlAttributes", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "valueTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "headerTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "footerTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "itemTemplate", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "allowFiltering", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "changeOnBlur", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "allowCustomValue", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "showClearButton", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], MultiSelect.prototype, "maximumSelectionLength", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "readonly", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "text", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MultiSelect.prototype, "value", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "hideSelectedItem", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "closePopupOnSelect", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')], MultiSelect.prototype, "mode", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(',')], MultiSelect.prototype, "delimiterChar", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "ignoreCase", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "showDropDownIcon", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], MultiSelect.prototype, "floatLabelType", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MultiSelect.prototype, "showSelectAll", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Select All')], MultiSelect.prototype, "selectAllText", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Unselect All')], MultiSelect.prototype, "unSelectAllText", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "enableSelectionOrder", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MultiSelect.prototype, "openOnClick", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "change", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "removing", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "removed", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "selectedAll", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "beforeOpen", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "open", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "close", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "blur", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "focus", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "chipSelection", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "filtering", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "tagging", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MultiSelect.prototype, "customValueSelection", void 0);

    MultiSelect = __decorate$5([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], MultiSelect);
    var ICON = 'e-icons';
    var CHECKBOXFRAME$1 = 'e-frame';
    var CHECK$1 = 'e-check';
    var CHECKBOXWRAP$1 = 'e-checkbox-wrapper';
    var INDETERMINATE = 'e-stop';
    var checkAllParent = 'e-selectall-parent';
    var searchBackIcon = 'e-input-group-icon e-back-icon e-icons';
    var filterBarClearIcon = 'e-input-group-icon e-clear-icon e-icons';
    var filterInput = 'e-input-filter';
    var filterParent = 'e-filter-parent';
    var mobileFilter = 'e-ddl-device-filter';
    var clearIcon = 'e-clear-icon';
    var popupFullScreen = 'e-popup-full-page';
    var device = 'e-ddl-device';
    var FOCUS$1 = 'e-input-focus';
    /**
     * The Multiselect enable CheckBoxSelection call this inject module.
     */

    var CheckBoxSelection = /*#__PURE__*/function () {
      function CheckBoxSelection(parent) {
        _classCallCheck(this, CheckBoxSelection);

        this.activeLi = [];
        this.activeEle = [];
        this.parent = parent;
        this.removeEventListener();
        this.addEventListener();
      }

      _createClass2(CheckBoxSelection, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'CheckBoxSelection';
        }
      }, {
        key: "addEventListener",
        value: function addEventListener() {
          if (this.parent.isDestroyed) {
            return;
          }

          this.parent.on('updatelist', this.listSelection, this);
          this.parent.on('listoption', this.listOption, this);
          this.parent.on('selectAll', this.setSelectAll, this);
          this.parent.on('checkSelectAll', this.checkSelectAll, this);
          this.parent.on('searchBox', this.setSearchBox, this);
          this.parent.on('blur', this.onBlur, this);
          this.parent.on('targetElement', this.targetElement, this);
          this.parent.on('deviceSearchBox', this.setDeviceSearchBox, this);
          this.parent.on('inputFocus', this.getFocus, this);
          this.parent.on('reOrder', this.setReorder, this);
          this.parent.on('activeList', this.getActiveList, this);
          this.parent.on('selectAllText', this.setLocale, this);
          this.parent.on('filterBarPlaceholder', this.setPlaceholder, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', this.onDocumentClick, this);

          this.parent.on('addItem', this.checboxCreate, this);
          this.parent.on('popupFullScreen', this.setPopupFullScreen, this);
        }
      }, {
        key: "removeEventListener",
        value: function removeEventListener() {
          if (this.parent.isDestroyed) {
            return;
          }

          this.parent.off('updatelist', this.listSelection);
          this.parent.off('listoption', this.listOption);
          this.parent.off('selectAll', this.setSelectAll);
          this.parent.off('checkSelectAll', this.checkSelectAll);
          this.parent.off('searchBox', this.setSearchBox);
          this.parent.off('blur', this.onBlur);
          this.parent.off('targetElement', this.targetElement);
          this.parent.off('deviceSearchBox', this.setDeviceSearchBox);
          this.parent.off('inputFocus', this.getFocus);
          this.parent.off('reOrder', this.setReorder);
          this.parent.off('activeList', this.getActiveList);
          this.parent.off('selectAllText', this.setLocale);
          this.parent.off('filterBarPlaceholder', this.setPlaceholder);
          this.parent.off('addItem', this.checboxCreate);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown', this.onDocumentClick);

          this.parent.off('popupFullScreen', this.setPopupFullScreen);
        }
      }, {
        key: "listOption",
        value: function listOption(args) {
          var _this493 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.listCurrentOptions.itemCreated)) {
            this.parent.listCurrentOptions.itemCreated = function (e) {
              _this493.checboxCreate(e);
            };
          } else {
            var itemCreated = this.parent.listCurrentOptions.itemCreated;

            this.parent.listCurrentOptions.itemCreated = function (e) {
              _this493.checboxCreate(e);

              itemCreated.apply(_this493, [e]);
            };
          }
        }
      }, {
        key: "setPlaceholder",
        value: function setPlaceholder(props) {
          _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(props.filterBarPlaceholder, this.filterInput);
        }
      }, {
        key: "checboxCreate",
        value: function checboxCreate(e) {
          var item;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.item)) {
            item = e.item;
          } else {
            item = e;
          }

          if (this.parent.enableGroupCheckBox || item.className !== 'e-list-group-item ' && item.className !== 'e-list-group-item') {
            var checkboxEle = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["createCheckBox"])(this.parent.createElement, true);
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, item);
            var id = item.getAttribute('data-uid');
            item.insertBefore(checkboxEle, item.childNodes[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon) ? 0 : 1]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME$1, checkboxEle);
            var frame = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME$1, checkboxEle);

            if (this.parent.enableGroupCheckBox) {
              this.parent.popupWrapper.classList.add('e-multiselect-group');
            }

            return item;
          } else {
            return item;
          }
        }
      }, {
        key: "setSelectAll",
        value: function setSelectAll() {
          if (this.parent.showSelectAll) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkAllParent)) {
              this.checkAllParent = this.parent.createElement('div', {
                className: checkAllParent
              });
              this.selectAllSpan = this.parent.createElement('span', {
                className: 'e-all-text'
              });
              this.selectAllSpan.textContent = '';
              this.checkAllParent.appendChild(this.selectAllSpan);
              this.setLocale();
              this.checboxCreate(this.checkAllParent);

              if (this.parent.headerTemplate) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.filterParent)) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.checkAllParent], this.parent.filterParent);
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.checkAllParent], this.parent.popupWrapper);
                }
              }

              if (!this.parent.headerTemplate) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.filterParent)) {
                  this.parent.filterParent.parentNode.insertBefore(this.checkAllParent, this.parent.filterParent.nextSibling);
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.checkAllParent], this.parent.popupWrapper);
                }
              }

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.checkAllParent, 'mousedown', this.clickHandler, this);
            }

            if (this.parent.list.classList.contains('e-nodata') || this.parent.listData && this.parent.listData.length <= 1) {
              this.checkAllParent.style.display = 'none';
            } else {
              this.checkAllParent.style.display = 'block';
            }

            this.parent.selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkAllParent)) {
            this.checkAllParent.parentElement.removeChild(this.checkAllParent);
            this.checkAllParent = null;
          }
        }
      }, {
        key: "destroy",
        value: function destroy() {
          this.removeEventListener();
        }
      }, {
        key: "listSelection",
        value: function listSelection(args) {
          var target;
          var isBlazorListbox = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && args.module && args.module === 'listbox';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.e)) {
            var frameElm = args.li.querySelector('.e-checkbox-wrapper .e-frame');
            target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.e.target) ? args.e.target.classList.contains('e-frame') && (!this.parent.showSelectAll || this.checkAllParent && !this.checkAllParent.contains(args.e.target)) ? args.e.target : isBlazorListbox ? frameElm : args.li.querySelector('.e-checkbox-wrapper').childNodes[1] : isBlazorListbox ? frameElm : args.li.querySelector('.e-checkbox-wrapper').childNodes[1];
          } else {
            var checkboxWrapper = args.li.querySelector('.e-checkbox-wrapper');
            target = checkboxWrapper ? isBlazorListbox ? checkboxWrapper.querySelector('.e-frame') : checkboxWrapper.childNodes[1] : args.li.lastElementChild.childNodes[1];
          }

          if (this.parent.itemTemplate || this.parent.enableGroupCheckBox) {
            target = args.li.firstElementChild.childNodes[1];
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target)) {
            this.checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + CHECKBOXWRAP$1);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkWrapper)) {
            var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME$1, this.checkWrapper);
            var selectAll$$1 = false;
            this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll$$1);
          }
        }
      }, {
        key: "validateCheckNode",
        value: function validateCheckNode(checkWrap, isCheck, li, e, selectAll$$1) {
          this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll$$1);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var target;

          if (e.currentTarget.classList.contains(this.checkAllParent.className)) {
            target = e.currentTarget.firstElementChild.lastElementChild;
          } else {
            target = e.currentTarget;
          }

          this.checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + CHECKBOXWRAP$1);
          var selectAll$$1 = true;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkWrapper)) {
            var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME$1, this.checkWrapper);
            this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll$$1);
          }

          e.preventDefault();
        }
      }, {
        key: "changeState",
        value: function changeState(wrapper, state, e, isPrevent, selectAll$$1) {
          var ariaState;
          var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];

          if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
            frameSpan.classList.remove(INDETERMINATE);
            frameSpan.classList.add(CHECK$1);
            ariaState = 'true';

            if (selectAll$$1) {
              this.parent.selectAllItems(true, e);
              this.setLocale(true);
            }
          } else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([frameSpan], [CHECK$1, INDETERMINATE]);
            ariaState = 'false';

            if (selectAll$$1) {
              this.parent.selectAllItems(false, e);
              this.setLocale();
            }
          } else if (state === 'indeterminate' && !frameSpan.classList.contains(INDETERMINATE)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([frameSpan], [CHECK$1]);
            frameSpan.classList.add(INDETERMINATE);
            ariaState = 'false';

            if (selectAll$$1) {
              this.parent.selectAllItems(false, e);
              this.setLocale();
            }
          }

          ariaState = state === 'check' ? 'true' : state === 'uncheck' ? 'false' : ariaState;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
            wrapper.setAttribute('aria-checked', ariaState);
          }
        }
      }, {
        key: "setSearchBox",
        value: function setSearchBox(args) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.filterParent)) {
            this.parent.filterParent = this.parent.createElement('span', {
              className: filterParent
            });
            this.filterInput = this.parent.createElement('input', {
              attrs: {
                type: 'text'
              },
              className: filterInput
            });
            this.parent.element.parentNode.insertBefore(this.filterInput, this.parent.element);
            var backIcon = false;

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              backIcon = true;
              this.parent.mobFilter = false;
            }

            this.filterInputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
              element: this.filterInput,
              buttons: backIcon ? [searchBackIcon, filterBarClearIcon] : [filterBarClearIcon],
              properties: {
                placeholder: this.parent.filterBarPlaceholder
              }
            }, this.parent.createElement);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.cssClass)) {
              if (this.parent.cssClass.split(' ').indexOf('e-outline') !== -1) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.filterInputObj.container], 'e-outline');
              } else if (this.parent.cssClass.split(' ').indexOf('e-filled') !== -1) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.filterInputObj.container], 'e-filled');
              }
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([this.filterInputObj.container], this.parent.filterParent);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.parent.filterParent], args.popupElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.filterInput, {
              'aria-disabled': 'false',
              'aria-owns': this.parent.element.id + '_options',
              'role': 'listbox',
              'aria-activedescendant': null,
              'autocomplete': 'off',
              'autocorrect': 'off',
              'autocapitalize': 'off',
              'spellcheck': 'false'
            });
            this.clearIconElement = this.filterInput.parentElement.querySelector('.' + clearIcon);

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.clearIconElement) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.clearIconElement, 'mousedown', this.clearText, this);

              this.clearIconElement.style.visibility = 'hidden';
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'input', this.parent.onInput, this.parent);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keyup', this.parent.KeyUp, this.parent);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keydown', this.parent.onKeyDown, this.parent);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'blur', this.onBlur, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'paste', this.parent.pasteHandler, this.parent);

            this.parent.searchBoxHeight = this.filterInputObj.container.parentElement.getBoundingClientRect().height;
            return this.filterInputObj;
          }
        }
      }, {
        key: "clickOnBackIcon",
        value: function clickOnBackIcon(e) {
          this.parent.hidePopup();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body, this.parent.popupObj.element], popupFullScreen);
          this.parent.inputElement.focus();
        }
      }, {
        key: "clearText",
        value: function clearText(e) {
          this.parent.targetInputElement.value = '';
          this.parent.refreshPopup();
          this.parent.refreshListItems(null);
          this.clearIconElement.style.visibility = 'hidden';
          this.filterInput.focus();
          this.setReorder(e);
          e.preventDefault();
        }
      }, {
        key: "setDeviceSearchBox",
        value: function setDeviceSearchBox() {
          this.parent.popupObj.element.classList.add(device);
          this.parent.popupObj.element.classList.add(mobileFilter);
          this.parent.popupObj.position = {
            X: 0,
            Y: 0
          };
          this.parent.popupObj.dataBind();
          this.setSearchBoxPosition();
          this.backIconElement = this.filterInputObj.container.querySelector('.e-back-icon');
          this.clearIconElement = this.filterInputObj.container.querySelector('.' + clearIcon);
          this.clearIconElement.style.visibility = 'hidden';

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.backIconElement, 'click', this.clickOnBackIcon, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.clearIconElement, 'click', this.clearText, this);
        }
      }, {
        key: "setSearchBoxPosition",
        value: function setSearchBoxPosition() {
          var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
          var selectAllHeight = 0;

          if (this.checkAllParent) {
            selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
          }

          this.parent.popupObj.element.style.maxHeight = '100%';
          this.parent.popupObj.element.style.width = '100%';
          this.parent.list.style.maxHeight = window.innerHeight - searchBoxHeight - selectAllHeight + 'px';
          this.parent.list.style.height = window.innerHeight - searchBoxHeight - selectAllHeight + 'px';
          var clearElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.filterInput);
          clearElement.parentElement.insertBefore(this.filterInput, clearElement);
        }
      }, {
        key: "setPopupFullScreen",
        value: function setPopupFullScreen() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.parent.popupObj.element, {
            style: 'left:0px;right:0px;top:0px;bottom:0px;'
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body, this.parent.popupObj.element], popupFullScreen);
          this.parent.popupObj.element.style.maxHeight = '100%';
          this.parent.popupObj.element.style.width = '100%';
        }
      }, {
        key: "targetElement",
        value: function targetElement() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.clearIconElement)) {
            this.parent.targetInputElement = this.filterInput;
            this.clearIconElement.style.visibility = this.parent.targetInputElement.value === '' ? 'hidden' : 'visible';
          }

          return this.parent.targetInputElement.value;
        }
      }, {
        key: "onBlur",
        value: function onBlur(e) {
          if (!this.parent.element.classList.contains('e-listbox')) {
            var target;

            if (this.parent.keyAction) {
              return;
            }

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE) {
              target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && e.target;
            }

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE) {
              target = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && e.relatedTarget;
            }

            if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && this.parent.popupObj.element.contains(target) && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE && this.filterInput) {
              this.filterInput.focus();
              return;
            }

            if (this.parent.scrollFocusStatus && this.filterInput) {
              e.preventDefault();
              this.filterInput.focus();
              this.parent.scrollFocusStatus = false;
              return;
            }

            if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains('e-popup-close')) {
              this.parent.inputFocus = false;
              this.parent.updateValueState(e, this.parent.value, this.parent.tempValues);
              this.parent.dispatchEvent(this.parent.hiddenElement, 'change');
            }

            if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains('e-popup-close')) {
              this.parent.inputFocus = false;
              this.parent.overAllWrapper.classList.remove(FOCUS$1);
              this.parent.trigger('blur');
              this.parent.focused = true;
            }

            if (this.parent.popupObj && document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains('e-popup-close') && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              this.parent.hidePopup();
            }
          }
        }
      }, {
        key: "onDocumentClick",
        value: function onDocumentClick(e) {
          if (this.parent.getLocaleName() !== 'listbox') {
            var target = e.target;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + this.parent.popupObj.element.id)) {
              if (!(this.filterInput && this.filterInput.value !== '')) {
                e.preventDefault();
              }
            }

            if (!(!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.popupObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '#' + this.parent.popupObj.element.id)) && !this.parent.overAllWrapper.contains(e.target)) {
              if (this.parent.overAllWrapper.classList.contains(dropDownBaseClasses.focus) || this.parent.isPopupOpen()) {
                this.parent.inputFocus = false;
                this.parent.scrollFocusStatus = false;
                this.parent.hidePopup();
                this.parent.onBlur(e, true);
                this.parent.focused = true;
              }
            } else {
              this.parent.scrollFocusStatus = (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge') && document.activeElement === this.filterInput;
            }

            if (!this.parent.overAllWrapper.contains(e.target) && this.parent.overAllWrapper.classList.contains('e-input-focus') && !this.parent.isPopupOpen()) {
              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE) {
                this.parent.onBlur();
              } else {
                this.parent.onBlur(e);
              }
            }

            if (this.filterInput === target) {
              this.filterInput.focus();
            }
          }
        }
      }, {
        key: "getFocus",
        value: function getFocus(e) {
          this.parent.overAllWrapper.classList.remove(FOCUS$1);

          if (this.parent.keyAction && e.value !== 'clear') {
            this.parent.keyAction = false;
            return;
          }

          if (e.value === 'focus') {
            this.filterInput.focus();
            this.parent.removeFocus();

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.parent.list, 'keydown', this.parent.onKeyDown);
          }

          if (e.value === 'clear') {
            this.filterInput.value = '';
            this.clearIconElement.style.visibility = 'hidden';
          }
        }
      }, {
        key: "checkSelectAll",
        value: function checkSelectAll(e) {
          if (e.value === 'check' && this.checkAllParent.getAttribute('aria-checked') !== 'true') {
            this.changeState(this.checkAllParent, e.value, null, null, false);
            this.setLocale(true);
          }

          if (e.value === 'uncheck') {
            this.changeState(this.checkAllParent, e.value, null, null, false);
            this.setLocale();
          }

          if (e.value === 'indeterminate') {
            this.changeState(this.checkAllParent, e.value, null, null, false);
            this.setLocale();
          }
        }
      }, {
        key: "setLocale",
        value: function setLocale(unSelect) {
          if (this.parent.selectAllText !== 'Select All' || this.parent.unSelectAllText !== 'Unselect All') {
            var template = unSelect ? this.parent.unSelectAllText : this.parent.selectAllText;
            var compiledString;
            this.selectAllSpan.textContent = '';
            compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            var templateName = unSelect ? 'unSelectAllText' : 'selectAllText';

            var _iterator98 = _createForOfIteratorHelper(compiledString({}, this.parent, templateName, null, !this.parent.isStringTemplate)),
                _step98;

            try {
              for (_iterator98.s(); !(_step98 = _iterator98.n()).done;) {
                var item = _step98.value;
                this.selectAllSpan.textContent = item.textContent;
              }
            } catch (err) {
              _iterator98.e(err);
            } finally {
              _iterator98.f();
            }
          } else {
            var l10nLocale = {
              selectAllText: 'Select All',
              unSelectAllText: 'Unselect All'
            };
            var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.parent.getLocaleName(), {}, this.parent.locale);

            if (l10n.getConstant('selectAllText') === '') {
              l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('dropdowns', l10nLocale, this.parent.locale);
            }

            this.selectAllSpan.textContent = unSelect ? l10n.getConstant('unSelectAllText') : l10n.getConstant('selectAllText');
          }
        }
      }, {
        key: "getActiveList",
        value: function getActiveList(args) {
          if (args.li.classList.contains('e-active')) {
            this.activeLi.push(args.li.cloneNode(true));
          } else {
            this.activeLi.splice(args.index, 1);
          }
        }
      }, {
        key: "setReorder",
        value: function setReorder(args) {
          if (this.parent.enableSelectionOrder && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.parent.value)) {
            var activeLiCount = this.parent.ulElement.querySelectorAll('li.e-active').length;
            var remLi;
            var ulEle = this.parent.createElement('ul', {
              className: 'e-list-parent e-ul e-reorder'
            });
            var removeEle = this.parent.createElement('div');

            if (activeLiCount > 0) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(this.parent.ulElement.querySelectorAll('li.e-active'), ulEle);
              remLi = this.parent.ulElement.querySelectorAll('li.e-active');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(remLi, 'e-reorder-hide');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([ulEle], this.parent.list);
            }

            this.parent.focusAtFirstListItem();
          }
        }
      }]);

      return CheckBoxSelection;
    }();
    /**
     * export all modules from current location
     */


    var __decorate$6 = undefined && undefined.__decorate || function (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;
    };

    var ListBox_1; /// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>

    var ITEMTEMPLATE_PROPERTY$1 = 'ItemTemplate';
    /**
     * Defines the Selection settings of List Box.
     */

    var SelectionSettings = /*#__PURE__*/function (_syncfusion_ej2_base_11) {
      _inherits(SelectionSettings, _syncfusion_ej2_base_11);

      var _super193 = _createSuper(SelectionSettings);

      function SelectionSettings() {
        _classCallCheck(this, SelectionSettings);

        return _super193.apply(this, arguments);
      }

      return SelectionSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Multiple')], SelectionSettings.prototype, "mode", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], SelectionSettings.prototype, "showCheckbox", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], SelectionSettings.prototype, "showSelectAll", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], SelectionSettings.prototype, "checkboxPosition", void 0);
    /**
     * Defines the toolbar settings of List Box.
     */


    var ToolbarSettings = /*#__PURE__*/function (_syncfusion_ej2_base_12) {
      _inherits(ToolbarSettings, _syncfusion_ej2_base_12);

      var _super194 = _createSuper(ToolbarSettings);

      function ToolbarSettings() {
        _classCallCheck(this, ToolbarSettings);

        return _super194.apply(this, arguments);
      }

      return ToolbarSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], ToolbarSettings.prototype, "items", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Right')], ToolbarSettings.prototype, "position", void 0);
    /**
     * The ListBox is a graphical user interface component used to display a list of items.
     * Users can select one or more items in the list using a checkbox or by keyboard selection.
     * It supports sorting, grouping, reordering and drag and drop of items.
     * ```html
     * <select id="listbox">
     *      <option value='1'>Badminton</option>
     *      <option value='2'>Basketball</option>
     *      <option value='3'>Cricket</option>
     *      <option value='4'>Football</option>
     *      <option value='5'>Tennis</option>
     * </select>
     * ```
     * ```typescript
     * <script>
     *   var listObj = new ListBox();
     *   listObj.appendTo("#listbox");
     * </script>
     * ```
     */


    var ListBox = ListBox_1 = /*#__PURE__*/function (_DropDownBase3) {
      _inherits(ListBox, _DropDownBase3);

      var _super195 = _createSuper(ListBox);

      /**
       * Constructor for creating the ListBox component.
       */
      function ListBox(options, element) {
        var _this494;

        _classCallCheck(this, ListBox);

        _this494 = _super195.call(this, options, element);
        _this494.isValidKey = false;
        _this494.keyDownStatus = false;
        return _this494;
      }
      /**
       * Adds a new item to the popup list. By default, new item appends to the list as the last item,
       * but you can insert based on the index parameter.
       * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
       * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
       * @return {void}.
       * @private
       */


      _createClass2(ListBox, [{
        key: "addItem",
        value: function addItem(items, itemIndex) {
          _get(_getPrototypeOf(ListBox.prototype), "addItem", this).call(this, items, itemIndex);
        }
      }, {
        key: "render",

        /**
         * Build and render the component
         * @private
         */
        value: function render() {
          this.inputString = '';
          this.initLoad = true;
          this.isCustomFiltering = false;
          this.initialSelectedOptions = this.value;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.list = this.element.parentElement;
            this.liCollections = this.list.querySelectorAll('.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li);
            this.mainList = this.ulElement = this.list.querySelector('ul');
            this.setSelection(this.value);

            if (this.allowFiltering) {
              this.setFiltering();
            }

            this.initToolbarAndStyles();
            this.updateSelectionSettings();
            this.wireEvents();
            this.initDraggable();
            this.initLoad = false;
          } else {
            _get(_getPrototypeOf(ListBox.prototype), "render", this).call(this);
          }

          this.renderComplete();
        }
      }, {
        key: "updateBlazorListData",
        value: function updateBlazorListData(data, isDataSource, select$$1) {
          if (isDataSource) {
            this.liCollections = this.list.querySelectorAll('.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li);
            this.mainList = this.ulElement = this.list.querySelector('ul');

            if (this.allowDragAndDrop && !this.ulElement.classList.contains('e-sortable')) {
              this.initDraggable();
            }

            if (select$$1) {
              this.selectItems(this.listData, false);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
            this.sortedData = this.jsonData = this.listData = data;
          }
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          var hiddenSelect = this.createElement('select', {
            className: 'e-hidden-select',
            attrs: {
              'multiple': ''
            }
          });
          this.list.classList.add('e-listbox-wrapper');

          if (this.itemTemplate) {
            this.list.classList.add('e-list-template');
          }

          this.list.classList.add('e-wrapper');

          if (this.element.tagName === 'EJS-LISTBOX') {
            this.element.setAttribute('tabindex', '0');

            if (this.initLoad) {
              this.element.appendChild(this.list);
            }
          } else {
            if (this.initLoad) {
              this.element.parentElement.insertBefore(this.list, this.element);
            }

            this.list.insertBefore(this.element, this.list.firstChild);
            this.element.style.display = 'none';
          }

          this.list.insertBefore(hiddenSelect, this.list.firstChild);

          if (this.list.getElementsByClassName('e-list-item')[0]) {
            this.list.getElementsByClassName('e-list-item')[0].classList.remove(dropDownBaseClasses.focus);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.list], [dropDownBaseClasses.content, dropDownBaseClasses.root]);
          this.validationAttribute(this.element, hiddenSelect);
          this.list.setAttribute('role', 'listbox');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.list, {
            'role': 'listbox',
            'aria-multiselectable': this.selectionSettings.mode === 'Multiple' ? 'true' : 'false'
          });
          this.updateSelectionSettings();
        }
      }, {
        key: "updateSelectionSettings",
        value: function updateSelectionSettings() {
          if (this.selectionSettings.showCheckbox && this.selectionSettings.showSelectAll && this.liCollections.length) {
            var l10nSelect = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), {
              selectAllText: 'Select All',
              unSelectAllText: 'Unselect All'
            }, this.locale);
            this.showSelectAll = true;
            this.selectAllText = l10nSelect.getConstant('selectAllText');
            this.unSelectAllText = l10nSelect.getConstant('unSelectAllText');
            this.popupWrapper = this.list;
            this.checkBoxSelectionModule.checkAllParent = null;
            this.notify('selectAll', {});
          }
        }
      }, {
        key: "initDraggable",
        value: function initDraggable() {
          var _this495 = this;

          if (this.ulElement) {
            this.ulElement.id = this.element.id + '_parent';
          }

          if (this.allowDragAndDrop) {
            new _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["Sortable"](this.ulElement, {
              scope: this.scope,
              itemClass: 'e-list-item',
              dragStart: this.triggerDragStart.bind(this),
              drag: this.triggerDrag.bind(this),
              beforeDrop: this.beforeDragEnd.bind(this),
              drop: this.dragEnd.bind(this),
              placeHolder: function placeHolder() {
                return _this495.createElement('span', {
                  className: 'e-placeholder'
                });
              },
              helper: function helper(e) {
                var wrapper = _this495.list.cloneNode();

                var ele = e.sender.cloneNode(true);
                wrapper.appendChild(ele);

                var refEle = _this495.getItems()[0];

                wrapper.style.width = refEle.offsetWidth + 'px';
                wrapper.style.height = refEle.offsetHeight + 'px';

                if ((_this495.value && _this495.value.length) > 1 && _this495.isSelected(ele)) {
                  ele.appendChild(_this495.createElement('span', {
                    className: 'e-list-badge',
                    innerHTML: _this495.value.length + ''
                  }));
                }

                wrapper.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["getZindexPartial"])(_this495.element) + '';
                return wrapper;
              }
            });
          }
        }
      }, {
        key: "updateActionCompleteData",
        value: function updateActionCompleteData(li, item) {
          this.jsonData.push(item);
        }
      }, {
        key: "initToolbar",
        value: function initToolbar() {
          var scope;
          var pos = this.toolbarSettings.position;
          var prevScope = this.element.getAttribute('data-value');

          if (this.toolbarSettings.items.length) {
            var toolElem = this.createElement('div', {
              className: 'e-listbox-tool',
              attrs: {
                'role': 'toolbar'
              }
            });
            var wrapper = this.createElement('div', {
              className: 'e-listboxtool-wrapper e-' + pos.toLowerCase()
            });
            this.list.parentElement.insertBefore(wrapper, this.list);
            wrapper.appendChild(pos === 'Right' ? this.list : toolElem);
            wrapper.appendChild(pos === 'Right' ? toolElem : this.list);
            this.createButtons(toolElem);

            if (!this.element.id) {
              this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName());
            }

            if (this.scope) {
              document.querySelector(this.scope).setAttribute('data-value', this.element.id);
            } else {
              this.updateToolBarState();
            }
          }

          scope = this.element.getAttribute('data-value');

          if (prevScope && scope && prevScope !== scope) {
            this.tBListBox = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(document.getElementById(prevScope), this.getModuleName());
            this.tBListBox.updateToolBarState();
          } else if (scope) {
            this.tBListBox = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(document.getElementById(scope), this.getModuleName());
            this.tBListBox.updateToolBarState();
          }
        }
      }, {
        key: "createButtons",
        value: function createButtons(toolElem) {
          var _this496 = this;

          var btn;
          var ele;
          var title;
          var l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), {
            moveUp: 'Move Up',
            moveDown: 'Move Down',
            moveTo: 'Move To',
            moveFrom: 'Move From',
            moveAllTo: 'Move All To',
            moveAllFrom: 'Move All From'
          }, this.locale);
          this.toolbarSettings.items.forEach(function (value) {
            title = l10n.getConstant(value);
            ele = _this496.createElement('button', {
              attrs: {
                'type': 'button',
                'data-value': value,
                'title': title,
                'aria-label': title
              }
            });
            toolElem.appendChild(ele);
            btn = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_5__["Button"]({
              iconCss: 'e-icons e-' + value.toLowerCase()
            }, ele);
            btn.createElement = _this496.createElement;
          });
        }
      }, {
        key: "validationAttribute",
        value: function validationAttribute(input, hiddenSelect) {
          _get(_getPrototypeOf(ListBox.prototype), "validationAttribute", this).call(this, input, hiddenSelect);

          hiddenSelect.required = input.required;
          input.required = false;
        }
      }, {
        key: "setHeight",
        value: function setHeight() {
          var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;
          ele.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);

          if (this.allowFiltering && this.height.toString().indexOf('%') < 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], 'e-filter-list');
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.list], 'e-filter-list');
          }
        }
      }, {
        key: "setCssClass",
        value: function setCssClass() {
          var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrap], this.cssClass.split(' '));
          }

          if (this.enableRtl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrap], 'e-rtl');
          }
        }
      }, {
        key: "setEnable",
        value: function setEnable() {
          var ele = this.toolbarSettings.items.length ? this.list.parentElement : this.list;

          if (this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ele], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.toolbarSettings.items.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.list], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
            }
          }
        }
      }, {
        key: "showSpinner",
        value: function showSpinner() {
          if (!this.spinner) {
            this.spinner = this.createElement('div', {
              className: 'e-listbox-wrapper'
            });
          }

          this.spinner.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);
          this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["createSpinner"])({
            target: this.spinner
          }, this.createElement);
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["showSpinner"])(this.spinner);
        }
      }, {
        key: "hideSpinner",
        value: function hideSpinner() {
          if (this.spinner.querySelector('.e-spinner-pane')) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_3__["hideSpinner"])(this.spinner);
          }

          if (this.spinner.parentElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinner);
          }
        }
      }, {
        key: "onInput",
        value: function onInput() {
          if (this.keyDownStatus) {
            this.isValidKey = true;
          } else {
            this.isValidKey = false;
          }

          this.keyDownStatus = false;
          this.refreshClearIcon();
        }
      }, {
        key: "clearText",
        value: function clearText() {
          this.filterInput.value = '';
          this.refreshClearIcon();
          var event = document.createEvent('KeyboardEvent');
          this.isValidKey = true;
          this.KeyUp(event);
        }
      }, {
        key: "refreshClearIcon",
        value: function refreshClearIcon() {
          if (this.filterInput.parentElement.querySelector('.' + listBoxClasses.clearIcon)) {
            var clearElement = this.filterInput.parentElement.querySelector('.' + listBoxClasses.clearIcon);
            clearElement.style.visibility = this.filterInput.value === '' ? 'hidden' : 'visible';
          }
        }
      }, {
        key: "onActionComplete",
        value: function onActionComplete(ulElement, list, e) {
          var searchEle;

          if (this.allowFiltering && this.list.getElementsByClassName('e-filter-parent')[0]) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
              searchEle = this.list.getElementsByClassName('e-filter-parent')[0];
            } else {
              searchEle = this.list.getElementsByClassName('e-filter-parent')[0].cloneNode(true);
            }
          }

          _get(_getPrototypeOf(ListBox.prototype), "onActionComplete", this).call(this, ulElement, list, e);

          if (this.allowFiltering && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(searchEle)) {
            this.list.insertBefore(searchEle, this.list.firstElementChild);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
              this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
              this.filterWireEvents(searchEle);
            }
          }

          this.initWrapper();
          this.setSelection();
          this.initDraggable();
          this.mainList = this.ulElement;

          if (this.initLoad) {
            this.jsonData = [];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.jsonData, list, []);
            this.initToolbarAndStyles();
            this.wireEvents();

            if (this.showCheckbox) {
              this.setCheckboxPosition();
            }

            if (this.allowFiltering) {
              this.setFiltering();
            }
          } else {
            if (this.allowFiltering) {
              var filterElem = this.list.getElementsByClassName('e-input-filter')[0];
              var txtLength = this.filterInput.value.length;
              filterElem.selectionStart = txtLength;
              filterElem.selectionEnd = txtLength;
              filterElem.focus();
            }
          }

          this.initLoad = false;
        }
      }, {
        key: "initToolbarAndStyles",
        value: function initToolbarAndStyles() {
          this.initToolbar();
          this.setCssClass();
          this.setEnable();
          this.setHeight();
        }
      }, {
        key: "triggerDragStart",
        value: function triggerDragStart(args) {
          var _this497 = this;

          var badge;
          args = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.getDragArgs(args), {
            dragSelected: true
          });

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) {
            this.list.style.overflow = 'hidden';
          }

          this.trigger('dragStart', args, function (dragEventArgs) {
            _this497.allowDragAll = dragEventArgs.dragSelected;

            if (!_this497.allowDragAll) {
              badge = _this497.ulElement.getElementsByClassName('e-list-badge')[0];

              if (badge) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(badge);
              }
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              args.bindEvents(args.dragElement);
            }
          });
        }
      }, {
        key: "triggerDrag",
        value: function triggerDrag(args) {
          this.trigger('drag', this.getDragArgs(args));
          var listObj = this.getComponent(args.target);

          if (listObj && listObj.listData.length === 0) {
            var noRecElem = listObj.ulElement.getElementsByClassName('e-list-nrt')[0];

            if (noRecElem) {
              listObj.ulElement.removeChild(noRecElem);
            }
          }
        }
      }, {
        key: "beforeDragEnd",
        value: function beforeDragEnd(args) {
          var dragValue = args.droppedElement.getAttribute('data-value');

          if (this.value.indexOf(dragValue) > -1) {
            args.items = this.getDataByValues(this.value);
          } else {
            args.items = this.getDataByValues([dragValue]);
          }

          this.trigger('beforeDrop', args);
        } // tslint:disable-next-line:max-func-body-length

      }, {
        key: "dragEnd",
        value: function dragEnd(args) {
          var _this498 = this;

          var listData;
          var liColl;
          var jsonData;
          var droppedData;
          var selectedOptions;
          var sortedData;
          var dropValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
          var listObj = this.getComponent(args.droppedElement);
          var getArgs = this.getDragArgs({
            target: args.droppedElement
          }, true);
          var sourceArgs = {
            previousData: this.dataSource
          };
          var destArgs = {
            previousData: listObj.dataSource
          };
          var dragArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, getArgs, {
            target: args.target,
            source: {
              previousData: this.dataSource
            }
          });

          if (listObj !== this) {
            var sourceArgs1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(sourceArgs, {
              currentData: this.listData
            });
            dragArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dragArgs, {
              source: sourceArgs1,
              destination: destArgs
            });
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) {
            this.list.style.overflow = '';
          }

          if (listObj === this) {
            var ul = this.ulElement;
            listData = [].slice.call(this.listData);
            liColl = [].slice.call(this.liCollections);
            jsonData = [].slice.call(this.jsonData);
            sortedData = [].slice.call(this.sortedData);
            var toSortIdx = args.currentIndex;
            var toIdx = args.currentIndex = this.getCurIdx(this, args.currentIndex);
            var rIdx = listData.indexOf(this.getDataByValue(dropValue));
            var jsonIdx = jsonData.indexOf(this.getDataByValue(dropValue));
            var sIdx = sortedData.indexOf(this.getDataByValue(dropValue));
            listData.splice(toIdx, 0, listData.splice(rIdx, 1)[0]);
            sortedData.splice(toSortIdx, 0, sortedData.splice(sIdx, 1)[0]);
            jsonData.splice(toIdx, 0, jsonData.splice(jsonIdx, 1)[0]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              liColl.splice(toIdx, 0, liColl.splice(rIdx, 1)[0]);
            }

            if (this.allowDragAll) {
              selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
              selectedOptions.forEach(function (value) {
                if (value !== dropValue) {
                  var idx = listData.indexOf(_this498.getDataByValue(value));

                  var _jsonIdx = jsonData.indexOf(_this498.getDataByValue(value));

                  var _sIdx = sortedData.indexOf(_this498.getDataByValue(value));

                  if (idx > toIdx) {
                    toIdx++;
                  }

                  jsonData.splice(toIdx, 0, jsonData.splice(_jsonIdx, 1)[0]);
                  listData.splice(toIdx, 0, listData.splice(idx, 1)[0]);
                  sortedData.splice(toSortIdx, 0, sortedData.splice(_sIdx, 1)[0]);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    liColl.splice(toIdx, 0, liColl.splice(idx, 1)[0]);
                    ul.insertBefore(_this498.getItems()[_this498.getIndexByValue(value)], ul.getElementsByClassName('e-placeholder')[0]);
                  }
                } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  var lists = [].slice.call(_this498.ulElement.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li));

                  var refChild = _this498.ulElement.removeChild(lists[args.currentIndex]);

                  lists.splice(args.currentIndex, 1);

                  _this498.ulElement.insertBefore(refChild, lists[args.previousIndex]);
                }
              });
            }

            this.listData = listData;
            this.jsonData = jsonData;
            this.sortedData = sortedData;
            this.liCollections = liColl;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              var value = this.value; // tslint:disable-next-line:no-any

              this.interopAdaptor.invokeMethodAsync('UpdateListData', this.listData).then(function () {
                _this498.updateBlazorListData(null, true);

                _this498.selectItems(_this498.listData, false);

                _this498.selectItems(value);
              });
            }
          } else {
            var li;
            var fLiColl = [].slice.call(this.liCollections);
            var currIdx = args.currentIndex = this.getCurIdx(listObj, args.currentIndex);
            var _ul = listObj.ulElement;
            listData = [].slice.call(listObj.listData);
            liColl = [].slice.call(listObj.liCollections);
            jsonData = [].slice.call(listObj.jsonData);
            sortedData = [].slice.call(listObj.sortedData);
            selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll ? this.value : [dropValue];
            var fListData = [].slice.call(this.listData);
            var fSortData = [].slice.call(this.sortedData);
            selectedOptions.forEach(function (value, index) {
              droppedData = _this498.getDataByValue(value);

              var srcIdx = _this498.listData.indexOf(droppedData);

              var jsonSrcIdx = _this498.jsonData.indexOf(droppedData);

              var sortIdx = _this498.sortedData.indexOf(droppedData);

              fListData.splice(srcIdx, 1);

              _this498.jsonData.splice(jsonSrcIdx, 1);

              fSortData.splice(sortIdx, 1);
              _this498.listData = fListData;
              _this498.sortedData = fSortData;
              var destIdx = value === dropValue ? args.currentIndex : currIdx;
              listData.splice(destIdx, 0, droppedData);
              jsonData.splice(destIdx, 0, droppedData);
              sortedData.splice(destIdx, 0, droppedData);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                liColl.splice(destIdx, 0, fLiColl.splice(srcIdx, 1)[0]);
              }

              if (!value) {
                var liCollElem = _this498.getItems();

                for (var i = 0; i < liCollElem.length; i++) {
                  if (liCollElem[i].getAttribute('data-value') === null && liCollElem[i].classList.contains('e-list-item')) {
                    li = liCollElem[i];
                    break;
                  }
                }
              } else {
                li = _this498.getItems()[_this498.getIndexByValue(value)];
              }

              if (!li) {
                li = args.helper;
              }

              _this498.removeSelected(_this498, value === dropValue ? [args.droppedElement] : [li]);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                if (index === 0) {
                  _this498.ulElement.insertBefore(_ul.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li)[args.currentIndex], _this498.ulElement.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li)[args.previousIndex]);
                }
              } else {
                _ul.insertBefore(li, _ul.getElementsByClassName('e-placeholder')[0]);
              }

              currIdx++;
            });

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              // tslint:disable
              this.interopAdaptor.invokeMethodAsync('UpdateListData', this.listData).then(function () {
                _this498.updateSelectedOptions();

                if (_this498.fields.groupBy) {
                  _this498.setSelection();
                }

                _this498.updateBlazorListData(null, true, _this498.value == null || !_this498.value.length);
              });
              listObj.interopAdaptor.invokeMethodAsync('UpdateListData', listData).then(function () {
                if (listObj.sortOrder !== 'None' || _this498.selectionSettings.showCheckbox !== listObj.selectionSettings.showCheckbox || listObj.fields.groupBy) {
                  listObj.setSelection();
                }

                listObj.updateBlazorListData(null, true, listObj.value == null || !listObj.value.length);
              }); // tslint:enable
            } else {
              if (this.fields.groupBy) {
                this.ulElement.innerHTML = this.renderItems(this.listData, this.fields).innerHTML;
                this.setSelection();
              }

              if (listObj.sortOrder !== 'None' || this.selectionSettings.showCheckbox !== listObj.selectionSettings.showCheckbox || listObj.fields.groupBy) {
                var sortabale = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(_ul, 'sortable');
                _ul.innerHTML = listObj.renderItems(listData, listObj.fields).innerHTML;

                if (sortabale.placeHolderElement) {
                  _ul.appendChild(sortabale.placeHolderElement);
                }

                _ul.appendChild(args.helper);

                listObj.setSelection();
              }

              this.liCollections = fLiColl;
              listObj.liCollections = liColl;
            }

            listObj.jsonData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], jsonData, false);
            listObj.listData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], listData, false);
            listObj.sortedData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])([], [], sortedData, false);

            if (this.listData.length === 0) {
              this.l10nUpdate();
            }
          }

          if (this === listObj) {
            var _sourceArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(sourceArgs, {
              currentData: listData
            });

            dragArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dragArgs, {
              source: _sourceArgs
            });
          } else {
            var dragArgs1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(destArgs, {
              currentData: listData
            });
            dragArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dragArgs, {
              destination: dragArgs1
            });
          }

          this.trigger('drop', dragArgs);
        }
      }, {
        key: "removeSelected",
        value: function removeSelected(listObj, elems) {
          if (listObj.selectionSettings.showCheckbox) {
            elems.forEach(function (ele) {
              ele.getElementsByClassName('e-frame')[0].classList.remove('e-check');
            });
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elems, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
          }
        }
      }, {
        key: "getCurIdx",
        value: function getCurIdx(listObj, idx) {
          if (listObj.fields.groupBy) {
            idx -= [].slice.call(listObj.ulElement.children).slice(0, idx).filter(function (ele) {
              return ele.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].group);
            }).length;
          }

          return idx;
        }
      }, {
        key: "getComponent",
        value: function getComponent(li) {
          var listObj;
          var ele = this.element.tagName === 'EJS-LISTBOX' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(li, '.e-listbox') : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(li, '.e-listbox-wrapper') && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(li, '.e-listbox-wrapper').querySelector('.e-listbox');

          if (ele) {
            listObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(ele, this.getModuleName());
          }

          return listObj;
        }
      }, {
        key: "listOption",
        value: function listOption(dataSource, fields) {
          this.listCurrentOptions = _get(_getPrototypeOf(ListBox.prototype), "listOption", this).call(this, dataSource, fields);
          this.listCurrentOptions = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.listCurrentOptions, {
            itemCreated: this.triggerBeforeItemRender.bind(this)
          }, true);
          this.notify('listoption', {
            module: 'CheckBoxSelection'
          });
          return this.listCurrentOptions;
        }
      }, {
        key: "triggerBeforeItemRender",
        value: function triggerBeforeItemRender(e) {
          e.item.setAttribute('tabindex', '-1');
          this.trigger('beforeItemRender', {
            element: e.item,
            item: e.curData
          });
        }
      }, {
        key: "requiredModules",
        value: function requiredModules() {
          var modules = [];

          if (this.selectionSettings.showCheckbox) {
            modules.push({
              member: 'CheckBoxSelection',
              args: [this]
            });
          }

          return modules;
        }
        /**
         * This method is used to enable or disable the items in the ListBox based on the items and enable argument.
         * @param items Text items that needs to be enabled/disabled.
         * @param enable Set `true`/`false` to enable/disable the list items.
         * @param isValue - Set `true` if `items` parameter is a array of unique values.
         * @returns void
         */

      }, {
        key: "enableItems",
        value: function enableItems(items) {
          var _this499 = this;

          var enable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var isValue = arguments.length > 2 ? arguments[2] : undefined;
          var li;
          items.forEach(function (item) {
            var text;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && typeof item === 'object') {
              text = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(isValue ? _this499.fields.value : _this499.fields.text, item);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(text)) {
                return;
              }
            } else {
              text = item;
            }

            li = _this499.findListElement(_this499.list, 'li', 'data-value', isValue ? text : _this499.getValueByText(text));

            if (!li) {
              return;
            }

            if (enable) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([li], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
              li.removeAttribute('aria-disabled');
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled);
              li.setAttribute('aria-disabled', 'true');
            }
          });
        }
        /**
         * Based on the state parameter, specified list item will be selected/deselected.
         * @param items Array of text value of the item.
         * @param state Set `true`/`false` to select/un select the list items.
         * @param isValue - Set `true` if `items` parameter is a array of unique values.
         * @returns void
         */

      }, {
        key: "selectItems",
        value: function selectItems(items) {
          var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var isValue = arguments.length > 2 ? arguments[2] : undefined;
          this.setSelection(items, state, !isValue);
          this.updateSelectedOptions();
        }
        /**
         * Based on the state parameter, entire list item will be selected/deselected.
         * @param state Set `true`/`false` to select/un select the entire list items.
         * @returns void
         */

      }, {
        key: "selectAll",
        value: function selectAll() {
          var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
          this.selectAllItems(state);
        }
        /**
         * Adds a new item to the list. By default, new item appends to the list as the last item,
         * but you can insert based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to place the newly added item in the list.
         * @returns {void}.
         */

      }, {
        key: "addItems",
        value: function addItems(items, itemIndex) {
          _get(_getPrototypeOf(ListBox.prototype), "addItem", this).call(this, items, itemIndex);
        }
        /**
         * Removes a item from the list. By default, removed the last item in the list,
         * but you can remove based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to remove the item from the list.
         * @returns {void}.
         */

      }, {
        key: "removeItems",
        value: function removeItems(items, itemIndex) {
          this.removeItem(items, itemIndex);
        }
        /**
         * Removes a item from the list. By default, removed the last item in the list,
         * but you can remove based on the index parameter.
         * @param  { Object[] } items - Specifies an array of JSON data or a JSON data.
         * @param { number } itemIndex - Specifies the index to remove the item from the list.
         * @returns {void}.
         */

      }, {
        key: "removeItem",
        value: function removeItem(items, itemIndex) {
          var liCollections = [];
          var liElement = this.list.querySelectorAll('.' + dropDownBaseClasses.li);

          if (items) {
            items = items instanceof Array ? items : [items];
            var fields = this.fields;
            var dataValue;
            var objValue;
            var dupData = [];
            var itemIdx;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dupData, [], this.listData);
            var removeIdxes = [];
            var removeLiIdxes = [];

            for (var j = 0; j < items.length; j++) {
              if (items[j] instanceof Object) {
                dataValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, items[j]);
              } else {
                dataValue = items[j].toString();
              }

              for (var i = 0, _len34 = dupData.length; i < _len34; i++) {
                if (dupData[i] instanceof Object) {
                  objValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(fields.value, dupData[i]);
                } else {
                  objValue = dupData[i].toString();
                }

                if (objValue === dataValue) {
                  itemIdx = this.getIndexByValue(dataValue);
                  liCollections.push(liElement[itemIdx]);
                  removeIdxes.push(i);
                  removeLiIdxes.push(itemIdx);
                }
              }
            }

            for (var k = removeIdxes.length - 1; k > 0; k--) {
              this.listData.splice(removeIdxes[k], 1);
            }

            for (var _k2 = removeLiIdxes.length - 1; _k2 > 0; _k2--) {
              this.liCollections.splice(removeLiIdxes[_k2], 1);
            }
          } else {
            itemIndex = itemIndex ? itemIndex : 0;
            liCollections.push(liElement[itemIndex]);
            this.listData.splice(itemIndex, 1);
            this.updateLiCollection(itemIndex);
          }

          for (var _i82 = 0; _i82 < liCollections.length; _i82++) {
            this.ulElement.removeChild(liCollections[_i82]);
          }

          if (this.listData.length === 0) {
            this.l10nUpdate();
          }
        }
        /**
         * Gets the array of data Object that matches the given array of values.
         * @param  { string[] | number[] | boolean[] } value - Specifies the array value of the list item.
         * @returns object[].
         */

      }, {
        key: "getDataByValues",
        value: function getDataByValues(value) {
          var data = [];

          for (var i = 0; i < value.length; i++) {
            data.push(this.getDataByValue(value[i]));
          }

          return data;
        }
        /**
         * Moves the given value(s) / selected value(s) upwards.
         * @param  { string[] | number[] | boolean[] } value - Specifies the value(s).
         * @returns {void}
         */

      }, {
        key: "moveUp",
        value: function moveUp(value) {
          var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
          this.moveUpDown(true, false, elem);
        }
        /**
         * Moves the given value(s) / selected value(s) downwards.
         * @param  { string[] | number[] | boolean[] } value - Specifies the value(s).
         * @returns {void}
         */

      }, {
        key: "moveDown",
        value: function moveDown(value) {
          var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
          this.moveUpDown(false, false, elem);
        }
        /**
         * Moves the given value(s) / selected value(s) to the given / default scoped ListBox.
         * @param  { string[] | number[] | boolean[] } value - Specifies the value or array value of the list item.
         * @returns {void}
         */

      }, {
        key: "moveTo",
        value: function moveTo(value, index, targetId) {
          var elem = value ? this.getElemByValue(value) : this.getSelectedItems();
          var tlistbox = targetId ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(targetId, ListBox_1) : this.getScopedListBox();
          this.moveData(this, tlistbox, false, elem, index);
        }
        /**
         * Moves all the values from one ListBox to the scoped ListBox.
         * @param  { string } targetId - Specifies the scoped ListBox ID.
         * @param  { string } index - Specifies the index to where the items moved.
         * @returns {void}
         */

      }, {
        key: "moveAllTo",
        value: function moveAllTo(targetId, index) {
          var tlistbox = targetId ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(targetId, ListBox_1) : this.getScopedListBox();
          this.moveAllData(this, tlistbox, false, index);
        }
        /**
         * Returns the updated dataSource in ListBox
         * @returns {{ [key: string]: Object }[] | string[] | boolean[] | number[]}
         */

      }, {
        key: "getDataList",
        value: function getDataList() {
          return this.jsonData;
        }
        /**
         * Returns the sorted Data in ListBox
         * @returns {{ [key: string]: Object }[] | string[] | boolean[] | number[]}
         */

      }, {
        key: "getSortedList",
        value: function getSortedList() {
          var sortData;
          var tempData;
          sortData = tempData = this.sortedData;

          if (this.fields.groupBy) {
            sortData = [];

            for (var i = 0; i < tempData.length; i++) {
              if (tempData[i].isHeader) {
                continue;
              }

              sortData.push(tempData[i]);
            }
          }

          return sortData;
        }
      }, {
        key: "getElemByValue",
        value: function getElemByValue(value) {
          var elem = [];

          for (var i = 0; i < value.length; i++) {
            elem.push(this.ulElement.querySelector('[data-value ="' + value[i] + '"]'));
          }

          return elem;
        }
      }, {
        key: "updateLiCollection",
        value: function updateLiCollection(index) {
          var tempLi = [].slice.call(this.liCollections);
          tempLi.splice(index, 1);
          this.liCollections = tempLi;
        }
      }, {
        key: "selectAllItems",
        value: function selectAllItems(state, event) {
          var _this500 = this;

          [].slice.call(this.getItems()).forEach(function (li) {
            if (!li.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].disabled)) {
              if (_this500.selectionSettings.showCheckbox) {
                var ele = li.getElementsByClassName('e-check')[0];

                if (!ele && state || ele && !state) {
                  _this500.notify('updatelist', {
                    li: li,
                    module: 'listbox'
                  });

                  if (_this500.maximumSelectionLength >= _this500.list.querySelectorAll('.e-list-item span.e-check').length) {
                    _this500.checkMaxSelection();
                  }
                }
              } else {
                if (state) {
                  li.classList.add(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                } else {
                  li.classList.remove(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                }
              }
            }
          });
          this.updateSelectedOptions();

          if (this.allowFiltering && this.selectionSettings.showCheckbox) {
            var liEle = this.list.getElementsByTagName('li');
            var index = 0;

            if (state) {
              var _loop17 = function _loop17() {
                var dataValue1 = _this500.getFormattedValue(liEle[index].getAttribute('data-value'));

                if (!_this500.value.some(function (e) {
                  return e === dataValue1;
                })) {
                  _this500.value.push(_this500.getFormattedValue(liEle[index].getAttribute('data-value')));
                }
              };

              for (index = 0; index < liEle.length; index++) {
                _loop17();
              }
            } else {
              var _loop18 = function _loop18() {
                var dataValue2 = _this500.getFormattedValue(liEle[index].getAttribute('data-value'));

                _this500.value = _this500.value.filter(function (e) {
                  return e !== dataValue2;
                });
              };

              for (index = 0; index < liEle.length; index++) {
                _loop18();
              }
            }

            if (document.querySelectorAll('ul').length < 2) {
              this.updateMainList();
            }
          }

          this.triggerChange(this.getSelectedItems(), event);
        }
      }, {
        key: "updateMainList",
        value: function updateMainList() {
          var mainList = this.mainList.querySelectorAll('.e-list-item');
          var ulList = this.ulElement.querySelectorAll('.e-list-item');
          var mainCount = mainList.length;
          var ulEleCount = ulList.length;

          if (this.selectionSettings.showCheckbox || document.querySelectorAll('ul').length > 1 || mainCount !== ulEleCount) {
            var listindex = 0;
            var valueindex = 0;
            var count = 0;

            for (listindex; listindex < mainCount;) {
              if (this.value) {
                for (valueindex; valueindex < this.value.length; valueindex++) {
                  if (mainList[listindex].getAttribute('data-value') === this.value[valueindex]) {
                    count++;
                  }
                }
              }

              if (!count && this.selectionSettings.showCheckbox) {
                mainList[listindex].getElementsByClassName('e-frame')[0].classList.remove('e-check');
              }

              if (document.querySelectorAll('ul').length > 1 && count && mainCount !== ulEleCount) {
                this.mainList.removeChild(this.mainList.getElementsByTagName('li')[listindex]);
                listindex = 0;
              } else {
                listindex++;
              }

              count = 0;
              valueindex = 0;
            }
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
          var wrapper = this.element.tagName === 'EJS-LISTBOX' ? this.element : this.list;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.list, 'click', this.clickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(wrapper, 'keydown', this.keyDownHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(wrapper, 'focusout', this.focusOutHandler, this);

          this.wireToolbarEvent();

          if (this.selectionSettings.showCheckbox) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown', this.checkBoxSelectionModule.onDocumentClick);
          }

          if (this.fields.groupBy || this.element.querySelector('select>optgroup')) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'scroll', this.setFloatingHeader);
          }

          if (form) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(form, 'reset', this.formResetHandler, this);
          }
        }
      }, {
        key: "wireToolbarEvent",
        value: function wireToolbarEvent() {
          if (this.toolbarSettings.items.length) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.getToolElem(), 'click', this.toolbarClickHandler, this);
          }
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          var form = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');
          var wrapper = this.element.tagName === 'EJS-LISTBOX' ? this.element : this.list;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.list, 'click', this.clickHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(wrapper, 'keydown', this.keyDownHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(wrapper, 'focusout', this.focusOutHandler);

          if (this.allowFiltering && this.clearFilterIconElem) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.clearFilterIconElem, 'click', this.clearText);
          }

          if (this.toolbarSettings.items.length) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getToolElem(), 'click', this.toolbarClickHandler);
          }

          if (form) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(form, 'reset', this.formResetHandler);
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          this.selectHandler(e);
        }
      }, {
        key: "checkSelectAll",
        value: function checkSelectAll() {
          var searchCount = 0;
          var liItems = this.list.querySelectorAll('li.' + dropDownBaseClasses.li);

          for (var i = 0; i < liItems.length; i++) {
            if (!liItems[i].classList.contains('e-disabled')) {
              searchCount++;
            }
          }

          var len = this.getSelectedItems().length;

          if (this.showSelectAll && searchCount) {
            this.notify('checkSelectAll', {
              module: 'CheckBoxSelection',
              value: searchCount === len ? 'check' : len === 0 ? 'uncheck' : 'indeterminate'
            });
          }
        }
      }, {
        key: "getQuery",
        value: function getQuery(query) {
          var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();

          if (this.allowFiltering) {
            var filterType = this.inputString === '' ? 'contains' : this.filterType;
            var dataType = this.typeOfData(this.dataSource)["typeof"];

            if (!(this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) && dataType === 'string' || dataType === 'number') {
              filterQuery.where('', filterType, this.inputString, this.ignoreCase, this.ignoreAccent);
            } else {
              var fields = this.fields.text ? this.fields.text : '';
              filterQuery.where(fields, filterType, this.inputString, this.ignoreCase, this.ignoreAccent);
            }
          } else {
            filterQuery = query ? query : this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();
          }

          return filterQuery;
        }
      }, {
        key: "setFiltering",
        value: function setFiltering() {
          var filterInputObj;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filterParent)) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
              this.filterParent = this.list.querySelector('.e-filter-parent');
              this.filterInput = this.list.querySelector('.e-input-filter');
            } else {
              this.filterParent = this.createElement('span', {
                className: listBoxClasses.filterParent
              });
              this.filterInput = this.createElement('input', {
                attrs: {
                  type: 'text'
                },
                className: listBoxClasses.filterInput
              });
              this.element.parentNode.insertBefore(this.filterInput, this.element);

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {}

              filterInputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].createInput({
                element: this.filterInput,
                buttons: [listBoxClasses.filterBarClearIcon],
                properties: {
                  placeholder: this.filterBarPlaceholder
                }
              }, this.createElement);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([filterInputObj.container], this.filterParent);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.filterParent], this.list);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.filterInput, {
                'aria-disabled': 'false',
                'aria-owns': this.element.id + '_options',
                'role': 'listbox',
                'aria-activedescendant': null,
                'autocomplete': 'off',
                'autocorrect': 'off',
                'autocapitalize': 'off',
                'spellcheck': 'false'
              });
            }

            if (this.height.toString().indexOf('%') < 0) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.list], 'e-filter-list');
            }

            this.inputString = this.filterInput.value;
            this.filterWireEvents();
            return filterInputObj;
          }
        }
      }, {
        key: "filterWireEvents",
        value: function filterWireEvents(filterElem) {
          if (filterElem) {
            this.filterInput = filterElem.querySelector('.e-input-filter');
          }

          this.clearFilterIconElem = this.filterInput.parentElement.querySelector('.' + listBoxClasses.clearIcon);

          if (this.clearFilterIconElem) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.clearFilterIconElem, 'click', this.clearText, this);

            if (!filterElem) {
              this.clearFilterIconElem.style.visibility = 'hidden';
            }
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'input', this.onInput, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keyup', this.KeyUp, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.filterInput, 'keydown', this.onKeyDown, this);
        }
      }, {
        key: "selectHandler",
        value: function selectHandler(e, isKey) {
          var isSelect = true;
          var currSelIdx;
          var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + 'e-list-item');
          var selectedLi = [li];

          if (li) {
            currSelIdx = [].slice.call(li.parentElement.children).indexOf(li);

            if (!this.selectionSettings.showCheckbox) {
              if ((e.ctrlKey || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) && this.isSelected(li)) {
                li.classList.remove(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                li.removeAttribute('aria-selected');
                isSelect = false;
              } else if (!(this.selectionSettings.mode === 'Multiple' && (e.ctrlKey || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice))) {
                this.getSelectedItems().forEach(function (ele) {
                  ele.removeAttribute('aria-selected');
                });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.getSelectedItems(), _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
              }
            } else {
              isSelect = !li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
            }

            if (e.shiftKey && !this.selectionSettings.showCheckbox && this.selectionSettings.mode !== 'Single') {
              selectedLi = [].slice.call(li.parentElement.children).slice(Math.min(currSelIdx, this.prevSelIdx), Math.max(currSelIdx, this.prevSelIdx) + 1).filter(function (ele) {
                return ele.classList.contains('e-list-item');
              });
            } else {
              this.prevSelIdx = [].slice.call(li.parentElement.children).indexOf(li);
            }

            if (isSelect) {
              if (!this.selectionSettings.showCheckbox) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(selectedLi, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
              }

              selectedLi.forEach(function (ele) {
                ele.setAttribute('aria-selected', 'true');
              });
              this.list.setAttribute('aria-activedescendant', li.id);
            }

            if (!isKey && (this.maximumSelectionLength > (this.value && this.value.length) || !isSelect) && (this.maximumSelectionLength >= (this.value && this.value.length) || !isSelect) && !(this.maximumSelectionLength < (this.value && this.value.length))) {
              this.notify('updatelist', {
                li: li,
                e: e,
                module: 'listbox'
              });
            }

            if (this.allowFiltering && !isKey) {
              var liDataValue = this.getFormattedValue(li.getAttribute('data-value'));

              if (!isSelect) {
                this.value = this.value.filter(function (value1) {
                  return value1 !== liDataValue;
                });
              } else {
                var values = [];
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(values, this.value);
                values.push(liDataValue);
                this.value = values;
              }

              if (document.querySelectorAll('ul').length < 2) {
                this.updateMainList();
              }
            }

            this.updateSelectedOptions();
            this.triggerChange(this.getSelectedItems(), e);
            this.checkMaxSelection();
          }
        }
      }, {
        key: "triggerChange",
        value: function triggerChange(selectedLis, event) {
          this.trigger('change', {
            elements: selectedLis,
            items: this.getDataByElements(selectedLis),
            value: this.value,
            event: event
          });
        }
      }, {
        key: "getDataByElems",
        value: function getDataByElems(elems) {
          var data = [];

          for (var i = 0, _len35 = elems.length; i < _len35; i++) {
            data.push(this.getDataByValue(this.getFormattedValue(elems[i].getAttribute('data-value'))));
          }

          return data;
        }
      }, {
        key: "getDataByElements",
        value: function getDataByElements(elems) {
          var data = [];
          var value;
          var sIdx = 0;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listData)) {
            var type = this.typeOfData(this.listData)["typeof"];

            if (type === 'string' || type === 'number' || type === 'boolean') {
              var _iterator99 = _createForOfIteratorHelper(this.listData),
                  _step99;

              try {
                for (_iterator99.s(); !(_step99 = _iterator99.n()).done;) {
                  var item = _step99.value;

                  for (var i = sIdx, _len36 = elems.length; i < _len36; i++) {
                    value = this.getFormattedValue(elems[i].getAttribute('data-value'));

                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) && item === value) {
                      sIdx = i;
                      data.push(item);
                      break;
                    }
                  }

                  if (elems.length === data.length) {
                    break;
                  }
                }
              } catch (err) {
                _iterator99.e(err);
              } finally {
                _iterator99.f();
              }
            } else {
              var _iterator100 = _createForOfIteratorHelper(this.listData),
                  _step100;

              try {
                for (_iterator100.s(); !(_step100 = _iterator100.n()).done;) {
                  var _item2 = _step100.value;

                  for (var _i83 = sIdx, _len37 = elems.length; _i83 < _len37; _i83++) {
                    value = this.getFormattedValue(elems[_i83].getAttribute('data-value'));

                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_item2) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.value ? this.fields.value : 'value', _item2) === value) {
                      sIdx = _i83;
                      data.push(_item2);
                      break;
                    }
                  }

                  if (elems.length === data.length) {
                    break;
                  }
                }
              } catch (err) {
                _iterator100.e(err);
              } finally {
                _iterator100.f();
              }
            }

            return data;
          }

          return null;
        }
      }, {
        key: "checkMaxSelection",
        value: function checkMaxSelection() {
          var limit = this.list.querySelectorAll('.e-list-item span.e-check').length;

          if (this.selectionSettings.showCheckbox) {
            var index = 0;
            var liCollElem;
            liCollElem = this.list.getElementsByClassName('e-list-item');

            for (index; index < liCollElem.length; index++) {
              if (!liCollElem[index].querySelector('.e-frame.e-check')) {
                if (limit === this.maximumSelectionLength) {
                  liCollElem[index].classList.add('e-disable');
                } else if (liCollElem[index].classList.contains('e-disable')) {
                  liCollElem[index].classList.remove('e-disable');
                }
              }
            }
          }
        }
      }, {
        key: "toolbarClickHandler",
        value: function toolbarClickHandler(e) {
          var btn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'button');

          if (btn) {
            this.toolbarAction = btn.getAttribute('data-value');

            if (btn.disabled) {
              return;
            }

            switch (this.toolbarAction) {
              case 'moveUp':
                this.moveUpDown(true);
                break;

              case 'moveDown':
                this.moveUpDown();
                break;

              case 'moveTo':
                this.moveItemTo();
                break;

              case 'moveFrom':
                this.moveItemFrom();
                break;

              case 'moveAllTo':
                this.moveAllItemTo();
                break;

              case 'moveAllFrom':
                this.moveAllItemFrom();
                break;
            }
          }
        }
      }, {
        key: "moveUpDown",
        value: function moveUpDown(isUp, isKey, value) {
          var _this501 = this;

          var elems = this.getSelectedItems();
          var tempItems;

          if (value) {
            elems = value;
          }

          if ((isUp && this.isSelected(this.ulElement.firstElementChild) || !isUp && this.isSelected(this.ulElement.lastElementChild)) && !value) {
            return;
          }

          tempItems = this.getDataByElems(elems);
          var localDataArgs = {
            cancel: false,
            items: tempItems,
            eventName: this.toolbarAction
          };
          this.trigger('actionBegin', localDataArgs);

          if (localDataArgs.cancel) {
            return;
          }

          (isUp ? elems : elems.reverse()).forEach(function (ele) {
            var jsonToIdx = Array.prototype.indexOf.call(_this501.ulElement.querySelectorAll('.e-list-item'), ele);
            var idx = Array.prototype.indexOf.call(_this501.ulElement.children, ele);
            Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(_this501.ulElement, _this501.ulElement, [idx], isUp ? idx - 1 : idx + 2);

            _this501.changeData(idx, isUp ? idx - 1 : idx + 1, isUp ? jsonToIdx - 1 : jsonToIdx + 1, ele);
          });
          this.trigger('actionComplete', {
            items: tempItems,
            eventName: this.toolbarAction
          });
          elems[0].focus();

          if (!isKey && this.toolbarSettings.items.length) {
            this.getToolElem().querySelector('[data-value=' + (isUp ? 'moveUp' : 'moveDown') + ']').focus();
          }

          this.updateToolBarState();
        }
      }, {
        key: "moveItemTo",
        value: function moveItemTo() {
          this.moveData(this, this.getScopedListBox());
        }
      }, {
        key: "moveItemFrom",
        value: function moveItemFrom() {
          this.moveData(this.getScopedListBox(), this);
        }
        /**
         * Called internally if any of the property value changed.
         * @returns void
         * @private
         */
        // tslint:disable-next-line:max-func-body-length

      }, {
        key: "moveData",
        value: function moveData(fListBox, tListBox, isKey, value, index) {
          var _this502 = this;

          var idx = [];
          var dataIdx = [];
          var jsonIdx = [];
          var sortIdx = [];
          var listData = [].slice.call(fListBox.listData);
          var tListData = [].slice.call(tListBox.listData);
          var sortData = [].slice.call(fListBox.sortedData);
          var tSortData = [].slice.call(tListBox.sortedData);
          var fliCollections = [].slice.call(fListBox.liCollections);
          var dataLiIdx = [];
          var tliCollections = [].slice.call(tListBox.liCollections);
          var tempItems = [];
          var data = [];
          var elems = fListBox.getSelectedItems();

          if (value) {
            elems = value;
          }

          var isRefresh = tListBox.sortOrder !== 'None' || tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox || tListBox.fields.groupBy;
          fListBox.value = [];

          if (elems.length) {
            this.removeSelected(fListBox, elems);
            elems.forEach(function (ele, i) {
              idx.push(Array.prototype.indexOf.call(fListBox.ulElement.children, ele)); // update sortable elem
              // To update lb view data

              dataLiIdx.push(Array.prototype.indexOf.call(fListBox.ulElement.querySelectorAll('.e-list-item'), ele)); // To update lb listdata data

              dataIdx.push(Array.prototype.indexOf.call(fListBox.listData, fListBox.getDataByElems([ele])[0])); // To update lb sorted data

              sortIdx.push(Array.prototype.indexOf.call(fListBox.sortedData, fListBox.getDataByElems([ele])[0])); // To update lb original data

              jsonIdx.push(Array.prototype.indexOf.call(fListBox.jsonData, fListBox.getDataByElems([ele])[0]));
            });

            if (this.sortOrder !== 'None') {
              sortIdx.forEach(function (i) {
                tempItems.push(fListBox.sortedData[i]);
              });
            } else {
              jsonIdx.forEach(function (i) {
                tempItems.push(fListBox.jsonData[i]);
              });
            }

            var localDataArgs = {
              cancel: false,
              items: tempItems,
              eventName: this.toolbarAction
            };
            fListBox.trigger('actionBegin', localDataArgs);

            if (localDataArgs.cancel) {
              return;
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              var rLiCollection = [];
              dataLiIdx.sort(function (n1, n2) {
                return n1 - n2;
              }).reverse().forEach(function (i) {
                rLiCollection.push(fliCollections.splice(i, 1)[0]);
              });
              fListBox.liCollections = fliCollections;

              if (index) {
                var toColl = tliCollections.splice(0, index);
                tListBox.liCollections = toColl.concat(rLiCollection.reverse()).concat(tliCollections);
              } else {
                tListBox.liCollections = tliCollections.concat(rLiCollection.reverse());
              }

              if (tListBox.listData.length === 0) {
                var noRecElem = tListBox.ulElement.getElementsByClassName('e-list-nrt')[0];

                if (noRecElem) {
                  tListBox.ulElement.removeChild(noRecElem);
                }
              }
            }

            dataIdx.sort(function (n1, n2) {
              return n2 - n1;
            }).forEach(function (i) {
              listData.splice(i, 1)[0];
            });
            sortIdx.sort(function (n1, n2) {
              return n2 - n1;
            }).forEach(function (i) {
              sortData.splice(i, 1)[0];
            });
            jsonIdx.slice().reverse().forEach(function (i) {
              data.push(fListBox.jsonData.splice(i, 1)[0]);
            });

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              if (isRefresh) {
                if (fListBox.fields.groupBy) {
                  fListBox.ulElement.innerHTML = fListBox.renderItems(listData, fListBox.fields).innerHTML;
                } else {
                  elems.forEach(function (ele) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
                  });
                }
              } else {
                Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(fListBox.ulElement, tListBox.ulElement, idx, index);
                fListBox.trigger('actionComplete', {
                  items: tempItems,
                  eventName: this.toolbarAction
                });
              }

              if (tListBox.mainList.childElementCount !== tListBox.jsonData.length) {
                tListBox.mainList = tListBox.ulElement;
              }

              fListBox.updateMainList();
            }

            var tJsonData = [].slice.call(tListBox.jsonData);
            tSortData = [].slice.call(tListBox.sortedData);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.selectNextList(elems, dataLiIdx, dataIdx, fListBox);
            }

            if (isKey) {
              this.list.focus();
            }

            fListBox.listData = listData;
            fListBox.sortedData = sortData;
            index = index ? index : tListData.length;

            for (var i = tempItems.length - 1; i >= 0; i--) {
              tListData.splice(index, 0, tempItems[i]);
              tJsonData.splice(index, 0, tempItems[i]);
              tSortData.splice(index, 0, tempItems[i]);
            }

            tListBox.listData = tListData;
            tListBox.jsonData = tJsonData;
            tListBox.sortedData = tSortData;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              // tslint:disable
              fListBox.interopAdaptor.invokeMethodAsync('UpdateListData', fListBox.listData).then(function () {
                fListBox.updateBlazorListData(null, true);

                _this502.selectNextList(elems, dataLiIdx, dataIdx, fListBox);

                fListBox.updateSelectedOptions();
              });
              tListBox.interopAdaptor.invokeMethodAsync('UpdateListData', tListBox.listData).then(function () {
                if (isRefresh) {
                  tListBox.setSelection();
                }

                tListBox.updateBlazorListData(null, true);
                fListBox.trigger('actionComplete', {
                  items: tempItems,
                  eventName: _this502.toolbarAction
                });
              }); // tslint:enable
            } else {
              if (isRefresh) {
                tListBox.ulElement.innerHTML = tListBox.renderItems(tListData, tListBox.fields).innerHTML;
                tListBox.setSelection();
              }

              fListBox.updateSelectedOptions();
            }

            if (fListBox.listData.length === 0) {
              // tslint:disable-next-line
              fListBox.l10nUpdate();
            }
          }

          if (fListBox.value.length === 1 && fListBox.getSelectedItems().length) {
            fListBox.value[0] = fListBox.getFormattedValue(fListBox.getSelectedItems()[0].getAttribute('data-value'));
          }
        }
      }, {
        key: "selectNextList",
        value: function selectNextList(elems, dataLiIdx, dataIdx, inst) {
          var childCnt = inst.ulElement.querySelectorAll('.e-list-item').length;
          var ele;
          var liIdx;
          var validIdx = -1;

          if (elems.length === 1 && childCnt && !inst.selectionSettings.showCheckbox) {
            liIdx = childCnt <= dataLiIdx[0] ? childCnt - 1 : dataLiIdx[0];
            ele = inst.ulElement.querySelectorAll('.e-list-item')[liIdx];
            validIdx = inst.getValidIndex(ele, liIdx, childCnt === dataIdx[0] ? 38 : 40);

            if (validIdx > -1) {
              inst.ulElement.querySelectorAll('.e-list-item')[validIdx].classList.add(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
            }
          }
        }
      }, {
        key: "moveAllItemTo",
        value: function moveAllItemTo() {
          this.moveAllData(this, this.getScopedListBox());
        }
      }, {
        key: "moveAllItemFrom",
        value: function moveAllItemFrom() {
          this.moveAllData(this.getScopedListBox(), this);
        }
      }, {
        key: "moveAllData",
        value: function moveAllData(fListBox, tListBox, isKey, index) {
          var _this503 = this;

          var listData = [].slice.call(tListBox.listData);
          var jsonData = [].slice.call(tListBox.jsonData);
          var isRefresh = tListBox.sortOrder !== 'None' || tListBox.selectionSettings.showCheckbox !== fListBox.selectionSettings.showCheckbox || tListBox.fields.groupBy;
          this.removeSelected(fListBox, fListBox.getSelectedItems());
          var tempItems = [].slice.call(fListBox.jsonData);
          var localDataArgs = {
            cancel: false,
            items: tempItems,
            eventName: this.toolbarAction
          };
          fListBox.trigger('actionBegin', localDataArgs);

          if (localDataArgs.cancel) {
            return;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            if (tListBox.listData.length === 0) {
              var noRecElem = tListBox.ulElement.getElementsByClassName('e-list-nrt')[0];

              if (noRecElem) {
                tListBox.ulElement.removeChild(noRecElem);
              }
            }

            if (isRefresh) {
              var _noRecElem = fListBox.ulElement.getElementsByClassName('e-list-nrt')[0];

              if (_noRecElem) {
                fListBox.ulElement.removeChild(_noRecElem);
              }
            }

            Object(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["moveTo"])(fListBox.ulElement, tListBox.ulElement, Array.apply(null, {
              length: fListBox.ulElement.childElementCount
            }).map(Number.call, Number), index);
            this.trigger('actionComplete', {
              items: tempItems,
              eventName: this.toolbarAction
            });
          }

          if (isKey) {
            this.list.focus();
          }

          index = index ? index : listData.length;

          for (var i = 0; i < fListBox.listData.length; i++) {
            listData.splice(index + i, 0, fListBox.listData[i]);
          }

          for (var _i84 = 0; _i84 < fListBox.jsonData.length; _i84++) {
            jsonData.splice(index + _i84, 0, fListBox.jsonData[_i84]);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var fliCollections = [].slice.call(fListBox.liCollections);
            var tliCollections = [].slice.call(tListBox.liCollections);
            fListBox.liCollections = [];

            if (index) {
              var toColl = tliCollections.splice(0, index);
              tListBox.liCollections = toColl.concat(fliCollections).concat(tliCollections);
            } else {
              tListBox.liCollections = tliCollections.concat(fliCollections);
            }
          }

          fListBox.value = [];
          listData = listData.filter(function (data) {
            return data.isHeader !== true;
          });
          tListBox.listData = listData;
          tListBox.jsonData = jsonData;
          fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            if (!isRefresh) {
              tListBox.sortedData = listData;
            } // tslint:disable


            fListBox.interopAdaptor.invokeMethodAsync('UpdateListData', fListBox.listData).then(function () {
              fListBox.updateBlazorListData(null, true);
              fListBox.updateSelectedOptions();
            });
            tListBox.interopAdaptor.invokeMethodAsync('UpdateListData', tListBox.listData).then(function () {
              tListBox.updateBlazorListData(null, true);
              fListBox.updateSelectedOptions();
              fListBox.trigger('actionComplete', {
                items: tempItems,
                eventName: _this503.toolbarAction
              });
            }); // tslint:enable
          } else {
            if (isRefresh) {
              tListBox.ulElement.innerHTML = tListBox.renderItems(listData, tListBox.fields).innerHTML;
              this.trigger('actionComplete', {
                items: tempItems,
                eventName: this.toolbarAction
              });
            } else {
              tListBox.sortedData = listData;
            }

            fListBox.updateSelectedOptions();
          }

          if (fListBox.listData.length === 0) {
            // tslint:disable-next-line
            fListBox.l10nUpdate();
          }
        }
      }, {
        key: "changeData",
        value: function changeData(fromIdx, toIdx, jsonToIdx, ele) {
          var listData = [].slice.call(this.listData);
          var jsonData = [].slice.call(this.jsonData);
          var sortData = [].slice.call(this.sortedData);
          var jsonIdx = Array.prototype.indexOf.call(this.jsonData, this.getDataByElems([ele])[0]);
          var sortIdx = Array.prototype.indexOf.call(this.sortedData, this.getDataByElems([ele])[0]);
          var liColl = [].slice.call(this.liCollections);
          listData.splice(toIdx, 0, listData.splice(fromIdx, 1)[0]);
          jsonData.splice(jsonToIdx, 0, jsonData.splice(jsonIdx, 1)[0]);
          sortData.splice(toIdx, 0, sortData.splice(sortIdx, 1)[0]);
          liColl.splice(toIdx, 0, liColl.splice(fromIdx, 1)[0]);
          this.listData = listData;
          this.jsonData = jsonData;
          this.liCollections = liColl;
          this.sortedData = sortData;
        }
      }, {
        key: "getSelectedItems",
        value: function getSelectedItems() {
          var ele = [];

          if (this.selectionSettings.showCheckbox) {
            [].slice.call(this.ulElement.getElementsByClassName('e-check')).forEach(function (cbox) {
              ele.push(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cbox, '.' + 'e-list-item'));
            });
          } else {
            ele = [].slice.call(this.ulElement.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected));
          }

          return ele;
        }
      }, {
        key: "getScopedListBox",
        value: function getScopedListBox() {
          var _this504 = this;

          var listObj;

          if (this.scope) {
            [].slice.call(document.querySelectorAll(this.scope)).forEach(function (ele) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(ele, _this504.getModuleName())) {
                listObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(ele, _this504.getModuleName());
              }
            });
          }

          return listObj;
        }
      }, {
        key: "getDragArgs",
        value: function getDragArgs(args, isDragEnd) {
          var elems = this.getSelectedItems();

          if (elems.length) {
            elems.pop();

            if (isDragEnd) {
              elems.push(args.target);
            }
          } else {
            elems = [args.target];
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            return {
              elements: elems,
              items: this.getDataByElems(elems),
              bindEvents: args.bindEvents,
              dragElement: args.dragElement
            };
          } else {
            return {
              elements: elems,
              items: this.getDataByElems(elems)
            };
          }
        }
      }, {
        key: "onKeyDown",
        value: function onKeyDown(e) {
          this.keyDownHandler(e);
          event.stopPropagation();
        }
      }, {
        key: "keyDownHandler",
        value: function keyDownHandler(e) {
          if ([32, 35, 36, 37, 38, 39, 40, 65].indexOf(e.keyCode) > -1 && !this.allowFiltering) {
            e.preventDefault();

            if (e.keyCode === 32 && this.ulElement.children.length) {
              this.selectHandler({
                target: this.ulElement.getElementsByClassName('e-focused')[0],
                ctrlKey: e.ctrlKey,
                shiftKey: e.shiftKey
              });
            } else if (e.keyCode === 65 && e.ctrlKey) {
              this.selectAll();
            } else if ((e.keyCode === 38 || e.keyCode === 40) && e.ctrlKey && e.shiftKey) {
              this.moveUpDown(e.keyCode === 38 ? true : false, true);
            } else if ((this.toolbarSettings.items.length || this.tBListBox) && (e.keyCode === 39 || e.keyCode === 37) && e.ctrlKey) {
              var listObj = this.tBListBox || this.getScopedListBox();

              if (e.keyCode === 39) {
                e.shiftKey ? this.moveAllData(this, listObj, true) : this.moveData(this, listObj, true);
              } else {
                e.shiftKey ? this.moveAllData(listObj, this, true) : this.moveData(listObj, this, true);
              }
            } else if (e.keyCode !== 37 && e.keyCode !== 39) {
              this.upDownKeyHandler(e);
            }
          } else if (this.allowFiltering) {
            if (e.keyCode === 40 || e.keyCode === 38) {
              this.upDownKeyHandler(e);
            }
          }
        }
      }, {
        key: "upDownKeyHandler",
        value: function upDownKeyHandler(e) {
          var ul = this.ulElement;
          var defaultIdx = e.keyCode === 40 || e.keyCode === 36 ? 0 : ul.childElementCount - 1;
          var fliIdx = defaultIdx;
          var fli = ul.getElementsByClassName('e-focused')[0] || ul.getElementsByClassName(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected)[0];

          if (fli) {
            if (e.keyCode !== 35 && e.keyCode !== 36) {
              fliIdx = Array.prototype.indexOf.call(ul.children, fli);
              e.keyCode === 40 ? fliIdx++ : fliIdx--;

              if (fliIdx < 0 || fliIdx > ul.childElementCount - 1) {
                return;
              }
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([fli], 'e-focused');
          }

          var cli = ul.children[fliIdx];

          if (cli) {
            fliIdx = this.getValidIndex(cli, fliIdx, e.keyCode);

            if (fliIdx === -1) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([fli], 'e-focused');
              return;
            }

            ul.children[fliIdx].focus();
            ul.children[fliIdx].classList.add('e-focused');

            if (!e.ctrlKey) {
              this.selectHandler({
                target: ul.children[fliIdx],
                ctrlKey: e.ctrlKey,
                shiftKey: e.shiftKey
              }, true);
            }
          }
        }
      }, {
        key: "KeyUp",
        value: function KeyUp(e) {
          var _this505 = this;

          var _char12 = String.fromCharCode(e.keyCode);

          var isWordCharacter = _char12.match(/\w/);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isWordCharacter)) {
            this.isValidKey = true;
          }

          this.isValidKey = e.keyCode === 8 || this.isValidKey;

          if (this.isValidKey) {
            this.isValidKey = false;

            switch (e.keyCode) {
              default:
                var text = this.targetElement();
                var keyCode = e.keyCode;

                if (this.allowFiltering) {
                  var eventArgsData = {
                    preventDefaultAction: false,
                    text: this.targetElement(),
                    updateData: function updateData(dataSource, query, fields) {
                      if (eventArgsData.cancel) {
                        return;
                      }

                      _this505.isFiltered = true;
                      _this505.remoteFilterAction = true;

                      _this505.dataUpdater(dataSource, query, fields);
                    },
                    event: e,
                    cancel: false
                  };
                  this.trigger('filtering', eventArgsData, function (args) {
                    _this505.isDataFetched = false;

                    if (eventArgsData.cancel || _this505.filterInput.value !== '' && _this505.isFiltered) {
                      return;
                    }

                    if (!eventArgsData.cancel && !_this505.isCustomFiltering && !eventArgsData.preventDefaultAction) {
                      _this505.inputString = _this505.filterInput.value;

                      _this505.filteringAction(_this505.jsonData, new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"](), _this505.fields);
                    }

                    if (!_this505.isFiltered && !_this505.isCustomFiltering && !eventArgsData.preventDefaultAction) {
                      _this505.dataUpdater(_this505.jsonData, new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"](), _this505.fields);
                    }
                  });
                }

            }
          }
        }
        /**
         * To filter the data from given data source by using query
         * @param  {Object[] | DataManager } dataSource - Set the data source to filter.
         * @param  {Query} query - Specify the query to filter the data.
         * @param  {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
         * @return {void}.
         */

      }, {
        key: "filter",
        value: function filter(dataSource, query, fields) {
          this.isCustomFiltering = true;
          this.filteringAction(dataSource, query, fields);
        }
      }, {
        key: "filteringAction",
        value: function filteringAction(dataSource, query, fields) {
          this.resetList(dataSource, fields, query);
        }
      }, {
        key: "targetElement",
        value: function targetElement() {
          this.targetInputElement = this.list.getElementsByClassName('e-input-filter')[0];
          return this.targetInputElement.value;
        }
      }, {
        key: "dataUpdater",
        value: function dataUpdater(dataSource, query, fields) {
          this.isDataFetched = false;
          var backCommand = true;

          if (this.targetElement().trim() === '') {
            var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;

            if (backCommand) {
              this.remoteCustomValue = false;
              this.onActionComplete(list, this.jsonData);
              this.notify('reOrder', {
                module: 'CheckBoxSelection',
                enable: this.selectionSettings.showCheckbox,
                e: this
              });
            }
          } else {
            this.resetList(dataSource, fields, query);
          }
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler() {
          var ele = this.list.getElementsByClassName('e-focused')[0];

          if (ele) {
            ele.classList.remove('e-focused');
          }

          if (this.allowFiltering) {
            this.refreshClearIcon();
          }
        }
      }, {
        key: "getValidIndex",
        value: function getValidIndex(cli, index, keyCode) {
          var cul = this.ulElement;

          if (cli.classList.contains('e-disabled') || cli.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].group)) {
            keyCode === 40 || keyCode === 36 ? index++ : index--;
          }

          if (index < 0 || index === cul.childElementCount) {
            return -1;
          }

          cli = cul.querySelectorAll('.e-list-item')[index];

          if (cli.classList.contains('e-disabled') || cli.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].group)) {
            index = this.getValidIndex(cli, index, keyCode);
          }

          return index;
        }
      }, {
        key: "updateSelectedOptions",
        value: function updateSelectedOptions() {
          var _this506 = this;

          var selectedOptions = [];
          var values = [];
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(values, this.value);
          this.getSelectedItems().forEach(function (ele) {
            if (!ele.classList.contains('e-grabbed')) {
              selectedOptions.push(_this506.getFormattedValue(ele.getAttribute('data-value')));
            }
          });

          if (this.mainList.childElementCount === this.ulElement.childElementCount) {
            if (this.allowFiltering && this.selectionSettings.showCheckbox) {
              for (var i = 0; i < selectedOptions.length; i++) {
                if (values.indexOf(selectedOptions[i]) > -1) {
                  continue;
                } else {
                  values.push(selectedOptions[i]);
                }
              }

              this.setProperties({
                value: values
              }, true);
            } else {
              this.setProperties({
                value: selectedOptions
              }, true);
            }
          }

          this.updateSelectTag();
          this.updateToolBarState();

          if (this.tBListBox) {
            this.tBListBox.updateToolBarState();
          }
        }
      }, {
        key: "clearSelection",
        value: function clearSelection() {
          var _this507 = this;

          var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.value;

          if (this.selectionSettings.showCheckbox) {
            var dvalue;
            this.getSelectedItems().forEach(function (li) {
              dvalue = _this507.getFormattedValue(li.getAttribute('data-value'));

              if (values.indexOf(dvalue) < 0) {
                li.getElementsByClassName('e-check')[0].classList.remove('e-check');
                li.getElementsByClassName('e-checkbox-wrapper')[0].removeAttribute('aria-checked');
                li.removeAttribute('aria-selected');
              }
            });
          }
        }
      }, {
        key: "setSelection",
        value: function setSelection() {
          var _this508 = this;

          var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.value;
          var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var isText = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
          var li;
          var liselect;

          if (values) {
            values.forEach(function (value) {
              var text;

              if (isText) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && typeof value === 'object') {
                  text = value[_this508.fields.text || 'text'];

                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(text)) {
                    return;
                  }

                  text = _this508.getValueByText(text);
                } else {
                  text = _this508.getValueByText(value);
                }
              } else {
                text = value;
              }

              li = _this508.list.querySelector('[data-value="' + text + '"]');

              if (li) {
                if (_this508.selectionSettings.showCheckbox) {
                  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
                } else {
                  liselect = li.classList.contains('e-selected');
                }

                if (!isSelect && liselect || isSelect && !liselect && li) {
                  if (_this508.selectionSettings.showCheckbox) {
                    _this508.notify('updatelist', {
                      li: li,
                      module: 'listbox'
                    });
                  } else {
                    if (isSelect) {
                      li.classList.add(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                      li.setAttribute('aria-selected', 'true');
                    } else {
                      li.classList.remove(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                      li.removeAttribute('aria-selected');
                    }
                  }
                }
              }
            });
          }

          this.updateSelectTag();
        }
      }, {
        key: "updateSelectTag",
        value: function updateSelectTag() {
          var ele = this.getSelectTag();
          var innerHTML = '';
          ele.innerHTML = '';

          if (this.value) {
            for (var i = 0, _len38 = this.value.length; i < _len38; i++) {
              innerHTML += '<option selected value="' + this.value[i] + '"></option>';
            }

            ele.innerHTML += innerHTML;
          }

          this.checkSelectAll();
        }
      }, {
        key: "checkDisabledState",
        value: function checkDisabledState(inst) {
          return (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? inst.ulElement.querySelectorAll('.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].li).length : inst.ulElement.childElementCount) === 0;
        }
      }, {
        key: "updateToolBarState",
        value: function updateToolBarState() {
          var _this509 = this;

          if (this.toolbarSettings.items.length) {
            var listObj = this.getScopedListBox();
            var wrap = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
            this.toolbarSettings.items.forEach(function (value) {
              var btn = wrap.querySelector('[data-value="' + value + '"]');

              switch (value) {
                case 'moveAllTo':
                  btn.disabled = _this509.checkDisabledState(_this509);
                  break;

                case 'moveAllFrom':
                  btn.disabled = _this509.checkDisabledState(listObj);
                  break;

                case 'moveFrom':
                  btn.disabled = listObj.value && listObj.value.length ? false : true;
                  break;

                case 'moveUp':
                  btn.disabled = _this509.value && _this509.value.length && !_this509.isSelected(_this509.ulElement.children[0]) ? false : true;
                  break;

                case 'moveDown':
                  btn.disabled = _this509.value && _this509.value.length && !_this509.isSelected(_this509.ulElement.children[_this509.ulElement.childElementCount - 1]) ? false : true;
                  break;

                default:
                  btn.disabled = _this509.value && _this509.value.length ? false : true;
                  break;
              }
            });
          }
        }
      }, {
        key: "setCheckboxPosition",
        value: function setCheckboxPosition() {
          var listWrap = this.list;

          if (!this.initLoad && this.selectionSettings.checkboxPosition === 'Left') {
            listWrap.classList.remove('e-right');
          }

          if (this.selectionSettings.checkboxPosition === 'Right') {
            listWrap.classList.add('e-right');
          }
        }
      }, {
        key: "showCheckbox",
        value: function showCheckbox(_showCheckbox) {
          var index = 0;
          var liColl = this.list.lastElementChild.querySelectorAll('li');
          var liCollLen = this.list.lastElementChild.getElementsByClassName('e-list-item').length;

          if (_showCheckbox) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.ulElement = this.renderItems(this.listData, this.fields);
              this.mainList = this.ulElement;
              this.list.removeChild(this.list.getElementsByTagName('ul')[0]);
              this.list.appendChild(this.ulElement);
            }

            if (this.selectionSettings.showSelectAll && !this.list.getElementsByClassName('e-selectall-parent')[0]) {
              var l10nShow = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), {
                selectAllText: 'Select All',
                unSelectAllText: 'Unselect All'
              }, this.locale);
              this.showSelectAll = true;
              this.selectAllText = l10nShow.getConstant('selectAllText');
              this.unSelectAllText = l10nShow.getConstant('unSelectAllText');
              this.popupWrapper = this.list;
              this.checkBoxSelectionModule.checkAllParent = null;
              this.notify('selectAll', {});
              this.checkSelectAll();
            }
          } else {
            if (this.list.getElementsByClassName('e-selectall-parent')[0]) {
              this.list.removeChild(this.list.getElementsByClassName('e-selectall-parent')[0]);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              for (index; index < liCollLen; index++) {
                if (liColl[index].classList.contains('e-list-item')) {
                  liColl[index].removeChild(liColl[index].getElementsByClassName('e-checkbox-wrapper')[0]);
                }

                if (liColl[index].hasAttribute('aria-selected')) {
                  liColl[index].removeAttribute('aria-selected');
                }
              }

              this.mainList = this.ulElement;
            }
          }

          this.value = [];
        }
      }, {
        key: "isSelected",
        value: function isSelected(ele) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return ele.classList.contains(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected) || ele.querySelector('.e-check') !== null;
          } else {
            return false;
          }
        }
      }, {
        key: "getSelectTag",
        value: function getSelectTag() {
          return this.list.getElementsByClassName('e-hidden-select')[0];
        }
      }, {
        key: "getToolElem",
        value: function getToolElem() {
          return this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.value = this.initialSelectedOptions;
        }
        /**
         * Return the module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'listbox';
        }
        /**
         * Get the properties to be maintained in the persisted state.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['value']);
        }
      }, {
        key: "getLocaleName",
        value: function getLocaleName() {
          return 'listbox';
        }
      }, {
        key: "destroy",
        value: function destroy() {
          if (this.itemTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])("".concat(this.element.id).concat(ITEMTEMPLATE_PROPERTY$1), ITEMTEMPLATE_PROPERTY$1);
          }

          this.unwireEvents();

          if (this.element.tagName === 'EJS-LISTBOX') {
            this.element.innerHTML = '';
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
              this.element.style.display = 'inline-block';

              if (this.toolbarSettings.items.length) {
                this.list.parentElement.parentElement.insertBefore(this.list, this.list.parentElement);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.list.nextElementSibling);
              }

              this.list.parentElement.insertBefore(this.element, this.list);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
            _get(_getPrototypeOf(ListBox.prototype), "destroy", this).call(this);
          }
        }
        /**
         * Called internally if any of the property value changed.
         * @returns void
         * @private
         */
        // tslint:disable-next-line:max-func-body-length

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var wrap = this.toolbarSettings.items.length ? this.list.parentElement : this.list;

          _get(_getPrototypeOf(ListBox.prototype), "onPropertyChanged", this).call(this, newProp, oldProp);

          this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);

          for (var _i85 = 0, _Object$keys23 = Object.keys(newProp); _i85 < _Object$keys23.length; _i85++) {
            var prop = _Object$keys23[_i85];

            switch (prop) {
              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrap], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrap], newProp.cssClass.split(' '));
                }

                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  wrap.classList.add('e-rtl');
                } else {
                  wrap.classList.remove('e-rtl');
                }

                break;

              case 'value':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.list.querySelectorAll('.' + _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected), _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_2__["cssClass"].selected);
                this.clearSelection(this.value);
                this.setSelection();
                break;

              case 'height':
                this.setHeight();
                break;

              case 'enabled':
                this.setEnable();
                break;

              case 'allowDragAndDrop':
                if (newProp.allowDragAndDrop) {
                  this.initDraggable();
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(this.ulElement, 'sortable').destroy();
                }

                break;

              case 'allowFiltering':
                if (this.allowFiltering) {
                  this.setFiltering();
                } else {
                  this.list.removeChild(this.list.getElementsByClassName('e-filter-parent')[0]);
                  this.filterParent = null;
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.list], 'e-filter-list');
                }

                break;

              case 'filterBarPlaceholder':
                if (this.allowFiltering) {
                  if (this.filterInput) {
                    _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_4__["Input"].setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
                  }
                }

                break;

              case 'scope':
                if (this.allowDragAndDrop) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(this.ulElement, 'sortable').scope = newProp.scope;
                }

                if (this.toolbarSettings.items.length) {
                  if (oldProp.scope) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(document.querySelector(oldProp.scope), this.getModuleName()).tBListBox = null;
                  }

                  if (newProp.scope) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(document.querySelector(newProp.scope), this.getModuleName()).tBListBox = this;
                  }
                }

                break;

              case 'toolbarSettings':
                var ele = void 0;
                var pos = newProp.toolbarSettings.position;
                var toolElem = this.getToolElem();

                if (pos) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrap], ['e-right', 'e-left']);
                  wrap.classList.add('e-' + pos.toLowerCase());

                  if (pos === 'Left') {
                    wrap.insertBefore(toolElem, this.list);
                  } else {
                    wrap.appendChild(toolElem);
                  }
                }

                if (newProp.toolbarSettings.items) {
                  if (oldProp.toolbarSettings.items.length) {
                    ele = this.list.parentElement;
                    ele.parentElement.insertBefore(this.list, ele);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
                  }

                  this.initToolbarAndStyles();
                  this.wireToolbarEvent();
                }

                break;

              case 'selectionSettings':
                var showSelectAll = newProp.selectionSettings.showSelectAll;
                var showCheckbox = newProp.selectionSettings.showCheckbox;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(showSelectAll)) {
                  this.showSelectAll = showSelectAll;

                  if (this.showSelectAll) {
                    var l10nSel = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"](this.getModuleName(), {
                      selectAllText: 'Select All',
                      unSelectAllText: 'Unselect All'
                    }, this.locale);
                    this.checkBoxSelectionModule.checkAllParent = null;
                    this.showSelectAll = true;
                    this.selectAllText = l10nSel.getConstant('selectAllText');
                    this.unSelectAllText = l10nSel.getConstant('selectAllText');
                    this.popupWrapper = this.list;
                  }

                  this.notify('selectAll', {});
                  this.checkSelectAll();
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(showCheckbox)) {
                  this.showCheckbox(showCheckbox);
                }

                if (this.selectionSettings.showCheckbox) {
                  this.setCheckboxPosition();
                }

                break;

              case 'dataSource':
                this.jsonData = [].slice.call(this.dataSource);
                break;
            }
          }
        }
      }]);

      return ListBox;
    }(DropDownBase);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListBox.prototype, "cssClass", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], ListBox.prototype, "value", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListBox.prototype, "height", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListBox.prototype, "allowDragAndDrop", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], ListBox.prototype, "maximumSelectionLength", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListBox.prototype, "allowFiltering", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListBox.prototype, "scope", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ListBox.prototype, "ignoreCase", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ListBox.prototype, "filterBarPlaceholder", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "beforeItemRender", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "filtering", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "select", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "change", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "beforeDrop", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "dragStart", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "drag", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "drop", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListBox.prototype, "dataBound", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ListBox.prototype, "groupTemplate", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('No records found')], ListBox.prototype, "noRecordsTemplate", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Request failed')], ListBox.prototype, "actionFailureTemplate", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], ListBox.prototype, "zIndex", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListBox.prototype, "ignoreAccent", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ToolbarSettings)], ListBox.prototype, "toolbarSettings", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SelectionSettings)], ListBox.prototype, "selectionSettings", void 0);

    ListBox = ListBox_1 = __decorate$6([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ListBox);
    var listBoxClasses = {
      backIcon: 'e-input-group-icon e-back-icon e-icons',
      filterBarClearIcon: 'e-input-group-icon e-clear-icon e-icons',
      filterInput: 'e-input-filter',
      filterParent: 'e-filter-parent',
      clearIcon: 'e-clear-icon'
    };
    /**
     * export all modules from current location
     */

    /**
     * export all modules from current location
     */
    //# sourceMappingURL=ej2-dropdowns.es2015.js.map

    /***/
  },

  /***/
  "./node_modules/@syncfusion/ej2-inputs/dist/es6/ej2-inputs.es2015.js":
  /*!***************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-inputs/dist/es6/ej2-inputs.es2015.js ***!
    \***************************************************************************/

  /*! exports provided: NumericTextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputFocusHandler, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox, Input, TicksData, ColorRangeData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox */

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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-popups */
    "./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-splitbuttons */
    "./node_modules/@syncfusion/ej2-splitbuttons/dist/es6/ej2-splitbuttons.es2015.js");

    var CLASSNAMES = {
      RTL: 'e-rtl',
      DISABLE: 'e-disabled',
      INPUT: 'e-input',
      TEXTAREA: 'e-multi-line-input',
      INPUTGROUP: 'e-input-group',
      FLOATINPUT: 'e-float-input',
      FLOATLINE: 'e-float-line',
      FLOATTEXT: 'e-float-text',
      CLEARICON: 'e-clear-icon',
      CLEARICONHIDE: 'e-clear-icon-hide',
      LABELTOP: 'e-label-top',
      LABELBOTTOM: 'e-label-bottom',
      NOFLOATLABEL: 'e-no-float-label',
      INPUTCUSTOMTAG: 'e-input-custom-tag',
      FLOATCUSTOMTAG: 'e-float-custom-tag'
    };
    /**
     * Base for Input creation through util methods.
     */

    var Input;

    (function (Input) {
      var floatType;
      /**
       * Create a wrapper to input element with multiple span elements and set the basic properties to input based components.
       * ```
       * E.g : Input.createInput({ element: element, floatLabelType : "Auto", properties: { placeholder: 'Search' } });
       * ```
       * @param args
       */

      function createInput(args, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var inputObject = {
          container: null,
          buttons: [],
          clearButton: null
        };
        floatType = args.floatLabelType;

        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.floatLabelType) || args.floatLabelType === 'Never') {
          inputObject.container = createInputContainer(args, CLASSNAMES.INPUTGROUP, CLASSNAMES.INPUTCUSTOMTAG, 'span', makeElement);
          args.element.parentNode.insertBefore(inputObject.container, args.element);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([args.element], CLASSNAMES.INPUT);
          inputObject.container.appendChild(args.element);
        } else {
          createFloatingInput(args, inputObject, makeElement);
        }

        bindInitialEvent(args);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.properties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.properties.showClearButton) && args.properties.showClearButton && args.element.tagName !== 'TEXTAREA') {
          setClearButton(args.properties.showClearButton, args.element, inputObject, true, makeElement);
          inputObject.clearButton.setAttribute('role', 'button');

          if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([inputObject.container], CLASSNAMES.INPUTGROUP);
          }
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.buttons) && args.element.tagName !== 'TEXTAREA') {
          for (var i = 0; i < args.buttons.length; i++) {
            inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));
          }
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.element) && args.element.tagName === 'TEXTAREA') {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([inputObject.container], CLASSNAMES.TEXTAREA);
        }

        inputObject = setPropertyValue(args, inputObject);
        return inputObject;
      }

      Input.createInput = createInput;

      function bindInitialEvent(args) {
        checkInputValue(args.floatLabelType, args.element);
        args.element.addEventListener('focus', function () {
          var parent = getParentNode(this);

          if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
            parent.classList.add('e-input-focus');
          }
        });
        args.element.addEventListener('blur', function () {
          var parent = getParentNode(this);

          if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
            parent.classList.remove('e-input-focus');
          }
        });
        args.element.addEventListener('input', function () {
          checkInputValue(floatType, args.element);
        });
      }

      Input.bindInitialEvent = bindInitialEvent;

      function checkInputValue(floatLabelType, inputElement) {
        var inputValue = inputElement.value;

        if (inputValue !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputValue)) {
          inputElement.parentElement.classList.add('e-valid-input');
        } else if (floatLabelType !== 'Always' && inputElement.parentElement) {
          inputElement.parentElement.classList.remove('e-valid-input');
        }
      }

      function _focusFn() {
        var label = getParentNode(this).getElementsByClassName('e-float-text')[0];

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], CLASSNAMES.LABELTOP);

          if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], CLASSNAMES.LABELBOTTOM);
          }
        }
      }

      function _blurFn() {
        var parent = getParentNode(this);

        if (parent.getElementsByTagName('textarea')[0] ? parent.getElementsByTagName('textarea')[0].value === '' : parent.getElementsByTagName('input')[0].value === '') {
          var label = parent.getElementsByClassName('e-float-text')[0];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
            if (label.classList.contains(CLASSNAMES.LABELTOP)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], CLASSNAMES.LABELTOP);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], CLASSNAMES.LABELBOTTOM);
          }
        }
      }

      function wireFloatingEvents(element) {
        element.addEventListener('focus', _focusFn);
        element.addEventListener('blur', _blurFn);
      }

      Input.wireFloatingEvents = wireFloatingEvents;

      function unwireFloatingEvents(element) {
        element.removeEventListener('focus', _focusFn);
        element.removeEventListener('blur', _blurFn);
      }

      function createFloatingInput(args, inputObject, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var floatLinelement;
        var floatLabelElement;

        if (args.floatLabelType === 'Auto') {
          wireFloatingEvents(args.element);
        }

        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputObject.container)) {
          inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div', makeElement);
          args.element.parentNode.insertBefore(inputObject.container, args.element);
        } else {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.customTag)) {
            inputObject.container.classList.add(CLASSNAMES.FLOATCUSTOMTAG);
          }

          inputObject.container.classList.add(CLASSNAMES.FLOATINPUT);
        }

        floatLinelement = makeElement('span', {
          className: CLASSNAMES.FLOATLINE
        });
        floatLabelElement = makeElement('label', {
          className: CLASSNAMES.FLOATTEXT
        });

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.element.id) && args.element.id !== '') {
          floatLabelElement.id = 'label_' + args.element.id.replace(/ /g, '_');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(args.element, {
            'aria-labelledby': floatLabelElement.id
          });
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.element.placeholder) && args.element.placeholder !== '') {
          floatLabelElement.innerText = encodePlaceHolder(args.element.placeholder);
          args.element.removeAttribute('placeholder');
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.properties) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.properties.placeholder) && args.properties.placeholder !== '') {
          floatLabelElement.innerText = encodePlaceHolder(args.properties.placeholder);
        }

        if (!floatLabelElement.innerText) {
          inputObject.container.classList.add(CLASSNAMES.NOFLOATLABEL);
        }

        if (inputObject.container.classList.contains('e-float-icon-left')) {
          var inputWrap = inputObject.container.querySelector('.e-input-in-wrap');
          inputWrap.appendChild(args.element);
          inputWrap.appendChild(floatLinelement);
          inputWrap.appendChild(floatLabelElement);
        } else {
          inputObject.container.appendChild(args.element);
          inputObject.container.appendChild(floatLinelement);
          inputObject.container.appendChild(floatLabelElement);
        }

        updateLabelState(args.element.value, floatLabelElement);

        if (args.floatLabelType === 'Always') {
          if (floatLabelElement.classList.contains(CLASSNAMES.LABELBOTTOM)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([floatLabelElement], CLASSNAMES.LABELBOTTOM);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([floatLabelElement], CLASSNAMES.LABELTOP);
        }

        if (args.floatLabelType === 'Auto') {
          args.element.addEventListener('input', function (event) {
            updateLabelState(args.element.value, floatLabelElement);
          });
          args.element.addEventListener('blur', function (event) {
            updateLabelState(args.element.value, floatLabelElement);
          });
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.element.getAttribute('id'))) {
          floatLabelElement.setAttribute('for', args.element.getAttribute('id'));
        }
      }

      function checkFloatLabelType(type, container) {
        if (type === 'Always' && container.classList.contains('e-outline')) {
          container.classList.add('e-valid-input');
        }
      }

      function setPropertyValue(args, inputObject) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.properties)) {
          for (var _i86 = 0, _Object$keys24 = Object.keys(args.properties); _i86 < _Object$keys24.length; _i86++) {
            var prop = _Object$keys24[_i86];

            switch (prop) {
              case 'cssClass':
                setCssClass(args.properties.cssClass, [inputObject.container]);
                checkFloatLabelType(args.floatLabelType, inputObject.container);
                break;

              case 'enabled':
                setEnabled(args.properties.enabled, args.element, args.floatLabelType, inputObject.container);
                break;

              case 'enableRtl':
                setEnableRtl(args.properties.enableRtl, [inputObject.container]);
                break;

              case 'placeholder':
                setPlaceholder(args.properties.placeholder, args.element);
                break;

              case 'readonly':
                setReadonly(args.properties.readonly, args.element);
                break;
            }
          }
        }

        return inputObject;
      }

      function updateIconState(value, button) {
        if (value) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([button], CLASSNAMES.CLEARICONHIDE);
        } else {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], CLASSNAMES.CLEARICONHIDE);
        }
      }

      function updateLabelState(value, label) {
        if (value) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], CLASSNAMES.LABELTOP);

          if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], CLASSNAMES.LABELBOTTOM);
          }
        } else {
          if (label.classList.contains(CLASSNAMES.LABELTOP)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([label], CLASSNAMES.LABELTOP);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([label], CLASSNAMES.LABELBOTTOM);
        }
      }

      function getParentNode(element) {
        var parentNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.parentNode) ? element : element.parentNode;

        if (parentNode && parentNode.classList.contains('e-input-in-wrap')) {
          parentNode = parentNode.parentNode;
        }

        return parentNode;
      }
      /**
       * To create clear button.
       */


      function createClearButton(element, inputObject, initial, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var button = makeElement('span', {
          className: CLASSNAMES.CLEARICON
        });
        var container = inputObject.container;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(initial)) {
          container.appendChild(button);
        } else {
          var baseElement = inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT) ? inputObject.container.querySelector('.' + CLASSNAMES.FLOATTEXT) : element;
          baseElement.insertAdjacentElement('afterend', button);
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(container) && container.classList.contains(CLASSNAMES.FLOATINPUT)) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([container], CLASSNAMES.INPUTGROUP);
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], CLASSNAMES.CLEARICONHIDE);
        wireClearBtnEvents(element, button, container);
        button.setAttribute('aria-label', 'close');
        return button;
      }

      function wireClearBtnEvents(element, button, container) {
        button.addEventListener('click', function (event) {
          if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
            event.preventDefault();

            if (element !== document.activeElement) {
              element.focus();
            }

            element.value = '';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], CLASSNAMES.CLEARICONHIDE);
          }
        });
        element.addEventListener('input', function (event) {
          updateIconState(element.value, button);
        });
        element.addEventListener('focus', function (event) {
          updateIconState(element.value, button);
        });
        element.addEventListener('blur', function (event) {
          setTimeout(function () {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], CLASSNAMES.CLEARICONHIDE);
          }, 200);
        });
      }

      Input.wireClearBtnEvents = wireClearBtnEvents;

      function validateLabel(element, floatLabelType) {
        var parent = getParentNode(element);

        if (parent.classList.contains(CLASSNAMES.FLOATINPUT) && floatLabelType === 'Auto') {
          var label = getParentNode(element).getElementsByClassName('e-float-text')[0];
          updateLabelState(element.value, label);
        }
      }
      /**
       * To create input box contianer.
       */


      function createInputContainer(args, className, tagClass, tag, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var container;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.customTag)) {
          container = makeElement(args.customTag, {
            className: className
          });
          container.classList.add(tagClass);
        } else {
          container = makeElement(tag, {
            className: className
          });
        }

        container.classList.add('e-control-wrapper');
        return container;
      }

      function encodePlaceHolder(placeholder) {
        var result = '';

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(placeholder) && placeholder !== '') {
          var spanEle = document.createElement('span');
          spanEle.innerHTML = '<input  placeholder="' + placeholder + '"/>';
          var hiddenInput = spanEle.children[0];
          result = hiddenInput.placeholder;
        }

        return result;
      }
      /**
       * Sets the value to the input element.
       * ```
       * E.g : Input.setValue('content', element, "Auto", true );
       * ```
       * @param value - Specify the value of the input element.
       * @param element - The element on which the specified value is updated.
       * @param floatLabelType - Specify the float label type of the input element.
       * @param clearButton - Boolean value to specify whether the clear icon is enabled / disabled on the input.
       */


      function setValue$$1(value, element, floatLabelType, clearButton) {
        element.value = value;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(floatLabelType) && floatLabelType === 'Auto') {
          validateLabel(element, floatLabelType);
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clearButton) && clearButton) {
          var parentElement = getParentNode(element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentElement)) {
            var button = parentElement.getElementsByClassName(CLASSNAMES.CLEARICON)[0];

            if (element.value && parentElement.classList.contains('e-input-focus')) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([button], CLASSNAMES.CLEARICONHIDE);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([button], CLASSNAMES.CLEARICONHIDE);
            }
          }
        }

        checkInputValue(floatLabelType, element);
      }

      Input.setValue = setValue$$1;
      /**
       * Sets the single or multiple cssClass to wrapper of input element.
       * ```
       * E.g : Input.setCssClass('e-custom-class', [element]);
       * ```
       * @param cssClass - Css class names which are needed to add.
       * @param elements - The elements which are needed to add / remove classes.
       * @param oldClass - Css class names which are needed to remove. If old classes are need to remove, can give this optional parameter.
       */

      function setCssClass(cssClass, elements, oldClass) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldClass) && oldClass !== '') {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, oldClass.split(' '));
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cssClass) && cssClass !== '') {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(elements, cssClass.split(' '));
        }
      }

      Input.setCssClass = setCssClass;
      /**
       * Set the width to the wrapper of input element.
       * ```
       * E.g : Input.setWidth('200px', container);
       * ```
       * @param width - Width value which is need to add.
       * @param container - The element on which the width is need to add.
       */

      function setWidth(width, container) {
        if (typeof width === 'number') {
          container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
        } else if (typeof width === 'string') {
          container.style.width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
        }
      }

      Input.setWidth = setWidth;
      /**
       * Set the placeholder attribute to the input element.
       * ```
       * E.g : Input.setPlaceholder('Search here', element);
       * ```
       * @param placeholder - Placeholder value which is need to add.
       * @param element - The element on which the placeholder is need to add.
       */

      function setPlaceholder(placeholder, element) {
        var parentElement;
        placeholder = encodePlaceHolder(placeholder);
        parentElement = getParentNode(element);

        if (parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(placeholder) && placeholder !== '') {
            parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = placeholder;
            parentElement.classList.remove(CLASSNAMES.NOFLOATLABEL);
            element.removeAttribute('placeholder');
          } else {
            parentElement.classList.add(CLASSNAMES.NOFLOATLABEL);
            parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';
          }
        } else {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(placeholder) && placeholder !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'placeholder': placeholder,
              'aria-placeholder': placeholder
            });
          } else {
            element.removeAttribute('placeholder');
            element.removeAttribute('aria-placeholder');
          }
        }
      }

      Input.setPlaceholder = setPlaceholder;
      /**
       * Set the read only attribute to the input element
       * ```
       * E.g : Input.setReadonly(true, element);
       * ```
       * @param isReadonly
       * - Boolean value to specify whether to set read only. Setting "True" value enables read only.
       * @param element
       * - The element which is need to enable read only.
       */

      function setReadonly(isReadonly, element, floatLabelType) {
        if (isReadonly) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
            readonly: ''
          });
        } else {
          element.removeAttribute('readonly');
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(floatLabelType)) {
          validateLabel(element, floatLabelType);
        }
      }

      Input.setReadonly = setReadonly;
      /**
       * Displays the element direction from right to left when its enabled.
       * ```
       * E.g : Input.setEnableRtl(true, [inputObj.container]);
       * ```
       * @param isRtl
       * - Boolean value to specify whether to set RTL. Setting "True" value enables the RTL mode.
       * @param elements
       * - The elements that are needed to enable/disable RTL.
       */

      function setEnableRtl(isRtl, elements) {
        if (isRtl) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(elements, CLASSNAMES.RTL);
        } else {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, CLASSNAMES.RTL);
        }
      }

      Input.setEnableRtl = setEnableRtl;
      /**
       * Enables or disables the given input element.
       * ```
       * E.g : Input.setEnabled(false, element);
       * ```
       * @param isEnable
       * - Boolean value to specify whether to enable or disable.
       * @param element
       * - Element to be enabled or disabled.
       */

      function setEnabled(isEnable, element, floatLabelType, inputContainer) {
        var disabledAttrs = {
          'disabled': 'disabled',
          'aria-disabled': 'true'
        };
        var considerWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputContainer) ? false : true;

        if (isEnable) {
          element.classList.remove(CLASSNAMES.DISABLE);
          removeAttributes(disabledAttrs, element);

          if (considerWrapper) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([inputContainer], CLASSNAMES.DISABLE);
          }
        } else {
          element.classList.add(CLASSNAMES.DISABLE);
          addAttributes(disabledAttrs, element);

          if (considerWrapper) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([inputContainer], CLASSNAMES.DISABLE);
          }
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(floatLabelType)) {
          validateLabel(element, floatLabelType);
        }
      }

      Input.setEnabled = setEnabled;

      function setClearButton(isClear, element, inputObject, initial, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];

        if (isClear) {
          inputObject.clearButton = createClearButton(element, inputObject, initial, makeElement);
        } else {
          inputObject.clearButton.remove();
          inputObject.clearButton = null;
        }
      }

      Input.setClearButton = setClearButton;
      /**
       * Removing the multiple attributes from the given element such as "disabled","id" , etc.
       * ```
       * E.g : Input.removeAttributes({ 'disabled': 'disabled', 'aria-disabled': 'true' }, element);
       * ```
       * @param attrs
       *  - Array of attributes which are need to removed from the element.
       * @param element
       *  - Element on which the attributes are needed to be removed.
       */

      function removeAttributes(attrs, element) {
        for (var _i87 = 0, _Object$keys25 = Object.keys(attrs); _i87 < _Object$keys25.length; _i87++) {
          var key = _Object$keys25[_i87];
          var parentElement = void 0;
          parentElement = getParentNode(element);

          if (key === 'disabled') {
            element.classList.remove(CLASSNAMES.DISABLE);
          }

          if (key === 'disabled' && parentElement.classList.contains(CLASSNAMES.INPUTGROUP)) {
            parentElement.classList.remove(CLASSNAMES.DISABLE);
          }

          if (key === 'placeholder' && parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
            parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';
          } else {
            element.removeAttribute(key);
          }
        }
      }

      Input.removeAttributes = removeAttributes;
      /**
       * Adding the multiple attributes to the given element such as "disabled","id" , etc.
       * ```
       * E.g : Input.addAttributes({ 'id': 'inputpopup' }, element);
       * ```
       * @param attrs
       * - Array of attributes which is added to element.
       * @param element
       * - Element on which the attributes are needed to be added.
       */

      function addAttributes(attrs, element) {
        for (var _i88 = 0, _Object$keys26 = Object.keys(attrs); _i88 < _Object$keys26.length; _i88++) {
          var key = _Object$keys26[_i88];
          var parentElement = void 0;
          parentElement = getParentNode(element);

          if (key === 'disabled') {
            element.classList.add(CLASSNAMES.DISABLE);
          }

          if (key === 'disabled' && parentElement.classList.contains(CLASSNAMES.INPUTGROUP)) {
            parentElement.classList.add(CLASSNAMES.DISABLE);
          }

          if (key === 'placeholder' && parentElement.classList.contains(CLASSNAMES.FLOATINPUT)) {
            parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = attrs[key];
          } else {
            element.setAttribute(key, attrs[key]);
          }
        }
      }

      Input.addAttributes = addAttributes;

      function removeFloating(input) {
        var container = input.container;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(container) && container.classList.contains(CLASSNAMES.FLOATINPUT)) {
          var inputEle = container.querySelector('textarea') ? container.querySelector('textarea') : container.querySelector('input');
          var placeholder = container.querySelector('.' + CLASSNAMES.FLOATTEXT).textContent;
          var clearButton = container.querySelector('.e-clear-icon') !== null;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(container.querySelector('.' + CLASSNAMES.FLOATLINE));
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(container.querySelector('.' + CLASSNAMES.FLOATTEXT));
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(container, [CLASSNAMES.INPUTGROUP], [CLASSNAMES.FLOATINPUT]);
          unwireFloatingEvents(inputEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(inputEle, {
            'placeholder': placeholder
          });
          inputEle.classList.add(CLASSNAMES.INPUT);

          if (!clearButton && inputEle.tagName === 'INPUT') {
            inputEle.removeAttribute('required');
          }
        }
      }

      Input.removeFloating = removeFloating;

      function addFloating(input, type, placeholder, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var container = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(input, '.' + CLASSNAMES.INPUTGROUP);
        floatType = type;

        if (type !== 'Never') {
          var customTag = container.tagName;
          customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
          var args = {
            element: input,
            floatLabelType: type,
            customTag: customTag,
            properties: {
              placeholder: placeholder
            }
          };
          var iconEle = container.querySelector('.e-clear-icon');
          var inputObj = {
            container: container
          };
          input.classList.remove(CLASSNAMES.INPUT);
          createFloatingInput(args, inputObj, makeElement);
          var isPrependIcon = container.classList.contains('e-float-icon-left');

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
            if (isPrependIcon) {
              var inputWrap = container.querySelector('.e-input-in-wrap');
              iconEle = inputWrap.querySelector('.e-input-group-icon');
            } else {
              iconEle = container.querySelector('.e-input-group-icon');
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
            if (isPrependIcon) {
              iconEle = container.querySelector('.e-input-group-icon');
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
              container.classList.remove(CLASSNAMES.INPUTGROUP);
            }
          } else {
            var floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);
            var floatText = container.querySelector('.' + CLASSNAMES.FLOATTEXT);
            var wrapper = isPrependIcon ? container.querySelector('.e-input-in-wrap') : container;
            wrapper.insertBefore(input, iconEle);
            wrapper.insertBefore(floatLine, iconEle);
            wrapper.insertBefore(floatText, iconEle);
          }
        }

        checkFloatLabelType(type, input.parentElement);
      }

      Input.addFloating = addFloating;
      /**
       * Enable or Disable the ripple effect on the icons inside the Input. Ripple effect is only applicable for material theme.
       * ```
       * E.g : Input.setRipple(true, [inputObjects]);
       * ```
       * @param isRipple
       * - Boolean value to specify whether to enable the ripple effect.
       * @param inputObject
       * - Specify the collection of input objects.
       */

      function setRipple(isRipple, inputObj) {
        for (var i = 0; i < inputObj.length; i++) {
          _internalRipple(isRipple, inputObj[i].container);
        }
      }

      Input.setRipple = setRipple;

      function _internalRipple(isRipple, container, button) {
        var argsButton = [];
        argsButton.push(button);
        var buttons = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(button) ? container.querySelectorAll('.e-input-group-icon') : argsButton;

        if (isRipple && buttons.length > 0) {
          for (var index = 0; index < buttons.length; index++) {
            buttons[index].addEventListener('mousedown', _onMouseDownRipple, false);
            buttons[index].addEventListener('mouseup', _onMouseUpRipple, false);
          }
        } else if (buttons.length > 0) {
          for (var _index2 = 0; _index2 < buttons.length; _index2++) {
            buttons[_index2].removeEventListener('mousedown', _onMouseDownRipple, this);

            buttons[_index2].removeEventListener('mouseup', _onMouseUpRipple, this);
          }
        }
      }

      function _onMouseRipple(container, button) {
        if (!container.classList.contains('e-disabled') && !container.querySelector('input').readOnly) {
          button.classList.add('e-input-btn-ripple');
        }
      }

      function _onMouseDownRipple() {
        var ele = this;
        var parentEle = this.parentElement;

        while (!parentEle.classList.contains('e-input-group')) {
          parentEle = parentEle.parentElement;
        }

        _onMouseRipple(parentEle, ele);
      }

      function _onMouseUpRipple() {
        var ele = this;
        setTimeout(function () {
          ele.classList.remove('e-input-btn-ripple');
        }, 500);
      }

      function createIconEle(iconClass, makeElement) {
        var button = makeElement('span', {
          className: iconClass
        });
        button.classList.add('e-input-group-icon');
        return button;
      }
      /**
       * Creates a new span element with the given icons added and append it in container element.
       * ```
       * E.g : Input.addIcon('append', 'e-icon-spin', inputObj.container, inputElement);
       * ```
       * @param position - Specify the icon placement on the input.Possible values are append and prepend.
       * @param iconClass - Icon classes which are need to add to the span element which is going to created.
       * Span element acts as icon or button element for input.
       * @param container - The container on which created span element is going to append.
       * @param inputElement - The inputElement on which created span element is going to prepend.
       */
      // tslint:disable


      function addIcon(position, icons, container, input, internalCreate) {
        // tslint:enable
        var result = typeof icons === 'string' ? icons.split(',') : icons;

        if (position.toLowerCase() === 'append') {
          var _iterator101 = _createForOfIteratorHelper(result),
              _step101;

          try {
            for (_iterator101.s(); !(_step101 = _iterator101.n()).done;) {
              var icon = _step101.value;
              appendSpan(icon, container, internalCreate);
            }
          } catch (err) {
            _iterator101.e(err);
          } finally {
            _iterator101.f();
          }
        } else {
          var _iterator102 = _createForOfIteratorHelper(result),
              _step102;

          try {
            for (_iterator102.s(); !(_step102 = _iterator102.n()).done;) {
              var _icon = _step102.value;
              prependSpan(_icon, container, input, internalCreate);
            }
          } catch (err) {
            _iterator102.e(err);
          } finally {
            _iterator102.f();
          }
        }
      }

      Input.addIcon = addIcon;
      /**
       * Creates a new span element with the given icons added and prepend it in input element.
       * ```
       * E.g : Input.prependSpan('e-icon-spin', inputObj.container, inputElement);
       * ```
       * @param iconClass - Icon classes which are need to add to the span element which is going to created.
       * Span element acts as icon or button element for input.
       * @param container - The container on which created span element is going to append.
       * @param inputElement - The inputElement on which created span element is going to prepend.
       */
      // tslint:disable

      function prependSpan(iconClass, container, inputElement, internalCreateElement) {
        // tslint:enable
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var button = createIconEle(iconClass, makeElement);
        container.classList.add('e-float-icon-left');
        var innerWrapper = container.querySelector('.e-input-in-wrap');

        if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(innerWrapper)) {
          innerWrapper = makeElement('span', {
            className: 'e-input-in-wrap'
          });
          inputElement.parentNode.insertBefore(innerWrapper, inputElement);
          var result = container.querySelectorAll(inputElement.tagName + ' ~ *');
          innerWrapper.appendChild(inputElement);

          for (var i = 0; i < result.length; i++) {
            innerWrapper.appendChild(result[i]);
          }
        }

        innerWrapper.parentNode.insertBefore(button, innerWrapper);

        if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
          container.classList.add(CLASSNAMES.INPUTGROUP);
        }

        _internalRipple(true, container, button);

        return button;
      }

      Input.prependSpan = prependSpan;
      /**
       * Creates a new span element with the given icons added and append it in container element.
       * ```
       * E.g : Input.appendSpan('e-icon-spin', inputObj.container);
       * ```
       * @param iconClass - Icon classes which are need to add to the span element which is going to created.
       * Span element acts as icon or button element for input.
       * @param container - The container on which created span element is going to append.
       */

      function appendSpan(iconClass, container, internalCreateElement) {
        var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
        var button = createIconEle(iconClass, makeElement);

        if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
          container.classList.add(CLASSNAMES.INPUTGROUP);
        }

        var wrap = container.classList.contains('e-float-icon-left') ? container.querySelector('.e-input-in-wrap') : container;
        wrap.appendChild(button);

        _internalRipple(true, container, button);

        return button;
      }

      Input.appendSpan = appendSpan;
    })(Input || (Input = {}));

    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var ROOT = 'e-control-wrapper e-numeric';
    var SPINICON = 'e-input-group-icon';
    var SPINUP = 'e-spin-up';
    var SPINDOWN = 'e-spin-down';
    var ERROR = 'e-error';
    var INCREMENT = 'increment';
    var DECREMENT = 'decrement';
    var INTREGEXP = new RegExp('^(-)?(\\d*)$');
    var DECIMALSEPARATOR = '.';
    var COMPONENT = 'e-numerictextbox';
    var CONTROL = 'e-control';
    var NUMERIC_FOCUS = 'e-input-focus';
    var HIDDENELEMENT = 'e-numeric-hidden';
    var wrapperAttributes = ['title', 'style', 'class'];
    /**
     * Represents the NumericTextBox component that allows the user to enter only numeric values.
     * ```html
     * <input type='text' id="numeric"/>
     * ```
     * ```typescript
     * <script>
     *   var numericObj = new NumericTextBox({ value: 10 });
     *   numericObj.appendTo("#numeric");
     * </script>
     * ```
     */

    var NumericTextBox = /*#__PURE__*/function (_syncfusion_ej2_base_13) {
      _inherits(NumericTextBox, _syncfusion_ej2_base_13);

      var _super196 = _createSuper(NumericTextBox);

      function NumericTextBox(options, element) {
        var _this510;

        _classCallCheck(this, NumericTextBox);

        _this510 = _super196.call(this, options, element);
        _this510.isVue = false;
        _this510.preventChange = false;
        _this510.numericOptions = options;
        return _this510;
      }

      _createClass2(NumericTextBox, [{
        key: "preRender",
        value: function preRender() {
          this.isPrevFocused = false;
          this.decimalSeparator = '.';
          this.intRegExp = new RegExp('/^(-)?(\d*)$/');
          this.isCalled = false;
          var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
          this.cloneElement = this.element.cloneNode(true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.cloneElement], [CONTROL, COMPONENT, 'e-lib']);
          this.angularTagName = null;
          this.formEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {
            this.angularTagName = this.element.tagName;
            var input = this.createElement('input');
            var index = 0;

            for (index; index < this.element.attributes.length; index++) {
              var attributeName = this.element.attributes[index].nodeName;

              if (attributeName !== 'id') {
                input.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
                input.innerHTML = this.element.innerHTML;
              }
            }

            if (this.element.hasAttribute('name')) {
              this.element.removeAttribute('name');
            }

            this.element.classList.remove('e-control', 'e-numerictextbox');
            this.element.appendChild(input);
            this.element = input;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, this.element);
          }

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              'role': 'spinbutton',
              'tabindex': '0',
              'autocomplete': 'off',
              'aria-live': 'assertive'
            });
            var localeText = {
              incrementTitle: 'Increment value',
              decrementTitle: 'Decrement value',
              placeholder: this.placeholder
            };
            this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('numerictextbox', localeText, this.locale);

            if (this.l10n.getConstant('placeholder') !== '') {
              this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant('placeholder')
              }, true);
            }
          }

          this.isValidState = true;
          this.inputStyle = null;
          this.inputName = null;
          this.cultureInfo = {};
          this.initCultureInfo();
          this.initCultureFunc();
          this.prevValue = this.value;

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.updateHTMLAttrToElement();
            this.checkAttributes(false);

            if (this.formEle) {
              this.inputEleValue = this.value;
            }
          }

          this.validateMinMax();
          this.validateStep();

          if (this.placeholder === null && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.updatePlaceholder();
          }
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (this.element.tagName.toLowerCase() === 'input') {
            if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
              this.createWrapper();

              if (this.showSpinButton) {
                this.spinBtnCreation();
              }

              this.setElementWidth(this.width);

              if (!this.container.classList.contains('e-input-group')) {
                this.container.classList.add('e-input-group');
              }

              this.changeValue(this.value === null || isNaN(this.value) ? null : this.strictMode ? this.trimValue(this.value) : this.value);
            } else {
              this.container = this.element.parentElement;
              this.inputWrapper = {
                container: this.container
              };
              this.hiddenInput = this.container.querySelector('input[type="hidden"]');

              if (this.showClearButton) {
                this.inputWrapper.clearButton = this.container.querySelector('.e-clear-icon');
                Input.wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);
              }

              if (this.showSpinButton) {
                this.spinDown = this.container.querySelector('.' + SPINDOWN);
                this.spinUp = this.container.querySelector('.' + SPINUP);
                this.wireSpinBtnEvents();
              }

              Input.bindInitialEvent({
                element: this.element,
                buttons: null,
                customTag: null,
                floatLabelType: this.floatLabelType,
                properties: this.properties
              });
            }

            this.wireEvents();

            if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
              if (this.value !== null && !isNaN(this.value)) {
                if (this.decimals) {
                  this.setProperties({
                    value: this.roundNumber(this.value, this.decimals)
                  }, true);
                }
              }

              if (this.element.getAttribute('value') || this.value) {
                this.element.setAttribute('value', this.element.value);
                this.hiddenInput.setAttribute('value', this.hiddenInput.value);
              }
            }

            this.elementPrevValue = this.element.value;
            this.renderComplete();
          }
        }
      }, {
        key: "checkAttributes",
        value: function checkAttributes(isDynamic) {
          var attributes$$1 = isDynamic ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ['value', 'min', 'max', 'step', 'disabled', 'readonly', 'style', 'name', 'placeholder'];

          var _iterator103 = _createForOfIteratorHelper(attributes$$1),
              _step103;

          try {
            for (_iterator103.s(); !(_step103 = _iterator103.n()).done;) {
              var prop = _step103.value;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute(prop))) {
                switch (prop) {
                  case 'disabled':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['enabled'] === undefined || isDynamic) {
                      var enabled = this.element.getAttribute(prop) === 'disabled' || this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? false : true;
                      this.setProperties({
                        enabled: enabled
                      }, !isDynamic);
                    }

                    break;

                  case 'readonly':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['readonly'] === undefined || isDynamic) {
                      var readonly = this.element.getAttribute(prop) === 'readonly' || this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? true : false;
                      this.setProperties({
                        readonly: readonly
                      }, !isDynamic);
                    }

                    break;

                  case 'placeholder':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['placeholder'] === undefined || isDynamic) {
                      this.setProperties({
                        placeholder: this.element.placeholder
                      }, !isDynamic);
                    }

                    break;

                  case 'value':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['value'] === undefined || isDynamic) {
                      var setNumber = this.instance.getNumberParser({
                        format: 'n'
                      })(this.element.getAttribute(prop));
                      this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, setNumber, {}), !isDynamic);
                    }

                    break;

                  case 'min':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['min'] === undefined || isDynamic) {
                      var minValue = this.instance.getNumberParser({
                        format: 'n'
                      })(this.element.getAttribute(prop));

                      if (minValue !== null && !isNaN(minValue)) {
                        this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, minValue, {}), !isDynamic);
                      }
                    }

                    break;

                  case 'max':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['max'] === undefined || isDynamic) {
                      var maxValue = this.instance.getNumberParser({
                        format: 'n'
                      })(this.element.getAttribute(prop));

                      if (maxValue !== null && !isNaN(maxValue)) {
                        this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, maxValue, {}), !isDynamic);
                      }
                    }

                    break;

                  case 'step':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.numericOptions) || this.numericOptions['step'] === undefined || isDynamic) {
                      var stepValue = this.instance.getNumberParser({
                        format: 'n'
                      })(this.element.getAttribute(prop));

                      if (stepValue !== null && !isNaN(stepValue)) {
                        this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, stepValue, {}), !isDynamic);
                      }
                    }

                    break;

                  case 'style':
                    this.inputStyle = this.element.getAttribute(prop);
                    break;

                  case 'name':
                    this.inputName = this.element.getAttribute(prop);
                    break;

                  default:
                    var value = this.instance.getNumberParser({
                      format: 'n'
                    })(this.element.getAttribute(prop));

                    if (value !== null && !isNaN(value) || prop === 'value') {
                      this.setProperties(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, value, {}), true);
                    }

                    break;
                }
              }
            }
          } catch (err) {
            _iterator103.e(err);
          } finally {
            _iterator103.f();
          }
        }
      }, {
        key: "updatePlaceholder",
        value: function updatePlaceholder() {
          this.setProperties({
            placeholder: this.l10n.getConstant('placeholder')
          }, true);
        }
      }, {
        key: "initCultureFunc",
        value: function initCultureFunc() {
          this.instance = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        }
      }, {
        key: "initCultureInfo",
        value: function initCultureInfo() {
          this.cultureInfo.format = this.format;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('currency', this) !== null) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('currency', this.currency, this.cultureInfo);
            this.setProperties({
              currencyCode: this.currency
            }, true);
          }
        }
        /* Wrapper creation */

      }, {
        key: "createWrapper",
        value: function createWrapper() {
          var updatedCssClassValue = this.cssClass;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            updatedCssClassValue = this.getNumericValidClassList(this.cssClass);
          }

          var inputObj = Input.createInput({
            element: this.element,
            floatLabelType: this.floatLabelType,
            properties: {
              readonly: this.readonly,
              placeholder: this.placeholder,
              cssClass: updatedCssClassValue,
              enableRtl: this.enableRtl,
              showClearButton: this.showClearButton,
              enabled: this.enabled
            }
          }, this.createElement);
          this.inputWrapper = inputObj;
          this.container = inputObj.container;
          this.container.setAttribute('class', ROOT + ' ' + this.container.getAttribute('class'));
          this.updateHTMLAttrToWrapper();

          if (this.readonly) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              'aria-readonly': 'true'
            });
          }

          this.hiddenInput = this.createElement('input', {
            attrs: {
              type: 'text',
              'validateHidden': 'true',
              'class': HIDDENELEMENT
            }
          });
          this.inputName = this.inputName !== null ? this.inputName : this.element.id;
          this.element.removeAttribute('name');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.hiddenInput, {
            'name': this.inputName
          });
          this.container.insertBefore(this.hiddenInput, this.container.childNodes[1]);
          this.updateDataAttribute(false);

          if (this.inputStyle !== null) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.container, {
              'style': this.inputStyle
            });
          }
        }
      }, {
        key: "updateDataAttribute",
        value: function updateDataAttribute(isDynamic) {
          var attr = {};

          if (!isDynamic) {
            for (var a = 0; a < this.element.attributes.length; a++) {
              attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);
            }
          } else {
            attr = this.htmlAttributes;
          }

          for (var _i89 = 0, _Object$keys27 = Object.keys(attr); _i89 < _Object$keys27.length; _i89++) {
            var key = _Object$keys27[_i89];

            if (key.indexOf('data') === 0) {
              this.hiddenInput.setAttribute(key, attr[key]);
            }
          }
        }
      }, {
        key: "updateHTMLAttrToElement",
        value: function updateHTMLAttrToElement() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i90 = 0, _Object$keys28 = Object.keys(this.htmlAttributes); _i90 < _Object$keys28.length; _i90++) {
              var pro = _Object$keys28[_i90];

              if (wrapperAttributes.indexOf(pro) < 0) {
                this.element.setAttribute(pro, this.htmlAttributes[pro]);
              }
            }
          }
        }
      }, {
        key: "updateCssClass",
        value: function updateCssClass(newClass, oldClass) {
          Input.setCssClass(this.getNumericValidClassList(newClass), [this.container], this.getNumericValidClassList(oldClass));
        }
      }, {
        key: "getNumericValidClassList",
        value: function getNumericValidClassList(numericClassName) {
          var result = numericClassName;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(numericClassName) && numericClassName !== '') {
            result = numericClassName.replace(/\s+/g, ' ').trim();
          }

          return result;
        }
      }, {
        key: "updateHTMLAttrToWrapper",
        value: function updateHTMLAttrToWrapper() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i91 = 0, _Object$keys29 = Object.keys(this.htmlAttributes); _i91 < _Object$keys29.length; _i91++) {
              var pro = _Object$keys29[_i91];

              if (wrapperAttributes.indexOf(pro) > -1) {
                if (pro === 'class') {
                  var updatedClassValue = this.getNumericValidClassList(this.htmlAttributes[pro]);

                  if (updatedClassValue !== '') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container], updatedClassValue.split(' '));
                  }
                } else if (pro === 'style') {
                  var numericStyle = this.container.getAttribute(pro);
                  numericStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(numericStyle) ? numericStyle + this.htmlAttributes[pro] : this.htmlAttributes[pro];
                  this.container.setAttribute(pro, numericStyle);
                } else {
                  this.container.setAttribute(pro, this.htmlAttributes[pro]);
                }
              }
            }
          }
        }
      }, {
        key: "setElementWidth",
        value: function setElementWidth(width) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            if (typeof width === 'number') {
              this.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            } else if (typeof width === 'string') {
              this.container.style.width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            }
          }
        }
        /* Spinner creation */

      }, {
        key: "spinBtnCreation",
        value: function spinBtnCreation() {
          this.spinDown = Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container, this.createElement);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.spinDown, {
            'title': this.l10n.getConstant('decrementTitle'),
            'aria-label': this.l10n.getConstant('decrementTitle')
          });
          this.spinUp = Input.appendSpan(SPINICON + ' ' + SPINUP, this.container, this.createElement);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.spinUp, {
            'title': this.l10n.getConstant('incrementTitle'),
            'aria-label': this.l10n.getConstant('incrementTitle')
          });
          this.wireSpinBtnEvents();
        }
      }, {
        key: "validateMinMax",
        value: function validateMinMax() {
          if (!(typeof this.min === 'number' && !isNaN(this.min))) {
            this.setProperties({
              min: -Number.MAX_VALUE
            }, true);
          }

          if (!(typeof this.max === 'number' && !isNaN(this.max))) {
            this.setProperties({
              max: Number.MAX_VALUE
            }, true);
          }

          if (this.decimals !== null) {
            if (this.min !== -Number.MAX_VALUE) {
              this.setProperties({
                min: this.instance.getNumberParser({
                  format: 'n'
                })(this.formattedValue(this.decimals, this.min))
              }, true);
            }

            if (this.max !== Number.MAX_VALUE) {
              this.setProperties({
                max: this.instance.getNumberParser({
                  format: 'n'
                })(this.formattedValue(this.decimals, this.max))
              }, true);
            }
          }

          this.setProperties({
            min: this.min > this.max ? this.max : this.min
          }, true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-valuemin': this.min.toString(),
            'aria-valuemax': this.max.toString()
          });
        }
      }, {
        key: "formattedValue",
        value: function formattedValue(decimals, value) {
          return this.instance.getNumberFormat({
            maximumFractionDigits: decimals,
            minimumFractionDigits: decimals,
            useGrouping: false
          })(value);
        }
      }, {
        key: "validateStep",
        value: function validateStep() {
          if (this.decimals !== null) {
            this.setProperties({
              step: this.instance.getNumberParser({
                format: 'n'
              })(this.formattedValue(this.decimals, this.step))
            }, true);
          }
        }
      }, {
        key: "action",
        value: function action(operation, event) {
          this.isInteract = true;
          var value = this.isFocused ? this.instance.getNumberParser({
            format: 'n'
          })(this.element.value) : this.value;
          this.changeValue(this.performAction(value, this.step, operation));
          this.raiseChangeEvent(event);
        }
      }, {
        key: "checkErrorClass",
        value: function checkErrorClass() {
          if (this.isValidState) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.container], ERROR);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container], ERROR);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-invalid': this.isValidState ? 'false' : 'true'
          });
        }
      }, {
        key: "bindClearEvent",
        value: function bindClearEvent() {
          if (this.showClearButton) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);
          }
        }
      }, {
        key: "resetHandler",
        value: function resetHandler(e) {
          e.preventDefault();

          if (!this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) {
            this.clear(e);
          }

          this.isInteract = true;
          this.raiseChangeEvent(e);
        }
      }, {
        key: "clear",
        value: function clear(event) {
          this.setProperties({
            value: null
          }, true);
          this.setElementValue('');
          this.hiddenInput.value = '';
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (formElement) {
            var element = this.element.nextElementSibling;
            var keyupEvent = document.createEvent('KeyboardEvent');
            keyupEvent.initEvent('keyup', false, true);
            element.dispatchEvent(keyupEvent);
          }
        }
      }, {
        key: "resetFormHandler",
        value: function resetFormHandler() {
          if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {
            this.updateValue(null);
          } else {
            this.updateValue(this.inputEleValue);
          }
        }
      }, {
        key: "setSpinButton",
        value: function setSpinButton() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinDown)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.spinDown, {
              'title': this.l10n.getConstant('decrementTitle'),
              'aria-label': this.l10n.getConstant('decrementTitle')
            });
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.spinUp)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.spinUp, {
              'title': this.l10n.getConstant('incrementTitle'),
              'aria-label': this.l10n.getConstant('incrementTitle')
            });
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.focusHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'blur', this.focusOutHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.keyDownHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', this.keyUpHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'input', this.inputHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keypress', this.keyPressHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'change', this.changeHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'paste', this.pasteHandler, this);

          if (this.enabled) {
            this.bindClearEvent();

            if (this.formEle) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formEle, 'reset', this.resetFormHandler, this);
            }
          }
        }
      }, {
        key: "wireSpinBtnEvents",
        value: function wireSpinBtnEvents() {
          /* bind spin button events */
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownOnSpinner, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownOnSpinner, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpOnSpinner, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpOnSpinner, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.touchMoveOnSpinner, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.touchMoveOnSpinner, this);
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.focusHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'blur', this.focusOutHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', this.keyUpHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'input', this.inputHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.keyDownHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keypress', this.keyPressHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'change', this.changeHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'paste', this.pasteHandler);

          if (this.formEle) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formEle, 'reset', this.resetFormHandler);
          }
        }
      }, {
        key: "unwireSpinBtnEvents",
        value: function unwireSpinBtnEvents() {
          /* unbind spin button events */
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownOnSpinner);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.mouseDownOnSpinner);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpOnSpinner);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.mouseUpOnSpinner);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinUp, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.touchMoveOnSpinner);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinDown, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchMoveEvent, this.touchMoveOnSpinner);
        }
      }, {
        key: "changeHandler",
        value: function changeHandler(event) {
          event.stopPropagation();

          if (!this.element.value.length) {
            this.setProperties({
              value: null
            }, true);
          }

          var parsedInput = this.instance.getNumberParser({
            format: 'n'
          })(this.element.value);
          this.updateValue(parsedInput, event);
        }
      }, {
        key: "raiseChangeEvent",
        value: function raiseChangeEvent(event) {
          if (this.prevValue !== this.value) {
            var eventArgs = {};
            this.changeEventArgs = {
              value: this.value,
              previousValue: this.prevValue,
              isInteracted: this.isInteract,
              isInteraction: this.isInteract,
              event: event
            };

            if (event) {
              this.changeEventArgs.event = event;
            }

            if (this.changeEventArgs.event === undefined) {
              this.changeEventArgs.isInteracted = false;
              this.changeEventArgs.isInteraction = false;
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, this.changeEventArgs);
            this.prevValue = this.value;
            this.isInteract = false;
            this.elementPrevValue = this.element.value;
            this.preventChange = false;
            this.trigger('change', eventArgs);
          }
        }
      }, {
        key: "pasteHandler",
        value: function pasteHandler() {
          var _this511 = this;

          if (!this.enabled || this.readonly) {
            return;
          }

          var beforeUpdate = this.element.value;
          setTimeout(function () {
            if (!_this511.numericRegex().test(_this511.element.value)) {
              _this511.setElementValue(beforeUpdate);
            }
          });
        }
      }, {
        key: "preventHandler",
        value: function preventHandler() {
          var _this512 = this;

          var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
          setTimeout(function () {
            if (_this512.element.selectionStart > 0) {
              var currentPos = _this512.element.selectionStart;
              var prevPos = _this512.element.selectionStart - 1;
              var start = 0;
              var ignoreKeyCode;

              var valArray = _this512.element.value.split('');

              var numericObject = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getNumericObject"])(_this512.locale);
              var decimalSeparator = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('decimal', numericObject);
              ignoreKeyCode = decimalSeparator.charCodeAt(0);

              if (_this512.element.value[prevPos] === ' ' && _this512.element.selectionStart > 0 && !iOS) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this512.prevVal)) {
                  _this512.element.value = _this512.element.value.trim();
                } else if (prevPos !== 0) {
                  _this512.element.value = _this512.prevVal;
                } else if (prevPos === 0) {
                  _this512.element.value = _this512.element.value.trim();
                }

                _this512.element.setSelectionRange(prevPos, prevPos);
              } else if (isNaN(parseFloat(_this512.element.value[_this512.element.selectionStart - 1])) && _this512.element.value[_this512.element.selectionStart - 1].charCodeAt(0) !== 45) {
                if (valArray.indexOf(_this512.element.value[_this512.element.selectionStart - 1]) !== valArray.lastIndexOf(_this512.element.value[_this512.element.selectionStart - 1]) && _this512.element.value[_this512.element.selectionStart - 1].charCodeAt(0) === ignoreKeyCode || _this512.element.value[_this512.element.selectionStart - 1].charCodeAt(0) !== ignoreKeyCode) {
                  _this512.element.value = _this512.element.value.substring(0, prevPos) + _this512.element.value.substring(currentPos, _this512.element.value.length);

                  _this512.element.setSelectionRange(prevPos, prevPos);

                  if (isNaN(parseFloat(_this512.element.value[_this512.element.selectionStart - 1])) && _this512.element.selectionStart > 0 && _this512.element.value.length) {
                    _this512.preventHandler();
                  }
                }
              } else if (isNaN(parseFloat(_this512.element.value[_this512.element.selectionStart - 2])) && _this512.element.selectionStart > 1 && _this512.element.value[_this512.element.selectionStart - 2].charCodeAt(0) !== 45) {
                if (valArray.indexOf(_this512.element.value[_this512.element.selectionStart - 2]) !== valArray.lastIndexOf(_this512.element.value[_this512.element.selectionStart - 2]) && _this512.element.value[_this512.element.selectionStart - 2].charCodeAt(0) === ignoreKeyCode || _this512.element.value[_this512.element.selectionStart - 2].charCodeAt(0) !== ignoreKeyCode) {
                  _this512.element.setSelectionRange(prevPos, prevPos);

                  _this512.nextEle = _this512.element.value[_this512.element.selectionStart];
                  _this512.cursorPosChanged = true;

                  _this512.preventHandler();
                }
              }

              if (_this512.cursorPosChanged === true && _this512.element.value[_this512.element.selectionStart] === _this512.nextEle && isNaN(parseFloat(_this512.element.value[_this512.element.selectionStart - 1]))) {
                _this512.element.setSelectionRange(_this512.element.selectionStart + 1, _this512.element.selectionStart + 1);

                _this512.cursorPosChanged = false;
                _this512.nextEle = null;
              }

              if (_this512.element.value.trim() === '') {
                _this512.element.setSelectionRange(start, start);
              }

              if (_this512.element.selectionStart > 0) {
                if (_this512.element.value[_this512.element.selectionStart - 1].charCodeAt(0) === 45 && _this512.element.selectionStart > 1) {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this512.prevVal)) {
                    _this512.element.value = _this512.element.value;
                  } else {
                    _this512.element.value = _this512.prevVal;
                  }

                  _this512.element.setSelectionRange(_this512.element.selectionStart, _this512.element.selectionStart);
                }
              }

              _this512.prevVal = _this512.element.value;
            }
          });
        }
      }, {
        key: "keyUpHandler",
        value: function keyUpHandler(event) {
          if (!this.enabled || this.readonly) {
            return;
          }

          var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);

          if (!iOS && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.preventHandler();
          }

          var parseValue = this.instance.getNumberParser({
            format: 'n'
          })(this.element.value);
          parseValue = parseValue === null || isNaN(parseValue) ? null : parseValue;
          this.hiddenInput.value = parseValue || parseValue === 0 ? parseValue.toString() : null;
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (formElement) {
            var element = this.element.nextElementSibling;
            var keyupEvent = document.createEvent('KeyboardEvent');
            keyupEvent.initEvent('keyup', false, true);
            element.dispatchEvent(keyupEvent);
          }
        }
      }, {
        key: "inputHandler",
        value: function inputHandler(event) {
          if (!this.enabled || this.readonly) {
            return;
          }

          var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
          var fireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;

          if ((fireFox || iOS) && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.preventHandler();
          }

          if (this.isVue) {
            var current = this.instance.getNumberParser({
              format: 'n'
            })(this.element.value);
            var previous = this.instance.getNumberParser({
              format: 'n'
            })(this.elementPrevValue);
            var eventArgs = {
              event: event,
              value: current === null || isNaN(current) ? null : current,
              previousValue: previous === null || isNaN(previous) ? null : previous
            };
            this.preventChange = true;
            this.elementPrevValue = this.element.value;
            this.trigger('input', eventArgs);
          }
        }
      }, {
        key: "keyDownHandler",
        value: function keyDownHandler(event) {
          if (!this.readonly) {
            switch (event.keyCode) {
              case 38:
                event.preventDefault();
                this.action(INCREMENT, event);
                break;

              case 40:
                event.preventDefault();
                this.action(DECREMENT, event);
                break;

              default:
                break;
            }
          }
        }
      }, {
        key: "performAction",
        value: function performAction(value, step, operation) {
          if (value === null || isNaN(value)) {
            value = 0;
          }

          var updatedValue = operation === INCREMENT ? value + step : value - step;
          updatedValue = this.correctRounding(value, step, updatedValue);
          return this.strictMode ? this.trimValue(updatedValue) : updatedValue;
        }
      }, {
        key: "correctRounding",
        value: function correctRounding(value, step, result) {
          var floatExp = new RegExp('[,.](.*)');
          var valueText = value.toString();
          var stepText = step.toString();
          var floatValue = floatExp.test(value.toString());
          var floatStep = floatExp.test(step.toString());

          if (floatValue || floatStep) {
            var valueCount = floatValue ? floatExp.exec(value.toString())[0].length : 0;
            var stepCount = floatStep ? floatExp.exec(step.toString())[0].length : 0;
            var max = Math.max(valueCount, stepCount);
            return value = this.roundValue(result, max);
          }

          return result;
        }
      }, {
        key: "roundValue",
        value: function roundValue(result, precision) {
          precision = precision || 0;
          var divide = Math.pow(10, precision);
          return result *= divide, result = Math.round(result) / divide;
        }
      }, {
        key: "updateValue",
        value: function updateValue(value, event) {
          if (event) {
            this.isInteract = true;
          }

          if (value !== null && !isNaN(value)) {
            if (this.decimals) {
              value = this.roundNumber(value, this.decimals);
            }
          }

          this.changeValue(value === null || isNaN(value) ? null : this.strictMode ? this.trimValue(value) : value);

          if (!this.isVue || this.isVue && !this.preventChange) {
            this.raiseChangeEvent(event);
          }
        }
      }, {
        key: "updateCurrency",
        value: function updateCurrency(prop, propVal) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, propVal, this.cultureInfo);
          this.updateValue(this.value);
        }
      }, {
        key: "changeValue",
        value: function changeValue(value) {
          if (!(value || value === 0)) {
            value = null;
            this.setProperties({
              value: value
            }, true);
          } else {
            var numberOfDecimals;
            numberOfDecimals = this.getNumberOfDecimals(value);
            this.setProperties({
              value: this.roundNumber(value, numberOfDecimals)
            }, true);
          }

          this.modifyText();

          if (!this.strictMode) {
            this.validateState();
          }
        }
      }, {
        key: "modifyText",
        value: function modifyText() {
          if (this.value || this.value === 0) {
            var value = this.formatNumber();
            var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
            this.setElementValue(elementValue);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              'aria-valuenow': value
            });
            this.hiddenInput.value = this.value.toString();

            if (this.value !== null && this.serverDecimalSeparator) {
              this.hiddenInput.value = this.hiddenInput.value.replace('.', this.serverDecimalSeparator);
            }
          } else {
            this.setElementValue('');
            this.element.removeAttribute('aria-valuenow');
            this.hiddenInput.value = null;
          }
        }
      }, {
        key: "setElementValue",
        value: function setElementValue(val, element) {
          Input.setValue(val, element ? element : this.element, this.floatLabelType, this.showClearButton);
        }
      }, {
        key: "validateState",
        value: function validateState() {
          this.isValidState = true;

          if (this.value || this.value === 0) {
            this.isValidState = !(this.value > this.max || this.value < this.min);
          }

          this.checkErrorClass();
        }
      }, {
        key: "getNumberOfDecimals",
        value: function getNumberOfDecimals(value) {
          var numberOfDecimals;
          var EXPREGEXP = new RegExp('[eE][\-+]?([0-9]+)');
          var valueString = value.toString();

          if (EXPREGEXP.test(valueString)) {
            var result = EXPREGEXP.exec(valueString);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(result)) {
              valueString = value.toFixed(Math.min(parseInt(result[1], 10), 20));
            }
          }

          var decimalPart = valueString.split('.')[1];
          numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;

          if (this.decimals !== null) {
            numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals;
          }

          return numberOfDecimals;
        }
      }, {
        key: "formatNumber",
        value: function formatNumber() {
          var numberOfDecimals;
          numberOfDecimals = this.getNumberOfDecimals(this.value);
          return this.instance.getNumberFormat({
            maximumFractionDigits: numberOfDecimals,
            minimumFractionDigits: numberOfDecimals,
            useGrouping: false
          })(this.value);
        }
      }, {
        key: "trimValue",
        value: function trimValue(value) {
          if (value > this.max) {
            return this.max;
          }

          if (value < this.min) {
            return this.min;
          }

          return value;
        }
      }, {
        key: "roundNumber",
        value: function roundNumber(value, precision) {
          var result = value;
          var decimals = precision || 0;
          var result1 = result.toString().split('e');
          result = Math.round(Number(result1[0] + 'e' + (result1[1] ? Number(result1[1]) + decimals : decimals)));
          var result2 = result.toString().split('e');
          result = Number(result2[0] + 'e' + (result2[1] ? Number(result2[1]) - decimals : -decimals));
          return Number(result.toFixed(decimals));
        }
      }, {
        key: "cancelEvent",
        value: function cancelEvent(event) {
          event.preventDefault();
          return false;
        }
      }, {
        key: "keyPressHandler",
        value: function keyPressHandler(event) {
          if (!this.enabled || this.readonly) {
            return true;
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.version === '11.0' && event.keyCode === 13) {
            var parsedInput = this.instance.getNumberParser({
              format: 'n'
            })(this.element.value);
            this.updateValue(parsedInput, event);
            return true;
          }

          if (event.which === 0 || event.metaKey || event.ctrlKey || event.keyCode === 8 || event.keyCode === 13) {
            return true;
          }

          var currentChar = String.fromCharCode(event.which);
          var text = this.element.value;
          text = text.substring(0, this.element.selectionStart) + currentChar + text.substring(this.element.selectionEnd);

          if (!this.numericRegex().test(text)) {
            event.preventDefault();
            event.stopPropagation();
            return false;
          } else {
            return true;
          }
        }
      }, {
        key: "numericRegex",
        value: function numericRegex() {
          var numericObject = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getNumericObject"])(this.locale);
          var decimalSeparator = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('decimal', numericObject);
          var fractionRule = '*';

          if (decimalSeparator === DECIMALSEPARATOR) {
            decimalSeparator = '\\' + decimalSeparator;
          }

          if (this.decimals === 0 && this.validateDecimalOnType) {
            return INTREGEXP;
          }

          if (this.decimals && this.validateDecimalOnType) {
            fractionRule = '{0,' + this.decimals + '}';
          }

          return new RegExp('^(-)?(((\\d+(' + decimalSeparator + '\\d' + fractionRule + ')?)|(' + decimalSeparator + '\\d' + fractionRule + ')))?$');
        }
      }, {
        key: "mouseWheel",
        value: function mouseWheel(event) {
          event.preventDefault();
          var delta;
          var rawEvent = event;

          if (rawEvent.wheelDelta) {
            delta = rawEvent.wheelDelta / 120;
          } else if (rawEvent.detail) {
            delta = -rawEvent.detail / 3;
          }

          if (delta > 0) {
            this.action(INCREMENT, event);
          } else if (delta < 0) {
            this.action(DECREMENT, event);
          }

          this.cancelEvent(event);
        }
      }, {
        key: "focusHandler",
        value: function focusHandler(event) {
          var _this513 = this;

          this.focusEventArgs = {
            event: event,
            value: this.value,
            container: this.container
          };
          this.trigger('focus', this.focusEventArgs);

          if (!this.enabled || this.readonly) {
            return;
          }

          this.isFocused = true;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.container], ERROR);
          this.prevValue = this.value;

          if (this.value || this.value === 0) {
            var formatValue = this.formatNumber();
            this.setElementValue(formatValue);

            if (!this.isPrevFocused) {
              if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.version === '11.0') {
                this.element.setSelectionRange(0, formatValue.length);
              } else {
                var delay = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos ? 600 : 0;
                setTimeout(function () {
                  _this513.element.setSelectionRange(0, formatValue.length);
                }, delay);
              }
            }
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel, this);
          }
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler(event) {
          var _this514 = this;

          this.blurEventArgs = {
            event: event,
            value: this.value,
            container: this.container
          };
          this.trigger('blur', this.blurEventArgs);

          if (!this.enabled || this.readonly) {
            return;
          }

          if (this.isPrevFocused) {
            event.preventDefault();

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              var value = this.element.value;
              this.element.focus();
              this.isPrevFocused = false;
              var ele = this.element;
              setTimeout(function () {
                _this514.setElementValue(value, ele);
              }, 200);
            }
          } else {
            this.isFocused = false;

            if (!this.element.value.length) {
              this.setProperties({
                value: null
              }, true);
            }

            var parsedInput = this.instance.getNumberParser({
              format: 'n'
            })(this.element.value);
            this.updateValue(parsedInput);

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
            }
          }

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (formElement) {
            var element = this.element.nextElementSibling;
            var focusEvent = document.createEvent('FocusEvent');
            focusEvent.initEvent('focusout', false, true);
            element.dispatchEvent(focusEvent);
          }
        }
      }, {
        key: "mouseDownOnSpinner",
        value: function mouseDownOnSpinner(event) {
          var _this515 = this;

          if (this.isFocused) {
            this.isPrevFocused = true;
            event.preventDefault();
          }

          if (!this.getElementData(event)) {
            return;
          }

          var result = this.getElementData(event);
          var target = event.currentTarget;
          var action = target.classList.contains(SPINUP) ? INCREMENT : DECREMENT;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'mouseleave', this.mouseUpClick, this);

          this.timeOut = setInterval(function () {
            _this515.isCalled = true;

            _this515.action(action, event);
          }, 150);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup', this.mouseUpClick, this);
        }
      }, {
        key: "touchMoveOnSpinner",
        value: function touchMoveOnSpinner(event) {
          var target = document.elementFromPoint(event.clientX, event.clientY);

          if (!target.classList.contains(SPINICON)) {
            clearInterval(this.timeOut);
          }
        }
      }, {
        key: "mouseUpOnSpinner",
        value: function mouseUpOnSpinner(event) {
          if (this.isPrevFocused) {
            this.element.focus();

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              this.isPrevFocused = false;
            }
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            event.preventDefault();
          }

          if (!this.getElementData(event)) {
            return;
          }

          var target = event.currentTarget;
          var action = target.classList.contains(SPINUP) ? INCREMENT : DECREMENT;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mouseleave', this.mouseUpClick);

          if (!this.isCalled) {
            this.action(action, event);
          }

          this.isCalled = false;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mouseup', this.mouseUpClick);

          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (formElement) {
            var element = this.element.nextElementSibling;
            var keyupEvent = document.createEvent('KeyboardEvent');
            keyupEvent.initEvent('keyup', false, true);
            element.dispatchEvent(keyupEvent);
          }
        }
      }, {
        key: "getElementData",
        value: function getElementData(event) {
          if (event.which && event.which === 3 || event.button && event.button === 2 || !this.enabled || this.readonly) {
            return false;
          }

          clearInterval(this.timeOut);
          return true;
        }
      }, {
        key: "floatLabelTypeUpdate",
        value: function floatLabelTypeUpdate() {
          Input.removeFloating(this.inputWrapper);
          var hiddenInput = this.hiddenInput;
          this.hiddenInput.remove();
          Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
          this.container.insertBefore(hiddenInput, this.container.childNodes[1]);
        }
      }, {
        key: "mouseUpClick",
        value: function mouseUpClick(event) {
          event.stopPropagation();
          clearInterval(this.timeOut);
          this.isCalled = false;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinUp, 'mouseleave', this.mouseUpClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.spinDown, 'mouseleave', this.mouseUpClick);
        }
        /**
         * Increments the NumericTextBox value with the specified step value.
         * @param  {number} step - Specifies the value used to increment the NumericTextBox value.
         * if its not given then numeric value will be incremented based on the step property value.
         */

      }, {
        key: "increment",
        value: function increment() {
          var step = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.step;
          this.isInteract = false;
          this.changeValue(this.performAction(this.value, step, INCREMENT));
          this.raiseChangeEvent();
        }
        /**
         * Decrements the NumericTextBox value with specified step value.
         * @param  {number} step - Specifies the value used to decrement the NumericTextBox value.
         * if its not given then numeric value will be decremented based on the step property value.
         */

      }, {
        key: "decrement",
        value: function decrement() {
          var step = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.step;
          this.isInteract = false;
          this.changeValue(this.performAction(this.value, step, DECREMENT));
          this.raiseChangeEvent();
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers.
         * Also it maintains the initial input element from the DOM.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.unwireEvents();

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.hiddenInput);

            if (this.showSpinButton) {
              this.unwireSpinBtnEvents();
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinUp);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinDown);
            }

            var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly', 'autocorrect', 'aria-disabled', 'aria-placeholder', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'tabindex', 'aria-valuemin', 'aria-valuemax', 'aria-live', 'aria-valuenow', 'aria-invalid'];

            for (var i = 0; i < attrArray.length; i++) {
              this.element.removeAttribute(attrArray[i]);
            }

            this.element.classList.remove('e-input');
            this.container.insertAdjacentElement('afterend', this.element);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.container);

            _get(_getPrototypeOf(NumericTextBox.prototype), "destroy", this).call(this);
          }
        }
        /**
         * Returns the value of NumericTextBox with the format applied to the NumericTextBox.
         */

      }, {
        key: "getText",
        value: function getText() {
          return this.element.value;
        }
        /**
         * Sets the focus to widget for interaction.
         * @returns void
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          if (document.activeElement !== this.element && this.enabled) {
            this.element.focus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container], [NUMERIC_FOCUS]);
          }
        }
        /**
         * Remove the focus from widget, if the widget is in focus state.
         * @returns void
         */

      }, {
        key: "focusOut",
        value: function focusOut() {
          if (document.activeElement === this.element && this.enabled) {
            this.element.blur();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.container], [NUMERIC_FOCUS]);
          }
        }
        /**
         * Gets the properties to be maintained in the persisted state.
         * @return {string}
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['value'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Calls internally if any of the property value is changed.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i92 = 0, _Object$keys30 = Object.keys(newProp); _i92 < _Object$keys30.length; _i92++) {
            var prop = _Object$keys30[_i92];

            switch (prop) {
              case 'width':
                this.setElementWidth(newProp.width);
                break;

              case 'cssClass':
                this.updateCssClass(newProp.cssClass, oldProp.cssClass);
                break;

              case 'enabled':
                Input.setEnabled(newProp.enabled, this.element);
                break;

              case 'enableRtl':
                Input.setEnableRtl(newProp.enableRtl, [this.container]);
                break;

              case 'readonly':
                Input.setReadonly(newProp.readonly, this.element);

                if (this.readonly) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
                    'aria-readonly': 'true'
                  });
                } else {
                  this.element.removeAttribute('aria-readonly');
                }

                break;

              case 'htmlAttributes':
                this.updateHTMLAttrToElement();
                this.updateHTMLAttrToWrapper();
                this.updateDataAttribute(true);
                this.checkAttributes(true);
                break;

              case 'placeholder':
                Input.setPlaceholder(newProp.placeholder, this.element);
                break;

              case 'step':
                this.step = newProp.step;
                this.validateStep();
                break;

              case 'showSpinButton':
                this.updateSpinButton(newProp);
                break;

              case 'showClearButton':
                this.updateClearButton(newProp);
                break;

              case 'floatLabelType':
                this.floatLabelType = newProp.floatLabelType;
                this.floatLabelTypeUpdate();
                break;

              case 'value':
                this.updateValue(newProp.value);

                if (this.isVue && this.preventChange) {
                  this.preventChange = false;
                }

                break;

              case 'min':
              case 'max':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, newProp), this);
                this.validateMinMax();
                this.updateValue(this.value);
                break;

              case 'strictMode':
                this.strictMode = newProp.strictMode;
                this.updateValue(this.value);
                this.validateState();
                break;

              case 'locale':
                this.initCultureFunc();
                this.l10n.setLocale(this.locale);
                this.setSpinButton();
                this.updatePlaceholder();
                Input.setPlaceholder(this.placeholder, this.element);
                this.updateValue(this.value);
                break;

              case 'currency':
                var propVal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, newProp);
                this.setProperties({
                  currencyCode: propVal
                }, true);
                this.updateCurrency(prop, propVal);
                break;

              case 'currencyCode':
                var propValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, newProp);
                this.setProperties({
                  currency: propValue
                }, true);
                this.updateCurrency('currency', propValue);
                break;

              case 'format':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(prop, newProp), this);
                this.initCultureInfo();
                this.updateValue(this.value);
                break;

              case 'decimals':
                this.decimals = newProp.decimals;
                this.updateValue(this.value);
            }
          }
        }
      }, {
        key: "updateClearButton",
        value: function updateClearButton(newProp) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            if (this.showClearButton) {
              this.inputWrapper.clearButton = this.container.querySelector('.e-clear-icon');
              Input.wireClearBtnEvents(this.element, this.inputWrapper.clearButton, this.inputWrapper.container);
            }
          } else {
            Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);
            this.bindClearEvent();
          }
        }
      }, {
        key: "updateSpinButton",
        value: function updateSpinButton(newProp) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            if (this.showSpinButton) {
              this.spinDown = this.container.querySelector('.' + SPINDOWN);
              this.spinUp = this.container.querySelector('.' + SPINUP);
              this.wireSpinBtnEvents();
            }
          } else {
            if (newProp.showSpinButton) {
              this.spinBtnCreation();
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinUp);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.spinDown);
            }
          }
        }
        /**
         * Gets the component name
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'numerictextbox';
        }
      }]);

      return NumericTextBox;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], NumericTextBox.prototype, "cssClass", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "value", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(-Number.MAX_VALUE)], NumericTextBox.prototype, "min", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(Number.MAX_VALUE)], NumericTextBox.prototype, "max", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)], NumericTextBox.prototype, "step", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "width", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "placeholder", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], NumericTextBox.prototype, "htmlAttributes", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], NumericTextBox.prototype, "showSpinButton", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], NumericTextBox.prototype, "readonly", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], NumericTextBox.prototype, "enabled", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], NumericTextBox.prototype, "showClearButton", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], NumericTextBox.prototype, "enablePersistence", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('n2')], NumericTextBox.prototype, "format", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "decimals", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "currency", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], NumericTextBox.prototype, "currencyCode", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], NumericTextBox.prototype, "strictMode", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], NumericTextBox.prototype, "validateDecimalOnType", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], NumericTextBox.prototype, "floatLabelType", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], NumericTextBox.prototype, "created", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], NumericTextBox.prototype, "destroyed", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], NumericTextBox.prototype, "change", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], NumericTextBox.prototype, "focus", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], NumericTextBox.prototype, "blur", void 0);

    NumericTextBox = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], NumericTextBox);
    /**
     * NumericTextBox modules
     */

    /**
     * MaskedTextBox base module
     */

    var ERROR$1 = 'e-error';
    var INPUTGROUP = 'e-input-group';
    var FLOATINPUT = 'e-float-input';
    var UTILMASK = 'e-utility-mask';
    var TOPLABEL = 'e-label-top';
    var BOTTOMLABEL = 'e-label-bottom';
    /**
     * @hidden
     * Built-in masking elements collection.
     */

    var regularExpressions = {
      '0': '[0-9]',
      '9': '[0-9 ]',
      '#': '[0-9 +-]',
      'L': '[A-Za-z]',
      '?': '[A-Za-z ]',
      '&': '[^\x7f ]+',
      'C': '[^\x7f]+',
      'A': '[A-Za-z0-9]',
      'a': '[A-Za-z0-9 ]'
    };
    /**
     * @hidden
     * Generate required masking elements to the MaskedTextBox from user mask input.
     */

    function createMask() {
      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
        'role': 'textbox',
        'autocomplete': 'off',
        'autocorrect': 'off',
        'autocapitalize': 'off',
        'spellcheck': 'false',
        'aria-live': 'assertive',
        'aria-valuenow': ''
      });

      if (this.mask) {
        var splitMask = this.mask.split(']');

        for (var i = 0; i < splitMask.length; i++) {
          if (splitMask[i][splitMask[i].length - 1] === '\\') {
            splitMask[i] = splitMask[i] + ']';
            var splitInnerMask = splitMask[i].split('[');

            for (var j = 0; j < splitInnerMask.length; j++) {
              if (splitInnerMask[j][splitInnerMask[j].length - 1] === '\\') {
                splitInnerMask[j] = splitInnerMask[j] + '[';
              }

              pushIntoRegExpCollec.call(this, splitInnerMask[j]);
            }
          } else {
            var _splitInnerMask = splitMask[i].split('[');

            if (_splitInnerMask.length > 1) {
              var chkSpace = false;

              for (var _j3 = 0; _j3 < _splitInnerMask.length; _j3++) {
                if (_splitInnerMask[_j3] === '\\') {
                  this.customRegExpCollec.push('[');
                  this.hiddenMask += _splitInnerMask[_j3] + '[';
                } else if (_splitInnerMask[_j3] === '') {
                  chkSpace = true;
                } else if (_splitInnerMask[_j3] !== '' && chkSpace || _j3 === _splitInnerMask.length - 1) {
                  this.customRegExpCollec.push('[' + _splitInnerMask[_j3] + ']');
                  this.hiddenMask += this.promptChar;
                  chkSpace = false;
                } else {
                  pushIntoRegExpCollec.call(this, _splitInnerMask[_j3]);
                }
              }
            } else {
              pushIntoRegExpCollec.call(this, _splitInnerMask[0]);
            }
          }
        }

        this.escapeMaskValue = this.hiddenMask;
        this.promptMask = this.hiddenMask.replace(/[09?LCAa#&]/g, this.promptChar);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters)) {
          for (var _i93 = 0; _i93 < this.promptMask.length; _i93++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[this.promptMask[_i93]])) {
              this.promptMask = this.promptMask.replace(new RegExp(this.promptMask[_i93], 'g'), this.promptChar);
            }
          }
        }

        var escapeNumber = 0;

        if (this.hiddenMask.match(new RegExp(/\\/))) {
          for (var _i94 = 0; _i94 < this.hiddenMask.length; _i94++) {
            var _j4 = 0;

            if (_i94 >= 1) {
              _j4 = _i94;
            }

            escapeNumber = this.hiddenMask.length - this.promptMask.length;
            _j4 = _j4 - escapeNumber;

            if (_i94 > 0 && this.hiddenMask[_i94 - 1] !== '\\' && (this.hiddenMask[_i94] === '>' || this.hiddenMask[_i94] === '<' || this.hiddenMask[_i94] === '|')) {
              this.promptMask = this.promptMask.substring(0, _j4) + this.promptMask.substring(_i94 + 1 - escapeNumber, this.promptMask.length);
              this.escapeMaskValue = this.escapeMaskValue.substring(0, _j4) + this.escapeMaskValue.substring(_i94 + 1 - escapeNumber, this.escapeMaskValue.length);
            }

            if (this.hiddenMask[_i94] === '\\') {
              this.promptMask = this.promptMask.substring(0, _j4) + this.hiddenMask[_i94 + 1] + this.promptMask.substring(_i94 + 2 - escapeNumber, this.promptMask.length);
              this.escapeMaskValue = this.escapeMaskValue.substring(0, _j4) + this.escapeMaskValue[_i94 + 1] + this.escapeMaskValue.substring(_i94 + 2 - escapeNumber, this.escapeMaskValue.length);
            }
          }
        } else {
          this.promptMask = this.promptMask.replace(/[>|<]/g, '');
          this.escapeMaskValue = this.hiddenMask.replace(/[>|<]/g, '');
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
          'aria-invalid': 'false'
        });
      }
    }
    /**
     * @hidden
     * Apply mask ability with masking elements to the MaskedTextBox.
     */


    function applyMask() {
      setElementValue.call(this, this.promptMask);
      setMaskValue.call(this, this.value);
    }
    /**
     * @hidden
     * To wire required events to the MaskedTextBox.
     */


    function wireEvents() {
      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', maskInputKeyDownHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keypress', maskInputKeyPressHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keyup', maskInputKeyUpHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'input', maskInputHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', maskInputFocusHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'blur', maskInputBlurHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'paste', maskInputPasteHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'cut', maskInputCutHandler, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'drop', maskInputDropHandler, this);

      if (this.enabled) {
        bindClearEvent.call(this);

        if (this.formElement) {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', resetFormHandler, this);
        }
      }
    }
    /**
     * @hidden
     * To unwire events attached to the MaskedTextBox.
     */


    function unwireEvents() {
      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', maskInputKeyDownHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keypress', maskInputKeyPressHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keyup', maskInputKeyUpHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'input', maskInputHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', maskInputFocusHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'blur', maskInputBlurHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'paste', maskInputPasteHandler);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'cut', maskInputCutHandler);

      if (this.formElement) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', resetFormHandler);
      }
    }
    /**
     * @hidden
     * To bind required events to the MaskedTextBox clearButton.
     */


    function bindClearEvent() {
      if (this.showClearButton) {
        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.inputObj.clearButton, 'mousedown touchstart', resetHandler, this);
      }
    }

    function resetHandler(e) {
      e.preventDefault();

      if (!this.inputObj.clearButton.classList.contains('e-clear-icon-hide')) {
        clear.call(this, e);
        this.value = '';
      }
    }

    function clear(event) {
      var value = this.element.value;
      setElementValue.call(this, this.promptMask);
      this.redoCollec.unshift({
        value: this.promptMask,
        startIndex: this.element.selectionStart,
        endIndex: this.element.selectionEnd
      });
      triggerMaskChangeEvent.call(this, event, value);
      this.element.setSelectionRange(0, 0);
    }

    function resetFormHandler() {
      if (this.element.tagName === 'EJS-MASKEDTEXTBOX') {
        setElementValue.call(this, this.promptMask);
      } else {
        this.value = this.initInputValue;
      }
    }
    /**
     * @hidden
     * To get masked value from the MaskedTextBox.
     */


    function unstrippedValue(element) {
      return element.value;
    }
    /**
     * @hidden
     * To extract raw value from the MaskedTextBox.
     */


    function strippedValue(element, maskValues) {
      var value = '';
      var k = 0;
      var checkMask = false;
      var maskValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maskValues) ? maskValues : !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this) ? element.value : maskValues;

      if (maskValue !== this.promptMask) {
        for (var i = 0; i < this.customRegExpCollec.length; i++) {
          if (checkMask) {
            checkMask = false;
          }

          if (this.customRegExpCollec[k] === '>' || this.customRegExpCollec[k] === '<' || this.customRegExpCollec[k] === '|' || this.customRegExpCollec[k] === '\\') {
            --i;
            checkMask = true;
          }

          if (!checkMask) {
            if (maskValue[i] !== this.promptChar && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customRegExpCollec[k]) && (this._callPasteHandler || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.regExpCollec[this.customRegExpCollec[k]]) || this.customRegExpCollec[k].length > 2 && this.customRegExpCollec[k][0] === '[' && this.customRegExpCollec[k][this.customRegExpCollec[k].length - 1] === ']' || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[this.customRegExpCollec[k]])) && maskValue !== '') {
              value += maskValue[i];
            }
          }

          ++k;
        }
      }

      if (this.mask === null || this.mask === '' && this.value !== undefined) {
        value = maskValue;
      }

      return value;
    }

    function pushIntoRegExpCollec(value) {
      for (var k = 0; k < value.length; k++) {
        this.hiddenMask += value[k];

        if (value[k] !== '\\') {
          this.customRegExpCollec.push(value[k]);
        }
      }
    }

    function maskInputFocusHandler(event) {
      var _this516 = this;

      var eventArgs = {
        selectionStart: 0,
        event: event,
        value: this.value,
        maskedValue: this.element.value,
        container: this.inputObj.container,
        selectionEnd: this.promptMask.length > 0 ? this.promptMask.length : this.element.value.length
      };
      this.trigger('focus', eventArgs, function (eventArgs) {
        if (_this516.mask) {
          _this516.isFocus = true;

          if (_this516.element.value === '') {
            setElementValue.call(_this516, _this516.promptMask);
          } else {
            setElementValue.call(_this516, _this516.element.value);
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.version === '11.0') {
            _this516.element.setSelectionRange(eventArgs.selectionStart, eventArgs.selectionEnd);
          } else {
            var delay = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos ? 450 : 0;
            setTimeout(function () {
              _this516.element.setSelectionRange(eventArgs.selectionStart, eventArgs.selectionEnd);
            }, delay);
          }
        }
      });
    }

    function maskInputBlurHandler(event) {
      this.blurEventArgs = {
        event: event,
        value: this.value,
        maskedValue: this.element.value,
        container: this.inputObj.container
      };
      this.trigger('blur', this.blurEventArgs);

      if (this.mask) {
        this.isFocus = false;

        if (this.placeholder && this.element.value === this.promptMask && this.floatLabelType !== 'Always') {
          setElementValue.call(this, '');
          var labelElement = this.element.parentNode.querySelector('.e-float-text');

          if (this.floatLabelType === 'Auto' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(labelElement) && labelElement.classList.contains(TOPLABEL)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([labelElement], TOPLABEL);
          }
        }
      }
    }

    function maskInputPasteHandler(event) {
      var _this517 = this;

      if (this.mask && !this.readonly) {
        var sIndex = this.element.selectionStart;
        var eIndex = this.element.selectionEnd;
        var oldValue = this.element.value;
        setElementValue.call(this, '');
        this._callPasteHandler = true;
        setTimeout(function () {
          var value = _this517.element.value.replace(/ /g, '');

          if (_this517.redoCollec.length > 0 && _this517.redoCollec[0].value === _this517.element.value) {
            value = strippedValue.call(_this517, _this517.element);
          }

          setElementValue.call(_this517, oldValue);
          _this517.element.selectionStart = sIndex;
          _this517.element.selectionEnd = eIndex;
          var i = 0;
          _this517.maskKeyPress = true;

          do {
            validateValue.call(_this517, value[i], false, null);
            ++i;
          } while (i < value.length);

          _this517.maskKeyPress = false;
          _this517._callPasteHandler = false;

          if (_this517.element.value === oldValue) {
            var _i95 = 0;
            _this517.maskKeyPress = true;

            do {
              validateValue.call(_this517, value[_i95], false, null);
              ++_i95;
            } while (_i95 < value.length);

            _this517.maskKeyPress = false;
          } else {
            triggerMaskChangeEvent.call(_this517, event, oldValue);
          }
        }, 1);
      }
    }

    function maskInputCutHandler(event) {
      var _this518 = this;

      if (this.mask && !this.readonly) {
        var preValue = this.element.value;
        var sIndex = this.element.selectionStart;
        var eIndex = this.element.selectionEnd;
        this.undoCollec.push({
          value: this.element.value,
          startIndex: this.element.selectionStart,
          endIndex: this.element.selectionEnd
        });
        var value = this.element.value.substring(0, sIndex) + this.promptMask.substring(sIndex, eIndex) + this.element.value.substring(eIndex);
        setTimeout(function () {
          setElementValue.call(_this518, value);
          _this518.element.selectionStart = _this518.element.selectionEnd = sIndex;

          if (_this518.element.value !== preValue) {
            triggerMaskChangeEvent.call(_this518, event, null);
          }
        }, 0);
      }
    }

    function maskInputDropHandler(event) {
      event.preventDefault();
    }

    function maskInputHandler(event) {
      if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE === true && this.element.value === '' && this.floatLabelType === 'Never') {
        return;
      }

      var eventArgs = {
        ctrlKey: false,
        keyCode: 229
      }; // tslint:disable-next-line

      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(event, eventArgs);

      if (this.mask) {
        if (this.element.value === '') {
          this.redoCollec.unshift({
            value: this.promptMask,
            startIndex: this.element.selectionStart,
            endIndex: this.element.selectionEnd
          });
        }

        if (this.element.value.length === 1) {
          this.element.value = this.element.value + this.promptMask;
          this.element.setSelectionRange(1, 1);
        }

        if (!this._callPasteHandler) {
          removeMaskInputValues.call(this, event);
        }

        if (this.element.value.length > this.promptMask.length) {
          var startIndex = this.element.selectionStart;
          var addedValues = this.element.value.length - this.promptMask.length;
          var value = this.element.value.substring(startIndex - addedValues, startIndex);
          this.maskKeyPress = false;
          var i = 0;

          do {
            validateValue.call(this, value[i], event.ctrlKey, event);
            ++i;
          } while (i < value.length);

          if (this.element.value !== this.preEleVal) {
            triggerMaskChangeEvent.call(this, event, null);
          }
        }

        var val = strippedValue.call(this, this.element);
        this.prevValue = val;
        this.value = val;

        if (val === '') {
          setElementValue.call(this, this.promptMask);
          this.element.setSelectionRange(0, 0);
        }
      }
    }

    function maskInputKeyDownHandler(event) {
      if (this.mask && !this.readonly) {
        if (event.keyCode !== 229) {
          if (event.ctrlKey && (event.keyCode === 89 || event.keyCode === 90)) {
            event.preventDefault();
          }

          removeMaskInputValues.call(this, event);
        }

        var startValue = this.element.value;

        if (event.ctrlKey && (event.keyCode === 89 || event.keyCode === 90)) {
          var collec;

          if (event.keyCode === 90 && this.undoCollec.length > 0 && startValue !== this.undoCollec[this.undoCollec.length - 1].value) {
            collec = this.undoCollec[this.undoCollec.length - 1];
            this.redoCollec.unshift({
              value: this.element.value,
              startIndex: this.element.selectionStart,
              endIndex: this.element.selectionEnd
            });
            setElementValue.call(this, collec.value);
            this.element.selectionStart = collec.startIndex;
            this.element.selectionEnd = collec.endIndex;
            this.undoCollec.splice(this.undoCollec.length - 1, 1);
          } else if (event.keyCode === 89 && this.redoCollec.length > 0 && startValue !== this.redoCollec[0].value) {
            collec = this.redoCollec[0];
            this.undoCollec.push({
              value: this.element.value,
              startIndex: this.element.selectionStart,
              endIndex: this.element.selectionEnd
            });
            setElementValue.call(this, collec.value);
            this.element.selectionStart = collec.startIndex;
            this.element.selectionEnd = collec.endIndex;
            this.redoCollec.splice(0, 1);
          }
        }
      }
    }

    function mobileRemoveFunction() {
      var collec;
      var sIndex = this.element.selectionStart;
      var eIndex = this.element.selectionEnd;

      if (this.redoCollec.length > 0) {
        collec = this.redoCollec[0];
        setElementValue.call(this, collec.value);

        if (collec.startIndex - sIndex === 1) {
          this.element.selectionStart = collec.startIndex;
          this.element.selectionEnd = collec.endIndex;
        } else {
          this.element.selectionStart = sIndex + 1;
          this.element.selectionEnd = eIndex + 1;
        }
      } else {
        setElementValue.call(this, this.promptMask);
        this.element.selectionStart = this.element.selectionEnd = sIndex;
      }
    }

    function autoFillMaskInputValues(isRemove, oldEventVal, event) {
      if (event.type === 'input') {
        isRemove = false;
        oldEventVal = this.element.value;
        setElementValue.call(this, this.promptMask);
        setMaskValue.call(this, oldEventVal);
      }

      return isRemove;
    }

    function removeMaskInputValues(event) {
      var isRemove = false;
      var oldEventVal;
      var isDeleted = false;

      if (this.element.value.length < this.promptMask.length) {
        isRemove = true;
        oldEventVal = this.element.value;
        isRemove = autoFillMaskInputValues.call(this, isRemove, oldEventVal, event);
        mobileRemoveFunction.call(this);
      }

      if (this.element.value.length >= this.promptMask.length && event.type === 'input') {
        isRemove = autoFillMaskInputValues.call(this, isRemove, oldEventVal, event);
      }

      var initStartIndex = this.element.selectionStart;
      var initEndIndex = this.element.selectionEnd;
      var startIndex = this.element.selectionStart;
      var endIndex = this.element.selectionEnd;
      var maskValue = this.hiddenMask.replace(/[>|\\<]/g, '');
      var curMask = maskValue[startIndex - 1];
      var parentElement = this.element.parentNode;

      if (isRemove || event.keyCode === 8 || event.keyCode === 46) {
        this.undoCollec.push({
          value: this.element.value,
          startIndex: this.element.selectionStart,
          endIndex: endIndex
        });
        var multipleDel = false;
        var preValue = this.element.value;

        if (startIndex > 0 || (event.keyCode === 8 || event.keyCode === 46) && startIndex < this.element.value.length && this.element.selectionEnd - startIndex !== this.element.value.length) {
          var index = startIndex;

          if (startIndex !== endIndex) {
            startIndex = endIndex;

            if (event.keyCode === 46) {
              multipleDel = true;
            }
          } else if (event.keyCode === 46) {
            ++index;
          } else {
            --index;
          }

          for (var k = startIndex; event.keyCode === 8 || isRemove || multipleDel ? k > index : k < index; event.keyCode === 8 || isRemove || multipleDel ? k-- : k++) {
            for (var i = startIndex; event.keyCode === 8 || isRemove || multipleDel ? i > 0 : i < this.element.value.length; event.keyCode === 8 || isRemove || multipleDel ? i-- : i++) {
              var sIndex = void 0;

              if ((event.keyCode === 8 || multipleDel) && (initStartIndex !== initEndIndex && initStartIndex !== startIndex || initStartIndex === initEndIndex) || isRemove) {
                curMask = maskValue[i - 1];
                sIndex = startIndex - 1;
              } else {
                curMask = maskValue[i];
                sIndex = startIndex;
                ++startIndex;
              }

              var oldValue = this.element.value[sIndex];

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.regExpCollec[curMask]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[curMask]) && this.hiddenMask[sIndex] !== this.promptChar && this.customRegExpCollec[sIndex][0] !== '[' && this.customRegExpCollec[sIndex][this.customRegExpCollec[sIndex].length - 1] !== ']' || this.promptMask[sIndex] !== this.promptChar && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters)) {
                this.element.selectionStart = this.element.selectionEnd = sIndex;
                event.preventDefault();

                if (event.keyCode === 46 && !multipleDel) {
                  ++this.element.selectionStart;
                }
              } else {
                var value = this.element.value;
                var prompt = this.promptChar;
                var elementValue = value.substring(0, sIndex) + prompt + value.substring(startIndex, value.length);
                setElementValue.call(this, elementValue);
                event.preventDefault();
                this.element.selectionStart = this.element.selectionEnd = sIndex;
                isDeleted = true;
              }

              startIndex = this.element.selectionStart;

              if (!isDeleted && event.keyCode === 8 || multipleDel || !isDeleted && !(event.keyCode === 46)) {
                sIndex = startIndex - 1;
              } else {
                sIndex = startIndex;
                isDeleted = false;
              }

              oldValue = this.element.value[sIndex];

              if (initStartIndex !== initEndIndex && this.element.selectionStart === initStartIndex || this.promptMask[sIndex] === this.promptChar || oldValue !== this.promptMask[sIndex] && this.promptMask[sIndex] !== this.promptChar && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters)) {
                break;
              }
            }
          }
        }

        if (this.element.selectionStart === 0 && this.element.selectionEnd === this.element.value.length) {
          setElementValue.call(this, this.promptMask);
          event.preventDefault();
          this.element.selectionStart = this.element.selectionEnd = startIndex;
        }

        this.redoCollec.unshift({
          value: this.element.value,
          startIndex: this.element.selectionStart,
          endIndex: this.element.selectionEnd
        });

        if (this.element.value !== preValue) {
          triggerMaskChangeEvent.call(this, event, oldEventVal);
        }
      }
    }

    function maskInputKeyPressHandler(event) {
      if (this.mask && !this.readonly) {
        var oldValue = this.element.value;

        if (!event.ctrlKey || event.ctrlKey && event.code !== 'KeyA' && event.code !== 'KeyY' && event.code !== 'KeyZ' && event.code !== 'KeyX' && event.code !== 'KeyC' && event.code !== 'KeyV') {
          this.maskKeyPress = true;
          var key = event.key;

          if (key === 'Spacebar') {
            key = String.fromCharCode(event.keyCode);
          }

          if (!key) {
            this.isIosInvalid = true;
            validateValue.call(this, String.fromCharCode(event.keyCode), event.ctrlKey, event);
            event.preventDefault();
            this.isIosInvalid = false;
          } else if (key && key.length === 1) {
            validateValue.call(this, key, event.ctrlKey, event);
            event.preventDefault();
          }

          if (event.keyCode === 32 && key === ' ' && this.promptChar === ' ') {
            this.element.selectionStart = this.element.selectionEnd = this.element.selectionStart - key.length;
          }
        }

        if (this.element.value !== oldValue) {
          triggerMaskChangeEvent.call(this, event, oldValue);
        }
      }
    }

    function triggerMaskChangeEvent(event, oldValue) {
      var prevOnChange = this.isProtectedOnChange;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.changeEventArgs) && !this.isInitial) {
        var eventArgs = {};
        this.changeEventArgs = {
          value: this.element.value,
          maskedValue: this.element.value,
          isInteraction: false,
          isInteracted: false
        };

        if (this.mask) {
          this.changeEventArgs.value = strippedValue.call(this, this.element);
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event)) {
          this.changeEventArgs.isInteracted = true;
          this.changeEventArgs.isInteraction = true;
          this.changeEventArgs.event = event;
        }

        this.isProtectedOnChange = true;
        this.value = this.changeEventArgs.value;
        this.isProtectedOnChange = prevOnChange;
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, this.changeEventArgs);
        this.trigger('change', eventArgs);
      }

      this.preEleVal = this.element.value;
      this.prevValue = strippedValue.call(this, this.element);
      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
        'aria-valuenow': this.element.value
      });
    }

    function maskInputKeyUpHandler(event) {
      if (this.mask && !this.readonly) {
        var collec;

        if (!this.maskKeyPress && event.keyCode === 229) {
          var oldEventVal;

          if (this.element.value.length === 1) {
            this.element.value = this.element.value + this.promptMask;
            this.element.setSelectionRange(1, 1);
          }

          if (this.element.value.length > this.promptMask.length) {
            var startIndex = this.element.selectionStart;
            var addedValues = this.element.value.length - this.promptMask.length;

            var _val2 = this.element.value.substring(startIndex - addedValues, startIndex);

            if (this.undoCollec.length > 0) {
              collec = this.undoCollec[this.undoCollec.length - 1];
              var _startIndex = this.element.selectionStart;
              oldEventVal = collec.value;
              var oldVal = collec.value.substring(_startIndex - addedValues, _startIndex);
              collec = this.redoCollec[0];
              _val2 = _val2.trim();
              var isSpace = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid && _val2 === '';

              if (!isSpace && oldVal !== _val2 && collec.value.substring(_startIndex - addedValues, _startIndex) !== _val2) {
                validateValue.call(this, _val2, event.ctrlKey, event);
              } else if (isSpace) {
                preventUnsupportedValues.call(this, event, _startIndex - 1, this.element.selectionEnd - 1, _val2, event.ctrlKey, false);
              }
            } else {
              oldEventVal = this.promptMask;
              validateValue.call(this, _val2, event.ctrlKey, event);
            }

            this.maskKeyPress = false;
            triggerMaskChangeEvent.call(this, event, oldEventVal);
          }
        } else {
          removeMaskError.call(this);
        }

        var val = strippedValue.call(this, this.element);

        if (!(this.element.selectionStart === 0 && this.promptMask === this.element.value && val === '') || val === '' && this.value !== val) {
          this.prevValue = val;
          this.value = val;
        }
      } else {
        triggerMaskChangeEvent.call(this, event);
      }

      if (this.element.selectionStart === 0 && this.element.selectionEnd === 0) {
        // tslint:disable-next-line
        var temp = this.element;
        setTimeout(function () {
          temp.setSelectionRange(0, 0);
        }, 0);
      }
    }

    function mobileSwipeCheck(key) {
      if (key.length > 1 && this.promptMask.length + key.length < this.element.value.length) {
        var elementValue = this.redoCollec[0].value.substring(0, this.redoCollec[0].startIndex) + key + this.redoCollec[0].value.substring(this.redoCollec[0].startIndex, this.redoCollec[0].value.length);
        setElementValue.call(this, elementValue);
        this.element.selectionStart = this.element.selectionEnd = this.redoCollec[0].startIndex + key.length;
      }

      this.element.selectionStart = this.element.selectionStart - key.length;
      this.element.selectionEnd = this.element.selectionEnd - key.length;
    }

    function mobileValidation(key) {
      if (!this.maskKeyPress) {
        mobileSwipeCheck.call(this, key);
      }
    }

    function validateValue(key, isCtrlKey, event) {
      mobileValidation.call(this, key);

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(key)) {
        return;
      }

      var startIndex = this.element.selectionStart;
      var initStartIndex = startIndex;
      var endIndex = this.element.selectionEnd;
      var curMask;
      var allowText = false;
      var value = this.element.value;
      var eventOldVal;
      var prevSupport = false;
      var isEqualVal = false;

      for (var k = 0; k < key.length; k++) {
        var keyValue = key[k];
        startIndex = this.element.selectionStart;
        endIndex = this.element.selectionEnd;

        if (!this.maskKeyPress && initStartIndex === startIndex) {
          startIndex = startIndex + k;
        }

        if (!this.maskKeyPress || startIndex < this.promptMask.length) {
          for (var i = startIndex; i < this.promptMask.length; i++) {
            var maskValue = this.escapeMaskValue;
            curMask = maskValue[startIndex];

            if (this.hiddenMask[startIndex] === '\\' && this.hiddenMask[startIndex + 1] === key) {
              isEqualVal = true;
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.regExpCollec[curMask]) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[curMask])) && this.hiddenMask[startIndex] !== this.promptChar && this.customRegExpCollec[startIndex][0] !== '[' && this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] !== ']' || this.promptMask[startIndex] !== this.promptChar && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) || this.promptChar === curMask && this.escapeMaskValue === this.mask) {
              this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
              startIndex = this.element.selectionStart;
              curMask = this.hiddenMask[startIndex];
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customCharacters[curMask])) {
            var customValStr = this.customCharacters[curMask];
            var customValArr = customValStr.split(',');

            for (var _i96 = 0; _i96 < customValArr.length; _i96++) {
              if (keyValue.match(new RegExp('[' + customValArr[_i96] + ']'))) {
                allowText = true;
                break;
              }
            }
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.regExpCollec[curMask]) && keyValue.match(new RegExp(this.regExpCollec[curMask])) && this.promptMask[startIndex] === this.promptChar) {
            allowText = true;
          } else if (this.promptMask[startIndex] === this.promptChar && this.customRegExpCollec[startIndex][0] === '[' && this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] === ']' && keyValue.match(new RegExp(this.customRegExpCollec[startIndex]))) {
            allowText = true;
          }

          if ((!this.maskKeyPress || startIndex < this.hiddenMask.length) && allowText) {
            if (k === 0) {
              if (this.maskKeyPress) {
                this.undoCollec.push({
                  value: value,
                  startIndex: startIndex,
                  endIndex: startIndex
                });
              } else {
                var sIndex = this.element.selectionStart;
                var eIndex = this.element.selectionEnd;

                if (this.redoCollec.length > 0) {
                  eventOldVal = this.redoCollec[0].value;
                  setElementValue.call(this, eventOldVal);
                  this.undoCollec.push(this.redoCollec[0]);
                } else {
                  this.undoCollec.push({
                    value: this.promptMask,
                    startIndex: startIndex,
                    endIndex: startIndex
                  });
                  eventOldVal = this.promptMask;
                  setElementValue.call(this, eventOldVal);
                }

                this.element.selectionStart = sIndex;
                this.element.selectionEnd = eIndex;
              }
            }

            startIndex = this.element.selectionStart;
            applySupportedValues.call(this, event, startIndex, keyValue, eventOldVal, isEqualVal);
            prevSupport = true;

            if (k === key.length - 1) {
              this.redoCollec.unshift({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
              });
            }

            allowText = false;
          } else {
            startIndex = this.element.selectionStart;
            preventUnsupportedValues.call(this, event, startIndex, initStartIndex, key, isCtrlKey, prevSupport);
          }

          if (k === key.length - 1 && !allowText) {
            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid && startIndex < this.promptMask.length) {
              this.redoCollec.unshift({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
              });
            }
          }
        } else {
          if (key.length === 1 && !isCtrlKey && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event)) {
            addMaskErrorClass.call(this);
          }
        }
      }
    }

    function applySupportedValues(event, startIndex, keyValue, eventOldVal, isEqualVal) {
      if (this.hiddenMask.length > this.promptMask.length) {
        keyValue = changeToLowerUpperCase.call(this, keyValue, this.element.value);
      }

      if (!isEqualVal) {
        var value = this.element.value;
        var elementValue = value.substring(0, startIndex) + keyValue + value.substring(startIndex + 1, value.length);
        setElementValue.call(this, elementValue);
        this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
      }
    }

    function preventUnsupportedValues(event, sIdx, idx, key, ctrl, chkSupport) {
      if (!this.maskKeyPress) {
        var eventOldVal;
        var value = this.element.value;

        if (sIdx >= this.promptMask.length) {
          setElementValue.call(this, value.substring(0, sIdx));
        } else {
          if (idx === sIdx) {
            setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx + 1, value.length));
          } else {
            if (this.promptMask.length === this.element.value.length) {
              setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx, value.length));
            } else {
              setElementValue.call(this, value.substring(0, idx) + value.substring(idx + 1, value.length));
            }
          }

          this.element.selectionStart = this.element.selectionEnd = chkSupport || this.element.value[idx] !== this.promptChar ? sIdx : idx;
        }

        eventOldVal = this.element.value;
        addMaskErrorClass.call(this);
      }

      if (key.length === 1 && !ctrl && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event)) {
        addMaskErrorClass.call(this);
      }
    }

    function addMaskErrorClass() {
      var _this519 = this;

      var parentElement = this.element.parentNode;
      var timer = 200;

      if (parentElement.classList.contains(INPUTGROUP) || parentElement.classList.contains(FLOATINPUT)) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([parentElement], ERROR$1);
      } else {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], ERROR$1);
      }

      if (this.isIosInvalid === true) {
        timer = 400;
      }

      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
        'aria-invalid': 'true'
      });
      setTimeout(function () {
        if (!_this519.maskKeyPress) {
          removeMaskError.call(_this519);
        }
      }, timer);
    }

    function removeMaskError() {
      var parentElement = this.element.parentNode;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentElement)) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([parentElement], ERROR$1);
      }

      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ERROR$1);
      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
        'aria-invalid': 'false'
      });
    }
    /**
     * @hidden
     * Validates user input using masking elements '<' , '>' and '|'.
     */


    function changeToLowerUpperCase(key, value) {
      var promptMask;
      var i;
      var curVal = value;
      var caseCount = 0;

      for (i = 0; i < this.hiddenMask.length; i++) {
        if (this.hiddenMask[i] === '\\') {
          promptMask = curVal.substring(0, i) + '\\' + curVal.substring(i, curVal.length);
        }

        if (this.hiddenMask[i] === '>' || this.hiddenMask[i] === '<' || this.hiddenMask[i] === '|') {
          if (this.hiddenMask[i] !== curVal[i]) {
            promptMask = curVal.substring(0, i) + this.hiddenMask[i] + curVal.substring(i, curVal.length);
          }

          ++caseCount;
        }

        if (promptMask) {
          if (promptMask[i] === this.promptChar && i > this.element.selectionStart || this.element.value.indexOf(this.promptChar) < 0 && this.element.selectionStart + caseCount === i) {
            caseCount = 0;
            break;
          }

          curVal = promptMask;
        }
      }

      while (i >= 0 && promptMask) {
        if (i === 0 || promptMask[i - 1] !== '\\') {
          var val = this.element.value;

          if (promptMask[i] === '>') {
            key = key.toUpperCase();
            break;
          } else if (promptMask[i] === '<') {
            key = key.toLowerCase();
            break;
          } else if (promptMask[i] === '|') {
            break;
          }
        }

        --i;
      }

      return key;
    }
    /**
     * @hidden
     * To set updated values in the MaskedTextBox.
     */


    function setMaskValue(val) {
      if (this.mask && val !== undefined && (this.prevValue === undefined || this.prevValue !== val)) {
        this.maskKeyPress = true;
        setElementValue.call(this, this.promptMask);

        if (val !== '' && !(val === null && this.floatLabelType === 'Never' && this.placeholder)) {
          this.element.selectionStart = 0;
          this.element.selectionEnd = 0;
        }

        if (val !== null) {
          for (var i = 0; i < val.length; i++) {
            validateValue.call(this, val[i], false, null);
          }
        }

        var newVal = strippedValue.call(this, this.element);
        this.prevValue = newVal;
        this.value = newVal;
        triggerMaskChangeEvent.call(this, null, null);
        this.maskKeyPress = false;
        var labelElement = this.element.parentNode.querySelector('.e-float-text');

        if (this.element.value === this.promptMask && this.floatLabelType === 'Auto' && this.placeholder && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(labelElement) && labelElement.classList.contains(TOPLABEL) && !this.isFocus) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([labelElement], TOPLABEL);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([labelElement], BOTTOMLABEL);
          setElementValue.call(this, '');
        }
      }

      if (this.mask === null || this.mask === '' && this.value !== undefined) {
        setElementValue.call(this, this.value);
      }
    }
    /**
     * @hidden
     * To set updated values in the input element.
     */


    function setElementValue(val, element) {
      if (!this.isFocus && this.floatLabelType === 'Auto' && this.placeholder && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
        val = '';
      }

      var value = strippedValue.call(this, element ? element : this.element, val);

      if (value === null || value === '') {
        Input.setValue(val, element ? element : this.element, this.floatLabelType, false);

        if (this.showClearButton) {
          this.inputObj.clearButton.classList.add('e-clear-icon-hide');
        }
      } else {
        Input.setValue(val, element ? element : this.element, this.floatLabelType, this.showClearButton);
      }
    }
    /**
     * @hidden
     * Provide mask support to input textbox through utility method.
     */


    function maskInput(args) {
      var inputEle = getMaskInput(args);
      applyMask.call(inputEle);
      var val = strippedValue.call(this, this.element);
      this.prevValue = val;
      this.value = val;

      if (args.mask) {
        unwireEvents.call(inputEle);
        wireEvents.call(inputEle);
      }
    }

    function getMaskInput(args) {
      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([args.element], UTILMASK);
      var inputEle = {
        element: args.element,
        mask: args.mask,
        promptMask: '',
        hiddenMask: '',
        escapeMaskValue: '',
        promptChar: args.promptChar ? args.promptChar.length > 1 ? args.promptChar = args.promptChar[0] : args.promptChar : '_',
        value: args.value ? args.value : null,
        regExpCollec: regularExpressions,
        customRegExpCollec: [],
        customCharacters: args.customCharacters,
        undoCollec: [],
        redoCollec: [],
        maskKeyPress: false,
        prevValue: ''
      };
      createMask.call(inputEle);
      return inputEle;
    }
    /**
     * @hidden
     * Gets raw value of the textbox which has been masked through utility method.
     */


    function getVal(args) {
      return strippedValue.call(getUtilMaskEle(args), args.element);
    }
    /**
     * @hidden
     * Gets masked value of the textbox which has been masked through utility method.
     */


    function getMaskedVal(args) {
      return unstrippedValue.call(getUtilMaskEle(args), args.element);
    }

    function getUtilMaskEle(args) {
      var inputEle;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args) && args.element.classList.contains(UTILMASK)) {
        inputEle = getMaskInput(args);
      }

      return inputEle;
    }
    /**
     * @hidden
     * Arguments to perform undo and redo functionalities.
     */


    var MaskUndo = function MaskUndo() {
      _classCallCheck(this, MaskUndo);
    };
    /**
     * MaskedTextbox base modules
     */


    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var ROOT$1 = 'e-control-wrapper e-mask';
    var INPUT = 'e-input';
    var COMPONENT$1 = 'e-maskedtextbox';
    var CONTROL$1 = 'e-control';
    var MASKINPUT_FOCUS = 'e-input-focus';
    var wrapperAttr = ['title', 'style', 'class'];
    /**
     * The MaskedTextBox allows the user to enter the valid input only based on the provided mask.
     * ```html
     * <input id="mask" type="text" />
     * ```
     * ```typescript
     * <script>
     * var maskObj = new MaskedTextBox({ mask: "(999) 9999-999" });
     * maskObj.appendTo('#mask');
     * </script>
     * ```
     */

    var MaskedTextBox = /*#__PURE__*/function (_syncfusion_ej2_base_14) {
      _inherits(MaskedTextBox, _syncfusion_ej2_base_14);

      var _super197 = _createSuper(MaskedTextBox);

      function MaskedTextBox(options, element) {
        var _this520;

        _classCallCheck(this, MaskedTextBox);

        _this520 = _super197.call(this, options, element);
        _this520.initInputValue = '';
        _this520.maskOptions = options;
        return _this520;
      }
      /**
       * Gets the component name
       * @private
       */


      _createClass2(MaskedTextBox, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'maskedtextbox';
        }
        /**
         * Initializes the event handler
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          this.promptMask = '';
          this.hiddenMask = '';
          this.escapeMaskValue = '';
          this.regExpCollec = regularExpressions;
          this.customRegExpCollec = [];
          this.undoCollec = [];
          this.redoCollec = [];
          this.changeEventArgs = {};
          this.focusEventArgs = {};
          this.blurEventArgs = {};
          this.maskKeyPress = false;
          this.isFocus = false;
          this.isInitial = false;
          this.isIosInvalid = false;
          var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
          this.cloneElement = this.element.cloneNode(true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.cloneElement], [CONTROL$1, COMPONENT$1, 'e-lib']);
          this.angularTagName = null;
          this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (this.element.tagName === 'EJS-MASKEDTEXTBOX') {
            this.angularTagName = this.element.tagName;
            var input = this.createElement('input');

            for (var i = 0; i < this.element.attributes.length; i++) {
              input.setAttribute(this.element.attributes[i].nodeName, this.element.attributes[i].nodeValue);
              input.innerHTML = this.element.innerHTML;
            }

            if (this.element.hasAttribute('id')) {
              this.element.removeAttribute('id');
            }

            this.element.classList.remove('e-control', 'e-maskedtextbox');
            this.element.classList.add('e-mask-container');
            this.element.appendChild(input);
            this.element = input;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, this.element);
          }

          this.updateHTMLAttrToElement();
          this.checkHtmlAttributes(false);

          if (this.formElement) {
            this.initInputValue = this.value;
          }
        }
        /**
         * Gets the properties to be maintained in the persisted state.
         * @return {string}
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['value'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Initializes the component rendering.
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (this.element.tagName.toLowerCase() === 'input') {
            if (this.floatLabelType === 'Never') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], INPUT);
            }

            this.createWrapper();
            this.updateHTMLAttrToWrapper();

            if (this.element.name === '') {
              this.element.setAttribute('name', this.element.id);
            }

            this.isInitial = true;
            this.resetMaskedTextBox();
            this.isInitial = false;
            this.setMaskPlaceholder(true, false);
            this.setWidth(this.width);
            this.preEleVal = this.element.value;

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.version === '11.0' || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge')) {
              this.element.blur();
            }

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) {
              this.element.blur();
            }

            if (this.element.getAttribute('value') || this.value) {
              this.element.setAttribute('value', this.element.value);
            }

            this.renderComplete();
          }
        }
      }, {
        key: "updateHTMLAttrToElement",
        value: function updateHTMLAttrToElement() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i97 = 0, _Object$keys31 = Object.keys(this.htmlAttributes); _i97 < _Object$keys31.length; _i97++) {
              var key = _Object$keys31[_i97];

              if (wrapperAttr.indexOf(key) < 0) {
                this.element.setAttribute(key, this.htmlAttributes[key]);
              }
            }
          }
        }
      }, {
        key: "updateCssClass",
        value: function updateCssClass(newClass, oldClass) {
          Input.setCssClass(this.getValidClassList(newClass), [this.inputObj.container], this.getValidClassList(oldClass));
        }
      }, {
        key: "getValidClassList",
        value: function getValidClassList(maskClassName) {
          var result = maskClassName;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maskClassName) && maskClassName !== '') {
            result = maskClassName.replace(/\s+/g, ' ').trim();
          }

          return result;
        }
      }, {
        key: "updateHTMLAttrToWrapper",
        value: function updateHTMLAttrToWrapper() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i98 = 0, _Object$keys32 = Object.keys(this.htmlAttributes); _i98 < _Object$keys32.length; _i98++) {
              var key = _Object$keys32[_i98];

              if (wrapperAttr.indexOf(key) > -1) {
                if (key === 'class') {
                  var updatedClassValues = this.htmlAttributes[key].replace(/\s+/g, ' ').trim();

                  if (updatedClassValues !== '') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputObj.container], updatedClassValues.split(' '));
                  }
                } else if (key === 'style') {
                  var maskStyle = this.inputObj.container.getAttribute(key);
                  maskStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maskStyle) ? maskStyle + this.htmlAttributes[key] : this.htmlAttributes[key];
                  this.inputObj.container.setAttribute(key, maskStyle);
                } else {
                  this.inputObj.container.setAttribute(key, this.htmlAttributes[key]);
                }
              }
            }
          }
        }
      }, {
        key: "resetMaskedTextBox",
        value: function resetMaskedTextBox() {
          this.promptMask = '';
          this.hiddenMask = '';
          this.escapeMaskValue = '';
          this.customRegExpCollec = [];
          this.undoCollec = [];
          this.redoCollec = [];

          if (this.promptChar.length > 1) {
            this.promptChar = this.promptChar[0];
          }

          createMask.call(this);
          applyMask.call(this);

          if (this.mask === null || this.mask === '' && this.value !== undefined) {
            setElementValue.call(this, this.value);
          }

          var val = strippedValue.call(this, this.element);
          this.prevValue = val;
          this.value = val;

          if (!this.isInitial) {
            unwireEvents.call(this);
          }

          wireEvents.call(this);
        }
      }, {
        key: "setMaskPlaceholder",
        value: function setMaskPlaceholder(setVal, dynamicPlaceholder) {
          if (dynamicPlaceholder || this.placeholder) {
            Input.setPlaceholder(this.placeholder, this.element);

            if (this.element.value === this.promptMask && setVal && this.floatLabelType !== 'Always') {
              setElementValue.call(this, '');
            }

            if (this.floatLabelType === 'Never') {
              maskInputBlurHandler.call(this);
            }
          }
        }
      }, {
        key: "setWidth",
        value: function setWidth(width) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            if (typeof width === 'number') {
              this.inputObj.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
              this.element.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            } else if (typeof width === 'string') {
              var elementWidth = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
              this.inputObj.container.style.width = elementWidth;
              this.element.style.width = elementWidth;
            }
          }
        }
      }, {
        key: "checkHtmlAttributes",
        value: function checkHtmlAttributes(isDynamic) {
          var attributes$$1 = isDynamic ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ['placeholder', 'disabled', 'value', 'readonly'];

          var _iterator104 = _createForOfIteratorHelper(attributes$$1),
              _step104;

          try {
            for (_iterator104.s(); !(_step104 = _iterator104.n()).done;) {
              var key = _step104.value;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute(key))) {
                switch (key) {
                  case 'placeholder':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maskOptions) || this.maskOptions['placeholder'] === undefined || isDynamic) {
                      this.setProperties({
                        placeholder: this.element.placeholder
                      }, !isDynamic);
                    }

                    break;

                  case 'disabled':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maskOptions) || this.maskOptions['enabled'] === undefined || isDynamic) {
                      var enabled = this.element.getAttribute(key) === 'disabled' || this.element.getAttribute(key) === '' || this.element.getAttribute(key) === 'true' ? false : true;
                      this.setProperties({
                        enabled: enabled
                      }, !isDynamic);
                    }

                    break;

                  case 'value':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maskOptions) || this.maskOptions['value'] === undefined || isDynamic) {
                      this.setProperties({
                        value: this.element.value
                      }, !isDynamic);
                    }

                    break;

                  case 'readonly':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.maskOptions) || this.maskOptions['readonly'] === undefined || isDynamic) {
                      var readonly = this.element.getAttribute(key) === 'readonly' || this.element.getAttribute(key) === '' || this.element.getAttribute(key) === 'true' ? true : false;
                      this.setProperties({
                        readonly: readonly
                      }, !isDynamic);
                    }

                    break;
                }
              }
            }
          } catch (err) {
            _iterator104.e(err);
          } finally {
            _iterator104.f();
          }
        }
      }, {
        key: "createWrapper",
        value: function createWrapper() {
          var updatedCssClassValues = this.cssClass;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            updatedCssClassValues = this.getValidClassList(this.cssClass);
          }

          this.inputObj = Input.createInput({
            element: this.element,
            floatLabelType: this.floatLabelType,
            properties: {
              enableRtl: this.enableRtl,
              cssClass: updatedCssClassValues,
              enabled: this.enabled,
              readonly: this.readonly,
              placeholder: this.placeholder,
              showClearButton: this.showClearButton
            }
          }, this.createElement);
          this.inputObj.container.setAttribute('class', ROOT$1 + ' ' + this.inputObj.container.getAttribute('class'));
        }
        /**
         * Calls internally if any of the property value is changed.
         * @hidden
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i99 = 0, _Object$keys33 = Object.keys(newProp); _i99 < _Object$keys33.length; _i99++) {
            var prop = _Object$keys33[_i99];

            switch (prop) {
              case 'value':
                setMaskValue.call(this, this.value);

                if (this.placeholder) {
                  this.setMaskPlaceholder(false, false);
                }

                break;

              case 'placeholder':
                this.setMaskPlaceholder(true, true);
                break;

              case 'width':
                this.setWidth(newProp.width);
                break;

              case 'cssClass':
                this.updateCssClass(newProp.cssClass, oldProp.cssClass);
                break;

              case 'enabled':
                Input.setEnabled(newProp.enabled, this.element, this.floatLabelType, this.inputObj.container);
                break;

              case 'readonly':
                Input.setReadonly(newProp.readonly, this.element);
                break;

              case 'enableRtl':
                Input.setEnableRtl(newProp.enableRtl, [this.inputObj.container]);
                break;

              case 'customCharacters':
                this.customCharacters = newProp.customCharacters;
                this.resetMaskedTextBox();
                break;

              case 'showClearButton':
                Input.setClearButton(newProp.showClearButton, this.element, this.inputObj, undefined, this.createElement);
                bindClearEvent.call(this);
                break;

              case 'floatLabelType':
                this.floatLabelType = newProp.floatLabelType;
                Input.removeFloating(this.inputObj);
                Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);
                break;

              case 'htmlAttributes':
                this.updateHTMLAttrToElement();
                this.updateHTMLAttrToWrapper();
                this.checkHtmlAttributes(true);
                break;

              case 'mask':
                var strippedValue$$1 = this.value;
                this.mask = newProp.mask;
                this.updateValue(strippedValue$$1);
                break;

              case 'promptChar':
                if (newProp.promptChar.length > 1) {
                  newProp.promptChar = newProp.promptChar[0];
                }

                if (newProp.promptChar) {
                  this.promptChar = newProp.promptChar;
                } else {
                  this.promptChar = '_';
                }

                var value = this.element.value.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);

                if (this.promptMask === this.element.value) {
                  value = this.promptMask.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);
                }

                this.promptMask = this.promptMask.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);
                this.undoCollec = this.redoCollec = [];
                setElementValue.call(this, value);
                break;
            }
          }
        }
      }, {
        key: "updateValue",
        value: function updateValue(strippedVal) {
          this.resetMaskedTextBox();
          setMaskValue.call(this, strippedVal);
        }
        /**
         * Gets the value of the MaskedTextBox with the masked format.
         * By using `value` property, you can get the raw value of maskedtextbox without literals and prompt characters.
         * @return {string}
         */

      }, {
        key: "getMaskedValue",
        value: function getMaskedValue() {
          return unstrippedValue.call(this, this.element);
        }
        /**
         * Sets the focus to widget for interaction.
         * @returns void
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          if (document.activeElement !== this.element && this.enabled) {
            this.element.focus();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.inputObj.container], [MASKINPUT_FOCUS]);
          }
        }
        /**
         * Remove the focus from widget, if the widget is in focus state.
         * @returns void
         */

      }, {
        key: "focusOut",
        value: function focusOut() {
          if (document.activeElement === this.element && this.enabled) {
            this.element.blur();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.inputObj.container], [MASKINPUT_FOCUS]);
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers.
         * Also it maintains the initial input element from the DOM.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          unwireEvents.call(this);
          var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly', 'autocorrect', 'aria-disabled', 'aria-placeholder', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-valuenow', 'aria-invalid'];

          for (var i = 0; i < attrArray.length; i++) {
            this.element.removeAttribute(attrArray[i]);
          }

          this.element.classList.remove('e-input');
          this.inputObj.container.insertAdjacentElement('afterend', this.element);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputObj.container);

          _get(_getPrototypeOf(MaskedTextBox.prototype), "destroy", this).call(this);
        }
      }]);

      return MaskedTextBox;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "cssClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "width", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "placeholder", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], MaskedTextBox.prototype, "floatLabelType", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], MaskedTextBox.prototype, "htmlAttributes", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], MaskedTextBox.prototype, "enabled", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MaskedTextBox.prototype, "readonly", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MaskedTextBox.prototype, "showClearButton", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MaskedTextBox.prototype, "enablePersistence", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "mask", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('_')], MaskedTextBox.prototype, "promptChar", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "value", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MaskedTextBox.prototype, "customCharacters", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MaskedTextBox.prototype, "created", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MaskedTextBox.prototype, "destroyed", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MaskedTextBox.prototype, "change", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MaskedTextBox.prototype, "focus", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MaskedTextBox.prototype, "blur", void 0);

    MaskedTextBox = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], MaskedTextBox);
    /**
     * MaskedTextbox modules
     */

    /**
     * MaskedTextbox modules
     */

    /**
     * Input box Component
     */

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };
    /**
     * Configures the ticks data of the Slider.
     */


    var TicksData = /*#__PURE__*/function (_syncfusion_ej2_base_15) {
      _inherits(TicksData, _syncfusion_ej2_base_15);

      var _super198 = _createSuper(TicksData);

      function TicksData() {
        _classCallCheck(this, TicksData);

        return _super198.apply(this, arguments);
      }

      return TicksData;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], TicksData.prototype, "placement", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)], TicksData.prototype, "largeStep", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)], TicksData.prototype, "smallStep", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TicksData.prototype, "showSmallTicks", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TicksData.prototype, "format", void 0);
    /**
     * It illustrates the color track data in slider.
     * {% codeBlock src='slider/colorrange/index.md' %}{% endcodeBlock %}
     */


    var ColorRangeData = /*#__PURE__*/function (_syncfusion_ej2_base_16) {
      _inherits(ColorRangeData, _syncfusion_ej2_base_16);

      var _super199 = _createSuper(ColorRangeData);

      function ColorRangeData() {
        _classCallCheck(this, ColorRangeData);

        return _super199.apply(this, arguments);
      }

      return ColorRangeData;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ColorRangeData.prototype, "color", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ColorRangeData.prototype, "start", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ColorRangeData.prototype, "end", void 0);
    /**
     * It illustrates the limit data in slider.
     * {% codeBlock src='slider/limits/index.md' %}{% endcodeBlock %}
     */


    var LimitData = /*#__PURE__*/function (_syncfusion_ej2_base_17) {
      _inherits(LimitData, _syncfusion_ej2_base_17);

      var _super200 = _createSuper(LimitData);

      function LimitData() {
        _classCallCheck(this, LimitData);

        return _super200.apply(this, arguments);
      }

      return LimitData;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], LimitData.prototype, "enabled", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], LimitData.prototype, "minStart", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], LimitData.prototype, "minEnd", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], LimitData.prototype, "maxStart", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], LimitData.prototype, "maxEnd", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], LimitData.prototype, "startHandleFixed", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], LimitData.prototype, "endHandleFixed", void 0);
    /**
     * It illustrates the tooltip data in slider.
     */


    var TooltipData = /*#__PURE__*/function (_syncfusion_ej2_base_18) {
      _inherits(TooltipData, _syncfusion_ej2_base_18);

      var _super201 = _createSuper(TooltipData);

      function TooltipData() {
        _classCallCheck(this, TooltipData);

        return _super201.apply(this, arguments);
      }

      return TooltipData;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], TooltipData.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Before')], TooltipData.prototype, "placement", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Focus')], TooltipData.prototype, "showOn", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TooltipData.prototype, "isVisible", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TooltipData.prototype, "format", void 0);

    var bootstrapTooltipOffset = 6;
    var bootstrap4TooltipOffset = 3;
    var classNames = {
      root: 'e-slider',
      rtl: 'e-rtl',
      sliderHiddenInput: 'e-slider-input',
      controlWrapper: 'e-control-wrapper',
      sliderHandle: 'e-handle',
      rangeBar: 'e-range',
      sliderButton: 'e-slider-button',
      firstButton: 'e-first-button',
      secondButton: 'e-second-button',
      scale: 'e-scale',
      tick: 'e-tick',
      large: 'e-large',
      tickValue: 'e-tick-value',
      sliderTooltip: 'e-slider-tooltip',
      sliderHover: 'e-slider-hover',
      sliderFirstHandle: 'e-handle-first',
      sliderSecondHandle: 'e-handle-second',
      sliderDisabled: 'e-disabled',
      sliderContainer: 'e-slider-container',
      horizontalTooltipBefore: 'e-slider-horizontal-before',
      horizontalTooltipAfter: 'e-slider-horizontal-after',
      verticalTooltipBefore: 'e-slider-vertical-before',
      verticalTooltipAfter: 'e-slider-vertical-after',
      materialTooltip: 'e-material-tooltip',
      materialTooltipOpen: 'e-material-tooltip-open',
      materialTooltipActive: 'e-tooltip-active',
      materialSlider: 'e-material-slider',
      sliderTrack: 'e-slider-track',
      sliderHorizantalColor: 'e-slider-horizantal-color',
      sliderVerticalColor: 'e-slider-vertical-color',
      sliderHandleFocused: 'e-handle-focused',
      verticalSlider: 'e-vertical',
      horizontalSlider: 'e-horizontal',
      sliderHandleStart: 'e-handle-start',
      sliderTooltipStart: 'e-material-tooltip-start',
      sliderTabHandle: 'e-tab-handle',
      sliderButtonIcon: 'e-button-icon',
      sliderSmallSize: 'e-small-size',
      sliderTickPosition: 'e-tick-pos',
      sliderFirstTick: 'e-first-tick',
      sliderLastTick: 'e-last-tick',
      sliderButtonClass: 'e-slider-btn',
      sliderTooltipWrapper: 'e-tooltip-wrap',
      sliderTabTrack: 'e-tab-track',
      sliderTabRange: 'e-tab-range',
      sliderActiveHandle: 'e-handle-active',
      sliderMaterialHandle: 'e-material-handle',
      sliderMaterialRange: 'e-material-range',
      sliderMaterialDefault: 'e-material-default',
      materialTooltipShow: 'e-material-tooltip-show',
      materialTooltipHide: 'e-material-tooltip-hide',
      readonly: 'e-read-only',
      limits: 'e-limits',
      limitBarDefault: 'e-limit-bar',
      limitBarFirst: 'e-limit-first',
      limitBarSecond: 'e-limit-second',
      dragHorizontal: 'e-drag-horizontal',
      dragVertical: 'e-drag-vertical'
    };
    /**
     * The Slider component allows the user to select a value or range
     * of values in-between a min and max range, by dragging the handle over the slider bar.
     * ```html
     * <div id='slider'></div>
     * ```
     * ```typescript
     * <script>
     *   var sliderObj = new Slider({ value: 10 });
     *   sliderObj.appendTo('#slider');
     * </script>
     * ```
     */

    var Slider = /*#__PURE__*/function (_syncfusion_ej2_base_19) {
      _inherits(Slider, _syncfusion_ej2_base_19);

      var _super202 = _createSuper(Slider);

      function Slider(options, element) {
        var _this521;

        _classCallCheck(this, Slider);

        _this521 = _super202.call(this, options, element);
        _this521.horDir = 'left';
        _this521.verDir = 'bottom';
        _this521.transition = {
          handle: 'left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), ' + 'top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)',
          rangeBar: 'all .4s cubic-bezier(.25, .8, .25, 1)'
        };
        _this521.transitionOnMaterialTooltip = {
          handle: 'left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out',
          rangeBar: 'left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out'
        };
        _this521.scaleTransform = 'transform .4s cubic-bezier(.25, .8, .25, 1)';
        _this521.customAriaText = null;
        _this521.drag = true;
        return _this521;
      }

      _createClass2(Slider, [{
        key: "preRender",
        value: function preRender() {
          var localeText = {
            incrementTitle: 'Increase',
            decrementTitle: 'Decrease'
          };
          this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('slider', localeText, this.locale);
          this.isElementFocused = false;
          this.tickElementCollection = [];
          this.tooltipFormatInfo = {};
          this.ticksFormatInfo = {};
          this.initCultureInfo();
          this.initCultureFunc();
          this.formChecker();
        }
      }, {
        key: "formChecker",
        value: function formChecker() {
          var formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (formElement) {
            this.isForm = true; // this condition needs to be checked, if the slider is going to be refreshed by `refresh()`
            // then we need to revert the slider `value` back to `formResetValue` to preserve the initial value

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formResetValue)) {
              this.setProperties({
                'value': this.formResetValue
              }, true);
            }

            this.formResetValue = this.value;

            if (this.type === 'Range' && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formResetValue) || typeof this.formResetValue !== 'object')) {
              this.formResetValue = [parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min)), parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max))];
            } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formResetValue)) {
              this.formResetValue = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min));
            }

            this.formElement = formElement;
          } else {
            this.isForm = false;
          }
        }
      }, {
        key: "initCultureFunc",
        value: function initCultureFunc() {
          this.internationalization = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
        }
      }, {
        key: "initCultureInfo",
        value: function initCultureInfo() {
          this.tooltipFormatInfo.format = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip.format) ? this.tooltip.format : null;
          this.ticksFormatInfo.format = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks.format) ? this.ticks.format : null;
        }
      }, {
        key: "formatString",
        value: function formatString(value, formatInfo) {
          var formatValue = null;
          var formatString = null;

          if (value || value === 0) {
            formatValue = this.formatNumber(value);
            var numberOfDecimals = this.numberOfDecimals(value);
            formatString = this.internationalization.getNumberFormat(formatInfo)(this.makeRoundNumber(value, numberOfDecimals));
          }

          return {
            elementVal: formatValue,
            formatString: formatString
          };
        }
      }, {
        key: "formatNumber",
        value: function formatNumber(value) {
          var numberOfDecimals = this.numberOfDecimals(value);
          return this.internationalization.getNumberFormat({
            maximumFractionDigits: numberOfDecimals,
            minimumFractionDigits: numberOfDecimals,
            useGrouping: false
          })(value);
        }
      }, {
        key: "numberOfDecimals",
        value: function numberOfDecimals(value) {
          var decimalPart = value.toString().split('.')[1];
          var numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;
          return numberOfDecimals;
        }
      }, {
        key: "makeRoundNumber",
        value: function makeRoundNumber(value, precision) {
          var decimals = precision || 0;
          return Number(value.toFixed(decimals));
        }
      }, {
        key: "fractionalToInteger",
        value: function fractionalToInteger(value) {
          value = this.numberOfDecimals(value) === 0 ? Number(value).toFixed(this.noOfDecimals) : value;
          var tens = 1;

          for (var i = 0; i < this.noOfDecimals; i++) {
            tens *= 10;
          }

          value = Number((value * tens).toFixed(0));
          return value;
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.initialize();
          }

          this.initRender();
          this.wireEvents();
          this.setZindex();
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], classNames.root);
          this.setCSSClass();
        }
      }, {
        key: "setElementWidth",
        value: function setElementWidth(width) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(width)) {
            if (typeof width === 'number') {
              this.sliderContainer.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            } else if (typeof width === 'string') {
              this.sliderContainer.style.width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
            }
          }
        }
      }, {
        key: "setCSSClass",
        value: function setCSSClass(oldCSSClass) {
          if (oldCSSClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldCSSClass.split(' '));
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.cssClass.split(' '));
          }
        }
      }, {
        key: "setEnabled",
        value: function setEnabled() {
          if (!this.enabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.sliderContainer], [classNames.sliderDisabled]);

            if (this.tooltip.isVisible && this.tooltipElement && this.tooltip.showOn === 'Always') {
              this.tooltipElement.classList.add(classNames.sliderDisabled);
            }

            this.unwireEvents();
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.sliderContainer], [classNames.sliderDisabled]);

            if (this.tooltip.isVisible && this.tooltipElement && this.tooltip.showOn === 'Always') {
              this.tooltipElement.classList.remove(classNames.sliderDisabled);
            }

            this.wireEvents();
          }
        }
      }, {
        key: "getTheme",
        value: function getTheme(container) {
          var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');
          return theme.replace(/['"]+/g, '');
        }
        /**
         * Initialize the rendering
         * @private
         */

      }, {
        key: "initRender",
        value: function initRender() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.sliderContainer = this.element.parentElement;
            this.sliderTrack = this.element.querySelector('.e-slider-track');
            this.hiddenInput = this.element.parentElement.querySelector('.e-slider-input');
          } else {
            this.sliderContainer = this.createElement('div', {
              className: classNames.sliderContainer + ' ' + classNames.controlWrapper
            });
            this.element.parentNode.insertBefore(this.sliderContainer, this.element);
            this.sliderContainer.appendChild(this.element);
            this.sliderTrack = this.createElement('div', {
              className: classNames.sliderTrack
            });
            this.element.appendChild(this.sliderTrack);
          }

          this.setElementWidth(this.width);
          this.element.tabIndex = -1;
          this.getThemeInitialization();
          this.setHandler();
          this.createRangeBar();

          if (this.limits.enabled) {
            this.createLimitBar();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.setOrientClass();
            this.hiddenInput = this.createElement('input', {
              attrs: {
                type: 'hidden',
                value: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? this.min.toString() : this.value.toString(),
                name: this.element.getAttribute('name') || this.element.getAttribute('id') || '_' + (Math.random() * 1000).toFixed(0) + 'slider',
                "class": classNames.sliderHiddenInput
              }
            });
            this.hiddenInput.tabIndex = -1;
            this.sliderContainer.appendChild(this.hiddenInput);
          }

          if (this.showButtons) {
            this.setButtons();
          }

          this.setEnableRTL();

          if (this.type === 'Range') {
            this.rangeValueUpdate();
          } else {
            this.value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min.toString())) : this.value;
          }

          this.previousVal = this.type !== 'Range' ? this.checkHandleValue(parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.value.toString()))) : [this.checkHandleValue(parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.value[0].toString()))), this.checkHandleValue(parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.value[1].toString())))];
          this.previousChanged = this.previousVal;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.hasAttribute('name'))) {
            this.element.removeAttribute('name');
          }

          this.setValue();

          if (this.limits.enabled) {
            this.setLimitBar();
          }

          if (this.ticks.placement !== 'None') {
            this.renderScale();
          }

          if (this.tooltip.isVisible) {
            this.renderTooltip();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            if (!this.enabled) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.sliderContainer], [classNames.sliderDisabled]);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.sliderContainer], [classNames.sliderDisabled]);
            }

            if (this.readonly) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.sliderContainer], [classNames.readonly]);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.sliderContainer], [classNames.readonly]);
            }
          }
        }
      }, {
        key: "getThemeInitialization",
        value: function getThemeInitialization() {
          this.isMaterial = this.getTheme(this.sliderContainer) === 'material' || this.getTheme(this.sliderContainer) === 'material-dark';
          this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap' || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
          this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
          this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
        }
      }, {
        key: "createRangeBar",
        value: function createRangeBar() {
          if (this.type !== 'Default') {
            this.rangeBar = this.createElement('div', {
              attrs: {
                "class": classNames.rangeBar
              }
            });
            this.element.appendChild(this.rangeBar);

            if (this.drag && this.type === 'Range') {
              if (this.orientation === 'Horizontal') {
                this.rangeBar.classList.add(classNames.dragHorizontal);
              } else {
                this.rangeBar.classList.add(classNames.dragVertical);
              }
            }
          }
        }
      }, {
        key: "createLimitBar",
        value: function createLimitBar() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.limitBarFirst = this.element.querySelectorAll('.e-limits')[0];

            if (this.type === 'Range') {
              this.limitBarSecond = this.element.querySelectorAll('.e-limit-second')[0];
            }
          } else {
            var firstElementClassName = this.type !== 'Range' ? classNames.limitBarDefault : classNames.limitBarFirst;
            firstElementClassName += ' ' + classNames.limits;
            this.limitBarFirst = this.createElement('div', {
              attrs: {
                "class": firstElementClassName
              }
            });
            this.element.appendChild(this.limitBarFirst);

            if (this.type === 'Range') {
              this.limitBarSecond = this.createElement('div', {
                attrs: {
                  "class": classNames.limitBarSecond + ' ' + classNames.limits
                }
              });
              this.element.appendChild(this.limitBarSecond);
            }
          }
        }
      }, {
        key: "setOrientClass",
        value: function setOrientClass() {
          if (this.orientation !== 'Vertical') {
            this.sliderContainer.classList.remove(classNames.verticalSlider);
            this.sliderContainer.classList.add(classNames.horizontalSlider);
            this.firstHandle.setAttribute('aria-orientation', 'horizontal');

            if (this.type === 'Range') {
              this.secondHandle.setAttribute('aria-orientation', 'horizontal');
            }
          } else {
            this.sliderContainer.classList.remove(classNames.horizontalSlider);
            this.sliderContainer.classList.add(classNames.verticalSlider);
            this.firstHandle.setAttribute('aria-orientation', 'vertical');

            if (this.type === 'Range') {
              this.secondHandle.setAttribute('aria-orientation', 'vertical');
            }
          }
        }
      }, {
        key: "setAriaAttributes",
        value: function setAriaAttributes(element) {
          var _this522 = this;

          var min = this.min;
          var max = this.max;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0) {
            min = this.customValues[0];
            max = this.customValues[this.customValues.length - 1];
          }

          if (this.type !== 'Range') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuemin': min.toString(),
              'aria-valuemax': max.toString()
            });
          } else {
            var range = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0 ? [[min.toString(), this.customValues[this.value[1]].toString()], [this.customValues[this.value[0]].toString(), max.toString()]] : [[min.toString(), this.value[1].toString()], [this.value[0].toString(), max.toString()]];
            range.forEach(function (range, index) {
              var element = index === 0 ? _this522.firstHandle : _this522.secondHandle;

              if (element) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
                  'aria-valuemin': range[0],
                  'aria-valuemax': range[1]
                });
              }
            });
          }
        }
      }, {
        key: "createSecondHandle",
        value: function createSecondHandle() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.secondHandle = this.element.querySelector('.e-handle-second');
          } else {
            this.secondHandle = this.createElement('div', {
              attrs: {
                "class": classNames.sliderHandle,
                'role': 'slider',
                tabIndex: '0'
              }
            });
            this.secondHandle.classList.add(classNames.sliderSecondHandle);
            this.element.appendChild(this.secondHandle);
          }
        }
      }, {
        key: "createFirstHandle",
        value: function createFirstHandle() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.firstHandle = this.element.querySelector('.e-handle-first');
          } else {
            this.firstHandle = this.createElement('div', {
              attrs: {
                "class": classNames.sliderHandle,
                'role': 'slider',
                tabIndex: '0'
              }
            });
            this.firstHandle.classList.add(classNames.sliderFirstHandle);
            this.element.appendChild(this.firstHandle);
          }

          if (this.isMaterialTooltip) {
            this.materialHandle = this.createElement('div', {
              attrs: {
                "class": classNames.sliderHandle + ' ' + classNames.sliderMaterialHandle
              }
            });
            this.element.appendChild(this.materialHandle);
          }
        }
      }, {
        key: "wireFirstHandleEvt",
        value: function wireFirstHandleEvt(destroy) {
          if (!destroy) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstHandle, 'mousedown touchstart', this.handleFocus, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstHandle, 'transitionend', this.transitionEnd, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstHandle, 'mouseenter touchenter', this.handleOver, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstHandle, 'mouseleave touchend', this.handleLeave, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstHandle, 'mousedown touchstart', this.handleFocus);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstHandle, 'transitionend', this.transitionEnd);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstHandle, 'mouseenter touchenter', this.handleOver);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstHandle, 'mouseleave touchend', this.handleLeave);
          }
        }
      }, {
        key: "wireSecondHandleEvt",
        value: function wireSecondHandleEvt(destroy) {
          if (!destroy) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondHandle, 'mousedown touchstart', this.handleFocus, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondHandle, 'transitionend', this.transitionEnd, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondHandle, 'mouseenter touchenter', this.handleOver, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondHandle, 'mouseleave touchend', this.handleLeave, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondHandle, 'mousedown touchstart', this.handleFocus);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondHandle, 'transitionend', this.transitionEnd);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondHandle, 'mouseenter touchenter', this.handleOver);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondHandle, 'mouseleave touchend', this.handleLeave);
          }
        }
      }, {
        key: "handleStart",
        value: function handleStart() {
          if (this.type !== 'Range') {
            this.firstHandle.classList[this.handlePos1 === 0 ? 'add' : 'remove'](classNames.sliderHandleStart);

            if (this.isMaterialTooltip) {
              this.materialHandle.classList[this.handlePos1 === 0 ? 'add' : 'remove'](classNames.sliderHandleStart);

              if (this.tooltipElement) {
                this.tooltipElement.classList[this.handlePos1 === 0 ? 'add' : 'remove'](classNames.sliderTooltipStart);
              }
            }
          }
        }
      }, {
        key: "transitionEnd",
        value: function transitionEnd(e) {
          if (e.propertyName !== 'transform') {
            this.handleStart();
            this.getHandle().style.transition = 'none';

            if (this.type !== 'Default') {
              this.rangeBar.style.transition = 'none';
            }

            if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
              this.tooltipElement.style.transition = this.transition.handle;
            }

            this.tooltipToggle(this.getHandle());
            this.closeTooltip();
          }
        }
      }, {
        key: "handleFocusOut",
        value: function handleFocusOut() {
          if (this.firstHandle.classList.contains(classNames.sliderHandleFocused)) {
            this.firstHandle.classList.remove(classNames.sliderHandleFocused);
          }

          if (this.type === 'Range') {
            if (this.secondHandle.classList.contains(classNames.sliderHandleFocused)) {
              this.secondHandle.classList.remove(classNames.sliderHandleFocused);
            }
          }
        }
      }, {
        key: "handleFocus",
        value: function handleFocus(e) {
          this.focusSliderElement();
          this.sliderBarClick(e);

          if (e.currentTarget === this.firstHandle) {
            this.firstHandle.classList.add(classNames.sliderHandleFocused);
          } else {
            this.secondHandle.classList.add(classNames.sliderHandleFocused);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousemove touchmove', this.sliderBarMove, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup touchend', this.sliderBarUp, this);
        }
      }, {
        key: "handleOver",
        value: function handleOver(e) {
          if (this.tooltip.isVisible && this.tooltip.showOn === 'Hover') {
            this.tooltipToggle(e.currentTarget);
          }
        }
      }, {
        key: "handleLeave",
        value: function handleLeave(e) {
          if (this.tooltip.isVisible && this.tooltip.showOn === 'Hover' && !e.currentTarget.classList.contains(classNames.sliderHandleFocused) && !e.currentTarget.classList.contains(classNames.sliderTabHandle)) {
            this.closeTooltip();
          }
        }
      }, {
        key: "setHandler",
        value: function setHandler() {
          if (this.min > this.max) {
            this.min = this.max;
          }

          this.createFirstHandle();

          if (this.type === 'Range') {
            this.createSecondHandle();
          }
        }
      }, {
        key: "setEnableRTL",
        value: function setEnableRTL() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.enableRtl && this.orientation !== 'Vertical' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.sliderContainer], classNames.rtl) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.sliderContainer], classNames.rtl);
            var preDir = this.orientation !== 'Vertical' ? this.horDir : this.verDir;

            if (this.enableRtl) {
              this.horDir = 'right';
              this.verDir = 'bottom';
            } else {
              this.horDir = 'left';
              this.verDir = 'bottom';
            }

            var currDir = this.orientation !== 'Vertical' ? this.horDir : this.verDir;

            if (preDir !== currDir) {
              if (this.orientation === 'Horizontal') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.firstHandle, {
                  'right': '',
                  'left': 'auto'
                });

                if (this.type === 'Range') {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.secondHandle, {
                    'top': '',
                    'left': 'auto'
                  });
                }
              }
            }
          }

          this.setBarColor();
        }
      }, {
        key: "tooltipValue",
        value: function tooltipValue() {
          var _this523 = this;

          var text;
          var args = {
            value: this.value,
            text: ''
          };

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            args.text = this.formatContent(this.tooltipFormatInfo, false);
          } else {
            this.setTooltipContent();
            args.text = text = this.tooltipObj.content;
          }

          this.trigger('tooltipChange', args, function (observedArgs) {
            _this523.addTooltipClass(observedArgs.text);

            if (text !== observedArgs.text) {
              _this523.customAriaText = observedArgs.text;
              _this523.tooltipObj.content = observedArgs.text;

              _this523.setAriaAttrValue(_this523.firstHandle);

              if (_this523.type === 'Range') {
                _this523.setAriaAttrValue(_this523.secondHandle);
              }
            }
          });
        }
      }, {
        key: "setTooltipContent",
        value: function setTooltipContent() {
          var content;
          content = this.formatContent(this.tooltipFormatInfo, false);
          this.tooltipObj.content = content;
        }
      }, {
        key: "formatContent",
        value: function formatContent(formatInfo, ariaContent) {
          var content = '';
          var handle1 = this.handleVal1;
          var handle2 = this.handleVal2;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0) {
            handle1 = this.customValues[this.handleVal1];
            handle2 = this.customValues[this.handleVal2];
          }

          if (!ariaContent) {
            if (this.type === 'Range') {
              if (this.enableRtl && this.orientation !== 'Vertical') {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(formatInfo.format) ? this.formatString(handle2, formatInfo).formatString + ' - ' + this.formatString(handle1, formatInfo).formatString : handle2.toString() + ' - ' + handle1.toString();
              } else {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(formatInfo.format) ? this.formatString(handle1, formatInfo).formatString + ' - ' + this.formatString(handle2, formatInfo).formatString : handle1.toString() + ' - ' + handle2.toString();
              }
            } else {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(handle1)) {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(formatInfo.format) ? this.formatString(handle1, formatInfo).formatString : handle1.toString();
              }
            }

            return content;
          } else {
            if (this.type === 'Range') {
              if (this.enableRtl && this.orientation !== 'Vertical') {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip.format) ? this.formatString(handle2, formatInfo).elementVal + ' - ' + this.formatString(handle1, formatInfo).elementVal : handle2.toString() + ' - ' + handle1.toString();
              } else {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip.format) ? this.formatString(handle1, formatInfo).elementVal + ' - ' + this.formatString(handle2, formatInfo).elementVal : handle1.toString() + ' - ' + handle2.toString();
              }
            } else {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(handle1)) {
                content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltip.format) ? this.formatString(handle1, formatInfo).elementVal : handle1.toString();
              }
            }

            return content;
          }
        }
      }, {
        key: "addTooltipClass",
        value: function addTooltipClass(content) {
          if (this.isMaterialTooltip) {
            var count = content.toString().length;

            if (!this.tooltipElement) {
              var cssClass = count > 4 ? classNames.sliderMaterialRange : classNames.sliderMaterialDefault;
              this.tooltipObj.cssClass = classNames.sliderTooltip + ' ' + cssClass;
            } else {
              var _cssClass = count > 4 ? {
                oldCss: classNames.sliderMaterialDefault,
                newCss: classNames.sliderMaterialRange
              } : {
                oldCss: classNames.sliderMaterialRange,
                newCss: classNames.sliderMaterialDefault
              };

              this.tooltipElement.classList.remove(_cssClass.oldCss);

              if (!this.tooltipElement.classList.contains(_cssClass.newCss)) {
                this.tooltipElement.classList.add(_cssClass.newCss);
                this.tooltipElement.style.transform = count > 4 ? 'scale(1)' : this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
              }
            }
          }
        }
      }, {
        key: "tooltipPlacement",
        value: function tooltipPlacement() {
          return this.orientation === 'Horizontal' ? this.tooltip.placement === 'Before' ? 'TopCenter' : 'BottomCenter' : this.tooltip.placement === 'Before' ? 'LeftCenter' : 'RightCenter';
        }
      }, {
        key: "tooltipBeforeOpen",
        value: function tooltipBeforeOpen(args) {
          this.tooltipElement = args.element;

          if (this.tooltip.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipElement], this.tooltip.cssClass.split(' ').filter(function (css) {
              return css;
            }));
          }

          args.target.removeAttribute('aria-describedby');

          if (this.isMaterialTooltip) {
            this.tooltipElement.firstElementChild.classList.add(classNames.materialTooltipHide);
            this.handleStart();
            this.setTooltipTransform();
          }
        }
      }, {
        key: "tooltipCollision",
        value: function tooltipCollision(position) {
          if (this.isBootstrap || this.isBootstrap4 || this.isMaterial && !this.isMaterialTooltip) {
            var tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;

            switch (position) {
              case 'TopCenter':
                this.tooltipObj.setProperties({
                  'offsetY': -tooltipOffsetValue
                }, false);
                break;

              case 'BottomCenter':
                this.tooltipObj.setProperties({
                  'offsetY': tooltipOffsetValue
                }, false);
                break;

              case 'LeftCenter':
                this.tooltipObj.setProperties({
                  'offsetX': -tooltipOffsetValue
                }, false);
                break;

              case 'RightCenter':
                this.tooltipObj.setProperties({
                  'offsetX': tooltipOffsetValue
                }, false);
                break;
            }
          }
        }
      }, {
        key: "materialTooltipEventCallBack",
        value: function materialTooltipEventCallBack(event) {
          this.sliderBarClick(event);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousemove touchmove', this.sliderBarMove, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup touchend', this.sliderBarUp, this);
        }
      }, {
        key: "wireMaterialTooltipEvent",
        value: function wireMaterialTooltipEvent(destroy) {
          if (this.isMaterialTooltip) {
            if (!destroy) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.tooltipElement, 'mousedown touchstart', this.materialTooltipEventCallBack, this);
            } else {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.tooltipElement, 'mousedown touchstart', this.materialTooltipEventCallBack);
            }
          }
        }
      }, {
        key: "tooltipPositionCalculation",
        value: function tooltipPositionCalculation(position) {
          var cssClass;

          switch (position) {
            case 'TopCenter':
              cssClass = classNames.horizontalTooltipBefore;
              break;

            case 'BottomCenter':
              cssClass = classNames.horizontalTooltipAfter;
              break;

            case 'LeftCenter':
              cssClass = classNames.verticalTooltipBefore;
              break;

            case 'RightCenter':
              cssClass = classNames.verticalTooltipAfter;
              break;
          }

          return cssClass;
        }
      }, {
        key: "getTooltipTransformProperties",
        value: function getTooltipTransformProperties(className) {
          var transformProperties;

          if (this.tooltipElement) {
            var position = this.orientation === 'Horizontal' ? this.tooltipElement.clientHeight + 14 - this.tooltipElement.clientHeight / 2 : this.tooltipElement.clientWidth + 14 - this.tooltipElement.clientWidth / 2;
            transformProperties = this.orientation === 'Horizontal' ? className === classNames.horizontalTooltipBefore ? {
              rotate: 'rotate(45deg)',
              translate: "translateY(".concat(position, "px)")
            } : {
              rotate: 'rotate(225deg)',
              translate: "translateY(".concat(-position, "px)")
            } : className === classNames.verticalTooltipBefore ? {
              rotate: 'rotate(-45deg)',
              translate: "translateX(".concat(position, "px)")
            } : {
              rotate: 'rotate(-225deg)',
              translate: "translateX(".concat(-position, "px)")
            };
          }

          return transformProperties;
        }
      }, {
        key: "openMaterialTooltip",
        value: function openMaterialTooltip() {
          var _this524 = this;

          if (this.isMaterialTooltip) {
            this.refreshTooltip(this.firstHandle);
            var tooltipContentElement = this.tooltipElement.firstElementChild;
            tooltipContentElement.classList.remove(classNames.materialTooltipHide);
            tooltipContentElement.classList.add(classNames.materialTooltipShow);
            this.firstHandle.style.cursor = 'default';
            this.tooltipElement.style.transition = this.scaleTransform;
            this.tooltipElement.classList.add(classNames.materialTooltipOpen);
            this.materialHandle.style.transform = 'scale(0)';

            if (tooltipContentElement.innerText.length > 4) {
              this.tooltipElement.style.transform = 'scale(1)';
            } else {
              this.tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
            }

            if (this.type === 'Default') {
              setTimeout(function () {
                _this524.tooltipElement.style.transition = _this524.transition.handle;
              }, 2500);
            } else {
              setTimeout(function () {
                _this524.tooltipElement.style.transition = 'none';
              }, 2500);
            }
          }
        }
      }, {
        key: "closeMaterialTooltip",
        value: function closeMaterialTooltip() {
          var _this525 = this;

          if (this.isMaterialTooltip) {
            var tooltipContentElement = this.tooltipElement.firstElementChild;
            this.tooltipElement.style.transition = this.scaleTransform;
            tooltipContentElement.classList.remove(classNames.materialTooltipShow);
            tooltipContentElement.classList.add(classNames.materialTooltipHide);
            this.firstHandle.style.cursor = '-webkit-grab';
            this.firstHandle.style.cursor = 'grab';

            if (this.materialHandle) {
              this.materialHandle.style.transform = 'scale(1)';
            }

            this.tooltipElement.classList.remove(classNames.materialTooltipOpen);
            this.setTooltipTransform();
            this.tooltipTarget = undefined;
            setTimeout(function () {
              _this525.tooltipElement.style.transition = 'none';
            }, 2500);
          }
        }
      }, {
        key: "checkTooltipPosition",
        value: function checkTooltipPosition(args) {
          if (this.tooltipCollidedPosition === undefined || this.tooltipCollidedPosition !== args.collidedPosition) {
            if (this.isMaterialTooltip) {
              var tooltipClass = this.tooltipPositionCalculation(args.collidedPosition);

              if (tooltipClass !== undefined) {
                args.element.classList.remove(this.previousTooltipClass);
                args.element.classList.add(tooltipClass);
                this.previousTooltipClass = tooltipClass;
              }

              if (args.element.style.transform && args.element.classList.contains(classNames.materialTooltipOpen) && args.element.firstElementChild.innerText.length <= 4) {
                args.element.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
              }
            }

            this.tooltipCollidedPosition = args.collidedPosition;
          }

          if (this.isMaterialTooltip && this.tooltipElement && this.tooltipElement.style.transform.indexOf('translate') !== -1) {
            this.setTooltipTransform();
          }
        }
      }, {
        key: "setTooltipTransform",
        value: function setTooltipTransform() {
          var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);

          if (this.tooltipElement.firstElementChild.innerText.length > 4) {
            this.tooltipElement.style.transform = "".concat(transformProperties.translate, " scale(0.01)");
          } else {
            this.tooltipElement.style.transform = "".concat(transformProperties.translate, " ").concat(transformProperties.rotate, " scale(0.01)");
          }
        }
      }, {
        key: "renderTooltip",
        value: function renderTooltip() {
          this.tooltipObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Tooltip"]({
            showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4,
            cssClass: classNames.sliderTooltip,
            height: this.isMaterial ? 30 : 'auto',
            animation: {
              open: {
                effect: 'None'
              },
              close: {
                effect: 'FadeOut',
                duration: 500
              }
            },
            opensOn: 'Custom',
            beforeOpen: this.tooltipBeforeOpen.bind(this),
            beforeCollision: this.checkTooltipPosition.bind(this),
            beforeClose: this.tooltipBeforeClose.bind(this),
            enableHtmlSanitizer: this.enableHtmlSanitizer
          });
          this.tooltipObj.appendTo(this.firstHandle);
          this.initializeTooltipProps();
        }
      }, {
        key: "initializeTooltipProps",
        value: function initializeTooltipProps() {
          var tooltipShowOn = this.isMaterialTooltip ? 'Always' : this.tooltip.showOn === 'Auto' ? 'Hover' : this.tooltip.showOn;
          this.setProperties({
            tooltip: {
              showOn: tooltipShowOn
            }
          }, true);
          this.tooltipObj.position = this.tooltipPlacement();
          this.tooltipCollision(this.tooltipObj.position);
          [this.firstHandle, this.rangeBar, this.secondHandle].forEach(function (handle) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(handle)) {
              handle.style.transition = 'none';
            }
          });

          if (this.isMaterialTooltip) {
            this.sliderContainer.classList.add(classNames.materialSlider);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.tooltipValue();
            }

            this.tooltipObj.animation.close.effect = 'None';
            this.tooltipObj.open(this.firstHandle);
          }
        }
      }, {
        key: "tooltipBeforeClose",
        value: function tooltipBeforeClose() {
          this.tooltipElement = undefined;
          this.tooltipCollidedPosition = undefined;
        }
      }, {
        key: "setButtons",
        value: function setButtons() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.firstBtn = this.element.parentElement.querySelector('.e-slider-button.e-first-button');
            this.secondBtn = this.element.parentElement.querySelector('.e-slider-button.e-second-button');
          } else {
            this.firstBtn = this.createElement('div', {
              className: classNames.sliderButton + ' ' + classNames.firstButton
            });
            this.firstBtn.appendChild(this.createElement('span', {
              className: classNames.sliderButtonIcon
            }));
            this.firstBtn.tabIndex = -1;
            this.secondBtn = this.createElement('div', {
              className: classNames.sliderButton + ' ' + classNames.secondButton
            });
            this.secondBtn.appendChild(this.createElement('span', {
              className: classNames.sliderButtonIcon
            }));
            this.secondBtn.tabIndex = -1;
            this.sliderContainer.classList.add(classNames.sliderButtonClass);
            this.sliderContainer.appendChild(this.firstBtn);
            this.sliderContainer.appendChild(this.secondBtn);
            this.sliderContainer.appendChild(this.element);
            this.buttonTitle();
          }
        }
      }, {
        key: "buttonTitle",
        value: function buttonTitle() {
          var enabledRTL = this.enableRtl && this.orientation !== 'Vertical';
          this.l10n.setLocale(this.locale);
          var decrementTitle = this.l10n.getConstant('decrementTitle');
          var incrementTitle = this.l10n.getConstant('incrementTitle');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(enabledRTL ? this.secondBtn : this.firstBtn, {
            'aria-label': decrementTitle,
            title: decrementTitle
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(enabledRTL ? this.firstBtn : this.secondBtn, {
            'aria-label': incrementTitle,
            title: incrementTitle
          });
        }
      }, {
        key: "buttonFocusOut",
        value: function buttonFocusOut() {
          if (this.isMaterial) {
            this.getHandle().classList.remove('e-large-thumb-size');
          }
        }
      }, {
        key: "repeatButton",
        value: function repeatButton(args) {
          var hVal = this.handleValueUpdate();
          var enabledRTL = this.enableRtl && this.orientation !== 'Vertical';
          var value;

          if (args.target.parentElement.classList.contains(classNames.firstButton) || args.target.classList.contains(classNames.firstButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.step.toString()), true) : value = this.add(hVal, parseFloat(this.step.toString()), false);
          } else if (args.target.parentElement.classList.contains(classNames.secondButton) || args.target.classList.contains(classNames.secondButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.step.toString()), false) : value = this.add(hVal, parseFloat(this.step.toString()), true);
          }

          if (this.limits.enabled) {
            value = this.getLimitCorrectedValues(value);
          }

          if (value >= this.min && value <= this.max) {
            this.changeHandleValue(value);
            this.tooltipToggle(this.getHandle());
          }
        }
      }, {
        key: "repeatHandlerMouse",
        value: function repeatHandlerMouse(args) {
          args.preventDefault();

          if (args.type === 'mousedown' || args.type === 'touchstart') {
            this.buttonClick(args);
            this.repeatInterval = setInterval(this.repeatButton.bind(this), 180, args);
          }
        }
      }, {
        key: "materialChange",
        value: function materialChange() {
          if (!this.getHandle().classList.contains('e-large-thumb-size')) {
            this.getHandle().classList.add('e-large-thumb-size');
          }
        }
      }, {
        key: "repeatHandlerUp",
        value: function repeatHandlerUp(e) {
          this.changeEvent('changed', e);
          this.closeTooltip();
          clearInterval(this.repeatInterval);
          this.getHandle().focus();
        }
      }, {
        key: "customTickCounter",
        value: function customTickCounter(bigNum) {
          var tickCount = 4;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0) {
            if (bigNum > 4) {
              tickCount = 3;
            }

            if (bigNum > 7) {
              tickCount = 2;
            }

            if (bigNum > 14) {
              tickCount = 1;
            }

            if (bigNum > 28) {
              tickCount = 0;
            }
          }

          return tickCount;
        } // tslint:disable-next-line:max-func-body-length

      }, {
        key: "renderScale",
        value: function renderScale() {
          var liElementPosition = 0;
          var orien = this.orientation === 'Vertical' ? 'v' : 'h';
          this.noOfDecimals = this.numberOfDecimals(this.step);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.ul = this.element.querySelector('ul');
          } else {
            this.ul = this.createElement('ul', {
              className: classNames.scale + ' ' + 'e-' + orien + '-scale ' + classNames.tick + '-' + this.ticks.placement.toLowerCase(),
              attrs: {
                role: 'presentation',
                tabIndex: '-1',
                'aria-hidden': 'true'
              }
            });
          }

          this.ul.style.zIndex = '-1';

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isAndroid && orien === 'h') {
            this.ul.classList.add(classNames.sliderTickPosition);
          }

          var smallStep = this.ticks.smallStep;

          if (!this.ticks.showSmallTicks) {
            this.ticks.largeStep > 0 ? smallStep = this.ticks.largeStep : smallStep = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min));
          } else if (smallStep <= 0) {
            smallStep = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.step));
          }

          var min = this.fractionalToInteger(this.min);
          var max = this.fractionalToInteger(this.max);
          var steps = this.fractionalToInteger(smallStep);
          var bigNum = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0 && this.customValues.length - 1;
          var customStep = this.customTickCounter(bigNum);
          var count = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0 ? bigNum * customStep + bigNum : Math.abs((max - min) / steps);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.element.appendChild(this.ul);
          }

          var li;
          var start = parseFloat(this.min.toString());

          if (orien === 'v') {
            start = parseFloat(this.max.toString());
          }

          var left = 0;
          var islargeTick;
          var tickWidth = 100 / count;

          if (tickWidth === Infinity) {
            tickWidth = 5;
          }

          for (var i = 0, y = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0 ? this.customValues.length - 1 : 0, k = 0; i <= count; i++) {
            li = this.createElement('li', {
              attrs: {
                "class": classNames.tick,
                role: 'presentation',
                tabIndex: '-1',
                'aria-hidden': 'true'
              }
            });

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0) {
              islargeTick = i % (customStep + 1) === 0;

              if (islargeTick) {
                if (orien === 'h') {
                  start = this.customValues[k];
                  k++;
                } else {
                  start = this.customValues[y];
                  y--;
                }

                li.setAttribute('title', start.toString());
              }
            } else {
              li.setAttribute('title', start.toString());

              if (this.numberOfDecimals(this.max) === 0 && this.numberOfDecimals(this.min) === 0 && this.numberOfDecimals(this.step) === 0) {
                if (orien === 'h') {
                  islargeTick = (start - parseFloat(this.min.toString())) % this.ticks.largeStep === 0 ? true : false;
                } else {
                  islargeTick = Math.abs(start - parseFloat(this.max.toString())) % this.ticks.largeStep === 0 ? true : false;
                }
              } else {
                var largestep = this.fractionalToInteger(this.ticks.largeStep);
                var startValue = this.fractionalToInteger(start);

                if (orien === 'h') {
                  islargeTick = (startValue - min) % largestep === 0 ? true : false;
                } else {
                  islargeTick = Math.abs(startValue - parseFloat(max.toString())) % largestep === 0 ? true : false;
                }
              }
            }

            if (islargeTick) {
              li.classList.add(classNames.large);
            }

            orien === 'h' ? li.style.width = tickWidth + '%' : li.style.height = tickWidth + '%';
            var repeat = islargeTick ? this.ticks.placement === 'Both' ? 2 : 1 : 0;

            if (islargeTick) {
              for (var j = 0; j < repeat; j++) {
                this.createTick(li, start, tickWidth);
              }

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
                this.updateTicksValues(start, this.ul.children[liElementPosition]);
                liElementPosition++;
              }
            } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
              this.formatTicksValue(li, start);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
                this.updateTicksValues(start, this.ul.children[liElementPosition]);
                liElementPosition++;
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
              this.ul.appendChild(li);
            }

            this.tickElementCollection.push(li);
            var decimalPoints = void 0;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
              if (this.numberOfDecimals(smallStep) > this.numberOfDecimals(start)) {
                decimalPoints = this.numberOfDecimals(smallStep);
              } else {
                decimalPoints = this.numberOfDecimals(start);
              }

              if (orien === 'h') {
                start = this.makeRoundNumber(start + smallStep, decimalPoints);
              } else {
                start = this.makeRoundNumber(start - smallStep, decimalPoints);
              }

              left = this.makeRoundNumber(left + smallStep, decimalPoints);
            }
          }

          this.ticksAlignment(orien, tickWidth);
        }
      }, {
        key: "updateTicksValues",
        value: function updateTicksValues(start, liElement) {
          if (liElement.childElementCount > 0) {
            for (var i = 0; i < liElement.childElementCount; i++) {
              this.blazortTicksValue(liElement, start, liElement.children[i]);
            }
          } else {
            this.blazortTicksValue(liElement, start, null);
          }
        }
      }, {
        key: "blazortTicksValue",
        value: function blazortTicksValue(li, start, span) {
          var _this526 = this;

          var tickText = this.formatNumber(start);
          var text = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks.format) ? this.formatString(start, this.ticksFormatInfo).formatString : tickText;
          var eventArgs = {
            value: start,
            text: text,
            tickElement: li
          };
          this.trigger('renderingTicks', eventArgs, function (observedArgs) {
            li.setAttribute('title', observedArgs.text.toString());

            if (span) {
              if (_this526.enableHtmlSanitizer) {
                span.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(observedArgs.text.toString());
              } else {
                span.innerHTML = observedArgs.text.toString();
              }
            }
          });
        }
      }, {
        key: "ticksAlignment",
        value: function ticksAlignment(orien, tickWidth) {
          var triggerEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
          this.firstChild = this.ul.firstElementChild;
          this.lastChild = this.ul.lastElementChild;
          this.firstChild.classList.add(classNames.sliderFirstTick);
          this.lastChild.classList.add(classNames.sliderLastTick);
          this.sliderContainer.classList.add(classNames.scale + '-' + this.ticks.placement.toLowerCase());

          if (orien === 'h') {
            this.firstChild.style.width = tickWidth / 2 + '%';
            this.lastChild.style.width = tickWidth / 2 + '%';
          } else {
            this.firstChild.style.height = tickWidth / 2 + '%';
            this.lastChild.style.height = tickWidth / 2 + '%';
          }

          var eventArgs = {
            ticksWrapper: this.ul,
            tickElements: this.tickElementCollection
          };

          if (triggerEvent) {
            this.trigger('renderedTicks', eventArgs);
          }

          this.scaleAlignment();
        }
      }, {
        key: "createTick",
        value: function createTick(li, start, tickWidth) {
          var span = this.createElement('span', {
            className: classNames.tickValue + ' ' + classNames.tick + '-' + this.ticks.placement.toLowerCase(),
            attrs: {
              role: 'presentation',
              tabIndex: '-1',
              'aria-hidden': 'true'
            }
          });
          li.appendChild(span);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
            this.formatTicksValue(li, start, span, tickWidth);
          } else {
            if (this.enableHtmlSanitizer) {
              span.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(start.toString());
            } else {
              span.innerHTML = start.toString();
            }
          }
        }
      }, {
        key: "formatTicksValue",
        value: function formatTicksValue(li, start, spanElement, tickWidth) {
          var _this527 = this;

          var tickText = this.formatNumber(start);
          var text = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks.format) ? this.formatString(start, this.ticksFormatInfo).formatString : tickText;
          var eventArgs = {
            value: start,
            text: text,
            tickElement: li
          };
          this.trigger('renderingTicks', eventArgs, function (observedArgs) {
            li.setAttribute('title', observedArgs.text.toString());

            if (spanElement) {
              if (_this527.enableHtmlSanitizer) {
                spanElement.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(observedArgs.text.toString());
              } else {
                spanElement.innerHTML = observedArgs.text.toString();
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this527.renderingTicks) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              var orien = _this527.orientation === 'Horizontal' ? 'h' : 'v';

              _this527.ticksAlignment(orien, tickWidth, false);
            }
          });
        }
      }, {
        key: "scaleAlignment",
        value: function scaleAlignment() {
          this.tickValuePosition();
          var orien = this.orientation === 'Vertical' ? 'v' : 'h';

          if (this.orientation === 'Vertical') {
            this.element.getBoundingClientRect().width <= 15 ? this.sliderContainer.classList.add(classNames.sliderSmallSize) : this.sliderContainer.classList.remove(classNames.sliderSmallSize);
          } else {
            this.element.getBoundingClientRect().height <= 15 ? this.sliderContainer.classList.add(classNames.sliderSmallSize) : this.sliderContainer.classList.remove(classNames.sliderSmallSize);
          }
        }
      }, {
        key: "tickValuePosition",
        value: function tickValuePosition() {
          this.firstChild = this.element.querySelector('ul').children[0];
          var first = this.firstChild.getBoundingClientRect();
          var firstChild;
          var otherChild;
          var smallStep = this.ticks.smallStep;
          var count = Math.abs(parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min))) / smallStep;

          if (this.firstChild.children.length > 0) {
            firstChild = this.firstChild.children[0].getBoundingClientRect();
          }

          var tickElements = [this.sliderContainer.querySelectorAll('.' + classNames.tick + '.' + classNames.large + ' .' + classNames.tickValue)];
          var other;

          if (this.ticks.placement === 'Both') {
            other = [].slice.call(tickElements[0], 2);
          } else {
            other = [].slice.call(tickElements[0], 1);
          }

          var tickWidth = this.orientation === 'Vertical' ? first.height * 2 : first.width * 2;

          for (var i = 0; i < this.firstChild.children.length; i++) {
            if (this.orientation === 'Vertical') {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                this.firstChild.children[i].style.top = -(firstChild.height / 2) + 'px';
              }
            } else {
              if (!this.enableRtl) {
                this.firstChild.children[i].style.left = -(firstChild.width / 2) + 'px';
              } else {
                this.firstChild.children[i].style.left = (tickWidth - this.firstChild.children[i].getBoundingClientRect().width) / 2 + 'px';
              }
            }
          }

          for (var _i100 = 0; _i100 < other.length; _i100++) {
            otherChild = other[_i100].getBoundingClientRect();

            if (this.orientation === 'Vertical') {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(other[_i100], {
                  top: (tickWidth - otherChild.height) / 2 + 'px'
                });
              }
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(other[_i100], {
                left: (tickWidth - otherChild.width) / 2 + 'px'
              });
            }
          }

          if (this.enableRtl && this.lastChild.children.length && count !== 0) {
            this.lastChild.children[0].style.left = -(this.lastChild.getBoundingClientRect().width / 2) + 'px';

            if (this.ticks.placement === 'Both') {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                this.lastChild.children[1].style.left = -(this.lastChild.getBoundingClientRect().width / 2) + 'px';
              }
            }
          }

          if (count === 0) {
            if (this.orientation === 'Horizontal') {
              if (!this.enableRtl) {
                this.firstChild.classList.remove(classNames.sliderLastTick);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  this.firstChild.style.left = this.firstHandle.style.left;
                }
              } else {
                this.firstChild.classList.remove(classNames.sliderLastTick);
                this.firstChild.style.right = this.firstHandle.style.right;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  this.firstChild.children[0].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + 'px';

                  if (this.ticks.placement === 'Both') {
                    this.firstChild.children[1].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + 'px';
                  }
                }
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
              if (this.orientation === 'Vertical') {
                this.firstChild.classList.remove(classNames.sliderLastTick);
              }
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            var args;

            if (this.firstChild != null) {
              if (this.orientation === 'Horizontal') {
                args = {
                  firstTickPostion: this.firstChild.children[0].style.left
                };
              } else {
                args = {
                  firstTickPostion: -(firstChild.height / 2) + 'px'
                };
              }
            }

            if (other[0] != null) {
              if (this.orientation === 'Horizontal') {
                args = {
                  otherTicksPosition: other[0].style.left
                };
              } else {
                args = {
                  otherTicksPosition: (tickWidth - otherChild.height) / 2 + 'px'
                };
              }
            }

            if (this.firstChild != null && other[0] != null) {
              if (this.orientation === 'Horizontal') {
                args = {
                  firstTickPostion: this.firstChild.children[0].style.left,
                  otherTicksPosition: other[0].style.left
                };
              } else {
                args = {
                  firstTickPostion: -(firstChild.height / 2) + 'px',
                  otherTicksPosition: (tickWidth - otherChild.height) / 2 + 'px'
                };
              }
            } // tslint:disable


            this.interopAdaptor.invokeMethodAsync('SliderTicksData', args); // tslint:enable
          }
        }
      }, {
        key: "setAriaAttrValue",
        value: function setAriaAttrValue(element) {
          var ariaValueText;
          var isTickFormatted = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks.format) ? true : false;
          var text = !isTickFormatted ? this.formatContent(this.ticksFormatInfo, false) : this.formatContent(this.tooltipFormatInfo, false);
          var valuenow = isTickFormatted ? this.formatContent(this.ticksFormatInfo, true) : this.formatContent(this.tooltipFormatInfo, true);
          text = !this.customAriaText ? text : this.customAriaText;

          if (text.split(' - ').length === 2) {
            ariaValueText = text.split(' - ');
          } else {
            ariaValueText = [text, text];
          }

          this.setAriaAttributes(element);

          if (this.type !== 'Range') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuenow': valuenow,
              'aria-valuetext': text
            });
          } else {
            !this.enableRtl ? element === this.firstHandle ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuenow': valuenow.split(' - ')[0],
              'aria-valuetext': ariaValueText[0]
            }) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuenow': valuenow.split(' - ')[1],
              'aria-valuetext': ariaValueText[1]
            }) : element === this.firstHandle ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuenow': valuenow.split(' - ')[1],
              'aria-valuetext': ariaValueText[1]
            }) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, {
              'aria-valuenow': valuenow.split(' - ')[0],
              'aria-valuetext': ariaValueText[0]
            });
          }
        }
      }, {
        key: "handleValueUpdate",
        value: function handleValueUpdate() {
          var hVal;

          if (this.type === 'Range') {
            if (this.activeHandle === 1) {
              hVal = this.handleVal1;
            } else {
              hVal = this.handleVal2;
            }
          } else {
            hVal = this.handleVal1;
          }

          return hVal;
        }
      }, {
        key: "getLimitCorrectedValues",
        value: function getLimitCorrectedValues(value) {
          if (this.type === 'MinRange' || this.type === 'Default') {
            value = this.getLimitValueAndPosition(value, this.limits.minStart, this.limits.minEnd)[0];
          } else {
            if (this.activeHandle === 1) {
              value = this.getLimitValueAndPosition(value, this.limits.minStart, this.limits.minEnd)[0];
            } else {
              value = this.getLimitValueAndPosition(value, this.limits.maxStart, this.limits.maxEnd)[0];
            }
          }

          return value;
        }
      }, {
        key: "focusSliderElement",
        value: function focusSliderElement() {
          if (!this.isElementFocused) {
            this.element.focus();
            this.isElementFocused = true;
          }
        }
      }, {
        key: "buttonClick",
        value: function buttonClick(args) {
          this.focusSliderElement();
          var value;
          var enabledRTL = this.enableRtl && this.orientation !== 'Vertical';
          var hVal = this.handleValueUpdate();

          if (args.keyCode === 40 || args.keyCode === 37 || args.currentTarget.classList.contains(classNames.firstButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.step.toString()), true) : value = this.add(hVal, parseFloat(this.step.toString()), false);
          } else if (args.keyCode === 38 || args.keyCode === 39 || args.currentTarget.classList.contains(classNames.secondButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.step.toString()), false) : value = this.add(hVal, parseFloat(this.step.toString()), true);
          } else if (args.keyCode === 33 || args.currentTarget.classList.contains(classNames.firstButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false) : value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true);
          } else if (args.keyCode === 34 || args.currentTarget.classList.contains(classNames.secondButton)) {
            enabledRTL ? value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), true) : value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false);
          } else if (args.keyCode === 36) {
            value = parseFloat(this.min.toString());
          } else if (args.keyCode === 35) {
            value = parseFloat(this.max.toString());
          }

          if (this.limits.enabled) {
            value = this.getLimitCorrectedValues(value);
          }

          this.changeHandleValue(value);

          if (this.isMaterial && !this.tooltip.isVisible && !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
            this.materialChange();
          }

          this.tooltipToggle(this.getHandle());
          this.getHandle().focus();

          if (args.currentTarget.classList.contains(classNames.firstButton)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstBtn, 'mouseup touchend', this.buttonUp, this);
          }

          if (args.currentTarget.classList.contains(classNames.secondButton)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondBtn, 'mouseup touchend', this.buttonUp, this);
          }
        }
      }, {
        key: "tooltipToggle",
        value: function tooltipToggle(target) {
          if (this.isMaterialTooltip) {
            !this.tooltipElement.classList.contains(classNames.materialTooltipOpen) ? this.openMaterialTooltip() : this.refreshTooltip(this.firstHandle);
          } else {
            !this.tooltipElement ? this.openTooltip(target) : this.refreshTooltip(target);
          }
        }
      }, {
        key: "buttonUp",
        value: function buttonUp(args) {
          if (args.currentTarget.classList.contains(classNames.firstButton)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstBtn, 'mouseup touchend', this.buttonUp);
          }

          if (args.currentTarget.classList.contains(classNames.secondButton)) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondBtn, 'mouseup touchend', this.buttonUp);
          }
        }
      }, {
        key: "setRangeBar",
        value: function setRangeBar() {
          if (this.orientation === 'Horizontal') {
            if (this.type === 'MinRange') {
              this.enableRtl ? this.rangeBar.style.right = '0px' : this.rangeBar.style.left = '0px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.handlePos1) ? 0 : this.handlePos1 + 'px'
              });
            } else {
              this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + 'px' : this.rangeBar.style.left = this.handlePos1 + 'px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'width': this.handlePos2 - this.handlePos1 + 'px'
              });
            }
          } else {
            if (this.type === 'MinRange') {
              this.rangeBar.style.bottom = '0px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.handlePos1) ? 0 : this.handlePos1 + 'px'
              });
            } else {
              this.rangeBar.style.bottom = this.handlePos1 + 'px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'height': this.handlePos2 - this.handlePos1 + 'px'
              });
            }
          }
        }
      }, {
        key: "checkValidValueAndPos",
        value: function checkValidValueAndPos(value) {
          value = this.checkHandleValue(value);
          value = this.checkHandlePosition(value);
          return value;
        }
      }, {
        key: "setLimitBarPositions",
        value: function setLimitBarPositions(fromMinPostion, fromMaxpostion, toMinPostion, toMaxpostion) {
          if (this.orientation === 'Horizontal') {
            if (!this.enableRtl) {
              this.limitBarFirst.style.left = fromMinPostion + 'px';
              this.limitBarFirst.style.width = fromMaxpostion - fromMinPostion + 'px';
            } else {
              this.limitBarFirst.style.right = fromMinPostion + 'px';
              this.limitBarFirst.style.width = fromMaxpostion - fromMinPostion + 'px';
            }
          } else {
            this.limitBarFirst.style.bottom = fromMinPostion + 'px';
            this.limitBarFirst.style.height = fromMaxpostion - fromMinPostion + 'px';
          }

          if (this.type === 'Range') {
            if (this.orientation === 'Horizontal') {
              if (!this.enableRtl) {
                this.limitBarSecond.style.left = toMinPostion + 'px';
                this.limitBarSecond.style.width = toMaxpostion - toMinPostion + 'px';
              } else {
                this.limitBarSecond.style.right = toMinPostion + 'px';
                this.limitBarSecond.style.width = toMaxpostion - toMinPostion + 'px';
              }
            } else {
              this.limitBarSecond.style.bottom = toMinPostion + 'px';
              this.limitBarSecond.style.height = toMaxpostion - toMinPostion + 'px';
            }
          }
        }
      }, {
        key: "setLimitBar",
        value: function setLimitBar() {
          if (this.type === 'Default' || this.type === 'MinRange') {
            var fromPosition = this.getLimitValueAndPosition(this.limits.minStart, this.limits.minStart, this.limits.minEnd, true)[0];
            fromPosition = this.checkValidValueAndPos(fromPosition);
            var toPosition = this.getLimitValueAndPosition(this.limits.minEnd, this.limits.minStart, this.limits.minEnd, true)[0];
            toPosition = this.checkValidValueAndPos(toPosition);
            this.setLimitBarPositions(fromPosition, toPosition);
          } else if (this.type === 'Range') {
            var fromMinPostion = this.getLimitValueAndPosition(this.limits.minStart, this.limits.minStart, this.limits.minEnd, true)[0];
            fromMinPostion = this.checkValidValueAndPos(fromMinPostion);
            var fromMaxpostion = this.getLimitValueAndPosition(this.limits.minEnd, this.limits.minStart, this.limits.minEnd, true)[0];
            fromMaxpostion = this.checkValidValueAndPos(fromMaxpostion);
            var toMinPostion = this.getLimitValueAndPosition(this.limits.maxStart, this.limits.maxStart, this.limits.maxEnd, true)[0];
            toMinPostion = this.checkValidValueAndPos(toMinPostion);
            var toMaxpostion = this.getLimitValueAndPosition(this.limits.maxEnd, this.limits.maxStart, this.limits.maxEnd, true)[0];
            toMaxpostion = this.checkValidValueAndPos(toMaxpostion);
            this.setLimitBarPositions(fromMinPostion, fromMaxpostion, toMinPostion, toMaxpostion);
          }
        }
      }, {
        key: "getLimitValueAndPosition",
        value: function getLimitValueAndPosition(currentValue, minValue, maxValue, limitBar) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(minValue)) {
            minValue = this.min;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(currentValue) && limitBar) {
              currentValue = minValue;
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(maxValue)) {
            maxValue = this.max;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(currentValue) && limitBar) {
              currentValue = maxValue;
            }
          }

          if (currentValue < minValue) {
            currentValue = minValue;
          }

          if (currentValue > maxValue) {
            currentValue = maxValue;
          }

          return [currentValue, this.checkHandlePosition(currentValue)];
        }
      }, {
        key: "setValue",
        value: function setValue() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues) && this.customValues.length > 0) {
            this.min = 0;
            this.max = this.customValues.length - 1;
            this.setBarColor();
          }

          this.setAriaAttributes(this.firstHandle);
          this.handleVal1 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value) ? this.checkHandleValue(parseFloat(this.min.toString())) : this.checkHandleValue(parseFloat(this.value.toString()));
          this.handlePos1 = this.checkHandlePosition(this.handleVal1);
          this.preHandlePos1 = this.handlePos1;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeHandle) ? this.type === 'Range' ? this.activeHandle = 2 : this.activeHandle = 1 : this.activeHandle = this.activeHandle;

          if (this.type === 'Default' || this.type === 'MinRange') {
            if (this.limits.enabled) {
              var values = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
              this.handleVal1 = values[0];
              this.handlePos1 = values[1];
              this.preHandlePos1 = this.handlePos1;
            }

            this.setHandlePosition(null);
            this.handleStart();
            this.value = this.handleVal1;
            this.setAriaAttrValue(this.firstHandle);
            this.changeEvent('changed', null);
          } else {
            this.validateRangeValue();
          }

          if (this.type !== 'Default') {
            this.setRangeBar();
          }

          if (this.limits.enabled) {
            this.setLimitBar();
          }
        }
      }, {
        key: "rangeValueUpdate",
        value: function rangeValueUpdate() {
          if (this.value === null || typeof this.value !== 'object') {
            this.value = [parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min)), parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max))];
          }
        }
      }, {
        key: "validateRangeValue",
        value: function validateRangeValue() {
          this.rangeValueUpdate();
          this.setRangeValue();
        }
      }, {
        key: "modifyZindex",
        value: function modifyZindex() {
          if (this.type === 'Range') {
            if (this.activeHandle === 1) {
              this.firstHandle.style.zIndex = this.zIndex + 4 + '';
              this.secondHandle.style.zIndex = this.zIndex + 3 + '';
            } else {
              this.firstHandle.style.zIndex = this.zIndex + 3 + '';
              this.secondHandle.style.zIndex = this.zIndex + 4 + '';
            }
          } else if (this.isMaterialTooltip && this.tooltipElement) {
            this.tooltipElement.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["getZindexPartial"])(this.element) + '';
          }
        }
      }, {
        key: "setHandlePosition",
        value: function setHandlePosition(event) {
          var _this528 = this;

          var handle;
          var pos = this.activeHandle === 1 ? this.handlePos1 : this.handlePos2;

          if (this.isMaterialTooltip) {
            handle = [this.firstHandle, this.materialHandle];
          } else {
            handle = [this.getHandle()];
          }

          this.handleStart();
          handle.forEach(function (handle) {
            if (_this528.orientation === 'Horizontal') {
              _this528.enableRtl ? handle.style.right = "".concat(pos, "px") : handle.style.left = "".concat(pos, "px");
            } else {
              handle.style.bottom = "".concat(pos, "px");
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this528.isServerRendered) {
              handle.style.removeProperty('visibility');
            }
          });
          this.changeEvent('change', event);
        }
      }, {
        key: "getHandle",
        value: function getHandle() {
          return this.activeHandle === 1 ? this.firstHandle : this.secondHandle;
        }
      }, {
        key: "setRangeValue",
        value: function setRangeValue() {
          this.updateRangeValue();
          this.activeHandle = 1;
          this.setHandlePosition(null);
          this.activeHandle = 2;
          this.setHandlePosition(null);
          this.activeHandle = 1;
        }
      }, {
        key: "changeEvent",
        value: function changeEvent(eventName, e) {
          var previous = eventName === 'change' ? this.previousVal : this.previousChanged;

          if (this.type !== 'Range') {
            this.setProperties({
              'value': this.handleVal1
            }, true);

            if (previous !== this.value) {
              this.trigger(eventName, this.changeEventArgs(eventName, e));
              this.setPreviousVal(eventName, this.value);
            }

            this.setAriaAttrValue(this.firstHandle);
          } else {
            var value = this.value = [this.handleVal1, this.handleVal2];
            this.setProperties({
              'value': value
            }, true);

            if (previous.length === this.value.length && this.value[0] !== previous[0] || this.value[1] !== previous[1]) {
              this.trigger(eventName, this.changeEventArgs(eventName, e));
              this.setPreviousVal(eventName, this.value);
            }

            this.setAriaAttrValue(this.getHandle());
          }

          this.hiddenInput.value = this.value.toString();
        }
      }, {
        key: "changeEventArgs",
        value: function changeEventArgs(eventName, e) {
          var eventArgs;

          if (this.tooltip.isVisible && this.tooltipObj) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
              this.tooltipValue();
            }

            eventArgs = {
              value: this.value,
              previousValue: eventName === 'change' ? this.previousVal : this.previousChanged,
              action: eventName,
              text: this.tooltipObj.content,
              isInteracted: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? false : true
            };
          } else {
            eventArgs = {
              value: this.value,
              previousValue: eventName === 'change' ? this.previousVal : this.previousChanged,
              action: eventName,
              text: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticksFormatInfo.format) ? this.value.toString() : this.type !== 'Range' ? this.formatString(this.value, this.ticksFormatInfo).formatString : this.formatString(this.value[0], this.ticksFormatInfo).formatString + ' - ' + this.formatString(this.value[1], this.ticksFormatInfo).formatString,
              isInteracted: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? false : true
            };
          }

          return eventArgs;
        }
      }, {
        key: "setPreviousVal",
        value: function setPreviousVal(eventName, value) {
          if (eventName === 'change') {
            this.previousVal = value;
          } else {
            this.previousChanged = value;
          }
        }
      }, {
        key: "updateRangeValue",
        value: function updateRangeValue() {
          var values = this.value.toString().split(',').map(Number);

          if (this.enableRtl && this.orientation !== 'Vertical' || this.rtl) {
            this.value = [values[1], values[0]];
          } else {
            this.value = [values[0], values[1]];
          }

          if (this.enableRtl && this.orientation !== 'Vertical') {
            this.handleVal1 = this.checkHandleValue(this.value[1]);
            this.handleVal2 = this.checkHandleValue(this.value[0]);
          } else {
            this.handleVal1 = this.checkHandleValue(this.value[0]);
            this.handleVal2 = this.checkHandleValue(this.value[1]);
          }

          this.handlePos1 = this.checkHandlePosition(this.handleVal1);
          this.handlePos2 = this.checkHandlePosition(this.handleVal2);

          if (this.handlePos1 > this.handlePos2) {
            this.handlePos1 = this.handlePos2;
            this.handleVal1 = this.handleVal2;
          }

          this.preHandlePos1 = this.handlePos1;
          this.preHandlePos2 = this.handlePos2;

          if (this.limits.enabled) {
            this.activeHandle = 1;

            var _values = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);

            this.handleVal1 = _values[0];
            this.handlePos1 = _values[1];
            this.preHandlePos1 = this.handlePos1;
            this.activeHandle = 2;
            _values = this.getLimitValueAndPosition(this.handleVal2, this.limits.maxStart, this.limits.maxEnd);
            this.handleVal2 = _values[0];
            this.handlePos2 = _values[1];
            this.preHandlePos2 = this.handlePos2;
          }
        }
      }, {
        key: "checkHandlePosition",
        value: function checkHandlePosition(value) {
          var pos;
          value = 100 * (value - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min))) / (parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min)));

          if (this.orientation === 'Horizontal') {
            pos = this.element.getBoundingClientRect().width * (value / 100);
          } else {
            pos = this.element.getBoundingClientRect().height * (value / 100);
          }

          if (parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) === parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min))) {
            if (this.orientation === 'Horizontal') {
              pos = this.element.getBoundingClientRect().width;
            } else {
              pos = this.element.getBoundingClientRect().height;
            }
          }

          return pos;
        }
      }, {
        key: "checkHandleValue",
        value: function checkHandleValue(value) {
          if (this.min > this.max) {
            this.min = this.max;
          }

          if (this.min === this.max) {
            return parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max));
          }

          var handle = this.tempStartEnd();

          if (value < handle.start) {
            value = handle.start;
          } else if (value > handle.end) {
            value = handle.end;
          }

          return value;
        }
        /**
         * It is used to reposition slider.
         * @returns void
         */

      }, {
        key: "reposition",
        value: function reposition() {
          var _this529 = this;

          this.firstHandle.style.transition = 'none';

          if (this.type !== 'Default') {
            this.rangeBar.style.transition = 'none';
          }

          if (this.type === 'Range') {
            this.secondHandle.style.transition = 'none';
          }

          this.handlePos1 = this.checkHandlePosition(this.handleVal1);

          if (this.handleVal2) {
            this.handlePos2 = this.checkHandlePosition(this.handleVal2);
          }

          if (this.orientation === 'Horizontal') {
            this.enableRtl ? this.firstHandle.style.right = "".concat(this.handlePos1, "px") : this.firstHandle.style.left = "".concat(this.handlePos1, "px");

            if (this.isMaterialTooltip) {
              this.enableRtl ? this.materialHandle.style.right = "".concat(this.handlePos1, "px") : this.materialHandle.style.left = "".concat(this.handlePos1, "px");
            }

            if (this.type === 'MinRange') {
              this.enableRtl ? this.rangeBar.style.right = '0px' : this.rangeBar.style.left = '0px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.handlePos1) ? 0 : this.handlePos1 + 'px'
              });
            } else if (this.type === 'Range') {
              this.enableRtl ? this.secondHandle.style.right = "".concat(this.handlePos2, "px") : this.secondHandle.style.left = "".concat(this.handlePos2, "px");
              this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + 'px' : this.rangeBar.style.left = this.handlePos1 + 'px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'width': this.handlePos2 - this.handlePos1 + 'px'
              });
            }
          } else {
            this.firstHandle.style.bottom = "".concat(this.handlePos1, "px");

            if (this.isMaterialTooltip) {
              this.materialHandle.style.bottom = "".concat(this.handlePos1, "px");
            }

            if (this.type === 'MinRange') {
              this.rangeBar.style.bottom = '0px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.handlePos1) ? 0 : this.handlePos1 + 'px'
              });
            } else if (this.type === 'Range') {
              this.secondHandle.style.bottom = "".concat(this.handlePos2, "px");
              this.rangeBar.style.bottom = this.handlePos1 + 'px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.rangeBar, {
                'height': this.handlePos2 - this.handlePos1 + 'px'
              });
            }
          }

          if (this.limits.enabled) {
            this.setLimitBar();
          }

          if (this.ticks.placement !== 'None' && this.ul) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.removeElement(this.ul);
              this.ul = undefined;
            }

            this.renderScale();

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.tickValuePosition();
            }
          }

          this.handleStart();

          if (!this.tooltip.isVisible) {
            setTimeout(function () {
              _this529.firstHandle.style.transition = _this529.scaleTransform;

              if (_this529.type === 'Range') {
                _this529.secondHandle.style.transition = _this529.scaleTransform;
              }
            });
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.refreshTooltip(this.tooltipTarget);
          }

          this.setBarColor();
        }
      }, {
        key: "changeHandleValue",
        value: function changeHandleValue(value) {
          var position = null;

          if (this.activeHandle === 1) {
            if (!(this.limits.enabled && this.limits.startHandleFixed)) {
              this.handleVal1 = this.checkHandleValue(value);
              this.handlePos1 = this.checkHandlePosition(this.handleVal1);

              if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
                this.handlePos1 = this.handlePos2;
                this.handleVal1 = this.handleVal2;
              }

              if (this.handlePos1 !== this.preHandlePos1) {
                position = this.preHandlePos1 = this.handlePos1;
              }
            }

            this.modifyZindex();
          } else {
            if (!(this.limits.enabled && this.limits.endHandleFixed)) {
              this.handleVal2 = this.checkHandleValue(value);
              this.handlePos2 = this.checkHandlePosition(this.handleVal2);

              if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
                this.handlePos2 = this.handlePos1;
                this.handleVal2 = this.handleVal1;
              }

              if (this.handlePos2 !== this.preHandlePos2) {
                position = this.preHandlePos2 = this.handlePos2;
              }
            }

            this.modifyZindex();
          }

          if (position !== null) {
            if (this.type !== 'Default') {
              this.setRangeBar();
            }

            this.setHandlePosition(null);
          }
        }
      }, {
        key: "tempStartEnd",
        value: function tempStartEnd() {
          if (this.min > this.max) {
            return {
              start: this.max,
              end: this.min
            };
          } else {
            return {
              start: this.min,
              end: this.max
            };
          }
        }
      }, {
        key: "xyToPosition",
        value: function xyToPosition(position) {
          var pos;

          if (this.min === this.max) {
            return 100;
          }

          if (this.orientation === 'Horizontal') {
            var left = position.x - this.element.getBoundingClientRect().left;
            var num = this.element.offsetWidth / 100;
            this.val = left / num;
          } else {
            var top = position.y - this.element.getBoundingClientRect().top;

            var _num = this.element.offsetHeight / 100;

            this.val = 100 - top / _num;
          }

          var val = this.stepValueCalculation(this.val);

          if (val < 0) {
            val = 0;
          } else if (val > 100) {
            val = 100;
          }

          if (this.enableRtl && this.orientation !== 'Vertical') {
            val = 100 - val;
          }

          if (this.orientation === 'Horizontal') {
            pos = this.element.getBoundingClientRect().width * (val / 100);
          } else {
            pos = this.element.getBoundingClientRect().height * (val / 100);
          }

          return pos;
        }
      }, {
        key: "stepValueCalculation",
        value: function stepValueCalculation(value) {
          if (this.step === 0) {
            this.step = 1;
          }

          var percentStep = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.step)) / ((parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min))) / 100);
          var remain = value % Math.abs(percentStep);

          if (remain !== 0) {
            if (percentStep / 2 > remain) {
              value -= remain;
            } else {
              value += Math.abs(percentStep) - remain;
            }
          }

          return value;
        }
      }, {
        key: "add",
        value: function add(a, b, addition) {
          var precision;
          var x = Math.pow(10, precision || 3);
          var val;

          if (addition) {
            val = (Math.round(a * x) + Math.round(b * x)) / x;
          } else {
            val = (Math.round(a * x) - Math.round(b * x)) / x;
          }

          return val;
        }
      }, {
        key: "positionToValue",
        value: function positionToValue(pos) {
          var val;
          var diff = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.max)) - parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.min));

          if (this.orientation === 'Horizontal') {
            val = pos / this.element.getBoundingClientRect().width * diff;
          } else {
            val = pos / this.element.getBoundingClientRect().height * diff;
          }

          var total = this.add(val, parseFloat(this.min.toString()), true);
          return total;
        }
      }, {
        key: "sliderBarClick",
        value: function sliderBarClick(evt) {
          evt.preventDefault();
          var pos;

          if (evt.type === 'mousedown' || evt.type === 'mouseup' || evt.type === 'click') {
            pos = {
              x: evt.clientX,
              y: evt.clientY
            };
          } else if (evt.type === 'touchend' || evt.type === 'touchstart') {
            pos = {
              x: evt.changedTouches[0].clientX,
              y: evt.changedTouches[0].clientY
            };
          }

          var handlepos = this.xyToPosition(pos);
          var handleVal = this.positionToValue(handlepos);

          if (this.type === 'Range' && this.handlePos2 - handlepos < handlepos - this.handlePos1) {
            this.activeHandle = 2;

            if (!(this.limits.enabled && this.limits.endHandleFixed)) {
              if (this.limits.enabled) {
                var value = this.getLimitValueAndPosition(handleVal, this.limits.maxStart, this.limits.maxEnd);
                handleVal = value[0];
                handlepos = value[1];
              }

              this.secondHandle.classList.add(classNames.sliderActiveHandle);
              this.handlePos2 = this.preHandlePos2 = handlepos;
              this.handleVal2 = handleVal;
            }

            this.modifyZindex();
            this.secondHandle.focus();
          } else {
            this.activeHandle = 1;

            if (!(this.limits.enabled && this.limits.startHandleFixed)) {
              if (this.limits.enabled) {
                var _value14 = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);

                handleVal = _value14[0];
                handlepos = _value14[1];
              }

              this.firstHandle.classList.add(classNames.sliderActiveHandle);
              this.handlePos1 = this.preHandlePos1 = handlepos;
              this.handleVal1 = handleVal;
            }

            this.modifyZindex();
            this.firstHandle.focus();
          }

          if (this.isMaterialTooltip) {
            this.tooltipElement.classList.add(classNames.materialTooltipActive);
          }

          var focusedElement = this.element.querySelector('.' + classNames.sliderTabHandle);

          if (focusedElement && this.getHandle() !== focusedElement) {
            focusedElement.classList.remove(classNames.sliderTabHandle);
          }

          var handle = this.activeHandle === 1 ? this.firstHandle : this.secondHandle;

          if (evt.target === handle) {
            if (this.isMaterial && !this.tooltip.isVisible && !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
              this.materialChange();
            }

            this.tooltipToggle(this.getHandle());
            return;
          }

          if (!this.checkRepeatedValue(handleVal)) {
            return;
          }

          var transition = this.isMaterial && this.tooltip.isVisible ? this.transitionOnMaterialTooltip : this.transition;
          this.getHandle().style.transition = transition.handle;

          if (this.type !== 'Default') {
            this.rangeBar.style.transition = transition.rangeBar;
          }

          this.setHandlePosition(evt);

          if (this.type !== 'Default') {
            this.setRangeBar();
          }
        }
      }, {
        key: "handleValueAdjust",
        value: function handleValueAdjust(handleValue, assignValue, handleNumber) {
          if (handleNumber === 1) {
            this.handleVal1 = assignValue;
            this.handleVal2 = this.handleVal1 + this.minDiff;
          } else if (handleNumber === 2) {
            this.handleVal2 = assignValue;
            this.handleVal1 = this.handleVal2 - this.minDiff;
          }

          this.handlePos1 = this.checkHandlePosition(this.handleVal1);
          this.handlePos2 = this.checkHandlePosition(this.handleVal2);
        }
      }, {
        key: "dragRangeBarMove",
        value: function dragRangeBarMove(event) {
          if (event.type !== 'touchmove') {
            event.preventDefault();
          }

          this.rangeBarDragged = true;
          var pos;
          this.rangeBar.style.transition = 'none';
          this.firstHandle.style.transition = 'none';
          this.secondHandle.style.transition = 'none';
          var xPostion;
          var yPostion;

          if (event.type === 'mousemove') {
            var _ref65 = [event.clientX, event.clientY];
            xPostion = _ref65[0];
            yPostion = _ref65[1];
          } else {
            var _ref66 = [event.changedTouches[0].clientX, event.changedTouches[0].clientY];
            xPostion = _ref66[0];
            yPostion = _ref66[1];
          }

          if (!(this.limits.enabled && this.limits.startHandleFixed) && !(this.limits.enabled && this.limits.endHandleFixed)) {
            if (!this.enableRtl) {
              pos = {
                x: xPostion - this.firstPartRemain,
                y: yPostion + this.secondPartRemain
              };
            } else {
              pos = {
                x: xPostion + this.secondPartRemain,
                y: yPostion + this.secondPartRemain
              };
            }

            this.handlePos1 = this.xyToPosition(pos);
            this.handleVal1 = this.positionToValue(this.handlePos1);

            if (!this.enableRtl) {
              pos = {
                x: xPostion + this.secondPartRemain,
                y: yPostion - this.firstPartRemain
              };
            } else {
              pos = {
                x: xPostion - this.firstPartRemain,
                y: yPostion - this.firstPartRemain
              };
            }

            this.handlePos2 = this.xyToPosition(pos);
            this.handleVal2 = this.positionToValue(this.handlePos2);

            if (this.limits.enabled) {
              var value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
              this.handleVal1 = value[0];
              this.handlePos1 = value[1];

              if (this.handleVal1 === this.limits.minEnd) {
                this.handleValueAdjust(this.handleVal1, this.limits.minEnd, 1);
              }

              if (this.handleVal1 === this.limits.minStart) {
                this.handleValueAdjust(this.handleVal1, this.limits.minStart, 1);
              }

              value = this.getLimitValueAndPosition(this.handleVal2, this.limits.maxStart, this.limits.maxEnd);
              this.handleVal2 = value[0];
              this.handlePos2 = value[1];

              if (this.handleVal2 === this.limits.maxStart) {
                this.handleValueAdjust(this.handleVal2, this.limits.maxStart, 2);
              }

              if (this.handleVal2 === this.limits.maxEnd) {
                this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
              }
            }

            if (this.handleVal2 === this.max) {
              this.handleValueAdjust(this.handleVal2, this.max, 2);
            }

            if (this.handleVal1 === this.min) {
              this.handleValueAdjust(this.handleVal1, this.min, 1);
            }
          }

          this.activeHandle = 1;
          this.setHandlePosition(event);
          this.activeHandle = 2;
          this.setHandlePosition(event);
          this.tooltipToggle(this.rangeBar);
          this.setRangeBar();
        }
      }, {
        key: "sliderBarUp",
        value: function sliderBarUp(event) {
          this.changeEvent('changed', event);
          this.handleFocusOut();
          this.firstHandle.classList.remove(classNames.sliderActiveHandle);

          if (this.type === 'Range') {
            this.secondHandle.classList.remove(classNames.sliderActiveHandle);
          }

          this.closeTooltip();

          if (this.isMaterial) {
            this.getHandle().classList.remove('e-large-thumb-size');

            if (this.isMaterialTooltip) {
              this.tooltipElement.classList.remove(classNames.materialTooltipActive);
            }
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousemove touchmove', this.sliderBarMove);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mouseup touchend', this.sliderBarUp);
        }
      }, {
        key: "sliderBarMove",
        value: function sliderBarMove(evt) {
          if (evt.type !== 'touchmove') {
            evt.preventDefault();
          }

          var pos;

          if (evt.type === 'mousemove') {
            pos = {
              x: evt.clientX,
              y: evt.clientY
            };
          } else {
            pos = {
              x: evt.changedTouches[0].clientX,
              y: evt.changedTouches[0].clientY
            };
          }

          var handlepos = this.xyToPosition(pos);
          var handleVal = this.positionToValue(handlepos);
          handlepos = Math.round(handlepos);

          if (this.type !== 'Range' && this.activeHandle === 1) {
            if (!(this.limits.enabled && this.limits.startHandleFixed)) {
              if (this.limits.enabled) {
                var valueAndPostion = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
                handlepos = valueAndPostion[1];
                handleVal = valueAndPostion[0];
              }

              this.handlePos1 = handlepos;
              this.handleVal1 = handleVal;
            }

            this.firstHandle.classList.add(classNames.sliderActiveHandle);
          }

          if (this.type === 'Range') {
            if (this.activeHandle === 1) {
              this.firstHandle.classList.add(classNames.sliderActiveHandle);

              if (!(this.limits.enabled && this.limits.startHandleFixed)) {
                if (handlepos > this.handlePos2) {
                  handlepos = this.handlePos2;
                  handleVal = this.handleVal2;
                }

                if (handlepos !== this.preHandlePos1) {
                  if (this.limits.enabled) {
                    var value = this.getLimitValueAndPosition(handleVal, this.limits.minStart, this.limits.minEnd);
                    handleVal = value[0];
                    handlepos = value[1];
                  }

                  this.handlePos1 = this.preHandlePos1 = handlepos;
                  this.handleVal1 = handleVal;
                  this.activeHandle = 1;
                }
              }
            } else if (this.activeHandle === 2) {
              this.secondHandle.classList.add(classNames.sliderActiveHandle);

              if (!(this.limits.enabled && this.limits.endHandleFixed)) {
                if (handlepos < this.handlePos1) {
                  handlepos = this.handlePos1;
                  handleVal = this.handleVal1;
                }

                if (handlepos !== this.preHandlePos2) {
                  if (this.limits.enabled) {
                    var _value15 = this.getLimitValueAndPosition(handleVal, this.limits.maxStart, this.limits.maxEnd);

                    handleVal = _value15[0];
                    handlepos = _value15[1];
                  }

                  this.handlePos2 = this.preHandlePos2 = handlepos;
                  this.handleVal2 = handleVal;
                  this.activeHandle = 2;
                }
              }
            }
          }

          if (!this.checkRepeatedValue(handleVal)) {
            return;
          }

          this.getHandle().style.transition = this.scaleTransform;

          if (this.type !== 'Default') {
            this.rangeBar.style.transition = 'none';
          }

          this.setHandlePosition(evt);

          if (this.isMaterial && !this.tooltip.isVisible && !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
            this.materialChange();
          }

          this.tooltipToggle(this.getHandle());

          if (this.type !== 'Default') {
            this.setRangeBar();
          }
        }
      }, {
        key: "dragRangeBarUp",
        value: function dragRangeBarUp(event) {
          if (!this.rangeBarDragged) {
            this.focusSliderElement();
            this.sliderBarClick(event);
          }

          this.changeEvent('changed', event);
          this.closeTooltip();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousemove touchmove', this.dragRangeBarMove);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mouseup touchend', this.dragRangeBarUp);

          this.rangeBarDragged = false;
        }
      }, {
        key: "checkRepeatedValue",
        value: function checkRepeatedValue(currentValue) {
          if (this.type === 'Range') {
            var previousVal = this.enableRtl && this.orientation !== 'Vertical' ? this.activeHandle === 1 ? this.previousVal[1] : this.previousVal[0] : this.activeHandle === 1 ? this.previousVal[0] : this.previousVal[1];

            if (currentValue === previousVal) {
              return 0;
            }
          } else {
            if (currentValue === this.previousVal) {
              return 0;
            }
          }

          return 1;
        }
      }, {
        key: "refreshTooltip",
        value: function refreshTooltip(target) {
          if (this.tooltip.isVisible && this.tooltipObj) {
            this.tooltipValue();

            if (target) {
              this.tooltipObj.refresh(target);
              this.tooltipTarget = target;
            }
          }
        }
      }, {
        key: "openTooltip",
        value: function openTooltip(target) {
          if (this.tooltip.isVisible && this.tooltipObj && !this.isMaterialTooltip) {
            this.tooltipValue();
            this.tooltipObj.open(target);
            this.tooltipTarget = target;
          }
        }
      }, {
        key: "closeTooltip",
        value: function closeTooltip() {
          if (this.tooltip.isVisible && this.tooltipObj && this.tooltip.showOn !== 'Always' && !this.isMaterialTooltip) {
            this.tooltipValue();
            this.tooltipObj.close();
            this.tooltipTarget = undefined;
          }
        }
      }, {
        key: "keyDown",
        value: function keyDown(event) {
          switch (event.keyCode) {
            case 37:
            case 38:
            case 39:
            case 40:
            case 33:
            case 34:
            case 36:
            case 35:
              event.preventDefault();
              this.buttonClick(event);
              break;
          }
        }
      }, {
        key: "wireButtonEvt",
        value: function wireButtonEvt(destroy) {
          if (!destroy) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstBtn, 'mouseleave touchleave', this.buttonFocusOut, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondBtn, 'mouseleave touchleave', this.buttonFocusOut, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstBtn, 'mousedown touchstart', this.repeatHandlerMouse, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstBtn, 'mouseup mouseleave touchup touchend', this.repeatHandlerUp, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondBtn, 'mousedown touchstart', this.repeatHandlerMouse, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondBtn, 'mouseup mouseleave touchup touchend', this.repeatHandlerUp, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.firstBtn, 'focusout', this.sliderFocusOut, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.secondBtn, 'focusout', this.sliderFocusOut, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstBtn, 'mouseleave touchleave', this.buttonFocusOut);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondBtn, 'mouseleave touchleave', this.buttonFocusOut);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstBtn, 'mousedown touchstart', this.repeatHandlerMouse);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstBtn, 'mouseup mouseleave touchup touchend', this.repeatHandlerUp);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondBtn, 'mousedown touchstart', this.repeatHandlerMouse);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondBtn, 'mouseup mouseleave touchup touchend', this.repeatHandlerUp);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.firstBtn, 'focusout', this.sliderFocusOut);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.secondBtn, 'focusout', this.sliderFocusOut);
          }
        }
      }, {
        key: "rangeBarMousedown",
        value: function rangeBarMousedown(event) {
          event.preventDefault();
          this.focusSliderElement();

          if (this.type === 'Range' && this.drag && event.target === this.rangeBar) {
            var xPostion;
            var yPostion;

            if (event.type === 'mousedown') {
              var _ref67 = [event.clientX, event.clientY];
              xPostion = _ref67[0];
              yPostion = _ref67[1];
            } else if (event.type === 'touchstart') {
              var _ref68 = [event.changedTouches[0].clientX, event.changedTouches[0].clientY];
              xPostion = _ref68[0];
              yPostion = _ref68[1];
            }

            if (this.orientation === 'Horizontal') {
              this.firstPartRemain = xPostion - this.rangeBar.getBoundingClientRect().left;
              this.secondPartRemain = this.rangeBar.getBoundingClientRect().right - xPostion;
            } else {
              this.firstPartRemain = yPostion - this.rangeBar.getBoundingClientRect().top;
              this.secondPartRemain = this.rangeBar.getBoundingClientRect().bottom - yPostion;
            }

            this.minDiff = this.handleVal2 - this.handleVal1;
            this.tooltipToggle(this.rangeBar);
            var focusedElement = this.element.querySelector('.' + classNames.sliderTabHandle);

            if (focusedElement) {
              focusedElement.classList.remove(classNames.sliderTabHandle);
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousemove touchmove', this.dragRangeBarMove, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup touchend', this.dragRangeBarUp, this);
          }
        }
      }, {
        key: "elementClick",
        value: function elementClick(event) {
          event.preventDefault();
          this.focusSliderElement();
          this.sliderBarClick(event);
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          this.onresize = this.reposition.bind(this);
          window.addEventListener('resize', this.onresize);

          if (this.enabled && !this.readonly) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.elementClick, this);

            if (this.type === 'Range' && this.drag) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.rangeBar, 'mousedown touchstart', this.rangeBarMousedown, this);
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.sliderContainer, 'keydown', this.keyDown, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.sliderContainer, 'keyup', this.keyUp, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.sliderFocusOut, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.sliderContainer, 'mouseover mouseout touchstart touchend', this.hover, this);

            this.wireFirstHandleEvt(false);

            if (this.type === 'Range') {
              this.wireSecondHandleEvt(false);
            }

            if (this.showButtons) {
              this.wireButtonEvt(false);
            }

            this.wireMaterialTooltipEvent(false);

            if (this.isForm) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
            }
          }
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.elementClick);

          if (this.type === 'Range' && this.drag) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.rangeBar, 'mousedown touchstart', this.rangeBarMousedown);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.sliderContainer, 'keydown', this.keyDown);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.sliderContainer, 'keyup', this.keyUp);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focusout', this.sliderFocusOut);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.sliderContainer, 'mouseover mouseout touchstart touchend', this.hover);

          this.wireFirstHandleEvt(true);

          if (this.type === 'Range') {
            this.wireSecondHandleEvt(true);
          }

          if (this.showButtons) {
            this.wireButtonEvt(true);
          }

          this.wireMaterialTooltipEvent(true);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'reset', this.formResetHandler);
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.setProperties({
            'value': this.formResetValue
          }, true);
          this.setValue();
        }
      }, {
        key: "keyUp",
        value: function keyUp(event) {
          if (event.keyCode === 9 && event.target.classList.contains(classNames.sliderHandle)) {
            this.focusSliderElement();

            if (!event.target.classList.contains(classNames.sliderTabHandle)) {
              if (this.element.querySelector('.' + classNames.sliderTabHandle)) {
                this.element.querySelector('.' + classNames.sliderTabHandle).classList.remove(classNames.sliderTabHandle);
              }

              event.target.classList.add(classNames.sliderTabHandle);
              var parentElement = event.target.parentElement;

              if (parentElement === this.element) {
                parentElement.querySelector('.' + classNames.sliderTrack).classList.add(classNames.sliderTabTrack);

                if (this.type === 'Range' || this.type === 'MinRange') {
                  parentElement.querySelector('.' + classNames.rangeBar).classList.add(classNames.sliderTabRange);
                }
              }

              if (this.type === 'Range') {
                event.target.previousSibling.classList.contains(classNames.sliderHandle) ? this.activeHandle = 2 : this.activeHandle = 1;
              }

              this.getHandle().focus();
              this.tooltipToggle(this.getHandle());
            }
          }

          this.closeTooltip();
          this.changeEvent('changed', event);
        }
      }, {
        key: "hover",
        value: function hover(event) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(event)) {
            if (event.type === 'mouseover' || event.type === 'touchmove' || event.type === 'mousemove' || event.type === 'pointermove' || event.type === 'touchstart') {
              this.sliderContainer.classList.add(classNames.sliderHover);
            } else {
              this.sliderContainer.classList.remove(classNames.sliderHover);
            }
          }
        }
      }, {
        key: "sliderFocusOut",
        value: function sliderFocusOut(event) {
          if (event.relatedTarget !== this.secondHandle && event.relatedTarget !== this.firstHandle && event.relatedTarget !== this.element && event.relatedTarget !== this.firstBtn && event.relatedTarget !== this.secondBtn) {
            this.closeMaterialTooltip();

            if (this.element.querySelector('.' + classNames.sliderTabHandle)) {
              this.element.querySelector('.' + classNames.sliderTabHandle).classList.remove(classNames.sliderTabHandle);
            }

            if (this.element.querySelector('.' + classNames.sliderTabTrack)) {
              this.element.querySelector('.' + classNames.sliderTabTrack).classList.remove(classNames.sliderTabTrack);

              if ((this.type === 'Range' || this.type === 'MinRange') && this.element.querySelector('.' + classNames.sliderTabRange)) {
                this.element.querySelector('.' + classNames.sliderTabRange).classList.remove(classNames.sliderTabRange);
              }
            }

            this.hiddenInput.focus();
            this.hiddenInput.blur();
            this.isElementFocused = false;
          }
        }
      }, {
        key: "removeElement",
        value: function removeElement(element) {
          if (element.parentNode) {
            element.parentNode.removeChild(element);
          }
        }
      }, {
        key: "changeSliderType",
        value: function changeSliderType(type, args) {
          if (this.isMaterialTooltip && this.materialHandle) {
            this.sliderContainer.classList.remove(classNames.materialSlider);
            this.removeElement(this.materialHandle);
            this.materialHandle = undefined;
          }

          this.removeElement(this.firstHandle);
          this.firstHandle = undefined;

          if (type !== 'Default') {
            if (type === 'Range') {
              this.removeElement(this.secondHandle);
              this.secondHandle = undefined;
            }

            this.removeElement(this.rangeBar);
            this.rangeBar = undefined;
          }

          if (this.tooltip.isVisible && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltipObj)) {
            this.tooltipObj.destroy();
            this.tooltipElement = undefined;
            this.tooltipCollidedPosition = undefined;
          }

          if (this.limits.enabled) {
            if (type === 'MinRange' || type === 'Default') {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarFirst)) {
                this.removeElement(this.limitBarFirst);
                this.limitBarFirst = undefined;
              }
            } else {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarSecond)) {
                this.removeElement(this.limitBarSecond);
                this.limitBarSecond = undefined;
              }
            }
          }

          this.activeHandle = 1;
          this.getThemeInitialization();

          if (this.type === 'Range') {
            this.rangeValueUpdate();
          }

          this.createRangeBar();

          if (this.limits.enabled) {
            this.createLimitBar();
          }

          this.setHandler();
          this.setOrientClass();
          this.wireFirstHandleEvt(false);

          if (this.type === 'Range') {
            this.wireSecondHandleEvt(false);
          }

          this.setValue();

          if (this.tooltip.isVisible) {
            this.renderTooltip();
            this.wireMaterialTooltipEvent(false);
          }

          this.setBarColor();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered || args !== 'tooltip') {
            this.updateConfig();
          }
        }
      }, {
        key: "changeRtl",
        value: function changeRtl() {
          if (!this.enableRtl && this.type === 'Range') {
            this.value = [this.handleVal2, this.handleVal1];
          }

          this.updateConfig();

          if (this.tooltip.isVisible) {
            this.tooltipObj.refresh(this.firstHandle);
          }

          if (this.showButtons) {
            var enabledRTL = this.enableRtl && this.orientation !== 'Vertical';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(enabledRTL ? this.secondBtn : this.firstBtn, {
              'aria-label': 'Decrease',
              title: 'Decrease'
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(enabledRTL ? this.firstBtn : this.secondBtn, {
              'aria-label': 'Increase',
              title: 'Increase'
            });
          }
        }
      }, {
        key: "changeOrientation",
        value: function changeOrientation() {
          this.changeSliderType(this.type, 'null');
        }
      }, {
        key: "updateConfig",
        value: function updateConfig() {
          this.setEnableRTL();
          this.setValue();

          if (this.tooltip.isVisible) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.refreshTooltip(this.tooltipTarget);
            }
          }

          if (this.ticks.placement !== 'None') {
            if (this.ul) {
              this.removeElement(this.ul);
              this.ul = undefined;
              this.renderScale();
            }
          }

          this.limitsPropertyChange();
        }
      }, {
        key: "limitsPropertyChange",
        value: function limitsPropertyChange() {
          if (this.limits.enabled) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarFirst) && this.type !== 'Range') {
              this.createLimitBar();
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarFirst) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarSecond) && this.type === 'Range') {
              this.createLimitBar();
            }

            this.setLimitBar();
            this.setValue();
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarFirst)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.limitBarFirst);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.limitBarSecond)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.limitBarSecond);
            }
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['value'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers.
         * Also it removes the attributes and classes.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          _get(_getPrototypeOf(Slider.prototype), "destroy", this).call(this);

          this.unwireEvents();
          window.removeEventListener('resize', this.onresize);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.sliderContainer], [classNames.sliderDisabled]);
          this.firstHandle.removeAttribute('aria-orientation');

          if (this.type === 'Range') {
            this.secondHandle.removeAttribute('aria-orientation');
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
            this.sliderContainer.parentNode.insertBefore(this.element, this.sliderContainer);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.sliderContainer);
          }

          if (this.tooltip.isVisible) {
            this.tooltipObj.destroy();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
            this.element.innerHTML = '';
          }
        }
        /**
         * Calls internally if any of the property value is changed.
         * @private
         */
        // tslint:disable-next-line

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var _this530 = this;

          for (var _i101 = 0, _Object$keys34 = Object.keys(newProp); _i101 < _Object$keys34.length; _i101++) {
            var prop = _Object$keys34[_i101];

            switch (prop) {
              case 'cssClass':
                this.setCSSClass(oldProp.cssClass);
                break;

              case 'value':
                if (newProp && oldProp) {
                  var value = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value) ? this.type === 'Range' ? [this.min, this.max] : this.min : newProp.value;
                  this.setProperties({
                    'value': value
                  }, true);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.value) && oldProp.value.toString() !== value.toString()) {
                    this.setValue();

                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                      this.refreshTooltip(this.tooltipTarget);
                    }

                    if (this.type === 'Range') {
                      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value) || oldProp.value[1] === value[1]) {
                        this.activeHandle = 1;
                      } else {
                        this.activeHandle = 2;
                      }
                    }
                  }
                }

                break;

              case 'min':
              case 'step':
              case 'max':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                this.setMinMaxValue();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'tooltip':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.tooltip) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.tooltip)) {
                  this.setTooltip(prop);
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'type':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp) && Object.keys(oldProp).length && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.type)) {
                  this.changeSliderType(oldProp.type, prop);
                  this.setZindex();
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'enableRtl':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  if (this.isMaterialTooltip) {
                    this.sliderContainer.classList.add(classNames.materialSlider);
                  }

                  this.isServerRendered = false;
                }

                if (oldProp.enableRtl !== newProp.enableRtl && this.orientation !== 'Vertical') {
                  this.rtl = oldProp.enableRtl;
                  this.changeRtl();
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'limits':
                this.limitsPropertyChange();
                break;

              case 'orientation':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                this.changeOrientation();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'ticks':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.sliderContainer.querySelector('.' + classNames.scale))) {
                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.ul);
                  }

                  Array.prototype.forEach.call(this.sliderContainer.classList, function (className) {
                    if (className.match(/e-scale-/)) {
                      _this530.sliderContainer.classList.remove(className);
                    }
                  });
                }

                if (this.ticks.placement !== 'None') {
                  this.renderScale();
                  this.setZindex();
                }

                break;

              case 'locale':
                if (this.showButtons) {
                  this.buttonTitle();
                }

                break;

              case 'showButtons':
                if (newProp.showButtons) {
                  this.setButtons();
                  this.reposition();

                  if (this.enabled && !this.readonly) {
                    this.wireButtonEvt(false);
                  }
                } else {
                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                    if (this.firstBtn && this.secondBtn) {
                      this.sliderContainer.removeChild(this.firstBtn);
                      this.sliderContainer.removeChild(this.secondBtn);
                      this.sliderContainer.classList.remove(classNames.sliderButtonClass);
                      this.firstBtn = undefined;
                      this.secondBtn = undefined;
                      this.reposition();
                    }
                  }
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  if (this.isMaterialTooltip) {
                    this.sliderContainer.classList.add(classNames.materialSlider);
                  }
                }

                break;

              case 'enabled':
                this.setEnabled();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  if (this.isMaterialTooltip) {
                    this.sliderContainer.classList.add(classNames.materialSlider);
                  }
                }

                break;

              case 'readonly':
                this.setReadOnly();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  if (this.isMaterialTooltip) {
                    this.sliderContainer.classList.add(classNames.materialSlider);
                  }
                }

                break;

              case 'customValues':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                this.setValue();
                this.reposition();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'colorRange':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.isServerRendered = false;
                }

                this.reposition();

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered) {
                  this.isServerRendered = true;
                }

                break;

              case 'width':
                this.setElementWidth(newProp.width);
                this.setMinMaxValue();

                if (this.limits) {
                  this.limitsPropertyChange();
                }

                break;
            }
          }
        }
      }, {
        key: "setReadOnly",
        value: function setReadOnly() {
          if (this.readonly) {
            this.unwireEvents();
            this.sliderContainer.classList.add(classNames.readonly);
          } else {
            this.wireEvents();
            this.sliderContainer.classList.remove(classNames.readonly);
          }
        }
      }, {
        key: "setMinMaxValue",
        value: function setMinMaxValue() {
          var _this531 = this;

          this.setValue();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            this.refreshTooltip(this.tooltipTarget);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.sliderContainer.querySelector('.' + classNames.scale))) {
            if (this.ul) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.ul);
              Array.prototype.forEach.call(this.sliderContainer.classList, function (className) {
                if (className.match(/e-scale-/)) {
                  _this531.sliderContainer.classList.remove(className);
                }
              });
            }
          }

          if (this.ticks.placement !== 'None') {
            this.renderScale();
            this.setZindex();
          }
        }
      }, {
        key: "setZindex",
        value: function setZindex() {
          this.zIndex = 6;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks) && this.ticks.placement !== 'None') {
            this.ul.style.zIndex = this.zIndex + -7 + '';
            this.element.style.zIndex = this.zIndex + 2 + '';
          }

          if (!this.isMaterial && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ticks) && this.ticks.placement === 'Both') {
            this.element.style.zIndex = this.zIndex + 2 + '';
          }

          this.firstHandle.style.zIndex = this.zIndex + 3 + '';

          if (this.type === 'Range') {
            this.secondHandle.style.zIndex = this.zIndex + 4 + '';
          }
        }
      }, {
        key: "setTooltip",
        value: function setTooltip(args) {
          this.changeSliderType(this.type, args);
        }
      }, {
        key: "setBarColor",
        value: function setBarColor() {
          var trackPosition;
          var trackClassName;
          var child = this.sliderTrack.lastElementChild;

          while (child) {
            this.sliderTrack.removeChild(child);
            child = this.sliderTrack.lastElementChild;
          }

          for (var i = 0; i < this.colorRange.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.colorRange[i].start) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.colorRange[i].end)) {
              if (this.colorRange[i].end > this.colorRange[i].start) {
                if (this.colorRange[i].start < this.min) {
                  this.colorRange[i].start = this.min;
                }

                if (this.colorRange[i].end > this.max) {
                  this.colorRange[i].end = this.max;
                }

                var startingPosition = this.checkHandlePosition(this.colorRange[i].start);
                var endPosition = this.checkHandlePosition(this.colorRange[i].end);
                var trackContainer = this.createElement('div');
                trackContainer.style.backgroundColor = this.colorRange[i].color;
                trackContainer.style.border = '1px solid ' + this.colorRange[i].color;

                if (this.orientation === 'Horizontal') {
                  trackClassName = classNames.sliderHorizantalColor;

                  if (this.enableRtl) {
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.customValues)) {
                      trackPosition = this.checkHandlePosition(this.max) - this.checkHandlePosition(this.colorRange[i].end);
                    } else {
                      trackPosition = this.checkHandlePosition(this.customValues.length - this.colorRange[i].end - 1);
                    }
                  } else {
                    trackPosition = this.checkHandlePosition(this.colorRange[i].start);
                  }

                  trackContainer.style.width = endPosition - startingPosition + 'px';
                  trackContainer.style.left = trackPosition + 'px';
                } else {
                  trackClassName = classNames.sliderVerticalColor;
                  trackPosition = this.checkHandlePosition(this.colorRange[i].start);
                  trackContainer.style.height = endPosition - startingPosition + 'px';
                  trackContainer.style.bottom = trackPosition + 'px';
                }

                trackContainer.classList.add(trackClassName);
                this.sliderTrack.appendChild(trackContainer);
              }
            }
          }
        }
        /**
         * Gets the component name
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'slider';
        }
      }]);

      return Slider;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Slider.prototype, "value", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Slider.prototype, "customValues", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1)], Slider.prototype, "step", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Slider.prototype, "width", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Slider.prototype, "min", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(100)], Slider.prototype, "max", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Slider.prototype, "readonly", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')], Slider.prototype, "type", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], ColorRangeData)], Slider.prototype, "colorRange", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TicksData)], Slider.prototype, "ticks", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, LimitData)], Slider.prototype, "limits", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Slider.prototype, "enabled", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TooltipData)], Slider.prototype, "tooltip", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Slider.prototype, "showButtons", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Slider.prototype, "enableAnimation", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Horizontal')], Slider.prototype, "orientation", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Slider.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Slider.prototype, "enableHtmlSanitizer", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "created", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "change", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "changed", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "renderingTicks", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "renderedTicks", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Slider.prototype, "tooltipChange", void 0);

    Slider = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Slider);
    /**
     * Slider modules
     */

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };

    var FormValidator_1;
    /**
     * global declarations
     */
    // tslint:disable-next-line:no-any

    var regex = {
      EMAIL: new RegExp('^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}' + '|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$'),
      URL: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/m,
      DATE_ISO: new RegExp('^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'),
      DIGITS: new RegExp('^[0-9]*$'),
      PHONE: new RegExp('^[+]?[0-9]{9,13}$'),
      CREDITCARD: new RegExp('^\\d{13,16}$')
    };
    /**
     * ErrorOption values
     * @private
     */

    var ErrorOption;

    (function (ErrorOption) {
      /**
       * Defines the error message.
       */
      ErrorOption[ErrorOption["Message"] = 0] = "Message";
      /**
       * Defines the error element type.
       */

      ErrorOption[ErrorOption["Label"] = 1] = "Label";
    })(ErrorOption || (ErrorOption = {}));
    /**
     * FormValidator class enables you to validate the form fields based on your defined rules
     * ```html
     * <form id='formId'>
     *  <input type='text' name='Name' />
     *  <input type='text' name='Age' />
     * </form>
     * <script>
     *   let formObject = new FormValidator('#formId', {
     *      rules: { Name: { required: true }, Age: { range: [18, 30] } };
     *   });
     *   formObject.validate();
     * </script>
     * ```
     */


    var FormValidator = FormValidator_1 = /*#__PURE__*/function (_syncfusion_ej2_base_20) {
      _inherits(FormValidator, _syncfusion_ej2_base_20);

      var _super203 = _createSuper(FormValidator);

      // Initializes the FormValidator 
      function FormValidator(element, options) {
        var _this532;

        _classCallCheck(this, FormValidator);

        _this532 = _super203.call(this, options, element);
        _this532.validated = [];
        _this532.errorRules = [];
        _this532.allowSubmit = false;
        _this532.required = 'required';
        _this532.infoElement = null;
        _this532.inputElement = null;
        _this532.selectQuery = 'input:not([type=reset]):not([type=button]), select, textarea'; // tslint:disable-next-line:no-any

        _this532.localyMessage = {};
        /**
         * Specifies the default messages for validation rules.
         * @default { List of validation message }
         */

        _this532.defaultMessages = {
          required: 'This field is required.',
          email: 'Please enter a valid email address.',
          url: 'Please enter a valid URL.',
          date: 'Please enter a valid date.',
          dateIso: 'Please enter a valid date ( ISO ).',
          creditcard: 'Please enter valid card number',
          number: 'Please enter a valid number.',
          digits: 'Please enter only digits.',
          maxLength: 'Please enter no more than {0} characters.',
          minLength: 'Please enter at least {0} characters.',
          rangeLength: 'Please enter a value between {0} and {1} characters long.',
          range: 'Please enter a value between {0} and {1}.',
          max: 'Please enter a value less than or equal to {0}.',
          min: 'Please enter a value greater than or equal to {0}.',
          regex: 'Please enter a correct value.',
          tel: 'Please enter a valid phone number.',
          pattern: 'Please enter a correct pattern value.',
          equalTo: 'Please enter the valid match text'
        };

        if (typeof _this532.rules === 'undefined') {
          _this532.rules = {};
        }

        _this532.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('formValidator', _this532.defaultMessages, _this532.locale);

        if (_this532.locale) {
          _this532.localeFunc();
        }

        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["onIntlChange"].on('notifyExternalChange', _this532.afterLocalization, _assertThisInitialized(_this532));

        element = typeof element === 'string' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(element, document) : element; // Set novalidate to prevent default HTML5 form validation

        if (_this532.element != null) {
          _this532.element.setAttribute('novalidate', '');

          _this532.inputElements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(_this532.selectQuery, _this532.element);

          _this532.createHTML5Rules();

          _this532.wireEvents();
        } else {
          return _possibleConstructorReturn(_this532, undefined);
        }

        return _this532;
      } // tslint:enable

      /**
       * Add validation rules to the corresponding input element based on `name` attribute.
       * @param {string} name `name` of form field.
       * @param {Object} rules Validation rules for the corresponding element.
       * @return {void}
       */


      _createClass2(FormValidator, [{
        key: "addRules",
        value: function addRules(name, rules) {
          if (name) {
            if (this.rules.hasOwnProperty(name)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.rules[name], rules, {});
            } else {
              this.rules[name] = rules;
            }
          }
        }
        /**
         * Remove validation to the corresponding field based on name attribute.
         * When no parameter is passed, remove all the validations in the form.
         * @param {string} name Input name attribute value.
         * @param {string[]} rules List of validation rules need to be remove from the corresponding element.
         * @return {void}
         */

      }, {
        key: "removeRules",
        value: function removeRules(name, rules) {
          if (!name && !rules) {
            this.rules = {};
          } else if (this.rules[name] && !rules) {
            delete this.rules[name];
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.rules[name] && rules)) {
            for (var i = 0; i < rules.length; i++) {
              delete this.rules[name][rules[i]];
            }
          } else {
            return;
          }
        }
        /**
         * Validate the current form values using defined rules.
         * Returns `true` when the form is valid otherwise `false`
         * @param {string} selected - Optional parameter to validate specified element.
         * @return {boolean}
         */

      }, {
        key: "validate",
        value: function validate(selected) {
          var rules = Object.keys(this.rules);

          if (selected && rules.length) {
            this.validateRules(selected); //filter the selected element it don't have any valid input element

            return rules.indexOf(selected) !== -1 && this.errorRules.filter(function (data) {
              return data.name === selected;
            }).length === 0;
          } else {
            this.errorRules = [];

            var _iterator105 = _createForOfIteratorHelper(rules),
                _step105;

            try {
              for (_iterator105.s(); !(_step105 = _iterator105.n()).done;) {
                var name = _step105.value;
                this.validateRules(name);
              }
            } catch (err) {
              _iterator105.e(err);
            } finally {
              _iterator105.f();
            }

            return this.errorRules.length === 0;
          }
        }
        /**
         * Reset the value of all the fields in form.
         * @return {void}
         */

      }, {
        key: "reset",
        value: function reset() {
          this.element.reset();
          this.clearForm();
        }
        /**
         * Get input element by name.
         * @param {string} name - Input element name attribute value.
         * @return {HTMLInputElement}
         */

      }, {
        key: "getInputElement",
        value: function getInputElement(name) {
          this.inputElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('[name="' + name + '"]', this.element);
          return this.inputElement;
        }
        /**
         * Destroy the form validator object and error elements.
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.reset();
          this.unwireEvents();
          this.rules = {};
          var elements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + this.errorClass + ', .' + this.validClass, this.element);

          var _iterator106 = _createForOfIteratorHelper(elements),
              _step106;

          try {
            for (_iterator106.s(); !(_step106 = _iterator106.n()).done;) {
              var element = _step106.value;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(element);
            }
          } catch (err) {
            _iterator106.e(err);
          } finally {
            _iterator106.f();
          }

          _get(_getPrototypeOf(FormValidator.prototype), "destroy", this).call(this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["onIntlChange"].off('notifyExternalChange', this.afterLocalization);
        }
        /**
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i102 = 0, _Object$keys35 = Object.keys(newProp); _i102 < _Object$keys35.length; _i102++) {
            var prop = _Object$keys35[_i102];

            switch (prop) {
              case 'locale':
                this.localeFunc();
                break;
            }
          }
        }
      }, {
        key: "localeFunc",

        /**
         * @private
         */
        value: function localeFunc() {
          for (var _i103 = 0, _Object$keys36 = Object.keys(this.defaultMessages); _i103 < _Object$keys36.length; _i103++) {
            var key = _Object$keys36[_i103];
            this.l10n.setLocale(this.locale);
            var value = this.l10n.getConstant(key);
            this.localyMessage[key] = value;
          }
        }
        /**
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'formValidator';
        }
        /**
         * @private
         */
        // tslint:disable-next-line:no-any

      }, {
        key: "afterLocalization",
        value: function afterLocalization(args) {
          this.locale = args.locale;
          this.localeFunc();
        }
        /**
         * Allows you to refresh the form validator base events to the elements inside the form.
         * @return {void}
         */

      }, {
        key: "refresh",
        value: function refresh() {
          this.unwireEvents();
          this.inputElements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(this.selectQuery, this.element);
          this.wireEvents();
        }
      }, {
        key: "clearForm",
        value: function clearForm() {
          this.errorRules = [];
          this.validated = [];
          var elements = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(this.selectQuery, this.element);

          var _iterator107 = _createForOfIteratorHelper(elements),
              _step107;

          try {
            for (_iterator107.s(); !(_step107 = _iterator107.n()).done;) {
              var element = _step107.value;
              var input = element;
              input.removeAttribute('aria-invalid');
              input.classList.remove(this.errorClass);

              if (input.name.length > 0) {
                this.getInputElement(input.name);
                this.getErrorElement(input.name);
                this.hideMessage(input.name);
              }

              input.classList.remove(this.validClass);
            }
          } catch (err) {
            _iterator107.e(err);
          } finally {
            _iterator107.f();
          }
        }
      }, {
        key: "createHTML5Rules",
        value: function createHTML5Rules() {
          var defRules = ['required', 'validateHidden', 'regex', 'rangeLength', 'maxLength', 'minLength', 'dateIso', 'digits', 'pattern', 'data-val-required', 'type', 'data-validation', 'min', 'max', 'range', 'equalTo', 'data-val-minlength-min', 'data-val-equalto-other', 'data-val-maxlength-max', 'data-val-range-min', 'data-val-regex-pattern', 'data-val-length-max', 'data-val-creditcard', 'data-val-phone'];
          var acceptedTypes = ['hidden', 'email', 'url', 'date', 'number', 'tel'];

          var _iterator108 = _createForOfIteratorHelper(this.inputElements),
              _step108;

          try {
            for (_iterator108.s(); !(_step108 = _iterator108.n()).done;) {
              var input = _step108.value;
              // Default attribute rules 
              var allRule = {};

              var _iterator109 = _createForOfIteratorHelper(defRules),
                  _step109;

              try {
                for (_iterator109.s(); !(_step109 = _iterator109.n()).done;) {
                  var rule = _step109.value;

                  if (input.getAttribute(rule) !== null) {
                    switch (rule) {
                      case 'required':
                        this.defRule(input, allRule, rule, input.required);
                        break;

                      case 'data-validation':
                        rule = input.getAttribute(rule);
                        this.defRule(input, allRule, rule, true);
                        break;

                      case 'type':
                        if (acceptedTypes.indexOf(input.type) !== -1) {
                          this.defRule(input, allRule, input.type, true);
                        }

                        break;

                      case 'rangeLength':
                      case 'range':
                        this.defRule(input, allRule, rule, JSON.parse(input.getAttribute(rule)));
                        break;

                      case 'equalTo':
                        var id = input.getAttribute(rule);
                        this.defRule(input, allRule, rule, id);
                        break;

                      default:
                        if (input.getAttribute('data-val') === 'true') {
                          this.annotationRule(input, allRule, rule, input.getAttribute(rule));
                        } else {
                          this.defRule(input, allRule, rule, input.getAttribute(rule));
                        }

                    }
                  }
                } //adding pattern type validation

              } catch (err) {
                _iterator109.e(err);
              } finally {
                _iterator109.f();
              }

              if (Object.keys(allRule).length !== 0) {
                this.addRules(input.name, allRule);
              }
            }
          } catch (err) {
            _iterator108.e(err);
          } finally {
            _iterator108.f();
          }
        }
      }, {
        key: "annotationRule",
        value: function annotationRule(input, ruleCon, ruleName, value) {
          var annotationRule = ruleName.split('-');
          var rulesList = ['required', 'creditcard', 'phone', 'maxlength', 'minlength', 'range', 'regex', 'equalto'];
          var ruleFirstName = annotationRule[annotationRule.length - 1];
          var ruleSecondName = annotationRule[annotationRule.length - 2];

          if (rulesList.indexOf(ruleFirstName) !== -1) {
            switch (ruleFirstName) {
              case 'required':
                this.defRule(input, ruleCon, 'required', value);
                break;

              case 'creditcard':
                this.defRule(input, ruleCon, 'creditcard', value);
                break;

              case 'phone':
                this.defRule(input, ruleCon, 'tel', value);
                break;
            }
          } else if (rulesList.indexOf(ruleSecondName) !== -1) {
            switch (ruleSecondName) {
              case 'maxlength':
                this.defRule(input, ruleCon, 'maxLength', value);
                break;

              case 'minlength':
                this.defRule(input, ruleCon, 'minLength', value);
                break;

              case 'range':
                var minvalue = input.getAttribute('data-val-range-min');
                var maxvalue = input.getAttribute('data-val-range-max');
                this.defRule(input, ruleCon, 'range', [minvalue, maxvalue]);
                break;

              case 'equalto':
                var id = input.getAttribute(ruleName).split('.');
                this.defRule(input, ruleCon, 'equalTo', id[id.length - 1]);
                break;

              case 'regex':
                this.defRule(input, ruleCon, 'regex', value);
                break;
            }
          }
        }
      }, {
        key: "defRule",
        value: function defRule(input, ruleCon, ruleName, value) {
          var message = input.getAttribute('data-' + ruleName + '-message');
          var annotationMessage = input.getAttribute('data-val-' + ruleName);
          var customMessage;

          if (this.rules[input.name] && ruleName !== 'validateHidden' && ruleName !== 'hidden') {
            this.getInputElement(input.name);
            customMessage = this.getErrorMessage(this.rules[input.name][ruleName], ruleName);
          }

          if (message) {
            value = [value, message];
          } else if (annotationMessage) {
            value = [value, annotationMessage];
          } else if (customMessage) {
            value = [value, customMessage];
          }

          ruleCon[ruleName] = value;
        } // Wire events to the form elements

      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var _iterator110 = _createForOfIteratorHelper(this.inputElements),
              _step110;

          try {
            for (_iterator110.s(); !(_step110 = _iterator110.n()).done;) {
              var input = _step110.value;

              if (FormValidator_1.isCheckable(input)) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(input, 'click', this.clickHandler, this);
              } else if (input.tagName === 'SELECT') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(input, 'change', this.changeHandler, this);
              } else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(input, 'focusout', this.focusOutHandler, this);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(input, 'keyup', this.keyUpHandler, this);
              }
            }
          } catch (err) {
            _iterator110.e(err);
          } finally {
            _iterator110.f();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'submit', this.submitHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'reset', this.resetHandler, this);
        } // UnWire events to the form elements

      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          var _iterator111 = _createForOfIteratorHelper(this.inputElements),
              _step111;

          try {
            for (_iterator111.s(); !(_step111 = _iterator111.n()).done;) {
              var input = _step111.value;

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(input);
            }
          } catch (err) {
            _iterator111.e(err);
          } finally {
            _iterator111.f();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'submit', this.submitHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'reset', this.resetHandler);
        } // Handle input element focusout event

      }, {
        key: "focusOutHandler",
        value: function focusOutHandler(e) {
          this.trigger('focusout', e); //FormValidator.triggerCallback(this.focusout, e);

          var element = e.target;

          if (this.rules[element.name]) {
            if (this.rules[element.name][this.required] || element.value.length > 0) {
              this.validate(element.name);
            } else if (this.validated.indexOf(element.name) === -1) {
              this.validated.push(element.name);
            }
          }
        } // Handle input element keyup event

      }, {
        key: "keyUpHandler",
        value: function keyUpHandler(e) {
          this.trigger('keyup', e);
          var element = e.target; // List of keys need to prevent while validation

          var excludeKeys = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225];

          if (e.which === 9 && (!this.rules[element.name] || this.rules[element.name] && !this.rules[element.name][this.required])) {
            return;
          }

          if (this.validated.indexOf(element.name) !== -1 && this.rules[element.name] && excludeKeys.indexOf(e.which) === -1) {
            this.validate(element.name);
          }
        } // Handle input click event

      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          this.trigger('click', e);
          var element = e.target; // If element type is not submit allow validation

          if (element.type !== 'submit') {
            this.validate(element.name);
          } else if (element.getAttribute('formnovalidate') !== null) {
            // Prevent form validation, if submit button has formnovalidate attribute
            this.allowSubmit = true;
          }
        } // Handle input change event

      }, {
        key: "changeHandler",
        value: function changeHandler(e) {
          this.trigger('change', e);
          var element = e.target;
          this.validate(element.name);
        } // Handle form submit event

      }, {
        key: "submitHandler",
        value: function submitHandler(e) {
          this.trigger('submit', e); //FormValidator.triggerCallback(this.submit, e);
          // Prevent form submit if validation failed

          if (!this.allowSubmit && !this.validate()) {
            e.preventDefault();
          } else {
            this.allowSubmit = false;
          }
        } // Handle form reset

      }, {
        key: "resetHandler",
        value: function resetHandler() {
          this.clearForm();
        } // Validate each rule based on input element name

      }, {
        key: "validateRules",
        value: function validateRules(name) {
          if (!this.rules[name]) {
            return;
          }

          var rules = Object.keys(this.rules[name]);
          var hiddenType = false;
          var validateHiddenType = false;
          var vhPos = rules.indexOf('validateHidden');
          var hPos = rules.indexOf('hidden');
          this.getInputElement(name);

          if (hPos !== -1) {
            hiddenType = true;
          }

          if (vhPos !== -1) {
            validateHiddenType = true;
          }

          if (!hiddenType || hiddenType && validateHiddenType) {
            if (vhPos !== -1) {
              rules.splice(vhPos, 1);
            }

            if (hPos !== -1) {
              rules.splice(hPos - 1, 1);
            }

            this.getErrorElement(name);

            var _iterator112 = _createForOfIteratorHelper(rules),
                _step112;

            try {
              for (_iterator112.s(); !(_step112 = _iterator112.n()).done;) {
                var rule = _step112.value;
                var errorMessage = this.getErrorMessage(this.rules[name][rule], rule);
                var errorRule = {
                  name: name,
                  message: errorMessage
                };
                var eventArgs = {
                  inputName: name,
                  element: this.inputElement,
                  message: errorMessage
                };

                if (!this.isValid(name, rule) && !this.inputElement.classList.contains(this.ignore)) {
                  this.removeErrorRules(name);
                  this.errorRules.push(errorRule); // Set aria attributes to invalid elements

                  this.inputElement.setAttribute('aria-invalid', 'true');
                  this.inputElement.setAttribute('aria-describedby', this.inputElement.id + '-info');
                  this.inputElement.classList.add(this.errorClass);
                  this.inputElement.classList.remove(this.validClass);

                  if (!this.infoElement) {
                    this.createErrorElement(name, errorRule.message, this.inputElement);
                  } else {
                    this.showMessage(errorRule);
                  }

                  eventArgs.errorElement = this.infoElement;
                  eventArgs.status = 'failure';
                  this.inputElement.classList.add(this.errorClass);
                  this.inputElement.classList.remove(this.validClass);
                  this.optionalValidationStatus(name, eventArgs);
                  this.trigger('validationComplete', eventArgs); // Set aria-required to required rule elements

                  if (rule === 'required') {
                    this.inputElement.setAttribute('aria-required', 'true');
                  }

                  break;
                } else {
                  this.hideMessage(name);
                  eventArgs.status = 'success';
                  this.trigger('validationComplete', eventArgs);
                }
              }
            } catch (err) {
              _iterator112.e(err);
            } finally {
              _iterator112.f();
            }
          } else {
            return;
          }
        } // Update the optional validation status

      }, {
        key: "optionalValidationStatus",
        value: function optionalValidationStatus(name, refer) {
          if (!this.rules[name][this.required] && !this.inputElement.value.length && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.infoElement)) {
            this.infoElement.innerHTML = this.inputElement.value;
            this.infoElement.setAttribute('aria-invalid', 'false');
            refer.status = '';
            this.hideMessage(name);
          }
        } // Check the input element whether it's value satisfy the validation rule or not

      }, {
        key: "isValid",
        value: function isValid(name, rule) {
          var params = this.rules[name][rule];
          var param = params instanceof Array && typeof params[1] === 'string' ? params[0] : params;
          var currentRule = this.rules[name][rule];
          var args = {
            value: this.inputElement.value,
            param: param,
            element: this.inputElement,
            formElement: this.element
          };
          this.trigger('validationBegin', args);

          if (currentRule && typeof currentRule[0] === 'function') {
            var fn = currentRule[0];
            return fn.call(this, {
              element: this.inputElement,
              value: this.inputElement.value
            });
          } else if (FormValidator_1.isCheckable(this.inputElement)) {
            if (rule !== 'required') {
              return true;
            }

            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('input[name=' + name + ']:checked', this.element).length > 0;
          } else {
            return FormValidator_1.checkValidator[rule](args);
          }
        } // Return default error message or custom error message 

      }, {
        key: "getErrorMessage",
        value: function getErrorMessage(ruleValue, rule) {
          var message = this.inputElement.getAttribute('data-' + rule + '-message') ? this.inputElement.getAttribute('data-' + rule + '-message') : ruleValue instanceof Array && typeof ruleValue[1] === 'string' ? ruleValue[1] : Object.keys(this.localyMessage).length !== 0 ? this.localyMessage[rule] : this.defaultMessages[rule];
          var formats = message.match(/{(\d)}/g);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(formats)) {
            for (var i = 0; i < formats.length; i++) {
              var value = ruleValue instanceof Array ? ruleValue[i] : ruleValue;
              message = message.replace(formats[i], value);
            }
          }

          return message;
        } // Create error element based on name and error message

      }, {
        key: "createErrorElement",
        value: function createErrorElement(name, message, input) {
          var errorElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])(this.errorElement, {
            className: this.errorClass,
            innerHTML: message,
            attrs: {
              "for": name
            }
          }); // Create message design if errorOption is message

          if (this.errorOption === ErrorOption.Message) {
            errorElement.classList.remove(this.errorClass);
            errorElement.classList.add('e-message');
            errorElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])(this.errorContainer, {
              className: this.errorClass,
              innerHTML: errorElement.outerHTML
            });
          }

          errorElement.id = this.inputElement.name + '-info'; // Append error message into MVC error message element

          if (this.element.querySelector('[data-valmsg-for="' + input.id + '"]')) {
            this.element.querySelector('[data-valmsg-for="' + input.id + '"]').appendChild(errorElement);
          } else if (input.hasAttribute('data-msg-containerid') === true) {
            // Append error message into custom div element
            var containerId = input.getAttribute('data-msg-containerid');
            var divElement = this.element.querySelector('#' + containerId);
            divElement.appendChild(errorElement);
          } else if (this.customPlacement != null) {
            // Call custom placement function if customPlacement is not null
            this.customPlacement.call(this, this.inputElement, errorElement);
          } else {
            this.inputElement.parentNode.insertBefore(errorElement, this.inputElement.nextSibling);
          }

          errorElement.style.display = 'block';
          this.getErrorElement(name);
          this.validated.push(name);
          this.checkRequired(name);
        } // Get error element by name

      }, {
        key: "getErrorElement",
        value: function getErrorElement(name) {
          this.infoElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(this.errorElement + '.' + this.errorClass, this.inputElement.parentElement);

          if (!this.infoElement) {
            this.infoElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(this.errorElement + '.' + this.errorClass + '[for="' + name + '"]', this.element);
          }

          return this.infoElement;
        } // Remove existing rule from errorRules object

      }, {
        key: "removeErrorRules",
        value: function removeErrorRules(name) {
          for (var i = 0; i < this.errorRules.length; i++) {
            var rule = this.errorRules[i];

            if (rule.name === name) {
              this.errorRules.splice(i, 1);
            }
          }
        } // Show error message to the input element

      }, {
        key: "showMessage",
        value: function showMessage(errorRule) {
          this.infoElement.style.display = 'block';
          this.infoElement.innerHTML = errorRule.message;
          this.checkRequired(errorRule.name);
        } // Hide error message based on input name

      }, {
        key: "hideMessage",
        value: function hideMessage(name) {
          if (this.infoElement) {
            this.infoElement.style.display = 'none';
            this.removeErrorRules(name);
            this.inputElement.classList.add(this.validClass);
            this.inputElement.classList.remove(this.errorClass);
            this.inputElement.setAttribute('aria-invalid', 'false');
          }
        } // Check whether the input element have required rule and its value is not empty

      }, {
        key: "checkRequired",
        value: function checkRequired(name) {
          if (!this.rules[name][this.required] && !this.inputElement.value.length && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.infoElement)) {
            this.infoElement.innerHTML = this.inputElement.value;
            this.infoElement.setAttribute('aria-invalid', 'false');
            this.hideMessage(name);
          }
        } // Return boolean result if the input have chekcable or submit types

      }], [{
        key: "isCheckable",
        value: function isCheckable(input) {
          var inputType = input.getAttribute('type');
          return inputType && (inputType === 'checkbox' || inputType === 'radio' || inputType === 'submit');
        }
      }]);

      return FormValidator;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Base"]); // List of function to validate the rules


    FormValidator.checkValidator = {
      required: function required(option) {
        return !isNaN(Date.parse(option.value)) ? !isNaN(new Date(option.value).getTime()) : option.value.toString().length > 0;
      },
      email: function email(option) {
        return regex.EMAIL.test(option.value);
      },
      url: function url(option) {
        return regex.URL.test(option.value);
      },
      dateIso: function dateIso(option) {
        return regex.DATE_ISO.test(option.value);
      },
      tel: function tel(option) {
        return regex.PHONE.test(option.value);
      },
      creditcard: function creditcard(option) {
        return regex.CREDITCARD.test(option.value);
      },
      number: function number(option) {
        return !isNaN(Number(option.value)) && option.value.indexOf(' ') === -1;
      },
      digits: function digits(option) {
        return regex.DIGITS.test(option.value);
      },
      maxLength: function maxLength(option) {
        return option.value.length <= option.param;
      },
      minLength: function minLength(option) {
        return option.value.length >= option.param;
      },
      rangeLength: function rangeLength(option) {
        var param = option.param;
        return option.value.length >= param[0] && option.value.length <= param[1];
      },
      range: function range(option) {
        var param = option.param;
        return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
      },
      date: function date(option) {
        return !isNaN(new Date(option.value).getTime());
      },
      max: function max(option) {
        if (!isNaN(Number(option.value))) {
          // Maximum rule validation for number
          return +option.value <= option.param;
        } // Maximum rule validation for date


        return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
      },
      min: function min(option) {
        if (!isNaN(Number(option.value))) {
          // Minimum rule validation for number
          return +option.value >= option.param;
        } else if (option.value.indexOf(',') !== -1) {
          var uNum = option.value.replace(/,/g, '');
          return parseFloat(uNum) >= option.param;
        } else {
          // Minimum rule validation for date
          return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();
        }
      },
      regex: function regex(option) {
        return new RegExp(option.param).test(option.value);
      },
      equalTo: function equalTo(option) {
        var compareTo = option.formElement.querySelector('#' + option.param);
        option.param = compareTo.value;
        return option.param === option.value;
      }
    };

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], FormValidator.prototype, "locale", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-hidden')], FormValidator.prototype, "ignore", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], FormValidator.prototype, "rules", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-error')], FormValidator.prototype, "errorClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('e-valid')], FormValidator.prototype, "validClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('label')], FormValidator.prototype, "errorElement", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('div')], FormValidator.prototype, "errorContainer", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(ErrorOption.Label)], FormValidator.prototype, "errorOption", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "focusout", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "keyup", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "click", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "change", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "submit", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "validationBegin", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "validationComplete", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], FormValidator.prototype, "customPlacement", void 0);

    FormValidator = FormValidator_1 = __decorate$3([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], FormValidator);
    /**
     * Input box Component
     */

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    };

    var CONTROL_WRAPPER = 'e-upload e-control-wrapper';
    var INPUT_WRAPPER = 'e-file-select';
    var DROP_AREA = 'e-file-drop';
    var DROP_WRAPPER = 'e-file-select-wrap';
    var LIST_PARENT = 'e-upload-files';
    var FILE = 'e-upload-file-list';
    var STATUS = 'e-file-status';
    var ACTION_BUTTONS = 'e-upload-actions';
    var UPLOAD_BUTTONS = 'e-file-upload-btn e-css e-btn e-flat e-primary';
    var CLEAR_BUTTONS = 'e-file-clear-btn e-css e-btn e-flat';
    var FILE_NAME = 'e-file-name';
    var FILE_TYPE = 'e-file-type';
    var FILE_SIZE = 'e-file-size';
    var REMOVE_ICON = 'e-file-remove-btn';
    var DELETE_ICON = 'e-file-delete-btn';
    var SPINNER_PANE = 'e-spinner-pane';
    var ABORT_ICON = 'e-file-abort-btn';
    var RETRY_ICON = 'e-file-reload-btn';
    var DRAG_HOVER = 'e-upload-drag-hover';
    var PROGRESS_WRAPPER = 'e-upload-progress-wrap';
    var PROGRESSBAR = 'e-upload-progress-bar';
    var PROGRESSBAR_TEXT = 'e-progress-bar-text';
    var UPLOAD_INPROGRESS = 'e-upload-progress';
    var UPLOAD_SUCCESS = 'e-upload-success';
    var UPLOAD_FAILED = 'e-upload-fails';
    var TEXT_CONTAINER = 'e-file-container';
    var VALIDATION_FAILS = 'e-validation-fails';
    var RTL = 'e-rtl';
    var DISABLED = 'e-disabled';
    var RTL_CONTAINER = 'e-rtl-container';
    var ICON_FOCUSED = 'e-clear-icon-focus';
    var PROGRESS_INNER_WRAPPER = 'e-progress-inner-wrap';
    var PAUSE_UPLOAD = 'e-file-pause-btn';
    var RESUME_UPLOAD = 'e-file-play-btn';
    var RESTRICT_RETRY = 'e-restrict-retry';
    var wrapperAttr$1 = ['title', 'style', 'class'];
    var FORM_UPLOAD = 'e-form-upload';
    var HIDDEN_INPUT = 'e-hidden-file-input';
    var INVALID_FILE = 'e-file-invalid';
    var INFORMATION = 'e-file-information';

    var FilesProp = /*#__PURE__*/function (_syncfusion_ej2_base_21) {
      _inherits(FilesProp, _syncfusion_ej2_base_21);

      var _super204 = _createSuper(FilesProp);

      function FilesProp() {
        _classCallCheck(this, FilesProp);

        return _super204.apply(this, arguments);
      }

      return FilesProp;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], FilesProp.prototype, "name", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], FilesProp.prototype, "size", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], FilesProp.prototype, "type", void 0);

    var ButtonsProps = /*#__PURE__*/function (_syncfusion_ej2_base_22) {
      _inherits(ButtonsProps, _syncfusion_ej2_base_22);

      var _super205 = _createSuper(ButtonsProps);

      function ButtonsProps() {
        _classCallCheck(this, ButtonsProps);

        return _super205.apply(this, arguments);
      }

      return ButtonsProps;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Browse...')], ButtonsProps.prototype, "browse", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Upload')], ButtonsProps.prototype, "upload", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Clear')], ButtonsProps.prototype, "clear", void 0);

    var AsyncSettings = /*#__PURE__*/function (_syncfusion_ej2_base_23) {
      _inherits(AsyncSettings, _syncfusion_ej2_base_23);

      var _super206 = _createSuper(AsyncSettings);

      function AsyncSettings() {
        _classCallCheck(this, AsyncSettings);

        return _super206.apply(this, arguments);
      }

      return AsyncSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], AsyncSettings.prototype, "saveUrl", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], AsyncSettings.prototype, "removeUrl", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], AsyncSettings.prototype, "chunkSize", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(3)], AsyncSettings.prototype, "retryCount", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(500)], AsyncSettings.prototype, "retryAfterDelay", void 0);
    /**
     * The uploader component allows to upload images, documents, and other files from local to server.
     * ```html
     * <input type='file' name='images[]' id='upload'/>
     * ```
     * ```typescript
     * <script>
     *   var uploadObj = new Uploader();
     *   uploadObj.appendTo('#upload');
     * </script>
     * ```
     */


    var Uploader = /*#__PURE__*/function (_syncfusion_ej2_base_24) {
      _inherits(Uploader, _syncfusion_ej2_base_24);

      var _super207 = _createSuper(Uploader);

      /**
       * Triggers when change the Uploader value.
       */
      function Uploader(options, element) {
        var _this533;

        _classCallCheck(this, Uploader);

        _this533 = _super207.call(this, options, element);
        _this533.initialAttr = {
          accept: null,
          multiple: false,
          disabled: false
        };
        _this533.uploadedFilesData = [];
        _this533.base64String = [];
        _this533.isForm = false;
        _this533.allTypes = false;
        _this533.pausedData = [];
        _this533.uploadMetaData = [];
        _this533.tabIndex = '0';
        _this533.btnTabIndex = '0';
        _this533.disableKeyboardNavigation = false;
        _this533.count = -1;
        _this533.actionCompleteCount = 0;
        _this533.flag = true;
        _this533.selectedFiles = [];
        _this533.uploaderName = 'UploadFiles';
        _this533.fileStreams = [];
        _this533.newFileRef = 0;
        _this533.isFirstFileOnSelection = false;
        /**
         * Get the file item(li) which are shown in file list.
         * @private
         */

        _this533.fileList = [];
        /**
         * Get the data of files which are shown in file list.
         * @private
         */

        _this533.filesData = [];
        _this533.uploaderOptions = options;
        return _this533;
      }
      /**
       * Calls internally if any of the property value is changed.
       * @private
       */


      _createClass2(Uploader, [{
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i104 = 0, _Object$keys37 = Object.keys(newProp); _i104 < _Object$keys37.length; _i104++) {
            var prop = _Object$keys37[_i104];

            switch (prop) {
              case 'allowedExtensions':
                this.setExtensions(this.allowedExtensions);
                this.clearAll();
                break;

              case 'enabled':
                this.setControlStatus();
                break;

              case 'multiple':
                this.setMultipleSelection();
                break;

              case 'enableRtl':
                this.setRTL();
                this.reRenderFileList();
                break;

              case 'buttons':
                this.buttons.browse = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons.browse) ? '' : this.buttons.browse;
                this.buttons.clear = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons.clear) ? '' : this.buttons.clear;
                this.buttons.upload = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons.upload) ? '' : this.buttons.upload;
                this.renderButtonTemplates();
                break;

              case 'dropArea':
                this.unBindDropEvents();
                this.updateDropArea();
                break;

              case 'htmlAttributes':
                this.updateHTMLAttrToElement();
                this.updateHTMLAttrToWrapper();
                this.checkHTMLAttributes(true);
                break;

              case 'files':
                this.renderPreLoadFiles();
                break;

              case 'directoryUpload':
                this.updateDirectoryAttributes();
                break;

              case 'template':
                if (!this.isServerBlazor) {
                  this.clearAll();
                }

                break;

              case 'minFileSize':
              case 'maxFileSize':
              case 'autoUpload':
                this.clearAll();
                break;

              case 'sequentialUpload':
                this.clearAll();
                break;

              case 'locale':
                this.l10n.setLocale(this.locale);
                this.setLocalizedTexts();
                this.preLocaleObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('currentLocale', this.l10n);
                break;

              case 'cssClass':
                this.setCSSClass(oldProp.cssClass);
                break;
            }
          }
        }
      }, {
        key: "setLocalizedTexts",
        value: function setLocalizedTexts() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
            if (typeof this.buttons.browse === 'string') {
              this.browseButton.innerText = this.buttons.browse === 'Browse...' ? this.localizedTexts('Browse') : this.buttons.browse;
              this.browseButton.setAttribute('title', this.browseButton.innerText);

              if (this.uploadWrapper && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploadWrapper.querySelector('.' + DROP_AREA))) {
                this.uploadWrapper.querySelector('.' + DROP_AREA).innerHTML = this.localizedTexts('dropFilesHint');
              }
            }

            this.updateFileList();
          }
        }
      }, {
        key: "getKeyValue",
        value: function getKeyValue(val) {
          var keyValue;

          for (var _i105 = 0, _Object$keys38 = Object.keys(this.preLocaleObj); _i105 < _Object$keys38.length; _i105++) {
            var key = _Object$keys38[_i105];

            if (this.preLocaleObj[key] === val) {
              keyValue = key;
            }
          }

          return keyValue;
        }
      }, {
        key: "updateFileList",
        value: function updateFileList() {
          var element;
          /* istanbul ignore next */

          if (this.fileList.length > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploadWrapper.querySelector('.' + LIST_PARENT))) {
            for (var i = 0; i < this.fileList.length; i++) {
              element = this.fileList[i].querySelector('.e-file-status');
              element.innerHTML = this.localizedTexts(this.getKeyValue(this.filesData[i].status));
              this.filesData[i].status = this.localizedTexts(this.getKeyValue(this.filesData[i].status));

              if (this.fileList[i].classList.contains(UPLOAD_SUCCESS)) {
                this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('delete'));
              }

              if (this.fileList[i].querySelector('.e-file-play-btn')) {
                this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('resume'));
              }

              if (this.fileList[i].querySelector('.e-file-remove-btn')) {
                this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('remove'));
              }

              if (this.fileList[i].querySelector('.e-file-reload-btn')) {
                this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('retry'));
              }

              if (!this.autoUpload) {
                this.uploadButton.innerText = this.buttons.upload === 'Upload' ? this.localizedTexts('Upload') : this.buttons.upload;
                this.uploadButton.setAttribute('title', this.localizedTexts('Upload'));
                this.clearButton.innerText = this.buttons.clear === 'Clear' ? this.localizedTexts('Clear') : this.buttons.clear;
                this.clearButton.setAttribute('title', this.localizedTexts('Clear'));
              }
            }
          }
        }
      }, {
        key: "reRenderFileList",
        value: function reRenderFileList() {
          if (this.listParent) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.listParent);
            this.listParent = null;
            this.fileList = [];
            this.createFileList(this.filesData);

            if (this.actionButtons) {
              this.removeActionButtons();
              this.renderActionButtons();
              this.checkActionButtonStatus();
            }
          }
        }
      }, {
        key: "preRender",
        value: function preRender() {
          this.localeText = {
            Browse: 'Browse...',
            Clear: 'Clear',
            Upload: 'Upload',
            dropFilesHint: 'Or drop files here',
            invalidMaxFileSize: 'File size is too large',
            invalidMinFileSize: 'File size is too small',
            invalidFileType: 'File type is not allowed',
            uploadFailedMessage: 'File failed to upload',
            uploadSuccessMessage: 'File uploaded successfully',
            removedSuccessMessage: 'File removed successfully',
            removedFailedMessage: 'Unable to remove file',
            inProgress: 'Uploading',
            readyToUploadMessage: 'Ready to upload',
            abort: 'Abort',
            remove: 'Remove',
            cancel: 'Cancel',
            "delete": 'Delete file',
            pauseUpload: 'File upload paused',
            pause: 'Pause',
            resume: 'Resume',
            retry: 'Retry',
            fileUploadCancel: 'File upload canceled',
            invalidFileSelection: 'Invalid files selected',
            totalFiles: 'Total files',
            size: 'Size'
          };
          this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('uploader', this.localeText, this.locale);
          this.preLocaleObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('currentLocale', this.l10n);
          this.isServerBlazor = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered ? true : false;
          this.isBlazorTemplate = this.isServerBlazor && this.template !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) ? true : false;
          this.isBlazorSaveUrl = this.isServerRendered && (this.asyncSettings.saveUrl === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.saveUrl)) ? true : false;

          if (this.isBlazorSaveUrl && this.sequentialUpload) {
            this.sequentialUpload = false;
          }

          if (!this.isBlazorSaveUrl) {
            this.formRendered();
          }

          if (!this.isServerBlazor) {
            this.updateHTMLAttrToElement();
            this.checkHTMLAttributes(false); // tslint:disable-next-line

            var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
            /* istanbul ignore next */

            if (this.element.tagName === 'EJS-UPLOADER') {
              var inputElement = this.createElement('input', {
                attrs: {
                  type: 'file'
                }
              });
              var index = 0;

              for (index; index < this.element.attributes.length; index++) {
                inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
                inputElement.innerHTML = this.element.innerHTML;
              }

              if (!inputElement.hasAttribute('name')) {
                inputElement.setAttribute('name', 'UploadFiles');
              }

              this.element.appendChild(inputElement);
              this.element = inputElement;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, this.element);
            }
            /* istanbul ignore next */


            if (ejInstance[0].isPureReactComponent) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ejInstance[0].props.name)) {
                this.element.setAttribute('name', ejInstance[0].props.name);
              } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ejInstance[0].props.id) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ejInstance[0].props.name)) {
                this.element.setAttribute('name', ejInstance[0].props.id);
              } else {
                this.element.setAttribute('name', 'UploadFiles');
              }
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute('name'))) {
              this.element.setAttribute('name', this.element.getAttribute('id'));
            }

            if (!this.element.hasAttribute('type')) {
              this.element.setAttribute('type', 'file');
            }

            this.updateDirectoryAttributes();
          }

          this.keyConfigs = {
            enter: 'enter'
          };

          if (this.element.hasAttribute('tabindex')) {
            this.tabIndex = this.element.getAttribute('tabindex');
          }

          this.browserName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
          this.uploaderName = this.element.getAttribute('name');
        }
      }, {
        key: "formRendered",
        value: function formRendered() {
          var parentEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentEle)) {
            for (; parentEle && parentEle !== document.documentElement; parentEle = parentEle.parentElement) {
              if (parentEle.tagName === 'FORM') {
                this.isForm = true;
                this.formElement = parentEle;
                parentEle.setAttribute('enctype', 'multipart/form-data');
                parentEle.setAttribute('encoding', 'multipart/form-data');
              }
            }
          }
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['filesData']);
        }
        /**
         * Return the module name of the component.
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'uploader';
        }
      }, {
        key: "updateDirectoryAttributes",
        value: function updateDirectoryAttributes() {
          if (this.directoryUpload) {
            this.element.setAttribute('directory', 'true');
            this.element.setAttribute('webkitdirectory', 'true');
          } else {
            this.element.removeAttribute('directory');
            this.element.removeAttribute('webkitdirectory');
          }
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (!this.isServerBlazor) {
            this.renderBrowseButton();
            this.initializeUpload();
            this.updateHTMLAttrToWrapper();
            this.wireEvents();
            this.setMultipleSelection();
            this.setExtensions(this.allowedExtensions);
            this.setRTL();
            this.renderPreLoadFiles();
            this.setControlStatus();
            this.setCSSClass();
          } else {
            this.dropAreaWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + DROP_WRAPPER);
            this.uploadWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.e-upload.e-control-wrapper');
            this.browseButton = this.dropAreaWrapper.querySelector('button.e-upload-browse-btn');
            this.setDropArea();
            this.renderPreLoadFiles();
            this.wireEvents();
          }

          this.renderComplete();
        }
      }, {
        key: "renderBrowseButton",
        value: function renderBrowseButton() {
          this.browseButton = this.createElement('button', {
            className: 'e-css e-btn',
            attrs: {
              'type': 'button'
            }
          });
          this.browseButton.setAttribute('tabindex', this.tabIndex);

          if (typeof this.buttons.browse === 'string') {
            this.browseButton.textContent = this.buttons.browse === 'Browse...' ? this.localizedTexts('Browse') : this.buttons.browse;
            this.browseButton.setAttribute('title', this.browseButton.innerText);
          } else {
            this.browseButton.appendChild(this.buttons.browse);
          }

          this.element.setAttribute('aria-label', 'Uploader');
        }
      }, {
        key: "renderActionButtons",
        value: function renderActionButtons() {
          this.element.setAttribute('tabindex', '-1');

          if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
            this.actionButtons = this.createElement('div', {
              className: ACTION_BUTTONS
            });
            this.uploadButton = this.createElement('button', {
              className: UPLOAD_BUTTONS,
              attrs: {
                'type': 'button',
                'tabindex': this.btnTabIndex
              }
            });
            this.clearButton = this.createElement('button', {
              className: CLEAR_BUTTONS,
              attrs: {
                'type': 'button',
                'tabindex': this.btnTabIndex
              }
            });
            this.actionButtons.appendChild(this.clearButton);
            this.actionButtons.appendChild(this.uploadButton);
            this.renderButtonTemplates();
            this.uploadWrapper.appendChild(this.actionButtons);
            this.browseButton.blur();
            this.uploadButton.focus();
            this.wireActionButtonEvents();
          }
        }
        /* istanbul ignore next */

      }, {
        key: "serverActionButtonsEventBind",
        value: function serverActionButtonsEventBind(element) {
          if (element && !this.isForm) {
            this.browseButton.blur();
            this.actionButtons = element;
            this.uploadButton = this.actionButtons.querySelector('.e-file-upload-btn');
            this.clearButton = this.actionButtons.querySelector('.e-file-clear-btn');
            this.uploadButton.focus();
            this.unwireActionButtonEvents();
            this.wireActionButtonEvents();
            this.checkActionButtonStatus();
          }
        }
        /* istanbul ignore next */

      }, {
        key: "serverUlElement",
        value: function serverUlElement(element) {
          if (element) {
            if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
              this.listParent = element;
              this.fileList = [].slice.call(this.listParent.querySelectorAll('li'));
              this.serverRemoveIconBindEvent();

              if (!this.isForm) {
                this.checkAutoUpload(this.filesData);
              }
            }
          }
        }
      }, {
        key: "wireActionButtonEvents",
        value: function wireActionButtonEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.uploadButton, 'click', this.uploadButtonClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.clearButton, 'click', this.clearButtonClick, this);
        }
      }, {
        key: "unwireActionButtonEvents",
        value: function unwireActionButtonEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.uploadButton, 'click', this.uploadButtonClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.clearButton, 'click', this.clearButtonClick);
        }
      }, {
        key: "removeActionButtons",
        value: function removeActionButtons() {
          if (this.actionButtons) {
            this.unwireActionButtonEvents();

            if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.actionButtons);
            }

            this.actionButtons = null;
          }
        }
      }, {
        key: "renderButtonTemplates",
        value: function renderButtonTemplates() {
          if (typeof this.buttons.browse === 'string') {
            this.browseButton.textContent = this.buttons.browse === 'Browse...' ? this.localizedTexts('Browse') : this.buttons.browse;
            this.browseButton.setAttribute('title', this.browseButton.textContent);
          } else {
            this.browseButton.innerHTML = '';
            this.browseButton.appendChild(this.buttons.browse);
          }

          if (this.uploadButton) {
            var uploadText;
            uploadText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons.upload) ? 'Upload' : this.buttons.upload;
            this.buttons.upload = uploadText;

            if (typeof this.buttons.upload === 'string') {
              this.uploadButton.textContent = this.buttons.upload === 'Upload' ? this.localizedTexts('Upload') : this.buttons.upload;
              this.uploadButton.setAttribute('title', this.uploadButton.textContent);
            } else {
              this.uploadButton.innerHTML = '';
              this.uploadButton.appendChild(this.buttons.upload);
            }
          }

          if (this.clearButton) {
            var clearText;
            clearText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons.clear) ? 'Clear' : this.buttons.clear;
            this.buttons.clear = clearText;

            if (typeof this.buttons.clear === 'string') {
              this.clearButton.textContent = this.buttons.clear === 'Clear' ? this.localizedTexts('Clear') : this.buttons.clear;
              this.clearButton.setAttribute('title', this.clearButton.textContent);
            } else {
              this.clearButton.innerHTML = '';
              this.clearButton.appendChild(this.buttons.clear);
            }
          }
        }
      }, {
        key: "initializeUpload",
        value: function initializeUpload() {
          this.element.setAttribute('tabindex', '-1');
          var inputWrapper = this.createElement('span', {
            className: INPUT_WRAPPER
          });
          this.element.parentElement.insertBefore(inputWrapper, this.element);
          this.dropAreaWrapper = this.createElement('div', {
            className: DROP_WRAPPER
          });
          this.element.parentElement.insertBefore(this.dropAreaWrapper, this.element);
          inputWrapper.appendChild(this.element);
          this.dropAreaWrapper.appendChild(this.browseButton);
          this.dropAreaWrapper.appendChild(inputWrapper);
          this.uploadWrapper = this.createElement('div', {
            className: CONTROL_WRAPPER
          });
          this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper);
          this.uploadWrapper.appendChild(this.dropAreaWrapper);
          this.setDropArea();
        }
      }, {
        key: "renderPreLoadFiles",
        value: function renderPreLoadFiles() {
          if (this.files.length) {
            if (this.enablePersistence && this.filesData.length) {
              this.createFileList(this.filesData);
              return;
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.files[0].size)) {
              return;
            }

            var files = [].slice.call(this.files);
            var filesData = [];

            if (!this.multiple) {
              this.clearData();
              files = [files[0]];
            }

            var _iterator113 = _createForOfIteratorHelper(files),
                _step113;

            try {
              for (_iterator113.s(); !(_step113 = _iterator113.n()).done;) {
                var data = _step113.value;
                var fileData = {
                  name: data.name + '.' + data.type.split('.')[data.type.split('.').length - 1],
                  rawFile: '',
                  size: data.size,
                  status: this.localizedTexts('uploadSuccessMessage'),
                  type: data.type,
                  validationMessages: {
                    minSize: '',
                    maxSize: ''
                  },
                  statusCode: '2'
                };
                filesData.push(fileData);
                this.filesData.push(fileData);
              }
            } catch (err) {
              _iterator113.e(err);
            } finally {
              _iterator113.f();
            }

            this.createFileList(filesData);

            if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {
              this.renderActionButtons();
            }

            this.checkActionButtonStatus();

            if (this.sequentialUpload) {
              this.count = this.filesData.length - 1;
            }
          }
        }
      }, {
        key: "checkActionButtonStatus",
        value: function checkActionButtonStatus() {
          if (this.actionButtons) {
            var length = this.uploadWrapper.querySelectorAll('.' + VALIDATION_FAILS).length + this.uploadWrapper.querySelectorAll('.e-upload-fails:not(.e-upload-progress)').length + this.uploadWrapper.querySelectorAll('span.' + UPLOAD_SUCCESS).length + this.uploadWrapper.querySelectorAll('span.' + UPLOAD_INPROGRESS).length;

            if (length > 0 && length === this.uploadWrapper.querySelectorAll('li').length) {
              this.uploadButton.setAttribute('disabled', 'disabled');
            } else {
              this.uploadButton.removeAttribute('disabled');
            }
          }
        }
      }, {
        key: "setDropArea",
        value: function setDropArea() {
          var dropTextArea = this.dropAreaWrapper.querySelector('.e-file-drop');

          if (this.dropArea) {
            this.dropZoneElement = typeof this.dropArea !== 'string' ? this.dropArea : document.querySelector(this.dropArea);
            var element = this.element;
            var enableDropText = false;

            while (element.parentNode) {
              element = element.parentNode;

              if (element === this.dropZoneElement) {
                enableDropText = true;

                if (!dropTextArea) {
                  this.createDropTextHint();
                } else if (!this.isServerBlazor) {
                  dropTextArea.innerHTML = this.localizedTexts('dropFilesHint');
                }
              }
            }

            if (!enableDropText && dropTextArea) {
              dropTextArea.remove();
            }
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploaderOptions) && this.uploaderOptions.dropArea === undefined) {
            this.createDropTextHint();
            this.dropZoneElement = this.uploadWrapper;
            this.setProperties({
              dropArea: this.uploadWrapper
            }, true);
          }

          this.bindDropEvents();
        }
      }, {
        key: "updateDropArea",
        value: function updateDropArea() {
          if (this.dropArea) {
            this.setDropArea();
          } else {
            this.dropZoneElement = null;
            var dropTextArea = this.dropAreaWrapper.querySelector('.e-file-drop');

            if (dropTextArea) {
              dropTextArea.remove();
            }
          }
        }
      }, {
        key: "createDropTextHint",
        value: function createDropTextHint() {
          if (!this.isServerBlazor) {
            var fileDropArea = this.createElement('span', {
              className: DROP_AREA
            });
            fileDropArea.innerHTML = this.localizedTexts('dropFilesHint');
            this.dropAreaWrapper.appendChild(fileDropArea);
          }
        }
      }, {
        key: "updateHTMLAttrToElement",
        value: function updateHTMLAttrToElement() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i106 = 0, _Object$keys39 = Object.keys(this.htmlAttributes); _i106 < _Object$keys39.length; _i106++) {
              var pro = _Object$keys39[_i106];

              if (wrapperAttr$1.indexOf(pro) < 0) {
                this.element.setAttribute(pro, this.htmlAttributes[pro]);
              }
            }
          }
        }
      }, {
        key: "updateHTMLAttrToWrapper",
        value: function updateHTMLAttrToWrapper() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i107 = 0, _Object$keys40 = Object.keys(this.htmlAttributes); _i107 < _Object$keys40.length; _i107++) {
              var pro = _Object$keys40[_i107];

              if (wrapperAttr$1.indexOf(pro) > -1) {
                if (pro === 'class') {
                  var updatedClassValues = this.htmlAttributes[pro].replace(/\s+/g, ' ').trim();

                  if (updatedClassValues !== '') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.uploadWrapper], updatedClassValues.split(' '));
                  }
                } else if (pro === 'style') {
                  var uploadStyle = this.uploadWrapper.getAttribute(pro);
                  uploadStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(uploadStyle) ? uploadStyle + this.htmlAttributes[pro] : this.htmlAttributes[pro];
                  this.uploadWrapper.setAttribute(pro, uploadStyle);
                } else {
                  this.uploadWrapper.setAttribute(pro, this.htmlAttributes[pro]);
                }
              }
            }
          }
        }
      }, {
        key: "setMultipleSelection",
        value: function setMultipleSelection() {
          if (this.multiple && !this.element.hasAttribute('multiple')) {
            var newAttr = document.createAttribute('multiple');
            newAttr.value = 'multiple';
            this.element.setAttributeNode(newAttr);
          } else if (!this.multiple) {
            this.element.removeAttribute('multiple');
          }
        }
      }, {
        key: "checkAutoUpload",
        value: function checkAutoUpload(fileData) {
          if (this.autoUpload) {
            if (this.sequentialUpload) {
              /* istanbul ignore next */
              this.sequenceUpload(fileData);
            } else {
              this.upload(fileData);
            }

            this.removeActionButtons();
          } else if (!this.actionButtons) {
            this.renderActionButtons();
          }

          this.checkActionButtonStatus();
        }
      }, {
        key: "sequenceUpload",
        value: function sequenceUpload(fileData) {
          if (this.filesData.length - fileData.length === 0 || this.filesData[this.filesData.length - fileData.length - 1].statusCode !== '1') {
            ++this.count;
            var isFileListCreated = this.showFileList ? false : true;

            if (typeof this.filesData[this.count] === 'object') {
              this.isFirstFileOnSelection = false;
              this.upload(this.filesData[this.count], isFileListCreated);

              if (this.filesData[this.count].statusCode === '0') {
                this.sequenceUpload(fileData);
              }
            } else {
              --this.count;
            }
          }
        }
      }, {
        key: "setCSSClass",
        value: function setCSSClass(oldCSSClass) {
          var updatedCssClassValue = this.cssClass;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            updatedCssClassValue = this.cssClass.replace(/\s+/g, ' ').trim();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && updatedCssClassValue !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));
          }

          var updatedOldCssClass = oldCSSClass;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldCSSClass)) {
            updatedOldCssClass = oldCSSClass.replace(/\s+/g, ' ').trim();
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldCSSClass) && updatedOldCssClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.uploadWrapper], updatedOldCssClass.split(' '));
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.browseButton, 'click', this.browseButtonClick, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'change', this.onSelectFiles, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'click', this.removeFocus, this);

          this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.uploadWrapper, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
          });

          if (this.isForm) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.resetForm, this);
          }
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.browseButton, 'click', this.browseButtonClick);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'change', this.onSelectFiles);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.removeFocus);

          if (this.isForm) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.resetForm);
          }

          this.keyboardModule.destroy();
        }
      }, {
        key: "resetForm",
        value: function resetForm() {
          this.clearAll();
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          var targetElement = e.target;

          switch (e.action) {
            case 'enter':
              if (e.target === this.clearButton) {
                this.clearButtonClick();
              } else if (e.target === this.uploadButton) {
                this.uploadButtonClick();
              } else if (e.target === this.browseButton) {
                this.browseButtonClick();
              } else if (targetElement.classList.contains(PAUSE_UPLOAD)) {
                var metaData = this.getCurrentMetaData(null, e);
                metaData.file.statusCode = '4';
                metaData.file.status = this.localizedTexts('pauseUpload');
                this.abortUpload(metaData, false);
              } else if (targetElement.classList.contains(RESUME_UPLOAD)) {
                this.resumeUpload(this.getCurrentMetaData(null, e), e);
              } else if (targetElement.classList.contains(RETRY_ICON)) {
                var _metaData = this.getCurrentMetaData(null, e);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_metaData)) {
                  _metaData.file.statusCode = '1';
                  _metaData.file.status = this.localizedTexts('readyToUploadMessage');
                  this.chunkUpload(_metaData.file);
                } else {
                  var target = e.target.parentElement;
                  var fileData = this.filesData[this.fileList.indexOf(target)];
                  this.retry(fileData);
                }
              } else {
                this.removeFiles(e);

                if (!targetElement.classList.contains(ABORT_ICON)) {
                  this.browseButton.focus();
                }
              }

              e.preventDefault();
              e.stopPropagation();
              break;
          }
        }
      }, {
        key: "getCurrentMetaData",
        value: function getCurrentMetaData(fileInfo, e) {
          var fileData;
          var targetMetaData;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileInfo)) {
            var target = e.target.parentElement;
            fileData = this.filesData[this.fileList.indexOf(target)];
          } else {
            fileData = fileInfo;
          }

          for (var i = 0; i < this.uploadMetaData.length; i++) {
            if (this.uploadMetaData[i].file.name === fileData.name) {
              targetMetaData = this.uploadMetaData[i];
            }
          }

          return targetMetaData;
        }
      }, {
        key: "removeFocus",
        value: function removeFocus() {
          if (this.uploadWrapper && this.listParent && this.listParent.querySelector('.' + ICON_FOCUSED)) {
            document.activeElement.blur();
            this.listParent.querySelector('.' + ICON_FOCUSED).classList.remove(ICON_FOCUSED);
          }
        }
      }, {
        key: "browseButtonClick",
        value: function browseButtonClick() {
          this.element.click();
        }
      }, {
        key: "uploadButtonClick",
        value: function uploadButtonClick() {
          if (this.sequentialUpload) {
            this.sequenceUpload(this.filesData);
          } else {
            this.upload(this.filesData);
          }
        }
      }, {
        key: "clearButtonClick",
        value: function clearButtonClick() {
          this.clearAll();
          /* istanbul ignore next */

          if (this.sequentialUpload) {
            this.count = -1;
          }

          this.actionCompleteCount = 0;
        }
      }, {
        key: "bindDropEvents",
        value: function bindDropEvents() {
          if (this.dropZoneElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dropZoneElement, 'drop', this.dropElement, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dropZoneElement, 'dragover', this.dragHover, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dropZoneElement, 'dragleave', this.onDragLeave, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dropZoneElement, 'paste', this.onPasteFile, this);
          }
        }
      }, {
        key: "unBindDropEvents",
        value: function unBindDropEvents() {
          if (this.dropZoneElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dropZoneElement, 'drop', this.dropElement);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dropZoneElement, 'dragover', this.dragHover);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dropZoneElement, 'dragleave', this.onDragLeave);
          }
        }
      }, {
        key: "onDragLeave",
        value: function onDragLeave(e) {
          this.dropZoneElement.classList.remove(DRAG_HOVER);
        }
      }, {
        key: "dragHover",
        value: function dragHover(e) {
          if (!this.enabled) {
            return;
          }

          this.dropZoneElement.classList.add(DRAG_HOVER);

          if (this.dropEffect !== 'Default') {
            e.dataTransfer.dropEffect = this.dropEffect.toLowerCase();
          }

          e.preventDefault();
          e.stopPropagation();
        }
        /* istanbul ignore next */

      }, {
        key: "dropElement",
        value: function dropElement(e) {
          this.dropZoneElement.classList.remove(DRAG_HOVER);
          this.onSelectFiles(e);
          e.preventDefault();
          e.stopPropagation();
        }
        /* istanbul ignore next */

      }, {
        key: "onPasteFile",
        value: function onPasteFile(event) {
          var item = event.clipboardData.items;

          if (item.length !== 1) {
            return;
          }

          var pasteFile = [].slice.call(item)[0];

          if (pasteFile.kind === 'file' && pasteFile.type.match('^image/')) {
            this.renderSelectedFiles(event, [pasteFile.getAsFile()], false, true);
          }
        }
      }, {
        key: "getSelectedFiles",
        value: function getSelectedFiles(index) {
          var data = [];
          var liElement = this.fileList[index];
          var allFiles = this.getFilesData();
          var nameElements = +liElement.getAttribute('data-files-count');
          var startIndex = 0;

          for (var i = 0; i < index; i++) {
            startIndex += +this.fileList[i].getAttribute('data-files-count');
          }

          for (var j = startIndex; j < startIndex + nameElements; j++) {
            data.push(allFiles[j]);
          }

          return data;
        }
      }, {
        key: "removeFiles",
        value: function removeFiles(args) {
          if (!this.enabled) {
            return;
          }

          var selectedElement = args.target.parentElement;

          if (this.isBlazorSaveUrl) {
            this.fileList = [].slice.call(this.uploadWrapper.querySelectorAll('li'));
          }

          var index = this.fileList.indexOf(selectedElement);
          var liElement = this.fileList[index];
          var formUpload = this.isFormUpload();
          var fileData = formUpload ? this.getSelectedFiles(index) : this.getFilesInArray(this.filesData[index]);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileData)) {
            return;
          }

          if (args.target.classList.contains(ABORT_ICON) && !formUpload) {
            fileData[0].statusCode = '5';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
              var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);
              Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["createSpinner"])({
                target: spinnerTarget,
                width: '20px'
              });
              Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["showSpinner"])(spinnerTarget);
            }

            if (this.sequentialUpload) {
              /* istanbul ignore next */
              this.uploadSequential();
            }

            if (!liElement.classList.contains(RESTRICT_RETRY)) {
              this.checkActionComplete(true);
            }
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(args.target, '.' + SPINNER_PANE)) {
            this.remove(fileData, false, false, true, args);
          }

          this.element.value = '';
          this.checkActionButtonStatus();
        }
      }, {
        key: "removeFilesData",
        value: function removeFilesData(file, customTemplate) {
          var index;

          if (customTemplate) {
            if (!this.showFileList) {
              index = this.filesData.indexOf(file);
              this.filesData.splice(index, 1);
            }

            return;
          }

          var selectedElement = this.getLiElement(file);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedElement)) {
            return;
          }

          if (!this.isBlazorSaveUrl) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(selectedElement);
          }

          index = this.fileList.indexOf(selectedElement);
          this.fileList.splice(index, 1);
          this.filesData.splice(index, 1);

          if (!this.isBlazorSaveUrl) {
            if (this.fileList.length === 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listParent)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.listParent);
              this.listParent = null;
              this.removeActionButtons();
            }

            if (this.sequentialUpload) {
              /* istanbul ignore next */
              if (index <= this.count) {
                --this.count;
              }
            }
          } else {
            // tslint:disable-next-line
            this.interopAdaptor.invokeMethodAsync('removeFileData', index);
          }
        }
      }, {
        key: "removeUploadedFile",
        value: function removeUploadedFile(file, eventArgs, removeDirectly, custom) {
          var _this534 = this;

          var selectedFiles = file;
          var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](this.asyncSettings.removeUrl, 'POST', true, null);
          ajax.emitError = false;
          var formData = new FormData();

          ajax.beforeSend = function (e) {
            eventArgs.currentRequest = ajax.httpRequest;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              if (_this534.currentRequestHeader) {
                _this534.updateCustomheader(ajax.httpRequest, _this534.currentRequestHeader);
              }

              if (_this534.customFormDatas) {
                _this534.updateFormData(formData, _this534.customFormDatas);
              }
            }

            if (!removeDirectly) {
              _this534.trigger('removing', eventArgs, function (eventArgs) {
                if (eventArgs.cancel) {
                  e.cancel = true;
                } else {
                  _this534.removingEventCallback(eventArgs, formData, selectedFiles, file);
                }
              });
            } else {
              _this534.removingEventCallback(eventArgs, formData, selectedFiles, file);
            }
          };

          if (this.isServerBlazor) {
            var name = this.element.getAttribute('name');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
              formData.append(name, selectedFiles.rawFile, selectedFiles.name);
            } else {
              formData.append(name, selectedFiles.name);
            }
          }

          ajax.onLoad = function (e) {
            _this534.removeCompleted(e, selectedFiles, custom);

            return {};
          };
          /* istanbul ignore next */


          ajax.onError = function (e) {
            _this534.removeFailed(e, selectedFiles, custom);

            return {};
          };

          ajax.send(formData);
        }
      }, {
        key: "removingEventCallback",
        value: function removingEventCallback(eventArgs, formData, selectedFiles, file) {
          /* istanbul ignore next */
          var name = this.element.getAttribute('name');
          var liElement = this.getLiElement(file);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + DELETE_ICON)) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + REMOVE_ICON)))) {
            var spinnerTarget;
            spinnerTarget = liElement.querySelector('.' + DELETE_ICON) ? liElement.querySelector('.' + DELETE_ICON) : liElement.querySelector('.' + REMOVE_ICON);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["createSpinner"])({
              target: spinnerTarget,
              width: '20px'
            });
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["showSpinner"])(spinnerTarget);
          }

          if (!this.isServerBlazor) {
            if (eventArgs.postRawFile && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
              formData.append(name, selectedFiles.rawFile, selectedFiles.name);
            } else {
              formData.append(name, selectedFiles.name);
            }

            this.updateFormData(formData, eventArgs.customFormData);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "updateFormData",
        value: function updateFormData(formData, customData) {
          if (customData.length > 0 && customData[0]) {
            var _loop19 = function _loop19(i) {
              var data = customData[i]; // tslint:disable-next-line

              var value = Object.keys(data).map(function (e) {
                return data[e];
              });
              formData.append(Object.keys(data)[0], value);
            };

            for (var i = 0; i < customData.length; i++) {
              _loop19(i);
            }
          }
        }
        /* istanbul ignore next */

      }, {
        key: "updateCustomheader",
        value: function updateCustomheader(request, currentRequest) {
          if (currentRequest.length > 0 && currentRequest[0]) {
            var _loop20 = function _loop20(i) {
              var data = currentRequest[i]; // tslint:disable-next-line

              var value = Object.keys(data).map(function (e) {
                return data[e];
              });
              request.setRequestHeader(Object.keys(data)[0], value);
            };

            for (var i = 0; i < currentRequest.length; i++) {
              _loop20(i);
            }
          }
        }
      }, {
        key: "removeCompleted",
        value: function removeCompleted(e, files, customTemplate) {
          var response = e && e.currentTarget ? this.getResponse(e) : null;
          var args = {
            e: e,
            response: response,
            operation: 'remove',
            file: this.updateStatus(files, this.localizedTexts('removedSuccessMessage'), '2')
          };
          this.trigger('success', args);
          this.removeFilesData(files, customTemplate);
          var index = this.uploadedFilesData.indexOf(files);
          this.uploadedFilesData.splice(index, 1);
          this.trigger('change', {
            files: this.uploadedFilesData
          });
        }
      }, {
        key: "removeFailed",
        value: function removeFailed(e, files, customTemplate) {
          var response = e && e.currentTarget ? this.getResponse(e) : null;
          var args = {
            e: e,
            response: response,
            operation: 'remove',
            file: this.updateStatus(files, this.localizedTexts('removedFailedMessage'), '0')
          };

          if (!customTemplate) {
            var index = this.filesData.indexOf(files);
            var rootElement = this.fileList[index];

            if (rootElement) {
              rootElement.classList.remove(UPLOAD_SUCCESS);
              rootElement.classList.add(UPLOAD_FAILED);
              var statusElement = rootElement.querySelector('.' + STATUS);

              if (statusElement) {
                statusElement.classList.remove(UPLOAD_SUCCESS);
                statusElement.classList.add(UPLOAD_FAILED);
              }
            }

            this.checkActionButtonStatus();
          }

          this.trigger('failure', args);
          var liElement = this.getLiElement(files);
          /* istanbul ignore next */

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + DELETE_ICON))) {
            var spinnerTarget = liElement.querySelector('.' + DELETE_ICON);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(spinnerTarget);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.e-spinner-pane'));
          }
        }
        /* istanbul ignore next */

      }, {
        key: "getFilesFromFolder",
        value: function getFilesFromFolder(event) {
          var _this535 = this;

          this.filesEntries = [];
          var items;
          items = this.multiple ? event.dataTransfer.items : [event.dataTransfer.items[0]];
          var validDirectoryUpload = this.checkDirectoryUpload(items);

          if (!validDirectoryUpload) {
            return;
          }

          var _loop21 = function _loop21(i) {
            // tslint:disable-next-line
            var item = items[i].webkitGetAsEntry();

            if (item.isFile) {
              var files = []; // tslint:disable-next-line

              item.file(function (fileObj) {
                var path = item.fullPath;
                files.push({
                  'path': path,
                  'file': fileObj
                });
              });

              _this535.renderSelectedFiles(event, files, true);
            } else if (item.isDirectory) {
              _this535.traverseFileTree(item, event);
            }
          };

          for (var i = 0; i < items.length; i++) {
            _loop21(i);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "checkDirectoryUpload",
        value: function checkDirectoryUpload(items) {
          for (var i = 0; items && i < items.length; i++) {
            // tslint:disable-next-line
            var item = items[i].webkitGetAsEntry();

            if (item.isDirectory) {
              return true;
            }
          }

          return false;
        } // tslint:disable

        /* istanbul ignore next */

      }, {
        key: "traverseFileTree",
        value: function traverseFileTree(item, event) {
          if (item.isFile) {
            this.filesEntries.push(item);
          } else if (item.isDirectory) {
            // tslint:disable-next-line
            var directoryReader = item.createReader(); // tslint:disable-next-line

            this.readFileFromDirectory(directoryReader, event);
          }
        } // tslint:disable

        /* istanbul ignore next */

      }, {
        key: "readFileFromDirectory",
        value: function readFileFromDirectory(directoryReader, event) {
          var _this536 = this;

          // tslint:disable-next-line
          directoryReader.readEntries(function (entries) {
            for (var i = 0; i < entries.length; i++) {
              _this536.traverseFileTree(entries[i]); // tslint:disable-next-line

            }

            _this536.pushFilesEntries(event);

            if (entries.length) {
              _this536.readFileFromDirectory(directoryReader);
            }
          });
        }
      }, {
        key: "pushFilesEntries",
        value: function pushFilesEntries(event) {
          var _this537 = this;

          var files = [];

          var _loop22 = function _loop22(i) {
            // tslint:disable-next-line
            _this537.filesEntries[i].file(function (fileObj) {
              if (_this537.filesEntries) {
                var path = _this537.filesEntries[i].fullPath;
                files.push({
                  'path': path,
                  'file': fileObj
                });

                if (i === _this537.filesEntries.length - 1) {
                  _this537.filesEntries = [];

                  _this537.renderSelectedFiles(event, files, true);
                }
              }
            });
          };

          for (var i = 0; i < this.filesEntries.length; i++) {
            _loop22(i);
          }
        } // tslint:enable

      }, {
        key: "onSelectFiles",
        value: function onSelectFiles(args) {
          if (!this.enabled) {
            return;
          }

          var targetFiles;
          /* istanbul ignore next */

          if (args.type === 'drop') {
            if (this.directoryUpload) {
              this.getFilesFromFolder(args);
            } else {
              var files = this.sortFilesList = args.dataTransfer.files;

              if (this.browserName !== 'msie' && this.browserName !== 'edge') {
                this.element.files = files;
              }

              targetFiles = this.multiple ? this.sortFileList(files) : [files[0]];
              this.renderSelectedFiles(args, targetFiles);
            }
          } else {
            targetFiles = [].slice.call(args.target.files);
            this.renderSelectedFiles(args, targetFiles);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "getBase64",
        value: function getBase64(file) {
          return new Promise(function (resolve, reject) {
            var fileReader = new FileReader();
            fileReader.readAsDataURL(file);

            fileReader.onload = function () {
              return resolve(fileReader.result);
            };

            fileReader.onerror = function (error) {
              return reject(error);
            };
          });
        }
        /* istanbul ignore next */

        /* tslint:ignore */

      }, {
        key: "renderSelectedFiles",
        value: function renderSelectedFiles(args, // tslint:disable-next-line
        targetFiles, directory, paste) {
          var _this538 = this;

          this.base64String = []; // tslint:disable-next-line

          var eventArgs = {
            event: args,
            cancel: false,
            filesData: [],
            isModified: false,
            modifiedFilesData: [],
            progressInterval: '',
            isCanceled: false,
            currentRequest: null,
            customFormData: null
          };
          /* istanbul ignore next */

          if (targetFiles.length < 1) {
            eventArgs.isCanceled = true;
            this.trigger('selected', eventArgs);
            return;
          }

          this.flag = true;
          var fileData = [];

          if (!this.multiple) {
            this.clearData(true);
            targetFiles = [targetFiles[0]];
          }

          for (var i = 0; i < targetFiles.length; i++) {
            var file = directory ? targetFiles[i].file : targetFiles[i];
            this.updateInitialFileDetails(args, targetFiles, file, i, fileData, directory, paste);
          }

          eventArgs.filesData = fileData;

          if (this.allowedExtensions.indexOf('*') > -1) {
            this.allTypes = true;
          }

          if (!this.allTypes) {
            fileData = this.checkExtension(fileData);
          }

          this.trigger('selected', eventArgs, function (eventArgs) {
            _this538._internalRenderSelect(eventArgs, fileData);
          });
        }
      }, {
        key: "updateInitialFileDetails",
        value: function updateInitialFileDetails(args, // tslint:disable-next-line
        targetFiles, file, i, fileData, directory, paste) {
          var fileName = directory ? targetFiles[i].path.substring(1, targetFiles[i].path.length) : paste ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(file.name.substring(0, file.name.lastIndexOf('.'))) + '.' + this.getFileType(file.name) : this.directoryUpload ? targetFiles[i].webkitRelativePath : file.name;
          var fileDetails = {
            name: fileName,
            rawFile: file,
            size: file.size,
            status: this.localizedTexts('readyToUploadMessage'),
            type: this.getFileType(file.name),
            validationMessages: this.validatedFileSize(file.size),
            statusCode: '1',
            id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(file.name.substring(0, file.name.lastIndexOf('.'))) + '.' + this.getFileType(file.name)
          };
          /* istanbul ignore next */

          if (paste) {
            fileDetails.fileSource = 'paste';
          }

          fileDetails.status = fileDetails.validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') : fileDetails.validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : fileDetails.status;

          if (fileDetails.validationMessages.minSize !== '' || fileDetails.validationMessages.maxSize !== '') {
            fileDetails.statusCode = '0';
          }

          fileData.push(fileDetails);
        }
      }, {
        key: "_internalRenderSelect",
        value: function _internalRenderSelect(eventArgs, fileData) {
          if (!eventArgs.cancel) {
            /* istanbul ignore next */
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.currentRequestHeader = eventArgs.currentRequest;
              this.customFormDatas = eventArgs.customFormData;
            }

            this.selectedFiles = this.selectedFiles.concat(fileData);
            this.btnTabIndex = this.disableKeyboardNavigation ? '-1' : '0';

            if (this.showFileList) {
              if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {
                for (var j = 0; j < eventArgs.modifiedFilesData.length; j++) {
                  for (var k = 0; k < fileData.length; k++) {
                    if (eventArgs.modifiedFilesData[j].id === fileData[k].id) {
                      eventArgs.modifiedFilesData[j].rawFile = fileData[k].rawFile;
                    }
                  }
                }

                var dataFiles = this.allTypes ? eventArgs.modifiedFilesData : this.checkExtension(eventArgs.modifiedFilesData);
                this.updateSortedFileList(dataFiles);
                this.filesData = dataFiles;

                if (!this.isForm || this.allowUpload()) {
                  this.checkAutoUpload(dataFiles);
                }
              } else {
                this.createFileList(fileData, true);

                if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
                  this.filesData = this.filesData.concat(fileData);
                }

                if (!this.isForm || this.allowUpload()) {
                  if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
                    this.checkAutoUpload(fileData);
                  }
                }
              }

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eventArgs.progressInterval) && eventArgs.progressInterval !== '') {
                this.progressInterval = eventArgs.progressInterval;
              }
            } else {
              this.filesData = this.filesData.concat(fileData);

              if (this.isBlazorSaveUrl) {
                // tslint:disable-next-line
                this.interopAdaptor.invokeMethodAsync('updateServerFileData', this.filesData, this.isForm);
              }

              if (this.autoUpload) {
                this.upload(this.filesData, true);
              }
            }

            this.raiseActionComplete();
            this.isFirstFileOnSelection = true;
          }
        }
      }, {
        key: "allowUpload",
        value: function allowUpload() {
          var allowFormUpload = false;

          if (this.isForm && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.saveUrl) && this.asyncSettings.saveUrl !== '') {
            allowFormUpload = true;
          }

          return allowFormUpload;
        }
      }, {
        key: "isFormUpload",
        value: function isFormUpload() {
          var isFormUpload = false;

          if (this.isForm && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.saveUrl) || this.asyncSettings.saveUrl === '') && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.removeUrl) || this.asyncSettings.removeUrl === '')) {
            isFormUpload = true;
          }

          return isFormUpload;
        }
      }, {
        key: "clearData",
        value: function clearData(singleUpload) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listParent) && !(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.listParent);
            this.listParent = null;
          }

          if (this.browserName !== 'msie' && !singleUpload) {
            this.element.value = '';
          }

          this.fileList = [];
          this.filesData = [];

          if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
            // tslint:disable-next-line
            this.interopAdaptor.invokeMethodAsync('clearAll');
          } else {
            this.removeActionButtons();
          }
        }
      }, {
        key: "updateSortedFileList",
        value: function updateSortedFileList(filesData) {
          var previousListClone = this.createElement('div', {
            id: 'clonewrapper'
          });
          var added = -1;
          var removedList;

          if (this.listParent) {
            for (var i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
              var liElement = this.listParent.querySelectorAll('li')[i];
              previousListClone.appendChild(liElement.cloneNode(true));
            }

            removedList = this.listParent.querySelectorAll('li');

            var _iterator114 = _createForOfIteratorHelper(removedList),
                _step114;

            try {
              for (_iterator114.s(); !(_step114 = _iterator114.n()).done;) {
                var item = _step114.value;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(item);
              }
            } catch (err) {
              _iterator114.e(err);
            } finally {
              _iterator114.f();
            }

            this.removeActionButtons();
            var oldList = [].slice.call(previousListClone.childNodes);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.listParent);
            this.listParent = null;
            this.fileList = [];
            this.createParentUL();

            for (var index = 0; index < filesData.length; index++) {
              for (var j = 0; j < this.filesData.length; j++) {
                if (this.filesData[j].name === filesData[index].name) {
                  this.listParent.appendChild(oldList[j]);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(oldList[j].querySelector('.e-icons'), 'click', this.removeFiles, this);

                  this.fileList.push(oldList[j]);
                  added = index;
                }
              }

              if (added !== index) {
                this.createFileList([filesData[index]]);
              }
            }
          } else {
            this.createFileList(filesData);
          }
        }
      }, {
        key: "isBlank",
        value: function isBlank(str) {
          return !str || /^\s*$/.test(str);
        }
      }, {
        key: "checkExtension",
        value: function checkExtension(files) {
          var dropFiles = files;

          if (!this.isBlank(this.allowedExtensions)) {
            var allowedExtensions = [];
            var extensions = this.allowedExtensions.split(',');

            var _iterator115 = _createForOfIteratorHelper(extensions),
                _step115;

            try {
              for (_iterator115.s(); !(_step115 = _iterator115.n()).done;) {
                var extension = _step115.value;
                allowedExtensions.push(extension.trim().toLocaleLowerCase());
              }
            } catch (err) {
              _iterator115.e(err);
            } finally {
              _iterator115.f();
            }

            for (var i = 0; i < files.length; i++) {
              if (allowedExtensions.indexOf(('.' + files[i].type).toLocaleLowerCase()) === -1) {
                files[i].status = this.localizedTexts('invalidFileType');
                files[i].statusCode = '0';
              }
            }
          }

          return dropFiles;
        }
      }, {
        key: "validatedFileSize",
        value: function validatedFileSize(fileSize) {
          var minSizeError = '';
          var maxSizeError = '';

          if (fileSize < this.minFileSize) {
            minSizeError = this.localizedTexts('invalidMinFileSize');
          } else if (fileSize > this.maxFileSize) {
            maxSizeError = this.localizedTexts('invalidMaxFileSize');
          } else {
            minSizeError = '';
            maxSizeError = '';
          }

          var errorMessage = {
            minSize: minSizeError,
            maxSize: maxSizeError
          };
          return errorMessage;
        }
      }, {
        key: "isPreLoadFile",
        value: function isPreLoadFile(fileData) {
          var isPreload = false;

          for (var i = 0; i < this.files.length; i++) {
            if (this.files[i].name === fileData.name.slice(0, fileData.name.lastIndexOf('.')) && this.files[i].type === fileData.type) {
              isPreload = true;
            }
          }

          return isPreload;
        }
      }, {
        key: "createCustomfileList",
        value: function createCustomfileList(fileData) {
          this.createParentUL();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'Template', 'Template');

          var _iterator116 = _createForOfIteratorHelper(fileData),
              _step116;

          try {
            for (_iterator116.s(); !(_step116 = _iterator116.n()).done;) {
              var listItem = _step116.value;
              var liElement = this.createElement('li', {
                className: FILE,
                attrs: {
                  'data-file-name': listItem.name
                }
              });
              this.uploadTemplateFn = this.templateComplier(this.template);
              var fromElements = [].slice.call(this.uploadTemplateFn(listItem, this, 'template', this.element.id + 'Template', this.isStringTemplate));
              var index = fileData.indexOf(listItem);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(fromElements, liElement);
              var eventArgs = {
                element: liElement,
                fileInfo: listItem,
                index: index,
                isPreload: this.isPreLoadFile(listItem)
              };
              var eventsArgs = {
                element: liElement,
                fileInfo: listItem,
                index: index,
                isPreload: this.isPreLoadFile(listItem)
              };
              this.trigger('rendering', eventArgs);
              this.trigger('fileListRendering', eventsArgs);
              this.listParent.appendChild(liElement);
              this.fileList.push(liElement);
            }
          } catch (err) {
            _iterator116.e(err);
          } finally {
            _iterator116.f();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'Template', 'Template', this, false);
        }
      }, {
        key: "createParentUL",
        value: function createParentUL() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listParent)) {
            this.listParent = this.createElement('ul', {
              className: LIST_PARENT
            });
            this.uploadWrapper.appendChild(this.listParent);
          }
        }
      }, {
        key: "formFileList",
        value: function formFileList(fileData, files) {
          var fileList = this.createElement('li', {
            className: FILE
          });
          fileList.setAttribute('data-files-count', fileData.length + '');
          var fileContainer = this.createElement('span', {
            className: TEXT_CONTAINER
          });
          var statusMessage;

          var _iterator117 = _createForOfIteratorHelper(fileData),
              _step117;

          try {
            for (_iterator117.s(); !(_step117 = _iterator117.n()).done;) {
              var listItem = _step117.value;
              var fileNameEle = this.createElement('span', {
                className: FILE_NAME
              });
              fileNameEle.innerHTML = this.getFileNameOnly(listItem.name);
              var fileTypeEle = this.createElement('span', {
                className: FILE_TYPE
              });
              fileTypeEle.innerHTML = '.' + this.getFileType(listItem.name);

              if (!this.enableRtl) {
                fileContainer.appendChild(fileNameEle);
                fileContainer.appendChild(fileTypeEle);
              } else {
                var rtlContainer = this.createElement('span', {
                  className: RTL_CONTAINER
                });
                rtlContainer.appendChild(fileTypeEle);
                rtlContainer.appendChild(fileNameEle);
                fileContainer.appendChild(rtlContainer);
              }

              this.truncateName(fileNameEle);
              statusMessage = this.formValidateFileInfo(listItem, fileList);
            }
          } catch (err) {
            _iterator117.e(err);
          } finally {
            _iterator117.f();
          }

          fileList.appendChild(fileContainer);
          this.setListToFileInfo(fileData, fileList);
          var index = this.listParent.querySelectorAll('li').length;
          var infoEle = this.createElement('span');

          if (fileList.classList.contains(INVALID_FILE)) {
            infoEle.classList.add(STATUS);
            infoEle.classList.add(INVALID_FILE);
            infoEle.innerText = fileData.length > 1 ? this.localizedTexts('invalidFileSelection') : statusMessage;
          } else {
            infoEle.classList.add(fileData.length > 1 ? INFORMATION : FILE_SIZE);
            infoEle.innerText = fileData.length > 1 ? this.localizedTexts('totalFiles') + ': ' + fileData.length + ' , ' + this.localizedTexts('size') + ': ' + this.bytesToSize(this.getFileSize(fileData)) : this.bytesToSize(fileData[0].size);
            this.createFormInput(fileData);
          }

          fileContainer.appendChild(infoEle);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileList.querySelector('.e-icons'))) {
            var iconElement = this.createElement('span', {
              className: 'e-icons',
              attrs: {
                'tabindex': this.btnTabIndex
              }
            });
            /* istanbul ignore next */

            if (this.browserName === 'msie') {
              iconElement.classList.add('e-msie');
            }

            iconElement.setAttribute('title', this.localizedTexts('remove'));
            fileList.appendChild(fileContainer);
            fileList.appendChild(iconElement);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(iconElement, 'click', this.removeFiles, this);

            iconElement.classList.add(REMOVE_ICON);
          }

          var eventArgs = {
            element: fileList,
            fileInfo: this.mergeFileInfo(fileData, fileList),
            index: index,
            isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))
          };
          var eventsArgs = {
            element: fileList,
            fileInfo: this.mergeFileInfo(fileData, fileList),
            index: index,
            isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))
          };
          this.trigger('rendering', eventArgs);
          this.trigger('fileListRendering', eventsArgs);
          this.listParent.appendChild(fileList);
          this.fileList.push(fileList);
        }
      }, {
        key: "formValidateFileInfo",
        value: function formValidateFileInfo(listItem, fileList) {
          var statusMessage = listItem.status;
          var validationMessages = this.validatedFileSize(listItem.size);

          if (validationMessages.minSize !== '' || validationMessages.maxSize !== '') {
            this.addInvalidClass(fileList);
            statusMessage = validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') : validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : statusMessage;
          }

          var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;

          if (typeValidationMessage === this.localizedTexts('invalidFileType')) {
            this.addInvalidClass(fileList);
            statusMessage = typeValidationMessage;
          }

          return statusMessage;
        }
      }, {
        key: "addInvalidClass",
        value: function addInvalidClass(fileList) {
          fileList.classList.add(INVALID_FILE);
        }
      }, {
        key: "createFormInput",
        value: function createFormInput(fileData) {
          var inputElement = this.element.cloneNode(true);
          inputElement.classList.add(HIDDEN_INPUT);

          var _iterator118 = _createForOfIteratorHelper(fileData),
              _step118;

          try {
            for (_iterator118.s(); !(_step118 = _iterator118.n()).done;) {
              var listItem = _step118.value;
              listItem.input = inputElement;
            }
          } catch (err) {
            _iterator118.e(err);
          } finally {
            _iterator118.f();
          }

          inputElement.setAttribute('name', this.uploaderName);
          this.uploadWrapper.querySelector('.' + INPUT_WRAPPER).appendChild(inputElement);

          if (this.browserName !== 'msie' && this.browserName !== 'edge') {
            this.element.value = '';
          }
        }
      }, {
        key: "getFileSize",
        value: function getFileSize(fileData) {
          var fileSize = 0;

          var _iterator119 = _createForOfIteratorHelper(fileData),
              _step119;

          try {
            for (_iterator119.s(); !(_step119 = _iterator119.n()).done;) {
              var file = _step119.value;
              fileSize += file.size;
            }
          } catch (err) {
            _iterator119.e(err);
          } finally {
            _iterator119.f();
          }

          return fileSize;
        }
      }, {
        key: "mergeFileInfo",
        value: function mergeFileInfo(fileData, fileList) {
          var result = {
            name: '',
            rawFile: '',
            size: 0,
            status: '',
            type: '',
            validationMessages: {
              minSize: '',
              maxSize: ''
            },
            statusCode: '1',
            list: fileList
          };
          var fileNames = [];
          var type = '';

          var _iterator120 = _createForOfIteratorHelper(fileData),
              _step120;

          try {
            for (_iterator120.s(); !(_step120 = _iterator120.n()).done;) {
              var listItem = _step120.value;
              fileNames.push(listItem.name);
              type = listItem.type;
            }
          } catch (err) {
            _iterator120.e(err);
          } finally {
            _iterator120.f();
          }

          result.name = fileNames.join(', ');
          result.size = this.getFileSize(fileData);
          result.type = type;
          result.status = this.statusForFormUpload(fileData, fileList);
          return result;
        }
      }, {
        key: "statusForFormUpload",
        value: function statusForFormUpload(fileData, fileList) {
          var isValid = true;
          var statusMessage;

          var _iterator121 = _createForOfIteratorHelper(fileData),
              _step121;

          try {
            for (_iterator121.s(); !(_step121 = _iterator121.n()).done;) {
              var listItem = _step121.value;
              statusMessage = listItem.status;
              var validationMessages = this.validatedFileSize(listItem.size);

              if (validationMessages.minSize !== '' || validationMessages.maxSize !== '') {
                isValid = false;
                statusMessage = validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') : validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : statusMessage;
              }

              var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;

              if (typeValidationMessage === this.localizedTexts('invalidFileType')) {
                isValid = false;
                statusMessage = typeValidationMessage;
              }
            }
          } catch (err) {
            _iterator121.e(err);
          } finally {
            _iterator121.f();
          }

          if (!isValid) {
            fileList.classList.add(INVALID_FILE);
            statusMessage = fileData.length > 1 ? this.localizedTexts('invalidFileSelection') : statusMessage;
          } else {
            statusMessage = this.localizedTexts('totalFiles') + ': ' + fileData.length + ' , ' + this.localizedTexts('size') + ': ' + this.bytesToSize(this.getFileSize(fileData));
          }

          return statusMessage;
        }
      }, {
        key: "formCustomFileList",
        value: function formCustomFileList(fileData, files) {
          this.createParentUL();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'Template', 'Template');
          var fileList = this.createElement('li', {
            className: FILE
          });
          fileList.setAttribute('data-files-count', fileData.length + '');
          this.setListToFileInfo(fileData, fileList);
          var result = this.mergeFileInfo(fileData, fileList);
          fileList.setAttribute('data-file-name', result.name);
          this.uploadTemplateFn = this.templateComplier(this.template);
          var fromElements = [].slice.call(this.uploadTemplateFn(result, this, 'template', this.element.id + 'Template', this.isStringTemplate));
          var index = this.listParent.querySelectorAll('li').length;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(fromElements, fileList);

          if (!fileList.classList.contains(INVALID_FILE)) {
            this.createFormInput(fileData);
          }

          var eventArgs = {
            element: fileList,
            fileInfo: result,
            index: index,
            isPreload: this.isPreLoadFile(result)
          };
          var eventsArgs = {
            element: fileList,
            fileInfo: result,
            index: index,
            isPreload: this.isPreLoadFile(result)
          };
          this.trigger('rendering', eventArgs);
          this.trigger('fileListRendering', eventsArgs);
          this.listParent.appendChild(fileList);
          this.fileList.push(fileList);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'Template', 'Template', this, false);
        }
        /**
         * Create the file list for specified files data.
         * @param { FileInfo[] } fileData - specifies the files data for file list creation.
         * @returns void
         */

      }, {
        key: "createFileList",
        value: function createFileList(fileData, isSelectedFile) {
          if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
            var fileListData = isSelectedFile ? this.filesData = this.filesData.concat(fileData) : fileData; // tslint:disable-next-line

            this.interopAdaptor.invokeMethodAsync('createFileList', fileListData, this.isForm);
          } else {
            this.createParentUL();

            if (this.template !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
              if (this.isFormUpload()) {
                this.uploadWrapper.classList.add(FORM_UPLOAD);
                this.formCustomFileList(fileData, this.element.files);
              } else {
                this.createCustomfileList(fileData);
              }
            } else if (this.isFormUpload()) {
              this.uploadWrapper.classList.add(FORM_UPLOAD);
              this.formFileList(fileData, this.element.files);
            } else {
              var _iterator122 = _createForOfIteratorHelper(fileData),
                  _step122;

              try {
                for (_iterator122.s(); !(_step122 = _iterator122.n()).done;) {
                  var listItem = _step122.value;
                  var liElement = this.createElement('li', {
                    className: FILE,
                    attrs: {
                      'data-file-name': listItem.name,
                      'data-files-count': '1'
                    }
                  });
                  var textContainer = this.createElement('span', {
                    className: TEXT_CONTAINER
                  });
                  var textElement = this.createElement('span', {
                    className: FILE_NAME,
                    attrs: {
                      'title': listItem.name
                    }
                  });
                  textElement.innerHTML = this.getFileNameOnly(listItem.name);
                  var fileExtension = this.createElement('span', {
                    className: FILE_TYPE
                  });
                  fileExtension.innerHTML = '.' + this.getFileType(listItem.name);

                  if (!this.enableRtl) {
                    textContainer.appendChild(textElement);
                    textContainer.appendChild(fileExtension);
                  } else {
                    var rtlContainer = this.createElement('span', {
                      className: RTL_CONTAINER
                    });
                    rtlContainer.appendChild(fileExtension);
                    rtlContainer.appendChild(textElement);
                    textContainer.appendChild(rtlContainer);
                  }

                  var fileSize = this.createElement('span', {
                    className: FILE_SIZE
                  });
                  fileSize.innerHTML = this.bytesToSize(listItem.size);
                  textContainer.appendChild(fileSize);
                  var statusElement = this.createElement('span', {
                    className: STATUS
                  });
                  textContainer.appendChild(statusElement);
                  statusElement.innerHTML = listItem.status;
                  liElement.appendChild(textContainer);
                  var iconElement = this.createElement('span', {
                    className: ' e-icons',
                    attrs: {
                      'tabindex': this.btnTabIndex
                    }
                  });
                  /* istanbul ignore next */

                  if (this.browserName === 'msie') {
                    iconElement.classList.add('e-msie');
                  }

                  iconElement.setAttribute('title', this.localizedTexts('remove'));
                  liElement.appendChild(iconElement);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(iconElement, 'click', this.removeFiles, this);

                  if (listItem.statusCode === '2') {
                    statusElement.classList.add(UPLOAD_SUCCESS);
                    iconElement.classList.add(DELETE_ICON);
                    iconElement.setAttribute('title', this.localizedTexts('delete'));
                  } else if (listItem.statusCode !== '1') {
                    statusElement.classList.remove(UPLOAD_SUCCESS);
                    statusElement.classList.add(VALIDATION_FAILS);
                  }

                  if (this.autoUpload && listItem.statusCode === '1' && this.asyncSettings.saveUrl !== '') {
                    statusElement.innerHTML = '';
                  }

                  if (!iconElement.classList.contains(DELETE_ICON)) {
                    iconElement.classList.add(REMOVE_ICON);
                  }

                  var index = fileData.indexOf(listItem);
                  var eventArgs = {
                    element: liElement,
                    fileInfo: listItem,
                    index: index,
                    isPreload: this.isPreLoadFile(listItem)
                  };
                  var eventsArgs = {
                    element: liElement,
                    fileInfo: listItem,
                    index: index,
                    isPreload: this.isPreLoadFile(listItem)
                  };
                  this.trigger('rendering', eventArgs);
                  this.trigger('fileListRendering', eventsArgs);
                  this.listParent.appendChild(liElement);
                  this.fileList.push(liElement);
                  this.truncateName(textElement);
                  var preventActionComplete = this.flag;

                  if (this.isPreLoadFile(listItem)) {
                    this.flag = false;
                    this.checkActionComplete(true);
                    this.flag = preventActionComplete;
                  }
                }
              } catch (err) {
                _iterator122.e(err);
              } finally {
                _iterator122.f();
              }
            }
          }
        }
      }, {
        key: "getSlicedName",
        value: function getSlicedName(nameElement) {
          var text;
          text = nameElement.textContent;
          nameElement.dataset.tail = text.slice(text.length - 10);
        }
      }, {
        key: "setListToFileInfo",
        value: function setListToFileInfo(fileData, fileList) {
          var _iterator123 = _createForOfIteratorHelper(fileData),
              _step123;

          try {
            for (_iterator123.s(); !(_step123 = _iterator123.n()).done;) {
              var listItem = _step123.value;
              listItem.list = fileList;
            }
          } catch (err) {
            _iterator123.e(err);
          } finally {
            _iterator123.f();
          }
        }
      }, {
        key: "truncateName",
        value: function truncateName(name) {
          var nameElement = name;

          if (this.browserName !== 'edge' && nameElement.offsetWidth < nameElement.scrollWidth) {
            this.getSlicedName(nameElement);
            /* istanbul ignore next */
          } else if (nameElement.offsetWidth + 1 < nameElement.scrollWidth) {
            this.getSlicedName(nameElement);
          }
        }
      }, {
        key: "getFileType",
        value: function getFileType(name) {
          var extension;
          var index = name.lastIndexOf('.');

          if (index >= 0) {
            extension = name.substring(index + 1);
          }

          return extension ? extension : '';
        }
      }, {
        key: "getFileNameOnly",
        value: function getFileNameOnly(name) {
          var type = this.getFileType(name);
          var names = name.split('.' + type);
          return type = names[0];
        }
      }, {
        key: "setInitialAttributes",
        value: function setInitialAttributes() {
          if (this.initialAttr.accept) {
            this.element.setAttribute('accept', this.initialAttr.accept);
          }

          if (this.initialAttr.disabled) {
            this.element.setAttribute('disabled', 'disabled');
          }

          if (this.initialAttr.multiple) {
            var newAttr = document.createAttribute('multiple');
            this.element.setAttributeNode(newAttr);
          }
        }
      }, {
        key: "filterfileList",
        value: function filterfileList(files) {
          var filterFiles = [];
          var li;

          for (var i = 0; i < files.length; i++) {
            li = this.getLiElement(files[i]);

            if (!li.classList.contains(UPLOAD_SUCCESS)) {
              filterFiles.push(files[i]);
            }
          }

          return filterFiles;
        }
      }, {
        key: "updateStatus",
        value: function updateStatus(files, status, statusCode) {
          var updateLiStatus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;

          if (!(status === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(status)) && !(statusCode === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(statusCode))) {
            if (this.isBlazorSaveUrl) {
              for (var i = 0; i < this.filesData.length; i++) {
                if (this.filesData[i].name === files.name) {
                  this.filesData[i].status = status;
                  this.filesData[i].statusCode = statusCode;
                }
              }
            } else {
              files.status = status;
              files.statusCode = statusCode;
            }
          }

          if (updateLiStatus) {
            var li = this.getLiElement(files);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + STATUS)) && !(status === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(status))) {
                li.querySelector('.' + STATUS).textContent = status;
              }
            }
          }

          return files;
        }
      }, {
        key: "getLiElement",
        value: function getLiElement(files) {
          var index;

          for (var i = 0; i < this.filesData.length; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.filesData[i].id) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(files.id) ? this.filesData[i].name === files.name && this.filesData[i].id === files.id : this.filesData[i].name === files.name) {
              index = i;
            }
          }

          return this.fileList[index];
        }
      }, {
        key: "createProgressBar",
        value: function createProgressBar(liElement) {
          var progressbarWrapper = this.createElement('span', {
            className: PROGRESS_WRAPPER
          });
          var progressBar = this.createElement('progressbar', {
            className: PROGRESSBAR,
            attrs: {
              value: '0',
              max: '100'
            }
          });
          var progressbarInnerWrapper = this.createElement('span', {
            className: PROGRESS_INNER_WRAPPER
          });
          progressBar.setAttribute('style', 'width: 0%');
          var progressbarText = this.createElement('span', {
            className: PROGRESSBAR_TEXT
          });
          progressbarText.textContent = '0%';
          progressbarInnerWrapper.appendChild(progressBar);
          progressbarWrapper.appendChild(progressbarInnerWrapper);
          progressbarWrapper.appendChild(progressbarText);
          liElement.querySelector('.' + TEXT_CONTAINER).appendChild(progressbarWrapper);
        }
        /* istanbul ignore next */

      }, {
        key: "updateProgressbar",
        value: function updateProgressbar(e, li) {
          if (!isNaN(Math.round(e.loaded / e.total * 100)) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + PROGRESSBAR))) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.progressInterval) && this.progressInterval !== '') {
              var value = Math.round(e.loaded / e.total * 100) % parseInt(this.progressInterval, 10);

              if (value === 0 || value === 100) {
                this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + '%');
              }
            } else {
              this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + '%');
            }
          }
        }
      }, {
        key: "changeProgressValue",
        value: function changeProgressValue(li, progressValue) {
          li.querySelector('.' + PROGRESSBAR).setAttribute('style', 'width:' + progressValue);
          li.querySelector('.' + PROGRESSBAR_TEXT).textContent = progressValue;
        }
      }, {
        key: "uploadInProgress",
        value: function uploadInProgress(e, files, customUI, request) {
          var li = this.getLiElement(files);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && !customUI) {
            return;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            /* istanbul ignore next */
            if (files.statusCode === '5') {
              this.cancelUploadingFile(files, e, request, li);
            }

            if (!(li.querySelectorAll('.' + PROGRESS_WRAPPER).length > 0) && li.querySelector('.' + STATUS)) {
              li.querySelector('.' + STATUS).classList.add(UPLOAD_INPROGRESS);
              this.createProgressBar(li);
              this.updateProgressBarClasses(li, UPLOAD_INPROGRESS);
              li.querySelector('.' + STATUS).classList.remove(UPLOAD_FAILED);
            }

            this.updateProgressbar(e, li);
            var iconEle = li.querySelector('.' + REMOVE_ICON);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
              iconEle.classList.add(ABORT_ICON, UPLOAD_INPROGRESS);
              iconEle.setAttribute('title', this.localizedTexts('abort'));
              iconEle.classList.remove(REMOVE_ICON);
            }
          } else {
            this.cancelUploadingFile(files, e, request);
          }

          var args = {
            e: e,
            operation: 'upload',
            file: this.updateStatus(files, this.localizedTexts('inProgress'), '3')
          };
          this.trigger('progress', args);
        }
        /* istanbul ignore next */

      }, {
        key: "cancelUploadingFile",
        value: function cancelUploadingFile(files, e, request, li) {
          var _this539 = this;

          if (files.statusCode === '5') {
            var eventArgs = {
              event: e,
              fileData: files,
              cancel: false
            };
            this.trigger('canceling', eventArgs, function (eventArgs) {
              if (eventArgs.cancel) {
                files.statusCode = '3';

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
                  var spinnerTarget = li.querySelector('.' + ABORT_ICON);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(spinnerTarget)) {
                    Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(spinnerTarget);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(li.querySelector('.e-spinner-pane'));
                  }
                }
              } else {
                request.emitError = false;
                request.httpRequest.abort();
                var formData = new FormData();

                if (files.statusCode === '5') {
                  var name = _this539.element.getAttribute('name');

                  formData.append(name, files.name);
                  formData.append('cancel-uploading', files.name);
                  var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](_this539.asyncSettings.removeUrl, 'POST', true, null);
                  ajax.emitError = false;

                  ajax.onLoad = function (e) {
                    _this539.removecanceledFile(e, files);

                    return {};
                  };

                  ajax.send(formData);
                }
              }
            });
          }
        }
      }, {
        key: "removecanceledFile",
        value: function removecanceledFile(e, file) {
          var liElement = this.getLiElement(file);

          if (liElement.querySelector('.' + RETRY_ICON) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + ABORT_ICON))) {
            return;
          }

          this.updateStatus(file, this.localizedTexts('fileUploadCancel'), '5');
          this.renderFailureState(e, file, liElement);
          var spinnerTarget = liElement.querySelector('.' + REMOVE_ICON);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(spinnerTarget);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.e-spinner-pane'));
          }

          var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
          var args = {
            event: e,
            response: requestResponse,
            operation: 'cancel',
            file: file
          };
          this.trigger('success', args);
        }
      }, {
        key: "renderFailureState",
        value: function renderFailureState(e, file, liElement) {
          var _this540 = this;

          this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
          this.removeProgressbar(liElement, 'failure');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.e-file-status'))) {
            liElement.querySelector('.e-file-status').classList.add(UPLOAD_FAILED);
          }

          var deleteIcon = liElement.querySelector('.' + ABORT_ICON);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(deleteIcon)) {
            return;
          }

          deleteIcon.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);
          deleteIcon.classList.add(REMOVE_ICON);
          deleteIcon.setAttribute('title', this.localizedTexts('remove'));
          this.pauseButton = this.createElement('span', {
            className: 'e-icons e-file-reload-btn',
            attrs: {
              'tabindex': this.btnTabIndex
            }
          });
          deleteIcon.parentElement.insertBefore(this.pauseButton, deleteIcon);
          this.pauseButton.setAttribute('title', this.localizedTexts('retry'));
          var retryElement = liElement.querySelector('.' + RETRY_ICON);
          /* istanbul ignore next */

          retryElement.addEventListener('click', function (e) {
            _this540.reloadcanceledFile(e, file, liElement, false);
          }, false);
        }
      }, {
        key: "reloadcanceledFile",
        value: function reloadcanceledFile(e, file, liElement, custom) {
          file.statusCode = '1';
          file.status = this.localizedTexts('readyToUploadMessage');

          if (!custom) {
            liElement.querySelector('.' + STATUS).classList.remove(UPLOAD_FAILED);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + RETRY_ICON))) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.' + RETRY_ICON));
            }

            this.pauseButton = null;
          }
          /* istanbul ignore next */


          liElement.classList.add(RESTRICT_RETRY);
          this.upload([file]);
        }
        /* istanbul ignore next */

      }, {
        key: "uploadComplete",
        value: function uploadComplete(e, file, customUI) {
          var status = e.target;

          if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {
            var li = this.getLiElement(file);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && (!customUI || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(customUI))) {
              return;
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
              this.updateProgressBarClasses(li, UPLOAD_SUCCESS);
              this.removeProgressbar(li, 'success');
              var iconEle = li.querySelector('.' + ABORT_ICON);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(iconEle)) {
                iconEle.classList.add(DELETE_ICON);
                iconEle.setAttribute('title', this.localizedTexts('delete'));
                iconEle.classList.remove(ABORT_ICON);
                iconEle.classList.remove(UPLOAD_INPROGRESS);
              }
            }

            this.raiseSuccessEvent(e, file);
          } else {
            this.uploadFailed(e, file);
          }
        }
      }, {
        key: "getResponse",
        value: function getResponse(e) {
          // tslint:disable-next-line
          var target = e.currentTarget;
          var response = {
            readyState: target.readyState,
            statusCode: target.status,
            statusText: target.statusText,
            headers: target.getAllResponseHeaders(),
            withCredentials: target.withCredentials
          };
          return response;
        }
        /* istanbul ignore next */

      }, {
        key: "serverRemoveIconBindEvent",
        value: function serverRemoveIconBindEvent() {
          if (this.uploadWrapper && this.isBlazorSaveUrl) {
            var iconElement = [].slice.call(this.uploadWrapper.querySelectorAll('ul li'));

            for (var i = 0; i < iconElement.length; i++) {
              var removeIconEle = iconElement[i] ? iconElement[i].querySelector('.e-icons') : null;

              if (removeIconEle) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(removeIconEle, 'click', this.removeFiles);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(removeIconEle, 'click', this.removeFiles, this);
              }
            }
          }
        }
      }, {
        key: "raiseSuccessEvent",
        value: function raiseSuccessEvent(e, file) {
          var _this541 = this;

          var response = e && e.currentTarget ? this.getResponse(e) : null;
          var statusMessage = this.localizedTexts('uploadSuccessMessage');
          var args = {
            e: e,
            response: response,
            operation: 'upload',
            file: this.updateStatus(file, statusMessage, '2', false),
            statusText: statusMessage
          };

          if (!this.isBlazorSaveUrl) {
            var liElement = this.getLiElement(file);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
              var spinnerEle = liElement.querySelector('.' + SPINNER_PANE);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(spinnerEle)) {
                Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(liElement);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(spinnerEle);
              }
            }
          }

          this.trigger('success', args, function (args) {
            // tslint:disable-next-line
            _this541.updateStatus(file, args.statusText, '2');

            _this541.uploadedFilesData.push(file);

            if (!_this541.isBlazorSaveUrl) {
              _this541.trigger('change', {
                file: _this541.uploadedFilesData
              });
            }

            _this541.checkActionButtonStatus();

            if (_this541.fileList.length > 0) {
              if (!_this541.getLiElement(file).classList.contains(RESTRICT_RETRY)) {
                _this541.uploadSequential();

                _this541.checkActionComplete(true);
              } else {
                /* istanbul ignore next */
                _this541.getLiElement(file).classList.remove(RESTRICT_RETRY);
              }
            }
          });
        }
      }, {
        key: "uploadFailed",
        value: function uploadFailed(e, file) {
          var _this542 = this;

          var li = this.getLiElement(file);
          var response = e && e.currentTarget ? this.getResponse(e) : null;
          var statusMessage = this.localizedTexts('uploadFailedMessage');
          var args = {
            e: e,
            response: response,
            operation: 'upload',
            file: this.updateStatus(file, statusMessage, '0', false),
            statusText: statusMessage
          };

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            this.renderFailureState(e, file, li);
          }

          this.trigger('failure', args, function (args) {
            // tslint:disable-next-line
            _this542.updateStatus(file, args.statusText, '0');

            _this542.checkActionButtonStatus();

            _this542.uploadSequential();

            _this542.checkActionComplete(true);
          });
        }
      }, {
        key: "uploadSequential",
        value: function uploadSequential() {
          if (this.sequentialUpload) {
            if (this.autoUpload) {
              /* istanbul ignore next */
              this.checkAutoUpload(this.filesData);
            } else {
              this.uploadButtonClick();
            }
          }
        }
      }, {
        key: "checkActionComplete",
        value: function checkActionComplete(increment) {
          increment ? ++this.actionCompleteCount : --this.actionCompleteCount;
          this.raiseActionComplete();
        }
      }, {
        key: "raiseActionComplete",
        value: function raiseActionComplete() {
          if (this.filesData.length === this.actionCompleteCount && this.flag) {
            this.flag = false;
            var eventArgs = {
              fileData: []
            };
            eventArgs.fileData = this.getSelectedFileStatus(this.selectedFiles);
            this.trigger('actionComplete', eventArgs);
          }
        }
      }, {
        key: "getSelectedFileStatus",
        value: function getSelectedFileStatus(selectedFiles) {
          var matchFiles = [];
          var matchFilesIndex = 0;

          for (var selectFileIndex = 0; selectFileIndex < selectedFiles.length; selectFileIndex++) {
            var selectedFileData = selectedFiles[selectFileIndex];

            for (var fileDataIndex = 0; fileDataIndex < this.filesData.length; fileDataIndex++) {
              if (this.filesData[fileDataIndex].name === selectedFileData.name) {
                matchFiles[matchFilesIndex] = this.filesData[fileDataIndex];
                ++matchFilesIndex;
              }
            }
          }

          return matchFiles;
        }
      }, {
        key: "updateProgressBarClasses",
        value: function updateProgressBarClasses(li, className) {
          var progressBar = li.querySelector('.' + PROGRESSBAR);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(progressBar)) {
            progressBar.classList.add(className);
          }
        }
      }, {
        key: "removeProgressbar",
        value: function removeProgressbar(li, callType) {
          var _this543 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + PROGRESS_WRAPPER))) {
            this.progressAnimation = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({
              duration: 1250
            });
            this.progressAnimation.animate(li.querySelector('.' + PROGRESS_WRAPPER), {
              name: 'FadeOut'
            });
            this.progressAnimation.animate(li.querySelector('.' + PROGRESSBAR_TEXT), {
              name: 'FadeOut'
            });
            setTimeout(function () {
              _this543.animateProgressBar(li, callType);
            }, 750);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "animateProgressBar",
        value: function animateProgressBar(li, callType) {
          if (callType === 'success') {
            li.classList.add(UPLOAD_SUCCESS);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + STATUS))) {
              li.querySelector('.' + STATUS).classList.remove(UPLOAD_INPROGRESS);
              this.progressAnimation.animate(li.querySelector('.' + STATUS), {
                name: 'FadeIn'
              });
              li.querySelector('.' + STATUS).classList.add(UPLOAD_SUCCESS);
            }
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + STATUS))) {
              li.querySelector('.' + STATUS).classList.remove(UPLOAD_INPROGRESS);
              this.progressAnimation.animate(li.querySelector('.' + STATUS), {
                name: 'FadeIn'
              });
              li.querySelector('.' + STATUS).classList.add(UPLOAD_FAILED);
            }
          }

          if (li.querySelector('.' + PROGRESS_WRAPPER)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(li.querySelector('.' + PROGRESS_WRAPPER));
          }
        }
      }, {
        key: "setExtensions",
        value: function setExtensions(extensions) {
          if (extensions !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(extensions)) {
            this.element.setAttribute('accept', extensions);
          } else {
            this.element.removeAttribute('accept');
          }
        }
      }, {
        key: "templateComplier",
        value: function templateComplier(uploadTemplate) {
          if (uploadTemplate) {
            try {
              if (document.querySelectorAll(uploadTemplate).length) {
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(uploadTemplate).innerHTML.trim());
              }
            } catch (exception) {
              return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(uploadTemplate);
            }
          }

          return undefined;
        }
      }, {
        key: "setRTL",
        value: function setRTL() {
          this.enableRtl ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.uploadWrapper], RTL) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.uploadWrapper], RTL);
        }
      }, {
        key: "localizedTexts",
        value: function localizedTexts(localeText) {
          this.l10n.setLocale(this.locale);
          return this.l10n.getConstant(localeText);
        }
      }, {
        key: "setControlStatus",
        value: function setControlStatus() {
          if (!this.enabled) {
            this.uploadWrapper.classList.add(DISABLED);
            this.element.setAttribute('disabled', 'disabled');
            this.browseButton.setAttribute('disabled', 'disabled');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.clearButton)) {
              this.clearButton.setAttribute('disabled', 'disabled');
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploadButton)) {
              this.uploadButton.setAttribute('disabled', 'disabled');
            }
          } else {
            if (this.uploadWrapper.classList.contains(DISABLED)) {
              this.uploadWrapper.classList.remove(DISABLED);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.browseButton) && this.element.hasAttribute('disabled')) {
              this.element.removeAttribute('disabled');
              this.browseButton.removeAttribute('disabled');
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.clearButton) && this.clearButton.hasAttribute('disabled')) {
              this.clearButton.removeAttribute('disabled');
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploadButton) && this.uploadButton.hasAttribute('disabled')) {
              this.uploadButton.hasAttribute('disabled');
            }
          }
        }
      }, {
        key: "checkHTMLAttributes",
        value: function checkHTMLAttributes(isDynamic) {
          var attributes$$1 = isDynamic ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ['accept', 'multiple', 'disabled'];

          var _iterator124 = _createForOfIteratorHelper(attributes$$1),
              _step124;

          try {
            for (_iterator124.s(); !(_step124 = _iterator124.n()).done;) {
              var prop = _step124.value;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute(prop))) {
                switch (prop) {
                  case 'accept':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploaderOptions) || this.uploaderOptions['allowedExtensions'] === undefined || isDynamic) {
                      this.setProperties({
                        allowedExtensions: this.element.getAttribute('accept')
                      }, !isDynamic);
                      this.initialAttr.accept = this.allowedExtensions;
                    }

                    break;

                  case 'multiple':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploaderOptions) || this.uploaderOptions['multiple'] === undefined || isDynamic) {
                      var isMutiple = this.element.getAttribute(prop) === 'multiple' || this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? true : false;
                      this.setProperties({
                        multiple: isMutiple
                      }, !isDynamic);
                      this.initialAttr.multiple = true;
                    }

                    break;

                  case 'disabled':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploaderOptions) || this.uploaderOptions['enabled'] === undefined || isDynamic) {
                      var isDisabled = this.element.getAttribute(prop) === 'disabled' || this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? false : true;
                      this.setProperties({
                        enabled: isDisabled
                      }, !isDynamic);
                      this.initialAttr.disabled = true;
                    }

                }
              }
            }
          } catch (err) {
            _iterator124.e(err);
          } finally {
            _iterator124.f();
          }
        }
      }, {
        key: "chunkUpload",
        value: function chunkUpload(file, custom, fileIndex) {
          var start = 0;
          var end = Math.min(this.asyncSettings.chunkSize, file.size);
          var index = 0;
          var blob = file.rawFile.slice(start, end);
          var metaData = {
            chunkIndex: index,
            blob: blob,
            file: file,
            start: start,
            end: end,
            retryCount: 0,
            request: null
          };
          this.sendRequest(file, metaData, custom, fileIndex);
        }
      }, {
        key: "sendRequest",
        value: function sendRequest(file, metaData, custom, fileIndex) {
          var _this544 = this;

          var formData = new FormData();
          var blob = file.rawFile.slice(metaData.start, metaData.end);
          formData.append('chunkFile', blob, file.name);
          formData.append(this.uploaderName, blob, file.name);
          formData.append('chunk-index', metaData.chunkIndex.toString());
          formData.append('chunkIndex', metaData.chunkIndex.toString());
          var totalChunk = Math.max(Math.ceil(file.size / this.asyncSettings.chunkSize), 1);
          formData.append('total-chunk', totalChunk.toString());
          formData.append('totalChunk', totalChunk.toString());
          var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"]({
            url: this.asyncSettings.saveUrl,
            type: 'POST',
            async: true,
            contentType: null
          });
          ajax.emitError = false;

          ajax.onLoad = function (e) {
            _this544.chunkUploadComplete(e, metaData, custom);

            return {};
          };

          ajax.onUploadProgress = function (e) {
            _this544.chunkUploadInProgress(e, metaData, custom);

            return {};
          };

          var eventArgs = {
            fileData: file,
            customFormData: [],
            cancel: false,
            chunkSize: this.asyncSettings.chunkSize === 0 ? null : this.asyncSettings.chunkSize
          };

          ajax.beforeSend = function (e) {
            eventArgs.currentRequest = ajax.httpRequest;
            eventArgs.currentChunkIndex = metaData.chunkIndex;
            /* istanbul ignore next */

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              if (_this544.currentRequestHeader) {
                _this544.updateCustomheader(ajax.httpRequest, _this544.currentRequestHeader);
              }

              if (_this544.customFormDatas) {
                _this544.updateFormData(formData, _this544.customFormDatas);
              }
            }

            if (eventArgs.currentChunkIndex === 0) {
              // This event is currently not required but to avoid breaking changes for previous customer, we have included.
              _this544.trigger('uploading', eventArgs, function (eventArgs) {
                _this544.uploadingEventCallback(formData, eventArgs, e, file);
              });
            } else {
              _this544.trigger('chunkUploading', eventArgs, function (eventArgs) {
                _this544.uploadingEventCallback(formData, eventArgs, e, file);
              });
            }
          };
          /* istanbul ignore next */


          ajax.onError = function (e) {
            _this544.chunkUploadFailed(e, metaData, custom);

            return {};
          };

          ajax.send(formData);
          metaData.request = ajax;
        }
      }, {
        key: "uploadingEventCallback",
        value: function uploadingEventCallback(formData, eventArgs, e, file) {
          if (eventArgs.cancel) {
            this.eventCancelByArgs(e, eventArgs, file);
          } else {
            this.updateFormData(formData, eventArgs.customFormData);
          }
        }
      }, {
        key: "eventCancelByArgs",
        value: function eventCancelByArgs(e, eventArgs, file) {
          var _this545 = this;

          e.cancel = true;

          if (eventArgs.fileData.statusCode === '5') {
            return;
          }

          var liElement = this.getLiElement(eventArgs.fileData);
          liElement.querySelector('.' + STATUS).innerHTML = this.localizedTexts('fileUploadCancel');
          liElement.querySelector('.' + STATUS).classList.add(UPLOAD_FAILED);
          eventArgs.fileData.statusCode = '5';
          eventArgs.fileData.status = this.localizedTexts('fileUploadCancel');
          this.pauseButton = this.createElement('span', {
            className: 'e-icons e-file-reload-btn',
            attrs: {
              'tabindex': this.btnTabIndex
            }
          });
          var removeIcon = liElement.querySelector('.' + REMOVE_ICON);
          removeIcon.parentElement.insertBefore(this.pauseButton, removeIcon);
          this.pauseButton.setAttribute('title', this.localizedTexts('retry'));
          /* istanbul ignore next */

          this.pauseButton.addEventListener('click', function (e) {
            _this545.reloadcanceledFile(e, file, liElement);
          }, false);
          this.checkActionButtonStatus();
        }
      }, {
        key: "checkChunkUpload",
        value: function checkChunkUpload() {
          return this.asyncSettings.chunkSize <= 0 || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.chunkSize) ? false : true;
        }
      }, {
        key: "chunkUploadComplete",
        value: function chunkUploadComplete(e, metaData, custom) {
          var _this546 = this;

          var response = e.target;
          var liElement;

          if (response.readyState === 4 && response.status >= 200 && response.status < 300) {
            var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
            var totalChunk = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);
            var eventArgs = {
              event: e,
              file: metaData.file,
              chunkIndex: metaData.chunkIndex,
              totalChunk: totalChunk,
              chunkSize: this.asyncSettings.chunkSize,
              response: requestResponse
            };
            this.trigger('chunkSuccess', eventArgs);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom) {
              liElement = this.getLiElement(metaData.file);
            }

            this.updateMetaData(metaData);

            if (metaData.end === metaData.file.size) {
              metaData.file.statusCode = '3';
            }

            if (metaData.file.statusCode === '5') {
              var _eventArgs = {
                event: e,
                fileData: metaData.file,
                cancel: false
              };
              this.trigger('canceling', _eventArgs, function (eventArgs) {
                /* istanbul ignore next */
                if (eventArgs.cancel) {
                  metaData.file.statusCode = '3';
                  var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(spinnerTarget)) {
                    Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(spinnerTarget);
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.e-spinner-pane'));
                  }

                  _this546.sendNextRequest(metaData);
                } else {
                  metaData.request.emitError = false;
                  response.abort();
                  var formData = new FormData();

                  var name = _this546.element.getAttribute('name');

                  formData.append(name, metaData.file.name);
                  formData.append('cancel-uploading', metaData.file.name);
                  formData.append('cancelUploading', metaData.file.name);
                  var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](_this546.asyncSettings.removeUrl, 'POST', true, null);
                  ajax.emitError = false;

                  ajax.onLoad = function (e) {
                    _this546.removeChunkFile(e, metaData, custom);

                    return {};
                  };

                  ajax.send(formData);
                }
              });
            } else {
              if (totalChunk - 1 === metaData.chunkIndex && totalChunk > metaData.chunkIndex) {
                var index = this.pausedData.indexOf(metaData);

                if (index >= 0) {
                  this.pausedData.splice(index, 1);
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom) && liElement) {
                  if (liElement) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.' + PAUSE_UPLOAD));
                  }

                  this.removeChunkProgressBar(metaData);
                }

                this.raiseSuccessEvent(e, metaData.file);
                return;
              }

              this.sendNextRequest(metaData);
            }
          } else {
            this.chunkUploadFailed(e, metaData);
          }
        }
      }, {
        key: "sendNextRequest",
        value: function sendNextRequest(metaData) {
          metaData.start = metaData.end;
          metaData.end += this.asyncSettings.chunkSize;
          metaData.end = Math.min(metaData.end, metaData.file.size);
          metaData.chunkIndex += 1;
          this.sendRequest(metaData.file, metaData);
        }
      }, {
        key: "removeChunkFile",
        value: function removeChunkFile(e, metaData, custom) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) && !custom) {
            var liElement = this.getLiElement(metaData.file);
            var deleteIcon = liElement.querySelector('.' + ABORT_ICON);
            var spinnerTarget = deleteIcon;
            this.updateStatus(metaData.file, this.localizedTexts('fileUploadCancel'), '5');
            this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
            this.removeProgressbar(liElement, 'failure');
            deleteIcon.classList.remove(ABORT_ICON);
            deleteIcon.classList.add(REMOVE_ICON);
            deleteIcon.setAttribute('title', this.localizedTexts('remove'));
            var pauseIcon = liElement.querySelector('.' + PAUSE_UPLOAD);
            pauseIcon.classList.add(RETRY_ICON);
            pauseIcon.classList.remove(PAUSE_UPLOAD);
            pauseIcon.setAttribute('title', this.localizedTexts('retry'));

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(deleteIcon)) {
              Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["hideSpinner"])(spinnerTarget);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.e-spinner-pane'));
            }
          }
        }
      }, {
        key: "pauseUpload",
        value: function pauseUpload(metaData, e, custom) {
          metaData.file.statusCode = '4';
          metaData.file.status = this.localizedTexts('pause');
          this.updateMetaData(metaData);
          var eventArgs = {
            event: e ? e : null,
            file: metaData.file,
            chunkIndex: metaData.chunkIndex,
            chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),
            chunkSize: this.asyncSettings.chunkSize
          };
          this.abortUpload(metaData, custom, eventArgs);
        }
      }, {
        key: "abortUpload",
        value: function abortUpload(metaData, custom, eventArgs) {
          metaData.request.emitError = false;
          metaData.request.httpRequest.abort();
          var liElement = this.getLiElement(metaData.file);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom)) {
            var targetElement = liElement.querySelector('.' + PAUSE_UPLOAD);
            targetElement.classList.remove(PAUSE_UPLOAD);
            targetElement.classList.add(RESUME_UPLOAD);
            targetElement.setAttribute('title', this.localizedTexts('resume'));
            targetElement.nextElementSibling.classList.add(REMOVE_ICON);
            targetElement.nextElementSibling.classList.remove(ABORT_ICON);
            targetElement.nextElementSibling.setAttribute('title', this.localizedTexts('remove'));
          }

          for (var i = 0; i < this.pausedData.length; i++) {
            if (this.pausedData[i].file.name === metaData.file.name) {
              this.pausedData.splice(i, 1);
            }
          }

          this.pausedData.push(metaData);
          this.trigger('pausing', eventArgs);
        }
      }, {
        key: "resumeUpload",
        value: function resumeUpload(metaData, e, custom) {
          var liElement = this.getLiElement(metaData.file);
          var targetElement;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
            targetElement = liElement.querySelector('.' + RESUME_UPLOAD);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(targetElement) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom)) {
            targetElement.classList.remove(RESUME_UPLOAD);
            targetElement.classList.add(PAUSE_UPLOAD);
            targetElement.setAttribute('title', this.localizedTexts('pause'));
            targetElement.nextElementSibling.classList.remove(REMOVE_ICON);
            targetElement.nextElementSibling.classList.add(ABORT_ICON);
            targetElement.nextElementSibling.setAttribute('title', this.localizedTexts('abort'));
          }

          metaData.file.status = this.localizedTexts('inProgress');
          metaData.file.statusCode = '3';
          this.updateMetaData(metaData);
          var eventArgs = {
            event: e ? e : null,
            file: metaData.file,
            chunkIndex: metaData.chunkIndex,
            chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),
            chunkSize: this.asyncSettings.chunkSize
          };
          this.trigger('resuming', eventArgs);

          for (var i = 0; i < this.pausedData.length; i++) {
            if (this.pausedData[i].end === this.pausedData[i].file.size) {
              this.chunkUploadComplete(e, metaData, custom);
            } else {
              if (this.pausedData[i].file.name === metaData.file.name) {
                this.pausedData[i].start = this.pausedData[i].end;
                this.pausedData[i].end = this.pausedData[i].end + this.asyncSettings.chunkSize;
                this.pausedData[i].end = Math.min(this.pausedData[i].end, this.pausedData[i].file.size);
                this.pausedData[i].chunkIndex = this.pausedData[i].chunkIndex + 1;
                this.sendRequest(this.pausedData[i].file, this.pausedData[i], custom);
              }
            }
          }
        }
      }, {
        key: "updateMetaData",
        value: function updateMetaData(metaData) {
          if (this.uploadMetaData.indexOf(metaData) === -1) {
            this.uploadMetaData.push(metaData);
          } else {
            this.uploadMetaData.splice(this.uploadMetaData.indexOf(metaData), 1);
            this.uploadMetaData.push(metaData);
          }
        }
      }, {
        key: "removeChunkProgressBar",
        value: function removeChunkProgressBar(metaData) {
          var liElement = this.getLiElement(metaData.file);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
            this.updateProgressBarClasses(liElement, UPLOAD_SUCCESS);
            this.removeProgressbar(liElement, 'success');
            var cancelButton = liElement.querySelector('.' + ABORT_ICON);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cancelButton)) {
              cancelButton.classList.add(DELETE_ICON);
              cancelButton.setAttribute('title', this.localizedTexts('delete'));
              cancelButton.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);
            }
          }
        }
      }, {
        key: "chunkUploadFailed",
        value: function chunkUploadFailed(e, metaData, custom) {
          var _this547 = this;

          var chunkCount = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);
          var liElement;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom)) {
            liElement = this.getLiElement(metaData.file);
          }

          var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;
          var eventArgs = {
            event: e,
            file: metaData.file,
            chunkIndex: metaData.chunkIndex,
            totalChunk: chunkCount,
            chunkSize: this.asyncSettings.chunkSize,
            cancel: false,
            response: requestResponse
          };
          this.trigger('chunkFailure', eventArgs, function (eventArgs) {
            // To prevent triggering of failure event
            // tslint:disable-next-line
            if (!eventArgs.cancel) {
              if (metaData.retryCount < _this547.asyncSettings.retryCount) {
                setTimeout(function () {
                  _this547.retryRequest(liElement, metaData, custom);
                }, _this547.asyncSettings.retryAfterDelay);
              } else {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
                  var pauseButton = liElement.querySelector('.' + PAUSE_UPLOAD) ? liElement.querySelector('.' + PAUSE_UPLOAD) : liElement.querySelector('.' + RESUME_UPLOAD);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(pauseButton)) {
                    pauseButton.classList.add(RETRY_ICON);
                    pauseButton.classList.remove(PAUSE_UPLOAD, RESUME_UPLOAD);
                  }

                  _this547.updateProgressBarClasses(liElement, UPLOAD_FAILED);

                  _this547.removeProgressbar(liElement, 'failure');

                  liElement.querySelector('.e-icons').classList.remove(UPLOAD_INPROGRESS);
                  var iconElement = liElement.querySelector('.' + ABORT_ICON) ? liElement.querySelector('.' + ABORT_ICON) : liElement.querySelector('.' + REMOVE_ICON);
                  iconElement.classList.remove(ABORT_ICON);

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + PAUSE_UPLOAD))) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liElement.querySelector('.' + PAUSE_UPLOAD));
                  }

                  if (metaData.start > 0) {
                    iconElement.classList.add(DELETE_ICON);
                    iconElement.setAttribute('title', _this547.localizedTexts('delete'));
                  } else {
                    iconElement.classList.add(REMOVE_ICON);
                    iconElement.setAttribute('title', _this547.localizedTexts('remove'));
                  }
                }

                metaData.retryCount = 0;
                var file = metaData.file;

                var failureMessage = _this547.localizedTexts('uploadFailedMessage');

                var args = {
                  e: e,
                  response: requestResponse,
                  operation: 'upload',
                  file: _this547.updateStatus(file, failureMessage, '0', false),
                  statusText: failureMessage
                };

                _this547.trigger('failure', args, function (args) {
                  // tslint:disable-next-line
                  _this547.updateStatus(file, args.statusText, '0');

                  _this547.uploadSequential();

                  _this547.checkActionComplete(true);
                });
              }
            }
          });
        }
      }, {
        key: "retryRequest",
        value: function retryRequest(liElement, metaData, custom) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom) || !custom) && liElement) {
            this.updateProgressBarClasses(liElement, UPLOAD_FAILED);
          }

          metaData.retryCount += 1;
          this.sendRequest(metaData.file, metaData);
        }
      }, {
        key: "checkPausePlayAction",
        value: function checkPausePlayAction(e) {
          var targetElement = e.target;
          var selectedElement = e.target.parentElement;
          var index = this.fileList.indexOf(selectedElement);
          var fileData = this.filesData[index];
          var metaData = this.getCurrentMetaData(fileData);

          if (targetElement.classList.contains(PAUSE_UPLOAD)) {
            /* istanbul ignore next */
            this.pauseUpload(metaData, e);
          } else if (targetElement.classList.contains(RESUME_UPLOAD)) {
            /* istanbul ignore next */
            this.resumeUpload(metaData, e);
          } else if (targetElement.classList.contains(RETRY_ICON)) {
            if (metaData.file.status === this.localizedTexts('fileUploadCancel')) {
              this.retryUpload(metaData, false);
            } else {
              this.retryUpload(metaData, true);
            }
          }
        }
      }, {
        key: "retryUpload",
        value: function retryUpload(metaData, fromcanceledStage) {
          if (fromcanceledStage) {
            metaData.end = metaData.end + this.asyncSettings.chunkSize;
            metaData.start = metaData.start + this.asyncSettings.chunkSize;
            this.sendRequest(metaData.file, metaData);
          } else {
            metaData.file.statusCode = '1';
            metaData.file.status = this.localizedTexts('readyToUploadMessage');
            this.chunkUpload(metaData.file);
          }
          /* istanbul ignore next */


          this.getLiElement(metaData.file).classList.add(RESTRICT_RETRY);
        }
      }, {
        key: "chunkUploadInProgress",
        value: function chunkUploadInProgress(e, metaData, custom) {
          var _this548 = this;

          if (metaData.file.statusCode === '4') {
            return;
          }

          if (metaData.file.statusCode !== '4' && metaData.file.statusCode !== '5') {
            metaData.file.statusCode = '3';
            metaData.file.status = this.localizedTexts('inProgress');
          }

          this.updateMetaData(metaData);
          var liElement = this.getLiElement(metaData.file);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
            return;
          }

          var retryElement = liElement.querySelector('.' + RETRY_ICON);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(retryElement)) {
            retryElement.classList.add(PAUSE_UPLOAD);
            retryElement.setAttribute('title', this.localizedTexts('pause'));
            retryElement.classList.remove(RETRY_ICON);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
            if (!(liElement.querySelectorAll('.' + PROGRESS_WRAPPER).length > 0)) {
              var statusElement = liElement.querySelector('.' + STATUS);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
                statusElement.classList.add(UPLOAD_INPROGRESS);
                statusElement.classList.remove(UPLOAD_FAILED);
                this.createProgressBar(liElement);
                this.updateProgressBarClasses(liElement, UPLOAD_INPROGRESS);
              }

              var clearIcon = liElement.querySelector('.' + REMOVE_ICON) ? liElement.querySelector('.' + REMOVE_ICON) : liElement.querySelector('.' + DELETE_ICON);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clearIcon)) {
                clearIcon.classList.add(ABORT_ICON);
                clearIcon.setAttribute('title', this.localizedTexts('abort'));
                clearIcon.classList.remove(REMOVE_ICON);
              }
            }

            if (!isNaN(Math.round(e.loaded / e.total * 100)) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template) && metaData.file.statusCode !== '4') {
              var loadedSize = metaData.chunkIndex * this.asyncSettings.chunkSize;
              var value = Math.min((loadedSize + e.loaded) / metaData.file.size * 100, 100);
              this.changeProgressValue(liElement, Math.round(value).toString() + '%');
            }

            if (metaData.chunkIndex === 0) {
              this.checkActionButtonStatus();
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement.querySelector('.' + PAUSE_UPLOAD)) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
            this.pauseButton = this.createElement('span', {
              className: 'e-icons e-file-pause-btn',
              attrs: {
                'tabindex': this.btnTabIndex
              }
            });

            if (this.browserName === 'msie') {
              this.pauseButton.classList.add('e-msie');
            }

            var abortIcon = liElement.querySelector('.' + ABORT_ICON);
            abortIcon.parentElement.insertBefore(this.pauseButton, abortIcon);
            this.pauseButton.setAttribute('title', this.localizedTexts('pause'));
            this.pauseButton.addEventListener('click', function (e) {
              _this548.checkPausePlayAction(e);
            }, false);
          }
        }
        /**
         * It is used to convert bytes value into kilobytes or megabytes depending on the size based
         * on [binary prefix](https://en.wikipedia.org/wiki/Binary_prefix).
         * @param { number } bytes - specifies the file size in bytes.
         * @returns string
         */

      }, {
        key: "bytesToSize",
        value: function bytesToSize(bytes) {
          var i = -1;

          if (!bytes) {
            return '0.0 KB';
          }

          do {
            bytes = bytes / 1024;
            i++;
          } while (bytes > 99);

          if (i >= 2) {
            bytes = bytes * 1024;
            i = 1;
          }

          return Math.max(bytes, 0).toFixed(1) + ' ' + ['KB', 'MB'][i];
        }
        /**
         * Allows you to sort the file data alphabetically based on its file name clearly.
         * @param { FileList } filesData - specifies the files data for upload.
         * @returns File[]
         */

        /* istanbul ignore next */

      }, {
        key: "sortFileList",
        value: function sortFileList(filesData) {
          filesData = filesData ? filesData : this.sortFilesList;
          var files = filesData;
          var fileNames = [];

          for (var i = 0; i < files.length; i++) {
            fileNames.push(files[i].name);
          }

          var sortedFileNames = fileNames.sort();
          var sortedFilesData = [];

          var _iterator125 = _createForOfIteratorHelper(sortedFileNames),
              _step125;

          try {
            for (_iterator125.s(); !(_step125 = _iterator125.n()).done;) {
              var name = _step125.value;

              for (var _i108 = 0; _i108 < files.length; _i108++) {
                if (name === files[_i108].name) {
                  sortedFilesData.push(files[_i108]);
                }
              }
            }
          } catch (err) {
            _iterator125.e(err);
          } finally {
            _iterator125.f();
          }

          return sortedFilesData;
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
         * @method destroy
         * @return {void}.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.element.value = null;

          if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
            this.clearAll();
          }

          this.unWireEvents();
          this.unBindDropEvents();

          if (this.multiple) {
            this.element.removeAttribute('multiple');
          }

          if (!this.enabled) {
            this.element.removeAttribute('disabled');
          }

          this.element.removeAttribute('accept');
          this.setInitialAttributes();
          var attributes$$1 = ['aria-label', 'directory', 'webkitdirectory', 'tabindex'];

          for (var _i109 = 0, _attributes$$ = attributes$$1; _i109 < _attributes$$.length; _i109++) {
            var key = _attributes$$[_i109];
            this.element.removeAttribute(key);
          }

          if (!this.isServerBlazor) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.uploadWrapper)) {
              this.uploadWrapper.parentElement.appendChild(this.element);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.uploadWrapper);
            }

            this.uploadWrapper = null;

            _get(_getPrototypeOf(Uploader.prototype), "destroy", this).call(this);
          } else {
            this.uploadWrapper = null;
          }
        }
        /**
         * Allows you to call the upload process manually by calling save URL action.
         * To process the selected files (added in upload queue), pass an empty argument otherwise
         * upload the specific file based on its argument.
         * @param { FileInfo | FileInfo[] } files - specifies the files data for upload.
         * @returns void
         */

      }, {
        key: "upload",
        value: function upload(files, custom) {
          var _this549 = this;

          files = files ? files : this.filesData;

          if (this.sequentialUpload && (this.isFirstFileOnSelection || custom)) {
            this.sequenceUpload(files);
          } else {
            var uploadFiles = this.getFilesInArray(files);
            var eventArgs = {
              customFormData: [],
              currentRequest: null,
              cancel: false
            };
            this.trigger('beforeUpload', eventArgs, function (eventArgs) {
              if (!eventArgs.cancel) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  _this549.currentRequestHeader = eventArgs.currentRequest ? eventArgs.currentRequest : _this549.currentRequestHeader;
                  _this549.customFormDatas = eventArgs.customFormData && eventArgs.customFormData.length > 0 ? eventArgs.customFormData : _this549.customFormDatas;
                }

                _this549.uploadFiles(uploadFiles, custom);
              }
            });
          }
        }
      }, {
        key: "getFilesInArray",
        value: function getFilesInArray(files) {
          var uploadFiles = [];

          if (files instanceof Array) {
            uploadFiles = files;
          } else {
            uploadFiles.push(files);
          }

          return uploadFiles;
        }
        /* istanbul ignore next */

      }, {
        key: "serverReadFileBase64",
        value: function serverReadFileBase64(fileIndex, position, totalCount) {
          var _this550 = this;

          return new Promise(function (resolve, reject) {
            var file = _this550.fileStreams[fileIndex].rawFile;

            try {
              var reader = new FileReader(); // tslint:disable-next-line

              reader.onload = function (args) {
                return function () {
                  try {
                    var contents = args.result;
                    var data = contents ? contents.split(';base64,')[1] : null;
                    resolve(data);
                  } catch (e) {
                    reject(e);
                  }
                };
              }(reader);

              reader.readAsDataURL(file.slice(position, position + totalCount));
            } catch (e) {
              reject(e);
            }
          });
        }
        /* istanbul ignore next */

      }, {
        key: "uploadFileCount",
        value: function uploadFileCount(ele) {
          var files = this.filesData;

          if (!files || files.length === 0) {
            return -1;
          }

          var result = files.length;
          return result;
        }
        /* istanbul ignore next */

      }, {
        key: "getFileRead",
        value: function getFileRead(index, ele) {
          var files = this.filesData;

          if (!files || files.length === 0) {
            return -1;
          }

          var file = files[index];
          var fileCount = this.newFileRef++;
          this.fileStreams[fileCount] = file;
          return fileCount;
        }
        /* istanbul ignore next */

      }, {
        key: "getFileInfo",
        value: function getFileInfo(index, ele) {
          var files = this.filesData;

          if (!files || files.length === 0) {
            return null;
          }

          var file = files[index];

          if (!file) {
            return null;
          }

          return this.filesData[index];
        }
      }, {
        key: "uploadFiles",
        value: function uploadFiles(files, custom) {
          var _this551 = this;

          var selectedFiles = [];

          if (this.asyncSettings.saveUrl === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.asyncSettings.saveUrl)) {
            if (this.isServerBlazor) {
              // tslint:disable-next-line
              this.interopAdaptor.invokeMethodAsync('GetFileDetails', files);
            }

            return;
          }

          if (!custom || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(custom)) {
            if (!this.multiple) {
              var file = [];
              file.push(files[0]);
              selectedFiles = this.filterfileList(file);
            } else {
              selectedFiles = this.filterfileList(files);
            }
          } else {
            selectedFiles = files;
          }

          var _loop23 = function _loop23(i) {
            if (_this551.isServerBlazor && !_this551.checkChunkUpload()) {
              /* istanbul ignore next */

              /* tslint:disable */
              if (selectedFiles[i] && selectedFiles[i].rawFile instanceof File) {
                _this551.getBase64(selectedFiles[i].rawFile).then(function (data) {
                  _this551.base64String.push(data);

                  _this551.uploadFilesRequest(selectedFiles, i, custom);
                });
              }
              /* tslint:disable */

            } else {
              _this551.uploadFilesRequest(selectedFiles, i, custom);
            }
          };

          for (var i = 0; i < selectedFiles.length; i++) {
            _loop23(i);
          }
        }
      }, {
        key: "uploadFilesRequest",
        value: function uploadFilesRequest(selectedFiles, i, custom) {
          var _this552 = this;

          var cloneFiles = [];
          var chunkEnabled = this.checkChunkUpload();
          var ajax = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Ajax"](this.asyncSettings.saveUrl, 'POST', true, null);
          ajax.emitError = false;
          var getFileData;
          /* istanbul ignore next */

          if (this.isServerBlazor) {
            getFileData = selectedFiles.slice(0);
            cloneFiles.push(getFileData[i].rawFile);
          }

          var eventArgs = {
            fileData: this.isServerBlazor ? getFileData[i] : selectedFiles[i],
            customFormData: [],
            cancel: false
          };
          var formData = new FormData();

          ajax.beforeSend = function (e) {
            eventArgs.currentRequest = ajax.httpRequest;
            /* istanbul ignore next */

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              eventArgs.fileData.rawFile = !chunkEnabled ? _this552.base64String[i] : eventArgs.fileData.rawFile;

              if (_this552.currentRequestHeader) {
                _this552.updateCustomheader(ajax.httpRequest, _this552.currentRequestHeader);
              }

              if (_this552.customFormDatas) {
                _this552.updateFormData(formData, _this552.customFormDatas);
              }
            }

            _this552.trigger('uploading', eventArgs, function (eventArgs) {
              /* istanbul ignore next */
              if (_this552.isServerBlazor && !chunkEnabled) {
                selectedFiles[i].rawFile = eventArgs.fileData.rawFile = cloneFiles[i];
              }

              if (eventArgs.cancel) {
                _this552.eventCancelByArgs(e, eventArgs, selectedFiles[i]);
              }

              _this552.updateFormData(formData, eventArgs.customFormData);
            });
          };

          if (selectedFiles[i].statusCode === '1') {
            var name = this.element.getAttribute('name');
            formData.append(name, selectedFiles[i].rawFile, selectedFiles[i].name);

            if (chunkEnabled && selectedFiles[i].size > this.asyncSettings.chunkSize) {
              this.chunkUpload(selectedFiles[i], custom, i);
            } else {
              ajax.onLoad = function (e) {
                if (eventArgs.cancel && _this552.isServerBlazor) {
                  return {};
                } else {
                  _this552.uploadComplete(e, selectedFiles[i], custom);

                  return {};
                }
              };

              ajax.onUploadProgress = function (e) {
                if (eventArgs.cancel && _this552.isServerBlazor) {
                  return {};
                } else {
                  _this552.uploadInProgress(e, selectedFiles[i], custom, ajax);

                  return {};
                }
              };
              /* istanbul ignore next */


              ajax.onError = function (e) {
                _this552.uploadFailed(e, selectedFiles[i]);

                return {};
              };

              ajax.send(formData);
            }
          }
        }
      }, {
        key: "spliceFiles",
        value: function spliceFiles(liIndex) {
          var liElement = this.fileList[liIndex];
          var allFiles = this.getFilesData();
          var nameElements = +liElement.getAttribute('data-files-count');
          var startIndex = 0;

          for (var i = 0; i < liIndex; i++) {
            startIndex += +this.fileList[i].getAttribute('data-files-count');
          }

          var endIndex = startIndex + nameElements - 1;

          for (var j = endIndex; j >= startIndex; j--) {
            allFiles.splice(j, 1);
          }
        }
        /**
         * Remove the uploaded file from server manually by calling the remove URL action.
         * If you pass an empty argument to this method, the complete file list can be cleared,
         * otherwise remove the specific file based on its argument (“file_data”).
         * @param { FileInfo | FileInfo[] } fileData - specifies the files data to remove from file list/server.
         * @param { boolean } customTemplate - Set true if the component rendering with customize template.
         * @param { boolean } removeDirectly - Set true if files remove without removing event.
         * @param { boolean } postRawFile - Set false, to post file name only to the remove action.
         * @returns void
         */

      }, {
        key: "remove",
        value: function remove(fileData, customTemplate, removeDirectly, postRawFile, args) {
          var _this553 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(postRawFile)) {
            postRawFile = true;
          }

          var eventArgs = {
            event: args,
            cancel: false,
            filesData: [],
            customFormData: [],
            postRawFile: postRawFile,
            currentRequest: null
          };
          var beforeEventArgs = {
            cancel: false,
            customFormData: [],
            currentRequest: null
          };
          this.trigger('beforeRemove', beforeEventArgs, function (beforeEventArgs) {
            if (!beforeEventArgs.cancel) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                _this553.currentRequestHeader = beforeEventArgs.currentRequest;
                _this553.customFormDatas = beforeEventArgs.customFormData;
              }

              var index;

              if (_this553.isFormUpload() && !_this553.isBlazorSaveUrl) {
                eventArgs.filesData = fileData;

                _this553.trigger('removing', eventArgs, function (eventArgs) {
                  if (!eventArgs.cancel) {
                    var removingFiles = _this553.getFilesInArray(fileData);

                    var isLiRemoved = false;
                    var liIndex;

                    var _iterator126 = _createForOfIteratorHelper(removingFiles),
                        _step126;

                    try {
                      for (_iterator126.s(); !(_step126 = _iterator126.n()).done;) {
                        var data = _step126.value;

                        if (!isLiRemoved) {
                          liIndex = _this553.fileList.indexOf(data.list);
                        }

                        if (liIndex > -1) {
                          var inputElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data.input) ? data.input : null;

                          if (inputElement) {
                            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(inputElement);
                          }

                          _this553.spliceFiles(liIndex);

                          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this553.fileList[liIndex]);

                          _this553.fileList.splice(liIndex, 1);

                          isLiRemoved = true;
                          liIndex = -1;
                        }
                      }
                    } catch (err) {
                      _iterator126.e(err);
                    } finally {
                      _iterator126.f();
                    }
                  }
                });
              } else if (_this553.isForm && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this553.asyncSettings.removeUrl) || _this553.asyncSettings.removeUrl === '') && !_this553.isBlazorSaveUrl) {
                eventArgs.filesData = _this553.getFilesData();

                _this553.trigger('removing', eventArgs, function (eventArgs) {
                  if (!eventArgs.cancel) {
                    _this553.clearAll();
                  }
                });
              } else {
                var removeFiles = [];
                fileData = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileData) ? fileData : _this553.filesData;

                if (fileData instanceof Array) {
                  removeFiles = fileData;
                } else {
                  removeFiles.push(fileData);
                }

                eventArgs.filesData = removeFiles;
                var removeUrl = _this553.asyncSettings.removeUrl;
                var validUrl = removeUrl === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(removeUrl) ? false : true;

                var _iterator127 = _createForOfIteratorHelper(removeFiles),
                    _step127;

                try {
                  var _loop24 = function _loop24() {
                    var files = _step127.value;
                    index = _this553.filesData.indexOf(files);

                    if ((files.statusCode === '2' || files.statusCode === '4') && validUrl) {
                      _this553.removeUploadedFile(files, eventArgs, removeDirectly, customTemplate);
                    } else {
                      if (!removeDirectly) {
                        _this553.trigger('removing', eventArgs, function (eventArgs) {
                          if (!eventArgs.cancel) {
                            _this553.removeFilesData(files, customTemplate);
                          }
                        });
                      } else {
                        _this553.removeFilesData(files, customTemplate);
                      }
                    }

                    if (args && !args.target.classList.contains(REMOVE_ICON)) {
                      _this553.checkActionComplete(false);
                    }
                  };

                  for (_iterator127.s(); !(_step127 = _iterator127.n()).done;) {
                    _loop24();
                  }
                } catch (err) {
                  _iterator127.e(err);
                } finally {
                  _iterator127.f();
                }
              }
            }
          });
        }
        /**
         * Clear all the file entries from list that can be uploaded files or added in upload queue.
         * @returns void
         */

      }, {
        key: "clearAll",
        value: function clearAll() {
          var _this554 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listParent) && !(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
            if (this.browserName !== 'msie') {
              this.element.value = '';
            }

            this.filesData = [];
            return;
          }

          var eventArgs = {
            cancel: false,
            filesData: this.filesData
          };
          this.trigger('clearing', eventArgs, function (eventArgs) {
            if (!eventArgs.cancel) {
              _this554.clearData();

              _this554.actionCompleteCount = 0;
              _this554.count = -1;
            }
          });
        }
        /**
         * Get the data of files which are shown in file list.
         * @param { number } index - specifies the file list item(li) index.
         * @returns FileInfo[]
         */

      }, {
        key: "getFilesData",
        value: function getFilesData(index) {
          if (!this.isServerBlazor) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
              return this.filesData;
            } else {
              return this.getSelectedFiles(index);
            }
          } else {
            for (var i = 0; i < this.filesData.length; i++) {
              this.filesData[i].rawFile = this.base64String[i];
            }

            return this.filesData;
          }
        }
        /**
         * Pauses the in-progress chunked upload based on the file data.
         * @param { FileInfo | FileInfo[] } fileData - specifies the files data to pause from uploading.
         * @param { boolean } custom - Set true if used custom UI.
         * @returns void
         */

      }, {
        key: "pause",
        value: function pause(fileData, custom) {
          fileData = fileData ? fileData : this.filesData;
          var fileDataFiles = this.getFilesInArray(fileData);
          this.pauseUploading(fileDataFiles, custom);
        }
      }, {
        key: "pauseUploading",
        value: function pauseUploading(fileData, custom) {
          var files = this.getFiles(fileData);

          for (var i = 0; i < files.length; i++) {
            if (files[i].statusCode === '3') {
              this.pauseUpload(this.getCurrentMetaData(files[i], null), null, custom);
            }
          }
        }
      }, {
        key: "getFiles",
        value: function getFiles(fileData) {
          var files = [];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fileData) && !(fileData instanceof Array)) {
            files.push(fileData);
          } else {
            files = fileData;
          }

          return files;
        }
        /**
         * Resumes the chunked upload that is previously paused based on the file data.
         * @param { FileInfo | FileInfo[] } fileData - specifies the files data to resume the paused file.
         * @param { boolean } custom - Set true if used custom UI.
         * @returns void
         */

      }, {
        key: "resume",
        value: function resume(fileData, custom) {
          fileData = fileData ? fileData : this.filesData;
          var fileDataFiles = this.getFilesInArray(fileData);
          this.resumeFiles(fileDataFiles, custom);
        }
      }, {
        key: "resumeFiles",
        value: function resumeFiles(fileData, custom) {
          var files = this.getFiles(fileData);

          for (var i = 0; i < files.length; i++) {
            if (files[i].statusCode === '4') {
              this.resumeUpload(this.getCurrentMetaData(files[i], null), null, custom);
            }
          }
        }
        /**
         * Retries the canceled or failed file upload based on the file data.
         * @param { FileInfo | FileInfo[] } fileData - specifies the files data to retry the canceled or failed file.
         * @param { boolean } fromcanceledStage - Set true to retry from canceled stage and set false to retry from initial stage.
         * @returns void
         */

      }, {
        key: "retry",
        value: function retry(fileData, fromcanceledStage, custom) {
          fileData = fileData ? fileData : this.filesData;
          var fileDataFiles = this.getFilesInArray(fileData);
          this.retryFailedFiles(fileDataFiles, fromcanceledStage, custom);
        }
      }, {
        key: "retryFailedFiles",
        value: function retryFailedFiles(fileData, fromcanceledStage, custom) {
          var files = this.getFiles(fileData);

          for (var i = 0; i < files.length; i++) {
            if (files[i].statusCode === '5' || files[i].statusCode === '0') {
              if (this.asyncSettings.chunkSize > 0) {
                this.retryUpload(this.getCurrentMetaData(files[i], null), fromcanceledStage);
              } else {
                var liElement = void 0;

                if (!custom) {
                  liElement = this.fileList[this.filesData.indexOf(files[i])];
                }

                this.reloadcanceledFile(null, files[i], liElement, custom);
              }
            }
          }
        }
        /**
         * Stops the in-progress chunked upload based on the file data.
         * When the file upload is canceled, the partially uploaded file is removed from server.
         * @param { FileInfo | FileInfo[] } fileData - specifies the files data to cancel the progressing file.
         * @returns void
         */

      }, {
        key: "cancel",
        value: function cancel(fileData) {
          fileData = fileData ? fileData : this.filesData;
          var cancelingFiles = this.getFilesInArray(fileData);
          this.cancelUpload(cancelingFiles);
        }
      }, {
        key: "cancelUpload",
        value: function cancelUpload(fileData) {
          var files = this.getFiles(fileData);

          if (this.asyncSettings.chunkSize > 0) {
            for (var i = 0; i < files.length; i++) {
              if (files[i].statusCode === '3') {
                var metaData = this.getCurrentMetaData(files[i], null);
                metaData.file.statusCode = '5';
                metaData.file.status = this.localizedTexts('fileUploadCancel');
                this.updateMetaData(metaData);
                this.showHideUploadSpinner(files[i]);
              }
            }
          } else {
            for (var _i110 = 0; _i110 < files.length; _i110++) {
              if (files[_i110].statusCode === '3') {
                files[_i110].statusCode = '5';
                files[_i110].status = this.localizedTexts('fileUploadCancel');
                this.showHideUploadSpinner(files[_i110]);
              }
            }
          }
        }
      }, {
        key: "showHideUploadSpinner",
        value: function showHideUploadSpinner(files) {
          var liElement = this.getLiElement(files);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.template)) {
            var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["createSpinner"])({
              target: spinnerTarget,
              width: '20px'
            });
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["showSpinner"])(spinnerTarget);
          }
        }
      }]);

      return Uploader;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      saveUrl: '',
      removeUrl: ''
    }, AsyncSettings)], Uploader.prototype, "asyncSettings", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Uploader.prototype, "sequentialUpload", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], Uploader.prototype, "htmlAttributes", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Uploader.prototype, "cssClass", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Uploader.prototype, "enabled", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Uploader.prototype, "template", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Uploader.prototype, "multiple", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Uploader.prototype, "autoUpload", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, ButtonsProps)], Uploader.prototype, "buttons", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Uploader.prototype, "allowedExtensions", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Uploader.prototype, "minFileSize", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(30000000)], Uploader.prototype, "maxFileSize", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Uploader.prototype, "dropArea", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], FilesProp)], Uploader.prototype, "files", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Uploader.prototype, "showFileList", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Uploader.prototype, "directoryUpload", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Default')], Uploader.prototype, "dropEffect", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "created", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "actionComplete", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "rendering", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "beforeUpload", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "fileListRendering", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "selected", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "uploading", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "success", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "failure", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "removing", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "beforeRemove", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "clearing", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "progress", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "change", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "chunkSuccess", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "chunkFailure", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "chunkUploading", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "canceling", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "pausing", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Uploader.prototype, "resuming", void 0);

    Uploader = __decorate$4([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Uploader);
    /**
     * Uploader modules
     */

    var __decorate$5 = undefined && undefined.__decorate || function (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;
    };

    var APPLY = 'e-apply';
    var CANCEL = 'e-cancel';
    var CURRENT = 'e-current';
    var CONTAINER = 'e-container';
    var CTRLBTN = 'e-ctrl-btn';
    var CTRLSWITCH = 'e-switch-ctrl-btn';
    var DISABLED$1 = 'e-disabled';
    var FORMATSWITCH = 'e-value-switch-btn';
    var HANDLER = 'e-handler';
    var HEX = 'e-hex';
    var HIDEHEX = 'e-hide-hex-value';
    var HIDEOPACITY = 'e-hide-opacity';
    var HIDERGBA = 'e-hide-switchable-value';
    var HIDEVALUE = 'e-hide-value';
    var HIDEVALUESWITCH = 'e-hide-valueswitcher';
    var HSVAREA = 'e-hsv-color';
    var HSVCONTAINER = 'e-hsv-container';
    var INPUTWRAPPER = 'e-selected-value';
    var MODESWITCH = 'e-mode-switch-btn';
    var NOCOLOR = 'e-nocolor-item';
    var OPACITY = 'e-opacity-value';
    var PALETTES = 'e-palette';
    var PALETTECONTENT = 'e-color-palette';
    var PICKERCONTENT = 'e-color-picker';
    var PREVIEW = 'e-preview-container';
    var PREVIOUS = 'e-previous';
    var RTL$1 = 'e-rtl';
    var SHOWVALUE = 'e-show-value';
    var SELECT = 'e-selected';
    var SPLITPREVIEW = 'e-split-preview';
    var TILE = 'e-tile';
    var presets = {
      "default": ['#000000', '#f44336', '#e91e63', '#9c27b0', '#673ab7', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#ffeb3b', '#ffffff', '#ffebee', '#fce4ec', '#f3e5f5', '#ede7f6', '#e3f2fd', '#e1f5fe', '#e0f7fa', '#e0f2f1', '#fffde7', '#f2f2f2', '#ffcdd2', '#f8bbd0', '#e1bee7', '#d1c4e9', '#bbdefb', '#b3e5fc', '#b2ebf2', '#b2dfdb', '#fff9c4', '#e6e6e6', '#ef9a9a', '#f48fb1', '#ce93d8', '#b39ddb', '#90caf9', '#81d4fa', '#80deea', '#80cbc4', '#fff59d', '#cccccc', '#e57373', '#f06292', '#ba68c8', '#9575cd', '#64b5f6', '#4fc3f7', '#4dd0e1', '#4db6ac', '#fff176', '#b3b3b3', '#ef5350', '#ec407a', '#ab47bc', '#7e57c2', '#42a5f5', '#29b6f6', '#26c6da', '#26a69a', '#ffee58', '#999999', '#e53935', '#d81b60', '#8e24aa', '#5e35b1', '#1e88e5', '#039be5', '#00acc1', '#00897b', '#fdd835', '#808080', '#d32f2f', '#c2185b', '#7b1fa2', '#512da8', '#1976d2', '#0288d1', '#0097a7', '#00796b', '#fbc02d', '#666666', '#c62828', '#ad1457', '#6a1b9a', '#4527a0', '#1565c0', '#0277bd', '#00838f', '#00695c', '#f9a825', '#4d4d4d', '#b71c1c', '#880e4f', '#4a148c', '#311b92', '#0d47a1', '#01579b', '#006064', '#004d40', '#f57f17']
    };
    /**
     * ColorPicker component is a user interface to select and adjust color values. It provides supports for various
     * color specification like Red Green Blue, Hue Saturation Value and Hex codes.
     * ```html
     * <input type="color" id="color-picker">
     * ```
     * ```typescript
     * <script>
     *   let colorPickerObj: ColorPicker = new ColorPicker(null , "#color-picker");
     * </script>
     * ```
     */

    var ColorPicker = /*#__PURE__*/function (_syncfusion_ej2_base_25) {
      _inherits(ColorPicker, _syncfusion_ej2_base_25);

      var _super208 = _createSuper(ColorPicker);

      function ColorPicker(options, element) {
        _classCallCheck(this, ColorPicker);

        return _super208.call(this, options, element);
      }

      _createClass2(ColorPicker, [{
        key: "preRender",
        value: function preRender() {
          var ele = this.element;
          this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.formResetHandler, this);
          }

          var localeText = {
            Apply: 'Apply',
            Cancel: 'Cancel',
            ModeSwitcher: 'Switch Mode'
          };
          this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('colorpicker', localeText, this.locale);

          if (ele.getAttribute('ejs-for') && !ele.getAttribute('name')) {
            ele.setAttribute('name', ele.id);
          }
        }
        /**
         * To Initialize the component rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initWrapper();

          if (this.inline) {
            this.createWidget();
          } else {
            this.createSplitBtn();
          }

          if (!this.enableOpacity) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container.parentElement], HIDEOPACITY);
          }

          this.renderComplete();
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          var wrapper = this.createElement('div', {
            className: 'e-' + this.getModuleName() + '-wrapper'
          });
          this.element.parentNode.insertBefore(wrapper, this.element);
          wrapper.appendChild(this.element);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'tabindex': '-1',
            'spellcheck': 'false'
          });
          this.container = this.createElement('div', {
            className: CONTAINER
          });
          this.getWrapper().appendChild(this.container);
          var value = this.value ? this.roundValue(this.value).toLowerCase() : '#008000ff';

          if (this.noColor && this.mode === 'Palette' && this.value === '') {
            value = '';
          }

          var slicedValue = value.slice(0, 7);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initialInputValue)) {
            this.initialInputValue = slicedValue;
          }

          this.element.value = slicedValue;

          if (this.enableOpacity) {
            this.setProperties({
              'value': value
            }, true);
          } else {
            this.setProperties({
              'value': slicedValue
            }, true);
          }

          if (this.enableRtl) {
            wrapper.classList.add(RTL$1);
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], this.cssClass.split(' '));
          }

          this.tileRipple = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.container, {
            selector: '.' + TILE
          });
          this.ctrlBtnRipple = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.container, {
            selector: '.e-btn'
          });
        }
      }, {
        key: "getWrapper",
        value: function getWrapper() {
          return this.element.parentElement;
        }
      }, {
        key: "createWidget",
        value: function createWidget() {
          if (this.mode === 'Palette') {
            this.createPalette();

            if (!this.inline) {
              this.firstPaletteFocus();
            }
          } else {
            this.createPicker();

            if (!this.inline) {
              this.getDragHandler().focus();
            }
          }

          this.isRgb = true;
          this.createInput();
          this.createCtrlBtn();

          if (!this.disabled) {
            this.wireEvents();
          }

          if (this.inline && this.disabled) {
            this.toggleDisabled(true);
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.refreshPopupPos();
          }
        }
      }, {
        key: "createSplitBtn",
        value: function createSplitBtn() {
          var _this555 = this;

          var splitButton = this.createElement('button', {
            className: 'e-split-colorpicker'
          });
          this.getWrapper().appendChild(splitButton);
          this.splitBtn = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_2__["SplitButton"]({
            iconCss: 'e-selected-color',
            target: this.container,
            disabled: this.disabled,
            enableRtl: this.enableRtl,
            open: this.onOpen.bind(this),
            click: function click(args) {
              _this555.trigger('change', {
                currentValue: {
                  hex: _this555.value.slice(0, 7),
                  rgba: _this555.convertToRgbString(_this555.hexToRgb(_this555.value))
                },
                previousValue: {
                  hex: null,
                  rgba: null
                },
                value: _this555.value
              });
            }
          });
          this.splitBtn.createElement = this.createElement;
          this.splitBtn.appendTo(splitButton);
          var preview = this.createElement('span', {
            className: SPLITPREVIEW
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-selected-color', splitButton).appendChild(preview);
          preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
          var popupEle = this.getPopupEle();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([popupEle], 'e-colorpicker-popup');

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([popupEle], this.cssClass.split(' '));
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            var popupInst = this.getPopupInst();
            popupInst.relateTo = document.body;
            popupInst.position = {
              X: 'center',
              Y: 'center'
            };
            popupInst.targetType = 'container';
            popupInst.collision = {
              X: 'fit',
              Y: 'fit'
            };
            popupInst.offsetY = 4;
            popupEle.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["getZindexPartial"])(this.splitBtn.element).toString();
          }

          this.bindCallBackEvent();
        }
      }, {
        key: "onOpen",
        value: function onOpen(args) {
          this.trigger('open', {
            element: this.container
          });
        }
      }, {
        key: "getPopupInst",
        value: function getPopupInst() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(this.getPopupEle(), _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Popup"]);
        }
      }, {
        key: "bindCallBackEvent",
        value: function bindCallBackEvent() {
          var _this556 = this;

          this.splitBtn.beforeOpen = function (args) {
            var callBackPromise = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_2__["Deferred"]();

            _this556.trigger('beforeOpen', args, function (observeOpenArgs) {
              if (!observeOpenArgs.cancel) {
                var popupEle = _this556.getPopupEle();

                popupEle.style.top = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(0 + pageYOffset);
                popupEle.style.left = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(0 + pageXOffset);
                popupEle.style.display = 'block';

                _this556.createWidget();

                popupEle.style.display = '';

                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                  _this556.modal = _this556.createElement('div');
                  _this556.modal.className = 'e-' + _this556.getModuleName() + ' e-modal';
                  _this556.modal.style.display = 'none';
                  document.body.insertBefore(_this556.modal, popupEle);
                  document.body.className += ' e-colorpicker-overflow';
                  _this556.modal.style.display = 'block';
                  _this556.modal.style.zIndex = (Number(popupEle.style.zIndex) - 1).toString();
                }
              }

              args.cancel = observeOpenArgs.cancel;
              callBackPromise.resolve(observeOpenArgs);
            });

            return callBackPromise;
          };

          this.splitBtn.beforeClose = function (args) {
            var callBackPromise = new _syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_2__["Deferred"]();

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.event)) {
              var beforeCloseArgs = {
                element: _this556.container,
                event: args.event,
                cancel: false
              };

              _this556.trigger('beforeClose', beforeCloseArgs, function (observedCloseArgs) {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && args.event.target === _this556.modal) {
                  observedCloseArgs.cancel = true;
                }

                if (!observedCloseArgs.cancel) {
                  _this556.onPopupClose();
                }

                args.cancel = observedCloseArgs.cancel;
                callBackPromise.resolve(observedCloseArgs);
              });
            } else {
              callBackPromise.resolve(args);
            }

            return callBackPromise;
          };
        }
      }, {
        key: "onPopupClose",
        value: function onPopupClose() {
          this.unWireEvents();
          this.destroyOtherComp();
          this.container.style.width = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + SPLITPREVIEW, this.splitBtn.element).style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
          this.container.innerHTML = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.container], [PICKERCONTENT, PALETTECONTENT]);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.modal) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], 'e-colorpicker-overflow');
            this.modal.style.display = 'none';
            this.modal.outerHTML = '';
            this.modal = null;
          }
        }
      }, {
        key: "createPalette",
        value: function createPalette() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.container, [PALETTECONTENT], [PICKERCONTENT]);

          if (this.presetColors) {
            var paletteGroup = this.createElement('div', {
              className: 'e-custom-palette'
            });
            this.appendElement(paletteGroup);
            var keys = Object.keys(this.presetColors);

            if (keys.length === 1) {
              this.appendPalette(this.presetColors[keys[0]], keys[0], paletteGroup);
            } else {
              for (var i = 0, _len39 = keys.length; i < _len39; i++) {
                this.appendPalette(this.presetColors[keys[i]], keys[i], paletteGroup);
              }
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-row', paletteGroup).length > 10) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([paletteGroup], 'e-palette-group');
            }
          } else {
            this.appendPalette(presets["default"], 'default');
          }

          if (this.mode === 'Palette' && !this.modeSwitcher && this.noColor) {
            this.setNoColor();
          }

          var width = parseInt(getComputedStyle(this.container).borderBottomWidth, 10);
          this.container.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.container.children[0].offsetWidth + width + width);
          this.rgb = this.hexToRgb(this.roundValue(this.value));
          this.hsv = this.rgbToHsv.apply(this, this.rgb);
        }
      }, {
        key: "firstPaletteFocus",
        value: function firstPaletteFocus() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + SELECT, this.container.children[0])) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + PALETTES, this.container)[0].focus();
          }
        }
      }, {
        key: "appendPalette",
        value: function appendPalette(colors, key, refEle) {
          var palette = this.createElement('div', {
            className: PALETTES,
            attrs: {
              'tabindex': '0'
            }
          });

          if (refEle) {
            refEle.appendChild(palette);
          } else {
            this.appendElement(palette);
          }

          var row;
          var tile;
          var roundedColor;

          for (var i = 0, _len40 = colors.length; i < _len40; i++) {
            if (i === 0 || i % this.columns === 0) {
              row = this.createElement('div', {
                className: 'e-row',
                attrs: {
                  'role': 'row'
                }
              });
              palette.appendChild(row);
            }

            roundedColor = this.roundValue(colors[i]).toLowerCase();
            tile = this.createElement('span', {
              className: TILE,
              attrs: {
                'role': 'gridcell',
                'aria-label': roundedColor,
                'aria-selected': 'false'
              }
            });
            this.trigger('beforeTileRender', {
              element: tile,
              presetName: key,
              value: colors[i]
            });
            row.appendChild(tile);

            if (this.value === roundedColor) {
              this.addTileSelection(tile);
              palette.focus();
            }

            tile.style.backgroundColor = this.convertToRgbString(this.hexToRgb(roundedColor));
          }
        }
      }, {
        key: "setNoColor",
        value: function setNoColor() {
          var noColorEle = this.container.querySelector('.e-row').children[0];
          noColorEle.classList.add(NOCOLOR);

          if (!this.value) {
            noColorEle.classList.add(SELECT);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(noColorEle, '.' + PALETTES).focus();
          }

          ['aria-selected', 'aria-label'].forEach(function (attr) {
            noColorEle.removeAttribute(attr);
          });
          noColorEle.style.backgroundColor = '';
        }
      }, {
        key: "appendElement",
        value: function appendElement(ele) {
          var insertPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
          var refEle = this.container.children[insertPos];
          refEle ? this.container.insertBefore(ele, refEle) : this.container.appendChild(ele);
        }
      }, {
        key: "addTileSelection",
        value: function addTileSelection(ele) {
          ele.classList.add(SELECT);
          ele.setAttribute('aria-selected', 'true');
        }
      }, {
        key: "createPicker",
        value: function createPicker() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(this.container, [PICKERCONTENT], [PALETTECONTENT]);
          var hsvContainer = this.createElement('div', {
            className: HSVCONTAINER
          });
          this.appendElement(hsvContainer);
          hsvContainer.appendChild(this.createElement('div', {
            className: HSVAREA
          }));
          var dragHandler = this.createElement('span', {
            className: HANDLER,
            attrs: {
              'tabindex': '0'
            }
          });
          hsvContainer.appendChild(dragHandler);
          this.rgb = this.hexToRgb(this.value);
          this.hsv = this.rgbToHsv.apply(this, this.rgb);
          this.setHsvContainerBg();
          this.setHandlerPosition();
          this.createSlider();
          this.createDragTooltip();
        }
      }, {
        key: "setHsvContainerBg",
        value: function setHsvContainerBg() {
          var h = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.hsv[0];
          this.getHsvContainer().style.backgroundColor = this.convertToRgbString(this.hsvToRgb(h, 100, 100, 1));
        }
      }, {
        key: "getHsvContainer",
        value: function getHsvContainer() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVCONTAINER, this.container);
        }
      }, {
        key: "setHandlerPosition",
        value: function setHandlerPosition() {
          var dragHandler = this.getDragHandler();
          var hsvArea = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVAREA, this.container);

          if (this.enableRtl) {
            dragHandler.style.left = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(hsvArea.offsetWidth * Math.abs(100 - this.hsv[1]) / 100);
          } else {
            dragHandler.style.left = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(hsvArea.offsetWidth * this.hsv[1] / 100);
          }

          dragHandler.style.top = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(hsvArea.offsetHeight * (100 - this.hsv[2]) / 100);
        }
      }, {
        key: "createSlider",
        value: function createSlider() {
          var sliderPreviewWrapper = this.createElement('div', {
            className: 'e-slider-preview'
          });
          this.appendElement(sliderPreviewWrapper, 1);
          this.createPreview(sliderPreviewWrapper);
          var sliderWrapper = this.createElement('div', {
            className: 'e-colorpicker-slider'
          });
          sliderPreviewWrapper.insertBefore(sliderWrapper, sliderPreviewWrapper.children[0]);
          var slider = this.createElement('div', {
            className: 'e-hue-slider'
          });
          sliderWrapper.appendChild(slider);
          this.hueSlider = new Slider({
            value: this.hsv[0],
            min: 0,
            max: 359,
            enableRtl: this.enableRtl,
            enabled: !this.disabled,
            change: this.hueChange.bind(this)
          });
          this.hueSlider.createElement = this.createElement;
          this.hueSlider.appendTo(slider);

          if (this.enableOpacity) {
            slider = this.createElement('div', {
              className: 'e-opacity-slider'
            });
            sliderWrapper.appendChild(slider);
            this.createOpacitySlider(slider);
          }
        }
      }, {
        key: "createOpacitySlider",
        value: function createOpacitySlider(slider) {
          this.opacitySlider = new Slider({
            value: this.rgb[3] * 100,
            min: 0,
            max: 100,
            enableRtl: this.enableRtl,
            enabled: !this.disabled,
            change: this.opacityChange.bind(this)
          });
          this.opacitySlider.createElement = this.createElement;
          this.opacitySlider.appendTo(slider);
          var opacityBgTrack = this.createElement('div', {
            className: 'e-opacity-empty-track'
          });
          slider.appendChild(opacityBgTrack);
          this.updateOpacitySliderBg();
        }
      }, {
        key: "updateOpacitySliderBg",
        value: function updateOpacitySliderBg() {
          var direction = this.enableRtl ? 'to left' : 'to right';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-slider-track', this.opacitySlider.element).style.background = 'linear-gradient(' + direction + ', rgba(' + this.rgb.slice(0, 3) + ', 0) 0%, ' + this.convertToRgbString(this.rgb.slice(0, 3)) + ' 100%)';
        }
      }, {
        key: "hueChange",
        value: function hueChange(args) {
          this.hsv[0] = args.value;
          this.setHsvContainerBg();
          this.convertToOtherFormat();
        }
      }, {
        key: "opacityChange",
        value: function opacityChange(args) {
          var value = args.value;
          var pValue = this.rgbToHex(this.rgb);
          this.hsv[3] = value / 100;
          this.rgb[3] = value / 100;
          var cValue = this.rgbToHex(this.rgb);
          this.updateOpacityInput(value);
          var rgb = this.convertToRgbString(this.rgb);
          this.updatePreview(rgb);
          this.triggerEvent(cValue, pValue, rgb);
        }
      }, {
        key: "updateOpacityInput",
        value: function updateOpacityInput(value) {
          if (this.enableOpacity && !this.getWrapper().classList.contains(HIDEVALUE)) {
            var opacityTextBoxInst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + OPACITY, this.container), NumericTextBox);
            opacityTextBoxInst.value = value;
            opacityTextBoxInst.dataBind();
          }
        }
      }, {
        key: "createPreview",
        value: function createPreview(parentEle) {
          var previewContainer = this.createElement('div', {
            className: PREVIEW
          });
          parentEle.appendChild(previewContainer);
          var preview = this.createElement('span', {
            className: 'e-preview ' + CURRENT
          });
          previewContainer.appendChild(preview);
          var colorValue = this.convertToRgbString(this.rgb);
          preview.style.backgroundColor = colorValue;
          preview = this.createElement('span', {
            className: 'e-preview ' + PREVIOUS
          });
          previewContainer.appendChild(preview);
          preview.style.backgroundColor = colorValue;
        }
      }, {
        key: "isPicker",
        value: function isPicker() {
          return !this.container.classList.contains(PALETTECONTENT);
        }
      }, {
        key: "getPopupEle",
        value: function getPopupEle() {
          return this.container.parentElement;
        }
      }, {
        key: "createNumericInput",
        value: function createNumericInput(element, value, label, max) {
          var _this557 = this;

          var numericInput = new NumericTextBox({
            value: value,
            placeholder: label,
            min: 0,
            max: max,
            format: '###.##',
            showSpinButton: false,
            floatLabelType: 'Always',
            enableRtl: this.enableRtl,
            enabled: !this.disabled,
            readonly: this.isPicker() ? false : true,
            change: function change(args) {
              if (args.event) {
                _this557.inputHandler(args.event);
              }
            }
          });
          numericInput.createElement = this.createElement;
          numericInput.appendTo(element);
        }
      }, {
        key: "createInput",
        value: function createInput() {
          var isPicker = this.isPicker();
          var wrapper = this.getWrapper();

          if (isPicker && !wrapper.classList.contains(HIDEVALUE) || !isPicker && wrapper.classList.contains(SHOWVALUE)) {
            var inputWrap = this.createElement('div', {
              className: INPUTWRAPPER
            });
            isPicker ? this.appendElement(inputWrap, 2) : this.appendElement(inputWrap, 1);
            var container = this.createElement('div', {
              className: 'e-input-container'
            });
            inputWrap.appendChild(container);

            if (!wrapper.classList.contains(HIDEVALUESWITCH)) {
              this.appendValueSwitchBtn(inputWrap);
            }

            if (!wrapper.classList.contains(HIDEHEX)) {
              var hexInput = this.createElement('input', {
                className: HEX,
                attrs: {
                  'maxlength': '7',
                  'spellcheck': 'false'
                }
              });
              container.appendChild(hexInput);
              Input.createInput({
                element: hexInput,
                floatLabelType: 'Always',
                properties: {
                  placeholder: 'HEX',
                  enableRtl: this.enableRtl,
                  enabled: !this.disabled,
                  readonly: this.isPicker() ? false : true
                }
              }, this.createElement);
              Input.setValue(this.value.slice(0, 7), hexInput);
              hexInput.addEventListener('input', this.inputHandler.bind(this));
            }

            if (!wrapper.classList.contains(HIDERGBA)) {
              var label;
              var value;

              if (this.isRgb) {
                label = 'RGB';
                value = this.rgb;
              } else {
                label = 'HSV';
                value = this.hsv;
              }

              var clsName = ['rh', 'gs', 'bv'];

              for (var i = 0; i < 3; i++) {
                this.createNumericInput(container.appendChild(this.createElement('input', {
                  className: 'e-' + clsName[i] + '-value'
                })), value[i], label[i], 255);
              }

              if (this.enableOpacity) {
                this.appendOpacityValue(container);
              }
            }
          }
        }
      }, {
        key: "appendOpacityValue",
        value: function appendOpacityValue(container) {
          this.createNumericInput(container.appendChild(this.createElement('input', {
            className: OPACITY
          })), this.rgb[3] * 100, 'A', 100);
        }
      }, {
        key: "appendValueSwitchBtn",
        value: function appendValueSwitchBtn(targetEle) {
          var valueSwitchBtn = this.createElement('button', {
            className: 'e-icons e-css e-btn e-flat e-icon-btn ' + FORMATSWITCH
          });
          targetEle.appendChild(valueSwitchBtn);

          if (this.isPicker() && !this.getWrapper().classList.contains(HIDERGBA)) {
            valueSwitchBtn.addEventListener('click', this.formatSwitchHandler.bind(this));
          }
        }
      }, {
        key: "createCtrlBtn",
        value: function createCtrlBtn() {
          if (this.modeSwitcher || this.showButtons) {
            this.l10n.setLocale(this.locale);
            var btnWrapper = this.createElement('div', {
              className: CTRLSWITCH
            });
            this.container.appendChild(btnWrapper);

            if (this.showButtons) {
              var controlBtnWrapper = this.createElement('div', {
                className: CTRLBTN
              });
              btnWrapper.appendChild(controlBtnWrapper);
              var apply = this.l10n.getConstant('Apply');
              controlBtnWrapper.appendChild(this.createElement('button', {
                innerHTML: apply,
                className: 'e-btn e-css e-flat e-primary e-small ' + APPLY,
                attrs: {
                  'title': apply
                }
              }));
              var cancel = this.l10n.getConstant('Cancel');
              controlBtnWrapper.appendChild(this.createElement('button', {
                innerHTML: cancel,
                className: 'e-btn e-css e-flat e-small ' + CANCEL,
                attrs: {
                  'title': cancel
                }
              }));
            }

            if (this.modeSwitcher) {
              this.appendModeSwitchBtn();
            }
          }
        }
      }, {
        key: "appendModeSwitchBtn",
        value: function appendModeSwitchBtn() {
          var modeSwitcher = this.createElement('button', {
            className: 'e-icons e-btn e-flat e-icon-btn ' + MODESWITCH,
            attrs: {
              title: this.l10n.getConstant('ModeSwitcher')
            }
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container).insertBefore(modeSwitcher, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLBTN, this.container));
        }
      }, {
        key: "createDragTooltip",
        value: function createDragTooltip() {
          var _this558 = this;

          var tooltip = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Tooltip"]({
            opensOn: 'Custom',
            showTipPointer: false,
            cssClass: 'e-color-picker-tooltip',
            beforeOpen: function beforeOpen(args) {
              _this558.tooltipEle = args.element;
            },
            animation: {
              open: {
                effect: 'None'
              },
              close: {
                effect: 'None'
              }
            }
          });
          tooltip.createElement = this.createElement;
          tooltip.appendTo(this.container);
          tooltip.open(this.container);
          this.tooltipEle.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["getZindexPartial"])(this.tooltipEle).toString();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-tip-content', this.tooltipEle).appendChild(this.createElement('div', {
            className: 'e-tip-transparent'
          }));
        }
      }, {
        key: "getTooltipInst",
        value: function getTooltipInst() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(this.container, _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_1__["Tooltip"]);
        }
      }, {
        key: "setTooltipOffset",
        value: function setTooltipOffset(value) {
          this.getTooltipInst().offsetY = value;
        }
      }, {
        key: "toggleDisabled",
        value: function toggleDisabled(enable) {
          enable ? this.getWrapper().classList.add(DISABLED$1) : this.getWrapper().classList.remove(DISABLED$1);

          if (this.showButtons) {
            [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-btn', this.container)).forEach(function (ele) {
              enable ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(ele, {
                'disabled': ''
              }) : ele.removeAttribute('disabled');
            });
          }
        }
      }, {
        key: "convertToRgbString",
        value: function convertToRgbString(rgb) {
          return rgb.length ? rgb.length === 4 ? 'rgba(' + rgb.join() + ')' : 'rgb(' + rgb.join() + ')' : '';
        }
      }, {
        key: "convertToHsvString",
        value: function convertToHsvString(hsv) {
          return hsv.length === 4 ? 'hsva(' + hsv.join() + ')' : 'hsv(' + hsv.join() + ')';
        }
      }, {
        key: "updateHsv",
        value: function updateHsv() {
          this.hsv[1] = this.hsv[1] > 100 ? 100 : this.hsv[1];
          this.hsv[2] = this.hsv[2] > 100 ? 100 : this.hsv[2];
          this.setHandlerPosition();
        }
      }, {
        key: "convertToOtherFormat",
        value: function convertToOtherFormat() {
          var isKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          var pValue = this.rgbToHex(this.rgb);
          this.rgb = this.hsvToRgb.apply(this, this.hsv);
          var cValue = this.rgbToHex(this.rgb);
          var rgba = this.convertToRgbString(this.rgb);
          this.updatePreview(rgba);
          this.updateInput(cValue);
          this.triggerEvent(cValue, pValue, rgba, isKey);
        }
      }, {
        key: "updateInput",
        value: function updateInput(value) {
          var wrapper = this.getWrapper();

          if (!wrapper.classList.contains(HIDEVALUE)) {
            if (!wrapper.classList.contains(HIDEHEX)) {
              Input.setValue(value.substr(0, 7), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HEX, this.container));
            }

            if (!wrapper.classList.contains(HIDERGBA)) {
              if (this.isRgb) {
                this.updateValue(this.rgb, false);
              } else {
                this.updateValue(this.hsv, false);
              }
            }
          }
        }
      }, {
        key: "updatePreview",
        value: function updatePreview(value) {
          if (this.enableOpacity) {
            this.updateOpacitySliderBg();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-tip-transparent', this.tooltipEle).style.backgroundColor = value;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PREVIEW + ' .' + CURRENT, this.container).style.backgroundColor = value;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PREVIEW + ' .' + PREVIOUS, this.container).style.backgroundColor = this.convertToRgbString(this.hexToRgb(this.value));
        }
      }, {
        key: "getDragHandler",
        value: function getDragHandler() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HANDLER, this.container);
        }
      }, {
        key: "removeTileSelection",
        value: function removeTileSelection() {
          var selectedEle = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + SELECT, this.container.children[0]));
          selectedEle.forEach(function (ele) {
            ele.classList.remove(SELECT);
            ele.setAttribute('aria-selected', 'false');
          });
        }
      }, {
        key: "convertRgbToNumberArray",
        value: function convertRgbToNumberArray(value) {
          return value.slice(value.indexOf('(') + 1, value.indexOf(')')).split(',').map(function (n, i) {
            return i !== 3 ? parseInt(n, 10) : parseFloat(n);
          });
        }
        /**
         * To get color value in specified type.
         * @param value - Specify the color value.
         * @param type - Specify the type to which the specified color needs to be converted.
         * @method getValue
         * @return {string}
         */

      }, {
        key: "getValue",
        value: function getValue(value, type) {
          if (!value) {
            value = this.value;
          }

          type = !type ? 'hex' : type.toLowerCase();

          if (value[0] === 'r') {
            var cValue = this.convertRgbToNumberArray(value);

            if (type === 'hex' || type === 'hexa') {
              var hex = this.rgbToHex(cValue);
              return type === 'hex' ? hex.slice(0, 7) : hex;
            } else {
              if (type === 'hsv') {
                return this.convertToHsvString(this.rgbToHsv.apply(this, cValue.slice(0, 3)));
              } else {
                if (type === 'hsva') {
                  return this.convertToHsvString(this.rgbToHsv.apply(this, cValue));
                } else {
                  return 'null';
                }
              }
            }
          } else {
            if (value[0] === 'h') {
              var _cValue = this.hsvToRgb.apply(this, this.convertRgbToNumberArray(value));

              if (type === 'rgba') {
                return this.convertToRgbString(_cValue);
              } else {
                if (type === 'hex' || type === 'hexa') {
                  var _hex = this.rgbToHex(_cValue);

                  return type === 'hex' ? _hex.slice(0, 7) : _hex;
                } else {
                  if (type === 'rgb') {
                    return this.convertToRgbString(_cValue.slice(0, 3));
                  } else {
                    return 'null';
                  }
                }
              }
            } else {
              value = this.roundValue(value);
              var rgb = this.hexToRgb(value);

              if (type === 'rgb' || type === 'hsv') {
                rgb = rgb.slice(0, 3);
              }

              if (type === 'rgba' || type === 'rgb') {
                return this.convertToRgbString(rgb);
              } else {
                if (type === 'hsva' || type === 'hsv') {
                  return this.convertToHsvString(this.rgbToHsv.apply(this, rgb));
                } else {
                  if (type === 'hex') {
                    return value.slice(0, 7);
                  } else {
                    if (type === 'a') {
                      return rgb[3].toString();
                    } else {
                      return 'null';
                    }
                  }
                }
              }
            }
          }
        }
        /**
         * To show/hide ColorPicker popup based on current state of the SplitButton.
         * @method toggle
         * @return {void}
         */

      }, {
        key: "toggle",
        value: function toggle() {
          this.container.parentElement.classList.contains('e-popup-close') ? this.splitBtn.toggle() : this.closePopup(null);
        }
        /**
         * Get component name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'colorpicker';
        }
        /**
         * Gets the properties to be maintained in the persisted state.
         * @return {string}
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['value']);
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          if (this.isPicker()) {
            var dragHandler = this.getDragHandler();

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(dragHandler, 'keydown', this.pickerKeyDown, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.getHsvContainer(), 'mousedown touchstart', this.handlerDown, this);

            if (this.modeSwitcher || this.showButtons) {
              this.addCtrlSwitchEvent();
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PREVIOUS, this.container), 'click', this.previewHandler, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.container, 'click', this.paletteClickHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.container, 'keydown', this.paletteKeyDown, this);
          }
        }
      }, {
        key: "formResetHandler",
        value: function formResetHandler() {
          this.value = this.initialInputValue;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'value': this.initialInputValue
          });
        }
      }, {
        key: "addCtrlSwitchEvent",
        value: function addCtrlSwitchEvent() {
          var ctrlSwitchBtn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container);

          if (ctrlSwitchBtn) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ctrlSwitchBtn, 'click', this.btnClickHandler, this);
          }
        }
      }, {
        key: "pickerKeyDown",
        value: function pickerKeyDown(e) {
          switch (e.keyCode) {
            case 39:
              this.handlerDragPosition(1, this.enableRtl ? -1 : 1, e);
              break;

            case 37:
              this.handlerDragPosition(1, this.enableRtl ? 1 : -1, e);
              break;

            case 38:
              this.handlerDragPosition(2, 1, e);
              break;

            case 40:
              this.handlerDragPosition(2, -1, e);
              break;

            case 13:
              e.preventDefault();
              var cValue = this.rgbToHex(this.rgb);
              this.enterKeyHandler(cValue, e);
          }
        }
      }, {
        key: "enterKeyHandler",
        value: function enterKeyHandler(value, e) {
          this.triggerChangeEvent(value);

          if (!this.inline) {
            this.closePopup(e);
            this.splitBtn.element.focus();
          }
        }
      }, {
        key: "closePopup",
        value: function closePopup(e) {
          var _this559 = this;

          var beforeCloseArgs = {
            element: this.container,
            event: e,
            cancel: false
          };
          this.trigger('beforeClose', beforeCloseArgs, function (observedcloseArgs) {
            if (!observedcloseArgs.cancel) {
              _this559.splitBtn.toggle();

              _this559.onPopupClose();
            }
          });
        }
      }, {
        key: "triggerChangeEvent",
        value: function triggerChangeEvent(value) {
          var hex = value.slice(0, 7);
          this.trigger('change', {
            currentValue: {
              hex: hex,
              rgba: this.convertToRgbString(this.rgb)
            },
            previousValue: {
              hex: this.value.slice(0, 7),
              rgba: this.convertToRgbString(this.hexToRgb(this.value))
            },
            value: this.enableOpacity ? value : hex
          });

          if (this.enableOpacity) {
            this.setProperties({
              'value': value
            }, true);
          } else {
            this.setProperties({
              'value': hex
            }, true);
          }

          this.element.value = hex ? hex : '#000000';
        }
      }, {
        key: "handlerDragPosition",
        value: function handlerDragPosition(prob, value, e) {
          e.preventDefault();
          this.hsv[prob] += value * (e.ctrlKey ? 1 : 3);

          if (this.hsv[prob] < 0) {
            this.hsv[prob] = 0;
          }

          this.updateHsv();
          this.convertToOtherFormat(true);
        }
      }, {
        key: "handlerDown",
        value: function handlerDown(e) {
          e.preventDefault();

          if (e.type === 'mousedown') {
            this.clientX = Math.abs(e.pageX - pageXOffset);
            this.clientY = Math.abs(e.pageY - pageYOffset);
            this.setTooltipOffset(8);
          } else {
            this.clientX = Math.abs(e.changedTouches[0].pageX - pageXOffset);
            this.clientY = Math.abs(e.changedTouches[0].pageY - pageYOffset);
            this.setTooltipOffset(-8);
          }

          this.setHsv(this.clientX, this.clientY);
          this.getDragHandler().style.transition = 'left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)';
          this.updateHsv();
          this.convertToOtherFormat();
          this.getDragHandler().focus();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousemove touchmove', this.handlerMove, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup touchend', this.handlerEnd, this);
        }
      }, {
        key: "handlerMove",
        value: function handlerMove(e) {
          if (e.type !== 'touchmove') {
            e.preventDefault();
          }

          var x;
          var y;

          if (e.type === 'mousemove') {
            x = Math.abs(e.pageX - pageXOffset);
            y = Math.abs(e.pageY - pageYOffset);
          } else {
            x = Math.abs(e.changedTouches[0].pageX - pageXOffset);
            y = Math.abs(e.changedTouches[0].pageY - pageYOffset);
          }

          this.setHsv(x, y);
          var dragHandler = this.getDragHandler();
          var left = parseInt(dragHandler.style.left, 10);
          var top = parseInt(dragHandler.style.top, 10);
          this.updateHsv();
          this.convertToOtherFormat();
          this.getTooltipInst().refresh(dragHandler);

          if (!this.tooltipEle.style.transform) {
            if (Math.abs(this.clientX - x) > 8 || Math.abs(this.clientY - y) > 8) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVAREA, this.container).style.cursor = 'pointer';
              dragHandler.style.transition = 'none';

              if (!this.inline) {
                this.tooltipEle.style.zIndex = (parseInt(this.getPopupEle().style.zIndex, 10) + 1).toString();
              }

              this.tooltipEle.style.transform = 'rotate(45deg)';
              dragHandler.classList.add('e-hide-handler');
            }
          }
        }
      }, {
        key: "setHsv",
        value: function setHsv(clientX, clientY) {
          var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVAREA, this.container);
          var position = ele.getBoundingClientRect();

          if (this.enableRtl) {
            clientX = clientX > position.right ? 0 : Math.abs(clientX - position.right);
          } else {
            clientX = clientX > position.left ? Math.abs(clientX - position.left) : 0;
          }

          clientY = clientY > position.top ? Math.abs(clientY - position.top) : 0;
          this.hsv[2] = Math.round(Number(100 * (ele.offsetHeight - Math.max(0, Math.min(ele.offsetHeight, clientY - ele.offsetTop))) / ele.offsetHeight) * 10) / 10;
          this.hsv[1] = Math.round(Number(100 * Math.max(0, Math.min(ele.offsetWidth, clientX - ele.offsetLeft)) / ele.offsetWidth) * 10) / 10;
        }
      }, {
        key: "handlerEnd",
        value: function handlerEnd(e) {
          if (e.type !== 'touchend') {
            e.preventDefault();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousemove touchmove', this.handlerMove);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mouseup touchend', this.handlerEnd);

          var dragHandler = this.getDragHandler();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + HSVAREA, this.container).style.cursor = '';

          if (this.tooltipEle.style.transform) {
            this.tooltipEle.style.transform = '';
            dragHandler.classList.remove('e-hide-handler');
          }

          if (!this.inline && !this.showButtons) {
            this.closePopup(e);
          }
        }
      }, {
        key: "btnClickHandler",
        value: function btnClickHandler(e) {
          var target = e.target;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + MODESWITCH)) {
            e.stopPropagation();
            this.switchToPalette();
          } else {
            if (target.classList.contains(APPLY) || target.classList.contains(CANCEL)) {
              this.ctrlBtnClick(target, e);
            }
          }
        }
      }, {
        key: "switchToPalette",
        value: function switchToPalette() {
          this.trigger('beforeModeSwitch', {
            element: this.container,
            mode: 'Palette'
          });
          this.unWireEvents();
          this.destroyOtherComp();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-slider-preview', this.container));

          if (!this.getWrapper().classList.contains(HIDEVALUE)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, this.container));
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.getHsvContainer());
          this.createPalette();
          this.firstPaletteFocus();
          this.createInput();
          this.refreshPopupPos();
          this.wireEvents();
          this.trigger('onModeSwitch', {
            element: this.container,
            mode: 'Palette'
          });
        }
      }, {
        key: "refreshPopupPos",
        value: function refreshPopupPos() {
          if (!this.inline) {
            var popupEle = this.getPopupEle();
            popupEle.style.left = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(0 + pageXOffset);
            popupEle.style.top = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(0 + pageYOffset);
            this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement);
          }
        }
      }, {
        key: "formatSwitchHandler",
        value: function formatSwitchHandler(e) {
          var target = e.target.parentElement;

          if (this.isRgb) {
            this.updateValue(this.hsv, true, 3, [360, 100, 100]);
            this.isRgb = false;
          } else {
            this.updateValue(this.rgb, true, 2);
            this.isRgb = true;
          }
        }
      }, {
        key: "updateValue",
        value: function updateValue(value, format, idx, max) {
          var clsName = ['e-rh-value', 'e-gs-value', 'e-bv-value'];
          var inst;

          for (var i = 0, _len41 = clsName.length; i < _len41; i++) {
            inst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + clsName[i], this.container), NumericTextBox);
            inst.value = Math.round(value[i]);

            if (format) {
              inst.placeholder = clsName[i].substr(idx, 1).toUpperCase();
              inst.max = max ? max[i] : 255;
            }

            inst.dataBind();
          }
        }
      }, {
        key: "previewHandler",
        value: function previewHandler(e) {
          var target = e.target;
          var pValue = this.rgbToHex(this.rgb);
          this.rgb = this.convertRgbToNumberArray(target.style.backgroundColor);

          if (!this.rgb[3]) {
            this.rgb[3] = 1;
          }

          var cValue = this.rgbToHex(this.rgb);
          var hsv = this.rgbToHsv.apply(this, this.rgb);

          if (hsv[0] !== this.hsv[0]) {
            this.hueSlider.setProperties({
              'value': hsv[0]
            }, true);
            this.hueSlider.refresh();
          }

          this.setHsvContainerBg(hsv[0]);

          if (this.enableOpacity && hsv[3] !== this.hsv[3]) {
            this.opacitySlider.setProperties({
              'value': hsv[3] * 100
            }, true);
            this.opacitySlider.refresh();
            this.updateOpacitySliderBg();
          }

          this.hsv = hsv;
          this.setHandlerPosition();
          this.updateInput(cValue);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PREVIEW + ' .' + CURRENT, this.container).style.backgroundColor = this.convertToRgbString(this.rgb);
          this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
        }
      }, {
        key: "paletteClickHandler",
        value: function paletteClickHandler(e) {
          e.preventDefault();
          var target = e.target;

          if (target.classList.contains(TILE)) {
            this.removeTileSelection();
            this.addTileSelection(target);

            if (target.classList.contains(NOCOLOR)) {
              this.noColorTile();
            } else {
              var cValue = target.getAttribute('aria-label');
              var pValue = this.rgbToHex(this.rgb);
              this.rgb = this.hexToRgb(this.roundValue(cValue));
              this.hsv = this.rgbToHsv.apply(this, this.rgb);

              if (this.getWrapper().classList.contains(SHOWVALUE)) {
                this.updateInput(cValue);
              }

              this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
            }

            if (!this.inline && !this.showButtons) {
              this.closePopup(e);
            }
          } else {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + MODESWITCH)) {
              this.switchToPicker();
            } else {
              if (target.classList.contains(APPLY) || target.classList.contains(CANCEL)) {
                this.ctrlBtnClick(target, e);
              } else {
                if (this.getWrapper().classList.contains(SHOWVALUE) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + FORMATSWITCH)) {
                  this.formatSwitchHandler(e);
                }
              }
            }
          }
        }
      }, {
        key: "noColorTile",
        value: function noColorTile() {
          var isKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          var pValue = this.rgbToHex(this.rgb);
          this.rgb = [];
          this.hsv = [];
          this.triggerEvent('', pValue, '', isKey);
        }
      }, {
        key: "switchToPicker",
        value: function switchToPicker() {
          var wrapper = this.getWrapper();
          this.trigger('beforeModeSwitch', {
            element: this.container,
            mode: 'Picker'
          });
          this.unWireEvents();
          [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + PALETTES, this.container)).forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
          });

          if (wrapper.classList.contains(SHOWVALUE)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, this.container));
          }

          this.container.style.width = '';
          var grpEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-custom-palette', this.container);

          if (this.presetColors) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(grpEle);
          }

          this.createPicker();
          this.getDragHandler().focus();
          this.createInput();
          this.refreshPopupPos();
          this.wireEvents();
          this.trigger('onModeSwitch', {
            element: this.container,
            mode: 'Picker'
          });
        }
      }, {
        key: "ctrlBtnClick",
        value: function ctrlBtnClick(ele, e) {
          if (ele.classList.contains(APPLY)) {
            var cValue = this.rgbToHex(this.rgb);
            this.triggerChangeEvent(cValue);
          }

          if (!this.inline) {
            this.closePopup(e);
            this.splitBtn.element.focus();
          }
        }
      }, {
        key: "paletteKeyDown",
        value: function paletteKeyDown(e) {
          var target = e.target;

          if (!target.classList.contains(PALETTES)) {
            return;
          }

          var selectedEle;
          var idx;
          var tiles = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + TILE, target));
          var prevSelectedEle = tiles.filter(function (tile) {
            return tile.classList.contains('e-selected');
          }).pop();

          switch (!e.altKey && e.keyCode) {
            case 39:
              e.preventDefault();
              selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? -1 : 1)] : tiles[this.enableRtl ? tiles.length - 1 : 0];
              this.keySelectionChanges(selectedEle);
              break;

            case 37:
              e.preventDefault();
              selectedEle = prevSelectedEle ? tiles[this.tilePosition(tiles, prevSelectedEle, this.enableRtl ? 1 : -1)] : tiles[this.enableRtl ? 0 : tiles.length - 1];
              this.keySelectionChanges(selectedEle);
              break;

            case 38:
              e.preventDefault();
              idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, -this.columns) : 0;
              selectedEle = tiles[idx] ? tiles[idx] : tiles[idx - this.columns];
              this.keySelectionChanges(selectedEle);
              break;

            case 40:
              e.preventDefault();
              idx = prevSelectedEle ? this.tilePosition(tiles, prevSelectedEle, this.columns) : tiles.length - 1;

              if (tiles[idx]) {
                selectedEle = tiles[idx];
              } else {
                idx %= tiles.length;
                idx += tiles[tiles.length - 1].parentElement.childElementCount;
                selectedEle = tiles[idx];
              }

              this.keySelectionChanges(selectedEle);
              break;

            case 13:
              e.preventDefault();

              if (prevSelectedEle) {
                var cValue = prevSelectedEle.getAttribute('aria-label');
                this.enterKeyHandler(cValue ? cValue : '', e);
              }

          }
        }
      }, {
        key: "keySelectionChanges",
        value: function keySelectionChanges(newEle) {
          this.removeTileSelection();
          this.addTileSelection(newEle);

          if (newEle.classList.contains(NOCOLOR)) {
            this.noColorTile(true);
          } else {
            var cValue = newEle.getAttribute('aria-label');
            var pValue = this.rgbToHex(this.rgb);
            this.rgb = this.hexToRgb(cValue);
            this.hsv = this.rgbToHsv.apply(this, this.rgb);

            if (this.getWrapper().classList.contains(SHOWVALUE)) {
              this.updateInput(cValue);
            }

            this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), true);
          }
        }
      }, {
        key: "tilePosition",
        value: function tilePosition(items, element, cIdx) {
          items = Array.prototype.slice.call(items);
          var n = items.length;
          var emptyCount = this.columns - items[n - 1].parentElement.childElementCount;
          var idx = items.indexOf(element);
          idx += cIdx;
          idx < 0 ? idx += n + emptyCount : idx %= n + emptyCount;
          return idx;
        }
      }, {
        key: "inputHandler",
        value: function inputHandler(e) {
          var target = e.target;

          if (!target.value.length) {
            return;
          }

          var hsv;
          var pValue;
          var label = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-float-text', target.parentElement).textContent;

          switch (label) {
            case 'HEX':
              var value = '';

              if (target.value[0] === '#' && target.value.length !== 5 || target.value[0] !== '#' && target.value.length !== 4) {
                value = this.roundValue(target.value);
              }

              if (value.length === 9) {
                pValue = this.rgbToHex(this.rgb);
                this.rgb = this.hexToRgb(value + value.substr(-2));
                this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value);
              } else {
                return;
              }

              break;

            case 'R':
              if (this.rgb[0] !== Number(target.value)) {
                pValue = this.rgbToHex(this.rgb);
                this.rgb[0] = Number(target.value);
                hsv = this.rgbToHsv.apply(this, this.rgb);
                this.inputValueChange(hsv, pValue);
              }

              break;

            case 'G':
              if (this.rgb[1] !== Number(target.value)) {
                pValue = this.rgbToHex(this.rgb);
                this.rgb[1] = Number(target.value);
                hsv = this.rgbToHsv.apply(this, this.rgb);
                this.inputValueChange(hsv, pValue);
              }

              break;

            case 'B':
              if (this.rgb[2] !== Number(target.value)) {
                pValue = this.rgbToHex(this.rgb);
                this.rgb[2] = Number(target.value);
                hsv = this.rgbToHsv.apply(this, this.rgb);
                this.inputValueChange(hsv, pValue);
              }

              break;

            case 'H':
              this.hueSlider.value = Number(target.value);
              break;

            case 'S':
              if (this.hsv[1] !== Number(target.value)) {
                this.hsv[1] = Number(target.value);
                this.updateHsv();
                this.convertToOtherFormat();
              }

              break;

            case 'V':
              if (this.hsv[2] !== Number(target.value)) {
                this.hsv[2] = Number(target.value);
                this.updateHsv();
                this.convertToOtherFormat();
              }

              break;

            case 'A':
              this.opacitySlider.value = Number(target.value);
              break;
          }
        }
      }, {
        key: "inputValueChange",
        value: function inputValueChange(hsv, pValue, value) {
          if (hsv[0] !== this.hsv[0]) {
            this.hueSlider.setProperties({
              'value': hsv[0]
            }, true);
            this.hueSlider.refresh();
            this.setHsvContainerBg(hsv[0]);
          }

          this.hsv = hsv;
          var cValue = this.rgbToHex(this.rgb);
          this.setHandlerPosition();
          this.updateInput(value ? value : cValue);
          var rgba = this.convertToRgbString(this.rgb);
          this.updatePreview(rgba);
          this.triggerEvent(cValue, pValue, rgba);
        }
      }, {
        key: "triggerEvent",
        value: function triggerEvent(cValue, pValue, rgba) {
          var isKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
          var hex = cValue.slice(0, 7);

          if (!this.showButtons && !isKey) {
            this.trigger('change', {
              currentValue: {
                hex: hex,
                rgba: rgba
              },
              previousValue: {
                hex: this.value.slice(0, 7),
                rgba: this.convertToRgbString(this.hexToRgb(this.value))
              },
              value: cValue
            });
            this.setProperties({
              'value': cValue
            }, true);
            this.element.value = hex ? hex : '#000000';
          } else {
            this.trigger('select', {
              currentValue: {
                hex: hex,
                rgba: rgba
              },
              previousValue: {
                hex: pValue.slice(0, 7),
                rgba: this.convertToRgbString(this.hexToRgb(pValue))
              }
            });
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers.
         * Also it maintains the initial input element from the DOM.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this560 = this;

          var wrapper = this.getWrapper();

          _get(_getPrototypeOf(ColorPicker.prototype), "destroy", this).call(this);

          ['tabindex', 'spellcheck'].forEach(function (attr) {
            _this560.element.removeAttribute(attr);
          });

          if (this.inline) {
            this.unWireEvents();
            this.destroyOtherComp();
          } else {
            if (this.isPopupOpen()) {
              this.unWireEvents();
              this.destroyOtherComp();
            }

            this.splitBtn.destroy();
            this.splitBtn = null;
          }

          this.tileRipple();
          this.tileRipple = null;
          this.ctrlBtnRipple();
          this.ctrlBtnRipple = null;

          if (this.element.nextElementSibling) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.nextElementSibling);
          }

          if (wrapper) {
            wrapper.parentElement.insertBefore(this.element, wrapper);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper);
          }

          this.container = null;

          if (this.formElement) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.formResetHandler);
          }
        }
      }, {
        key: "destroyOtherComp",
        value: function destroyOtherComp() {
          if (this.isPicker()) {
            this.hueSlider.destroy();

            if (this.enableOpacity) {
              this.opacitySlider.destroy();
              this.opacitySlider = null;
            }

            this.hueSlider = null;
            var tooltipInst = this.getTooltipInst();
            tooltipInst.close();
            tooltipInst.destroy();
            this.tooltipEle = null;
          }
        }
      }, {
        key: "isPopupOpen",
        value: function isPopupOpen() {
          return this.getPopupEle().classList.contains('e-popup-open');
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          if (this.isPicker()) {
            var wrapper = this.getWrapper();
            var dragHandler = this.getDragHandler();

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(dragHandler, 'keydown', this.pickerKeyDown);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getHsvContainer(), 'mousedown touchstart', this.handlerDown);

            if (this.modeSwitcher || this.showButtons) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container), 'click', this.btnClickHandler);
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PREVIOUS, this.container), 'click', this.previewHandler);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.container, 'click', this.paletteClickHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.container, 'keydown', this.paletteKeyDown);
          }
        }
      }, {
        key: "roundValue",
        value: function roundValue(value) {
          if (!value) {
            return '';
          }

          if (value[0] !== '#') {
            value = '#' + value;
          }

          var len = value.length;

          if (len === 4) {
            value += 'f';
            len = 5;
          }

          if (len === 5) {
            var tempValue = '';

            for (var i = 1, _len42 = value.length; i < _len42; i++) {
              tempValue += value.charAt(i) + value.charAt(i);
            }

            value = '#' + tempValue;
            len = 9;
          }

          if (len === 7) {
            value += 'ff';
          }

          return value;
        }
      }, {
        key: "hexToRgb",
        value: function hexToRgb(hex) {
          if (!hex) {
            return [];
          }

          hex = hex.trim();

          if (hex.length !== 9) {
            hex = this.roundValue(hex);
          }

          var opacity = Number((parseInt(hex.slice(-2), 16) / 255).toFixed(2));
          hex = hex.slice(1, 7);
          var bigInt = parseInt(hex, 16);
          var h = [];
          h.push(bigInt >> 16 & 255);
          h.push(bigInt >> 8 & 255);
          h.push(bigInt & 255);
          h.push(opacity);
          return h;
        }
      }, {
        key: "rgbToHsv",
        value: function rgbToHsv(r, g, b, opacity) {
          if (this.rgb && !this.rgb.length) {
            return [];
          }

          r /= 255;
          g /= 255;
          b /= 255;
          var max = Math.max(r, g, b);
          var min = Math.min(r, g, b);
          var h;
          var s;
          var v = max;
          var d = max - min;
          s = max === 0 ? 0 : d / max;

          if (max === min) {
            h = 0;
          } else {
            switch (max) {
              case r:
                h = (g - b) / d + (g < b ? 6 : 0);
                break;

              case g:
                h = (b - r) / d + 2;
                break;

              case b:
                h = (r - g) / d + 4;
                break;
            }

            h /= 6;
          }

          var hsv = [Math.round(h * 360), Math.round(s * 1000) / 10, Math.round(v * 1000) / 10];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(opacity)) {
            hsv.push(opacity);
          }

          return hsv;
        }
      }, {
        key: "hsvToRgb",
        value: function hsvToRgb(h, s, v, opacity) {
          var r;
          var g;
          var b;
          var i;
          var f;
          var p;
          var q;
          var t;
          s /= 100;
          v /= 100;

          if (s === 0) {
            r = g = b = v;
            return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), opacity];
          }

          h /= 60;
          i = Math.floor(h);
          f = h - i;
          p = v * (1 - s);
          q = v * (1 - s * f);
          t = v * (1 - s * (1 - f));

          switch (i) {
            case 0:
              r = v;
              g = t;
              b = p;
              break;

            case 1:
              r = q;
              g = v;
              b = p;
              break;

            case 2:
              r = p;
              g = v;
              b = t;
              break;

            case 3:
              r = p;
              g = q;
              b = v;
              break;

            case 4:
              r = t;
              g = p;
              b = v;
              break;

            default:
              r = v;
              g = p;
              b = q;
          }

          var rgb = [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(opacity)) {
            rgb.push(opacity);
          }

          return rgb;
        }
      }, {
        key: "rgbToHex",
        value: function rgbToHex(rgb) {
          return rgb.length ? '#' + this.hex(rgb[0]) + this.hex(rgb[1]) + this.hex(rgb[2]) + (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rgb[3]) ? rgb[3] !== 0 ? (Math.round(rgb[3] * 255) + 0x10000).toString(16).substr(-2) : '00' : '') : '';
        }
      }, {
        key: "hex",
        value: function hex(x) {
          return ('0' + x.toString(16)).slice(-2);
        }
      }, {
        key: "changeModeSwitcherProp",
        value: function changeModeSwitcherProp(prop) {
          var ctrlSwitchWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container);

          if (prop) {
            if (ctrlSwitchWrapper) {
              this.appendModeSwitchBtn();
            } else {
              this.createCtrlBtn();

              if (this.isPicker() && !this.disabled) {
                this.addCtrlSwitchEvent();
              }
            }
          } else {
            if (ctrlSwitchWrapper) {
              if (this.showButtons) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + MODESWITCH, ctrlSwitchWrapper));
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(ctrlSwitchWrapper);
              }
            }
          }
        }
      }, {
        key: "changeShowBtnProps",
        value: function changeShowBtnProps(prop) {
          var ctrlBtnWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLSWITCH, this.container);

          if (prop) {
            if (ctrlBtnWrapper) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(ctrlBtnWrapper);
            }

            this.createCtrlBtn();

            if (this.isPicker() && !this.disabled) {
              this.addCtrlSwitchEvent();
            }
          } else {
            if (this.modeSwitcher) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CTRLBTN, ctrlBtnWrapper));
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(ctrlBtnWrapper);
            }
          }
        }
      }, {
        key: "changeValueProp",
        value: function changeValueProp(newProp) {
          if (this.isPicker()) {
            this.rgb = this.hexToRgb(newProp);
            this.hsv = this.rgbToHsv.apply(this, this.rgb);
            this.setHandlerPosition();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.hueSlider.element, '.e-slider-preview'));
            this.createSlider();
            this.setHsvContainerBg();
            this.updateInput(newProp);

            if (this.rgb.length === 4) {
              this.updateOpacityInput(this.rgb[3] * 100);
            }
          } else {
            this.removeTileSelection();
            var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('span[aria-label="' + this.roundValue(newProp) + '"]', this.container);

            if (ele) {
              this.addTileSelection(ele);
            }
          }
        }
      }, {
        key: "setInputEleProps",
        value: function setInputEleProps(prop) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, this.container));
          this.createInput();
        }
      }, {
        key: "changeDisabledProp",
        value: function changeDisabledProp(newProp) {
          if (this.isPicker()) {
            this.hueSlider.enabled = !newProp;
            this.opacitySlider.enabled = !newProp;
            this.setInputEleProps(newProp);
          }

          if (newProp) {
            this.toggleDisabled(true);
            this.unWireEvents();
          } else {
            this.toggleDisabled(false);
            this.wireEvents();
          }
        }
      }, {
        key: "changeCssClassProps",
        value: function changeCssClassProps(newProp, oldProp) {
          var wrapper = this.getWrapper();
          var popupWrapper = this.getPopupEle();

          if (oldProp) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrapper, popupWrapper], oldProp.split(' '));
          }

          if (newProp) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper, popupWrapper], newProp.split(' '));
          }
        }
      }, {
        key: "changeRtlProps",
        value: function changeRtlProps(newProp) {
          if (newProp) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.getWrapper()], 'e-rtl');
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.getWrapper()], 'e-rtl');
          }
        }
      }, {
        key: "changePaletteProps",
        value: function changePaletteProps() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.container.children[0]);
          this.container.style.width = '';
          this.createPalette();
        }
      }, {
        key: "changeOpacityProps",
        value: function changeOpacityProps(newProp) {
          var wrapper = this.getWrapper();

          if (newProp) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.container.parentElement], HIDEOPACITY);
            this.createOpacitySlider(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-colorpicker-slider', this.container).appendChild(this.createElement('div', {
              className: 'e-opacity-slider'
            })));

            if (!wrapper.classList.contains(HIDEVALUE) && !wrapper.classList.contains(HIDERGBA)) {
              this.appendOpacityValue(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-input-container', this.container));
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.container.parentElement], HIDEOPACITY);
            this.opacitySlider.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.opacitySlider.element);
            this.opacitySlider = null;

            if (!wrapper.classList.contains(HIDEVALUE) && !wrapper.classList.contains(HIDERGBA)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + OPACITY, this.container).parentElement);
            }
          }
        }
        /**
         * Called internally if any of the property value changed.
         * @param  {ColorPickerModel} newProp
         * @param  {ColorPickerModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var _this561 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.value)) {
            var value = this.roundValue(newProp.value);

            if (value.length === 9) {
              this.element.value = this.roundValue(value).slice(0, 7);
              var preview = this.splitBtn && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + SPLITPREVIEW, this.splitBtn.element);

              if (preview) {
                preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(newProp.value));
              }
            } else {
              this.value = oldProp.value;
            }
          }

          if (!this.inline && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.inline)) {
            var otherCompModel = ['disabled', 'enableRtl'];
            this.splitBtn.setProperties(Object(_syncfusion_ej2_splitbuttons__WEBPACK_IMPORTED_MODULE_2__["getModel"])(newProp, otherCompModel));

            if (!this.isPopupOpen()) {
              this.changeCssClassProps(newProp.cssClass, oldProp.cssClass);
              this.changeRtlProps(newProp.enableRtl);
              return;
            }
          }

          for (var _i111 = 0, _Object$keys41 = Object.keys(newProp); _i111 < _Object$keys41.length; _i111++) {
            var prop = _Object$keys41[_i111];

            (function () {
              switch (prop) {
                case 'inline':
                  if (newProp.inline) {
                    _this561.getWrapper().appendChild(_this561.container);

                    _this561.splitBtn.destroy();

                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this561.element.nextElementSibling);

                    if (!_this561.container.children.length) {
                      _this561.createWidget();
                    }
                  } else {
                    _this561.destroyOtherComp();

                    _this561.unWireEvents();

                    _this561.container.innerHTML = '';

                    _this561.createSplitBtn();
                  }

                  break;

                case 'cssClass':
                  _this561.changeCssClassProps(newProp.cssClass, oldProp.cssClass);

                  var props = newProp.cssClass.split(' ').concat(oldProp.cssClass.split(' '));
                  props = props.reduce(function (a, b) {
                    if (a.indexOf(b) < 0) {
                      a.push(b);
                    }

                    return a;
                  }, []);
                  var count = 0;
                  props.forEach(function (cls) {
                    if (count === 0 && (cls === HIDEVALUE || cls === HIDEVALUESWITCH || cls === SHOWVALUE || cls === HIDEHEX || cls === HIDERGBA)) {
                      var inputWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, _this561.container);

                      if (inputWrap) {
                        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INPUTWRAPPER, _this561.container));
                      }

                      _this561.createInput();

                      count++;
                    }
                  });
                  break;

                case 'enableRtl':
                  if (_this561.isPicker()) {
                    _this561.hueSlider.enableRtl = newProp.enableRtl;

                    if (_this561.enableOpacity) {
                      _this561.opacitySlider.enableRtl = newProp.enableRtl;
                    }

                    _this561.setInputEleProps(newProp.enableRtl);
                  }

                  _this561.changeRtlProps(newProp.enableRtl);

                  break;

                case 'disabled':
                  _this561.changeDisabledProp(newProp.disabled);

                  break;

                case 'value':
                  if (_this561.value !== oldProp.value) {
                    _this561.changeValueProp(newProp.value);
                  }

                  break;

                case 'showButtons':
                  _this561.changeShowBtnProps(newProp.showButtons);

                  break;

                case 'mode':
                  if (newProp.mode === 'Picker') {
                    _this561.switchToPicker();
                  } else {
                    _this561.switchToPalette();
                  }

                  break;

                case 'modeSwitcher':
                  _this561.changeModeSwitcherProp(newProp.modeSwitcher);

                  break;

                case 'columns':
                case 'presetColors':
                  if (!_this561.isPicker()) {
                    _this561.changePaletteProps();
                  }

                  break;

                case 'noColor':
                  if (newProp.noColor) {
                    if (_this561.mode === 'Palette' && !_this561.modeSwitcher) {
                      _this561.setNoColor();
                    }
                  } else {
                    _this561.changePaletteProps();
                  }

                  break;

                case 'enableOpacity':
                  _this561.changeOpacityProps(newProp.enableOpacity);

                  break;
              }
            })();
          }
        }
        /**
         * Sets the focus to Colorpicker
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.parentElement.focus();
        }
      }]);

      return ColorPicker;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('#008000ff')], ColorPicker.prototype, "value", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ColorPicker.prototype, "cssClass", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ColorPicker.prototype, "disabled", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Picker')], ColorPicker.prototype, "mode", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ColorPicker.prototype, "modeSwitcher", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ColorPicker.prototype, "presetColors", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ColorPicker.prototype, "showButtons", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(10)], ColorPicker.prototype, "columns", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ColorPicker.prototype, "inline", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ColorPicker.prototype, "noColor", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ColorPicker.prototype, "enablePersistence", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ColorPicker.prototype, "enableOpacity", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "select", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "change", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "beforeTileRender", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "beforeOpen", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "open", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "beforeClose", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "beforeModeSwitch", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "onModeSwitch", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ColorPicker.prototype, "created", void 0);

    ColorPicker = __decorate$5([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ColorPicker);
    /**
     * ColorPicker modules
     */

    var __decorate$6 = undefined && undefined.__decorate || function (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;
    };

    var HIDE_CLEAR = 'e-clear-icon-hide';
    var TEXTBOX_FOCUS = 'e-input-focus';
    var containerAttr = ['title', 'style', 'class'];
    /**
     * Represents the TextBox component that allows the user to enter the values based on it's type.
     * ```html
     * <input name='images' id='textbox'/>
     * ```
     * ```typescript
     * <script>
     *   var textboxObj = new TextBox();
     *   textboxObj.appendTo('#textbox');
     * </script>
     * ```
     */

    var TextBox = /*#__PURE__*/function (_syncfusion_ej2_base_26) {
      _inherits(TextBox, _syncfusion_ej2_base_26);

      var _super209 = _createSuper(TextBox);

      function TextBox(options, element) {
        var _this562;

        _classCallCheck(this, TextBox);

        _this562 = _super209.call(this, options, element);
        _this562.previousValue = null;
        _this562.isAngular = false;
        _this562.isHiddenInput = false;
        _this562.isForm = false;
        _this562.inputPreviousValue = null;
        _this562.isVue = false;
        _this562.textboxOptions = options;
        return _this562;
      }
      /**
       * Calls internally if any of the property value is changed.
       * @private
       */


      _createClass2(TextBox, [{
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i112 = 0, _Object$keys42 = Object.keys(newProp); _i112 < _Object$keys42.length; _i112++) {
            var prop = _Object$keys42[_i112];

            switch (prop) {
              case 'floatLabelType':
                Input.removeFloating(this.textboxWrapper);
                Input.addFloating(this.respectiveElement, this.floatLabelType, this.placeholder);
                break;

              case 'enabled':
                Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
                this.bindClearEvent();
                break;

              case 'width':
                Input.setWidth(newProp.width, this.textboxWrapper.container);
                break;

              case 'value':
                var prevOnChange = this.isProtectedOnChange;
                this.isProtectedOnChange = true;

                if (!this.isBlank(this.value)) {
                  this.value = this.value.toString();
                }

                this.isProtectedOnChange = prevOnChange;
                Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);

                if (this.isHiddenInput) {
                  this.element.value = this.respectiveElement.value;
                }

                this.inputPreviousValue = this.respectiveElement.value;
                /* istanbul ignore next */

                if ((this.isAngular || this.isVue) && this.preventChange === true) {
                  this.previousValue = this.isAngular ? this.value : this.previousValue;
                  this.preventChange = false;
                } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.isAngular) || !this.isAngular || this.isAngular && !this.preventChange || this.isAngular && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.preventChange)) {
                  this.raiseChangeEvent();
                }

                break;

              case 'htmlAttributes':
                this.updateHTMLAttrToElement();
                this.updateHTMLAttrToWrapper();
                var attributes$$1 = this.element.attributes;
                this.checkAttributes(true);
                break;

              case 'readonly':
                Input.setReadonly(this.readonly, this.respectiveElement);
                break;

              case 'type':
                if (this.respectiveElement.tagName !== 'TEXTAREA') {
                  this.respectiveElement.setAttribute('type', this.type);
                  this.raiseChangeEvent();
                }

                break;

              case 'showClearButton':
                if (this.respectiveElement.tagName !== 'TEXTAREA') {
                  Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
                  this.bindClearEvent();
                }

                break;

              case 'enableRtl':
                Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
                break;

              case 'placeholder':
                Input.setPlaceholder(this.placeholder, this.respectiveElement);
                break;

              case 'autocomplete':
                if (this.autocomplete !== 'on' && this.autocomplete !== '') {
                  this.respectiveElement.autocomplete = this.autocomplete;
                } else {
                  this.removeAttributes(['autocomplete']);
                }

                break;

              case 'cssClass':
                this.updateCssClass(newProp.cssClass, oldProp.cssClass);
                break;

              case 'locale':
                this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
                this.l10n.setLocale(this.locale);
                this.setProperties({
                  placeholder: this.l10n.getConstant('placeholder')
                }, true);
                Input.setPlaceholder(this.placeholder, this.respectiveElement);
                break;
            }
          }
        }
        /**
         * Gets the component name
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'textbox';
        }
      }, {
        key: "isBlank",
        value: function isBlank(str) {
          return !str || /^\s*$/.test(str);
        }
      }, {
        key: "preRender",
        value: function preRender() {
          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.cloneElement = this.element.cloneNode(true);
            this.formElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, 'form');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.formElement)) {
              this.isForm = true;
            }
            /* istanbul ignore next */


            if (this.element.tagName === 'EJS-TEXTBOX') {
              var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
              var inputElement = this.multiline ? this.createElement('textarea') : this.createElement('input');
              var index = 0;

              for (index; index < this.element.attributes.length; index++) {
                var attributeName = this.element.attributes[index].nodeName;

                if (attributeName !== 'id') {
                  inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
                  inputElement.innerHTML = this.element.innerHTML;

                  if (attributeName === 'name') {
                    this.element.removeAttribute('name');
                  }
                }
              }

              this.element.appendChild(inputElement);
              this.element = inputElement;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, this.element);
            }

            this.updateHTMLAttrToElement();
            this.checkAttributes(false);

            if (this.element.tagName !== 'TEXTAREA') {
              this.element.setAttribute('type', this.type);
            }

            this.element.setAttribute('role', 'textbox');
            this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Internationalization"](this.locale);
            var localeText = {
              placeholder: this.placeholder
            };
            this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('textbox', localeText, this.locale);

            if (this.l10n.getConstant('placeholder') !== '') {
              this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant('placeholder')
              }, true);
            }

            if (!this.element.hasAttribute('id')) {
              this.element.setAttribute('id', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('textbox'));
            }

            if (!this.element.hasAttribute('name')) {
              this.element.setAttribute('name', this.element.getAttribute('id'));
            }

            if (this.element.tagName === 'INPUT' && this.multiline) {
              this.isHiddenInput = true;
              this.textarea = this.createElement('textarea');
              this.element.parentNode.insertBefore(this.textarea, this.element);
              this.element.setAttribute('type', 'hidden');
              this.textarea.setAttribute('name', this.element.getAttribute('name'));
              this.element.removeAttribute('name');
              this.textarea.setAttribute('role', this.element.getAttribute('role'));
              this.element.removeAttribute('role');
              var attribute = ['required', 'minlength', 'maxlength'];

              for (var i = 0; i < attribute.length; i++) {
                if (this.element.hasAttribute(attribute[i])) {
                  var attr = this.element.getAttribute(attribute[i]);
                  this.textarea.setAttribute(attribute[i], attr);
                  this.element.removeAttribute(attribute[i]);
                }
              }
            }
          }
        }
      }, {
        key: "checkAttributes",
        value: function checkAttributes(isDynamic) {
          var attrs = isDynamic ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) : ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];

          var _iterator128 = _createForOfIteratorHelper(attrs),
              _step128;

          try {
            for (_iterator128.s(); !(_step128 = _iterator128.n()).done;) {
              var key = _step128.value;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute(key))) {
                switch (key) {
                  case 'disabled':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['enabled'] === undefined || isDynamic) {
                      var enabled = this.element.getAttribute(key) === 'disabled' || this.element.getAttribute(key) === '' || this.element.getAttribute(key) === 'true' ? false : true;
                      this.setProperties({
                        enabled: enabled
                      }, !isDynamic);
                    }

                    break;

                  case 'readonly':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['readonly'] === undefined || isDynamic) {
                      var readonly = this.element.getAttribute(key) === 'readonly' || this.element.getAttribute(key) === '' || this.element.getAttribute(key) === 'true' ? true : false;
                      this.setProperties({
                        readonly: readonly
                      }, !isDynamic);
                    }

                    break;

                  case 'placeholder':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['placeholder'] === undefined || isDynamic) {
                      this.setProperties({
                        placeholder: this.element.placeholder
                      }, !isDynamic);
                    }

                    break;

                  case 'autocomplete':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['autocomplete'] === undefined || isDynamic) {
                      var autoCompleteTxt = this.element.autocomplete === 'off' ? 'off' : 'on';
                      this.setProperties({
                        autocomplete: autoCompleteTxt
                      }, !isDynamic);
                    }

                    break;

                  case 'value':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['value'] === undefined || isDynamic) {
                      this.setProperties({
                        value: this.element.value
                      }, !isDynamic);
                    }

                    break;

                  case 'type':
                    // tslint:disable-next-line
                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) || this.textboxOptions['type'] === undefined || isDynamic) {
                      this.setProperties({
                        type: this.element.type
                      }, !isDynamic);
                    }

                    break;
                }
              }
            }
          } catch (err) {
            _iterator128.e(err);
          } finally {
            _iterator128.f();
          }
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          var updatedCssClassValue = this.cssClass;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            updatedCssClassValue = this.getInputValidClassList(this.cssClass);
          }

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.respectiveElement = this.isHiddenInput ? this.textarea : this.element;
            this.textboxWrapper = Input.createInput({
              element: this.respectiveElement,
              floatLabelType: this.floatLabelType,
              properties: {
                enabled: this.enabled,
                enableRtl: this.enableRtl,
                cssClass: updatedCssClassValue,
                readonly: this.readonly,
                placeholder: this.placeholder,
                showClearButton: this.showClearButton
              }
            });
            this.updateHTMLAttrToWrapper();

            if (this.isHiddenInput) {
              this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
            }
          } else {
            this.respectiveElement = this.element;
            this.textboxWrapper = {
              container: this.element.parentElement
            };

            if (this.showClearButton && !this.multiline) {
              this.textboxWrapper.clearButton = this.textboxWrapper.container.querySelector('.e-clear-icon');
              Input.wireClearBtnEvents(this.respectiveElement, this.textboxWrapper.clearButton, this.textboxWrapper.container);
            }

            if (this.floatLabelType === 'Auto') {
              Input.wireFloatingEvents(this.respectiveElement);
            } // tslint:disable-next-line


            Input.bindInitialEvent({
              element: this.respectiveElement,
              buttons: null,
              customTag: null,
              floatLabelType: this.floatLabelType,
              properties: this.properties
            });
          }

          this.wireEvents();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);

            if (this.isHiddenInput) {
              this.element.value = this.respectiveElement.value;
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.value)) {
            this.initialValue = this.value;
            this.setInitialValue();
          }

          if (this.autocomplete !== 'on' && this.autocomplete !== '') {
            this.respectiveElement.autocomplete = this.autocomplete; // tslint:disable-next-line
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxOptions) && this.textboxOptions['autocomplete'] !== undefined) {
            this.removeAttributes(['autocomplete']);
          }

          this.previousValue = this.value;
          this.inputPreviousValue = this.value;
          this.respectiveElement.defaultValue = this.respectiveElement.value;
          Input.setWidth(this.width, this.textboxWrapper.container);
          this.renderComplete();
        }
      }, {
        key: "updateHTMLAttrToWrapper",
        value: function updateHTMLAttrToWrapper() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i113 = 0, _Object$keys43 = Object.keys(this.htmlAttributes); _i113 < _Object$keys43.length; _i113++) {
              var key = _Object$keys43[_i113];

              if (containerAttr.indexOf(key) > -1) {
                if (key === 'class') {
                  var updatedClassValues = this.getInputValidClassList(this.htmlAttributes[key]);

                  if (updatedClassValues !== '') {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.textboxWrapper.container], updatedClassValues.split(' '));
                  }
                } else if (key === 'style') {
                  var setStyle = this.textboxWrapper.container.getAttribute(key);
                  setStyle = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(setStyle) ? setStyle + this.htmlAttributes[key] : this.htmlAttributes[key];
                  this.textboxWrapper.container.setAttribute(key, setStyle);
                } else {
                  this.textboxWrapper.container.setAttribute(key, this.htmlAttributes[key]);
                }
              }
            }
          }
        }
      }, {
        key: "updateHTMLAttrToElement",
        value: function updateHTMLAttrToElement() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.htmlAttributes)) {
            for (var _i114 = 0, _Object$keys44 = Object.keys(this.htmlAttributes); _i114 < _Object$keys44.length; _i114++) {
              var key = _Object$keys44[_i114];

              if (containerAttr.indexOf(key) < 0) {
                this.element.setAttribute(key, this.htmlAttributes[key]);
              }
            }
          }
        }
      }, {
        key: "updateCssClass",
        value: function updateCssClass(newClass, oldClass) {
          Input.setCssClass(this.getInputValidClassList(newClass), [this.textboxWrapper.container], this.getInputValidClassList(oldClass));
        }
      }, {
        key: "getInputValidClassList",
        value: function getInputValidClassList(inputClassName) {
          var result = inputClassName;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(inputClassName) && inputClassName !== '') {
            result = inputClassName.replace(/\s+/g, ' ').trim();
          }

          return result;
        }
      }, {
        key: "setInitialValue",
        value: function setInitialValue() {
          if (!this.isAngular) {
            this.respectiveElement.setAttribute('value', this.initialValue);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.respectiveElement, 'focus', this.focusHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.respectiveElement, 'blur', this.focusOutHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.respectiveElement, 'input', this.inputHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.respectiveElement, 'change', this.changeHandler, this);

          if (this.isForm) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.formElement, 'reset', this.resetForm, this);
          }

          this.bindClearEvent();
        }
      }, {
        key: "resetValue",
        value: function resetValue(value) {
          var prevOnChange = this.isProtectedOnChange;
          this.isProtectedOnChange = true;
          this.value = value;
          this.isProtectedOnChange = prevOnChange;
        }
      }, {
        key: "resetForm",
        value: function resetForm() {
          if (this.isAngular) {
            this.resetValue('');
          } else {
            this.resetValue(this.initialValue);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxWrapper)) {
            var label = this.textboxWrapper.container.querySelector('.e-float-text');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(label)) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initialValue) || this.initialValue === '') {
                label.classList.add('e-label-bottom');
                label.classList.remove('e-label-top');
              } else if (this.initialValue !== '') {
                label.classList.add('e-label-top');
                label.classList.remove('e-label-bottom');
              }
            }
          }
        }
      }, {
        key: "focusHandler",
        value: function focusHandler(args) {
          var eventArgs = {
            container: this.textboxWrapper.container,
            event: args,
            value: this.value
          };
          this.trigger('focus', eventArgs);
        }
      }, {
        key: "focusOutHandler",
        value: function focusOutHandler(args) {
          if (!(this.previousValue === null && this.value === null && this.respectiveElement.value === '') && this.previousValue !== this.respectiveElement.value) {
            this.raiseChangeEvent(args, true);
          }

          var eventArgs = {
            container: this.textboxWrapper.container,
            event: args,
            value: this.value
          };
          this.trigger('blur', eventArgs);
        }
      }, {
        key: "inputHandler",
        value: function inputHandler(args) {
          // tslint:disable-next-line
          var textboxObj = this;
          var eventArgs = {
            event: args,
            value: this.respectiveElement.value,
            previousValue: this.inputPreviousValue,
            container: this.textboxWrapper.container
          };
          this.inputPreviousValue = this.respectiveElement.value;
          /* istanbul ignore next */

          if (this.isAngular) {
            textboxObj.localChange({
              value: this.respectiveElement.value
            });
            this.preventChange = true;
          }

          if (this.isVue) {
            this.preventChange = true;
          }

          this.trigger('input', eventArgs);
          args.stopPropagation();
        }
      }, {
        key: "changeHandler",
        value: function changeHandler(args) {
          this.setProperties({
            value: this.respectiveElement.value
          }, true);
          this.raiseChangeEvent(args, true);
          args.stopPropagation();
        }
      }, {
        key: "raiseChangeEvent",
        value: function raiseChangeEvent(event, interaction) {
          var eventArgs = {
            event: event,
            value: this.value,
            previousValue: this.previousValue,
            container: this.textboxWrapper.container,
            isInteraction: interaction ? interaction : false,
            isInteracted: interaction ? interaction : false
          };
          this.preventChange = false;
          this.trigger('change', eventArgs);
          this.previousValue = this.value;
        }
      }, {
        key: "bindClearEvent",
        value: function bindClearEvent() {
          if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
            if (this.enabled) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
            } else {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler);
            }
          }
        }
      }, {
        key: "resetInputHandler",
        value: function resetInputHandler(event) {
          event.preventDefault();

          if (!this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR)) {
            var previousValue = this.value;
            Input.setValue('', this.respectiveElement, this.floatLabelType, this.showClearButton);

            if (this.isHiddenInput) {
              this.element.value = this.respectiveElement.value;
            }

            this.setProperties({
              value: this.respectiveElement.value
            }, true);
            var eventArgs = {
              event: event,
              value: this.respectiveElement.value,
              previousValue: this.inputPreviousValue,
              container: this.textboxWrapper.container
            };
            this.trigger('input', eventArgs);
            this.inputPreviousValue = this.respectiveElement.value;
            this.raiseChangeEvent(event, true);
          }
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.respectiveElement, 'focus', this.focusHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.respectiveElement, 'blur', this.focusOutHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.respectiveElement, 'input', this.inputHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.respectiveElement, 'change', this.changeHandler);

          if (this.isForm) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.formElement, 'reset', this.resetForm);
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers.
         * Also, it maintains the initial TextBox element from the DOM.
         * @method destroy
         * @return {void}
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.unWireEvents();

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            if (this.element.tagName === 'INPUT' && this.multiline) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.textboxWrapper.container.getElementsByTagName('textarea')[0]);
              this.respectiveElement = this.element;
              this.element.removeAttribute('type');
            }

            this.respectiveElement.value = this.respectiveElement.defaultValue;
            this.respectiveElement.classList.remove('e-input');
            this.removeAttributes(['aria-placeholder', 'aria-disabled', 'aria-readonly', 'aria-labelledby']);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.textboxWrapper)) {
              this.textboxWrapper.container.insertAdjacentElement('afterend', this.respectiveElement);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.textboxWrapper.container);
            }

            this.textboxWrapper = null;

            _get(_getPrototypeOf(TextBox.prototype), "destroy", this).call(this);
          } else {
            this.textboxWrapper = null;
          }
        }
        /**
         * Adding the icons to the TextBox component.
         * @param { string } position - Specify the icon placement on the TextBox. Possible values are append and prepend.
         * @param { string | string[] } iconClass - Icon classes which are need to add to the span element which is going to created.
         * Span element acts as icon or button element for TextBox.
         * @return {void}
         */

      }, {
        key: "addIcon",
        value: function addIcon(position, icons) {
          Input.addIcon(position, icons, this.textboxWrapper.container, this.respectiveElement, this.createElement);
        }
        /**
         * Gets the properties to be maintained in the persisted state.
         * @return {string}
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['value'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Adding the multiple attributes as key-value pair to the TextBox element.
         * @param { { [key: string]: string } } attributes - Specifies the attributes to be add to TextBox element.
         * @return {void}
         */

      }, {
        key: "addAttributes",
        value: function addAttributes(attributes$$1) {
          for (var _i115 = 0, _Object$keys45 = Object.keys(attributes$$1); _i115 < _Object$keys45.length; _i115++) {
            var key = _Object$keys45[_i115];

            if (key === 'disabled') {
              this.setProperties({
                enabled: false
              }, true);
              Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
            } else if (key === 'readonly') {
              this.setProperties({
                readonly: true
              }, true);
              Input.setReadonly(this.readonly, this.respectiveElement);
            } else if (key === 'class') {
              this.respectiveElement.classList.add(attributes$$1[key]);
            } else if (key === 'placeholder') {
              this.setProperties({
                placeholder: attributes$$1[key]
              }, true);
              Input.setPlaceholder(this.placeholder, this.respectiveElement);
            } else if (key === 'rows' && this.respectiveElement.tagName === 'TEXTAREA') {
              this.respectiveElement.setAttribute(key, attributes$$1[key]);
            } else {
              this.respectiveElement.setAttribute(key, attributes$$1[key]);
            }
          }
        }
        /**
         * Removing the multiple attributes as key-value pair to the TextBox element.
         * @param { string[] } attributes - Specifies the attributes name to be removed from TextBox element.
         * @return {void}
         */

      }, {
        key: "removeAttributes",
        value: function removeAttributes(attributes$$1) {
          var _iterator129 = _createForOfIteratorHelper(attributes$$1),
              _step129;

          try {
            for (_iterator129.s(); !(_step129 = _iterator129.n()).done;) {
              var key = _step129.value;

              if (key === 'disabled') {
                this.setProperties({
                  enabled: true
                }, true);
                Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);
              } else if (key === 'readonly') {
                this.setProperties({
                  readonly: false
                }, true);
                Input.setReadonly(this.readonly, this.respectiveElement);
              } else if (key === 'placeholder') {
                this.setProperties({
                  placeholder: null
                }, true);
                Input.setPlaceholder(this.placeholder, this.respectiveElement);
              } else {
                this.respectiveElement.removeAttribute(key);
              }
            }
          } catch (err) {
            _iterator129.e(err);
          } finally {
            _iterator129.f();
          }
        }
        /**
         * Sets the focus to widget for interaction.
         * @returns void
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          if (document.activeElement !== this.respectiveElement && this.enabled) {
            this.respectiveElement.focus();

            if (this.textboxWrapper.container.classList.contains('e-input-group') || this.textboxWrapper.container.classList.contains('e-outline') || this.textboxWrapper.container.classList.contains('e-filled')) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.textboxWrapper.container], [TEXTBOX_FOCUS]);
            }
          }
        }
        /**
         * Remove the focus from widget, if the widget is in focus state.
         * @returns void
         */

      }, {
        key: "focusOut",
        value: function focusOut() {
          if (document.activeElement === this.respectiveElement && this.enabled) {
            this.respectiveElement.blur();

            if (this.textboxWrapper.container.classList.contains('e-input-group') || this.textboxWrapper.container.classList.contains('e-outline') || this.textboxWrapper.container.classList.contains('e-filled')) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.textboxWrapper.container], [TEXTBOX_FOCUS]);
            }
          }
        }
      }]);

      return TextBox;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], TextBox.prototype, "type", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TextBox.prototype, "readonly", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TextBox.prototype, "value", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Never')], TextBox.prototype, "floatLabelType", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], TextBox.prototype, "cssClass", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TextBox.prototype, "placeholder", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('on')], TextBox.prototype, "autocomplete", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], TextBox.prototype, "htmlAttributes", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TextBox.prototype, "multiline", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], TextBox.prototype, "enabled", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TextBox.prototype, "showClearButton", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TextBox.prototype, "enablePersistence", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TextBox.prototype, "width", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "created", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "destroyed", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "change", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "blur", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "focus", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TextBox.prototype, "input", void 0);

    TextBox = __decorate$6([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], TextBox);
    /**
     * Uploader modules
     */

    /**
     * NumericTextBox all modules
     */
    //# sourceMappingURL=ej2-inputs.es2015.js.map

    /***/
  },

  /***/
  "./node_modules/@syncfusion/ej2-lists/dist/es6/ej2-lists.es2015.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-lists/dist/es6/ej2-lists.es2015.js ***!
    \*************************************************************************/

  /*! exports provided: classNames, FieldSettings, ListView, Virtualization, cssClass, ListBase, getFieldValues, Sortable, moveTo */

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

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


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


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


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


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


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


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


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


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


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


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-data */
    "./node_modules/@syncfusion/ej2-data/dist/es6/ej2-data.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-buttons */
    "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js");

    var cssClass = {
      li: 'e-list-item',
      ul: 'e-list-parent e-ul',
      group: 'e-list-group-item',
      icon: 'e-list-icon',
      text: 'e-list-text',
      check: 'e-list-check',
      checked: 'e-checked',
      selected: 'e-selected',
      expanded: 'e-expanded',
      textContent: 'e-text-content',
      hasChild: 'e-has-child',
      level: 'e-level',
      url: 'e-list-url',
      collapsible: 'e-icon-collapsible',
      disabled: 'e-disabled',
      image: 'e-list-img',
      iconWrapper: 'e-icon-wrapper',
      anchorWrap: 'e-anchor-wrap',
      navigable: 'e-navigable'
    };
    /**
     * Base List Generator
     */

    var ListBase;

    (function (ListBase) {
      /**
       * Default mapped fields.
       */
      ListBase.defaultMappedFields = {
        id: 'id',
        text: 'text',
        url: 'url',
        value: 'value',
        isChecked: 'isChecked',
        enabled: 'enabled',
        expanded: 'expanded',
        selected: 'selected',
        iconCss: 'iconCss',
        child: 'child',
        isVisible: 'isVisible',
        hasChildren: 'hasChildren',
        tooltip: 'tooltip',
        htmlAttributes: 'htmlAttributes',
        urlAttributes: 'urlAttributes',
        imageAttributes: 'imageAttributes',
        imageUrl: 'imageUrl',
        groupBy: null
      };
      var defaultAriaAttributes = {
        level: 1,
        listRole: 'presentation',
        itemRole: 'presentation',
        groupItemRole: 'group',
        itemText: 'list-item',
        wrapperRole: 'presentation'
      };
      var defaultListBaseOptions = {
        showCheckBox: false,
        showIcon: false,
        enableHtmlSanitizer: false,
        expandCollapse: false,
        fields: ListBase.defaultMappedFields,
        ariaAttributes: defaultAriaAttributes,
        listClass: '',
        itemClass: '',
        processSubChild: false,
        sortOrder: 'None',
        template: null,
        groupTemplate: null,
        headerTemplate: null,
        expandIconClass: 'e-icon-collapsible',
        moduleName: 'list',
        expandIconPosition: 'Right',
        itemNavigable: false
      };
      /**
       * Function helps to created and return the UL Li element based on your data.
       * @param  {{[key:string]:Object}[]|string[]} dataSource - Specifies an array of JSON or String data.
       * @param  {ListBaseOptions} options? - Specifies the list options that need to provide.
       */

      function createList(createElement, dataSource, options, isSingleLevel) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var ariaAttributes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultAriaAttributes, curOpt.ariaAttributes);
        var type = typeofData(dataSource)["typeof"];

        if (type === 'string' || type === 'number') {
          return createListFromArray(createElement, dataSource, isSingleLevel, options);
        } else {
          return createListFromJson(createElement, dataSource, options, ariaAttributes.level, isSingleLevel);
        }
      }

      ListBase.createList = createList;
      /**
       * Function helps to created an element list based on string array input .
       * @param  {string[]} dataSource - Specifies an array of string data
       */

      function createListFromArray(createElement, dataSource, isSingleLevel, options) {
        var subChild = createListItemFromArray(createElement, dataSource, isSingleLevel, options);
        return generateUL(createElement, subChild, null, options);
      }

      ListBase.createListFromArray = createListFromArray;
      /**
       * Function helps to created an element list based on string array input .
       * @param  {string[]} dataSource - Specifies an array of string data
       */

      function createListItemFromArray(createElement, dataSource, isSingleLevel, options) {
        var subChild = [];
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        cssClass = getModuleClass(curOpt.moduleName);
        var id = generateId(); // generate id for drop-down-list option.

        for (var i = 0; i < dataSource.length; i++) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataSource[i])) {
            continue;
          }

          var li = void 0;

          if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {
            var curData = {
              dataSource: dataSource,
              curData: dataSource[i],
              text: dataSource[i],
              options: curOpt
            };
            curOpt.itemCreating(curData);
          }

          if (isSingleLevel) {
            li = generateSingleLevelLI(createElement, dataSource[i], undefined, null, null, [], null, id, i, options);
          } else {
            li = generateLI(createElement, dataSource[i], undefined, null, null, options);
          }

          if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {
            var _curData = {
              dataSource: dataSource,
              curData: dataSource[i],
              text: dataSource[i],
              item: li,
              options: curOpt
            };
            curOpt.itemCreated(_curData);
          }

          subChild.push(li);
        }

        return subChild;
      }

      ListBase.createListItemFromArray = createListItemFromArray;
      /**
       * Function helps to created an element list based on array of JSON input .
       * @param  {{[key:string]:Object}[]} dataSource - Specifies an array of JSON data.
       * @param  {ListBaseOptions} options? - Specifies the list options that need to provide.
       */
      // tslint:disable-next-line:max-func-body-length

      function createListItemFromJson(createElement, dataSource, options, level, isSingleLevel) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        cssClass = getModuleClass(curOpt.moduleName);
        var fields = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, ListBase.defaultMappedFields, curOpt.fields);
        var ariaAttributes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultAriaAttributes, curOpt.ariaAttributes);
        var id;
        var checkboxElement = [];

        if (level) {
          ariaAttributes.level = level;
        }

        var child = [];
        var li;
        var anchorElement;

        if (dataSource && dataSource.length && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(typeofData(dataSource).item) && !typeofData(dataSource).item.hasOwnProperty(fields.id)) {
          id = generateId(); // generate id for drop-down-list option.
        }

        for (var i = 0; i < dataSource.length; i++) {
          var fieldData = getFieldValues(dataSource[i], fields);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataSource[i])) {
            continue;
          }

          if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {
            var curData = {
              dataSource: dataSource,
              curData: dataSource[i],
              text: fieldData[fields.text],
              options: curOpt,
              fields: fields
            };
            curOpt.itemCreating(curData);
          }

          var curItem = dataSource[i];

          if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {
            fieldData = getFieldValues(dataSource[i], fields);
          }

          if (fieldData.hasOwnProperty(fields.id) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.id])) {
            id = fieldData[fields.id];
          }

          var innerEle = [];

          if (curOpt.showCheckBox) {
            if (curOpt.itemNavigable && (fieldData[fields.url] || fieldData[fields.urlAttributes])) {
              checkboxElement.push(createElement('input', {
                className: cssClass.check,
                attrs: {
                  type: 'checkbox'
                }
              }));
            } else {
              innerEle.push(createElement('input', {
                className: cssClass.check,
                attrs: {
                  type: 'checkbox'
                }
              }));
            }
          }

          if (isSingleLevel === true) {
            if (curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.iconCss])) {
              innerEle.push(createElement('span', {
                className: cssClass.icon + ' ' + fieldData[fields.iconCss]
              }));
            }

            li = generateSingleLevelLI(createElement, curItem, fieldData, fields, curOpt.itemClass, innerEle, curItem.hasOwnProperty('isHeader') && curItem.isHeader ? true : false, id, i, options);
            anchorElement = li.querySelector('.' + cssClass.anchorWrap);

            if (curOpt.itemNavigable && checkboxElement.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])(checkboxElement, li.firstElementChild);
            }
          } else {
            li = generateLI(createElement, curItem, fieldData, fields, curOpt.itemClass, options);
            li.classList.add(cssClass.level + '-' + ariaAttributes.level);
            li.setAttribute('aria-level', ariaAttributes.level.toString());
            anchorElement = li.querySelector('.' + cssClass.anchorWrap);

            if (fieldData.hasOwnProperty(fields.tooltip)) {
              li.setAttribute('title', fieldData[fields.tooltip]);
            }

            if (fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
              setAttribute(li, fieldData[fields.htmlAttributes]);
            }

            if (fieldData.hasOwnProperty(fields.enabled) && fieldData[fields.enabled] === false) {
              li.classList.add(cssClass.disabled);
            }

            if (fieldData.hasOwnProperty(fields.isVisible) && fieldData[fields.isVisible] === false) {
              li.style.display = 'none';
            }

            if (fieldData.hasOwnProperty(fields.imageUrl) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.imageUrl]) && !curOpt.template) {
              var attr = {
                src: fieldData[fields.imageUrl]
              };
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(attr, fieldData[fields.imageAttributes]);
              var imageElemnt = createElement('img', {
                className: cssClass.image,
                attrs: attr
              });

              if (anchorElement) {
                anchorElement.insertAdjacentElement('afterbegin', imageElemnt);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([imageElemnt], li.firstElementChild);
              }
            }

            if (curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.iconCss]) && !curOpt.template) {
              var iconElement = void 0;
              iconElement = createElement('div', {
                className: cssClass.icon + ' ' + fieldData[fields.iconCss]
              });

              if (anchorElement) {
                anchorElement.insertAdjacentElement('afterbegin', iconElement);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([iconElement], li.firstElementChild);
              }
            }

            if (innerEle.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])(innerEle, li.firstElementChild);
            }

            if (curOpt.itemNavigable && checkboxElement.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])(checkboxElement, li.firstElementChild);
            }

            processSubChild(createElement, fieldData, fields, dataSource, curOpt, li, ariaAttributes.level);
          }

          if (anchorElement) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], [cssClass.navigable]);
          }

          if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {
            var _curData2 = {
              dataSource: dataSource,
              curData: dataSource[i],
              text: fieldData[fields.text],
              item: li,
              options: curOpt,
              fields: fields
            };
            curOpt.itemCreated(_curData2);
          }

          checkboxElement = [];
          child.push(li);
        }

        return child;
      }

      ListBase.createListItemFromJson = createListItemFromJson;
      /**
       * Function helps to created an element list based on array of JSON input .
       * @param  {{[key:string]:Object}[]} dataSource - Specifies an array of JSON data.
       * @param  {ListBaseOptions} options? - Specifies the list options that need to provide.
       */

      function createListFromJson(createElement, dataSource, options, level, isSingleLevel) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var li = createListItemFromJson(createElement, dataSource, options, level, isSingleLevel);
        return generateUL(createElement, li, curOpt.listClass, options);
      }

      ListBase.createListFromJson = createListFromJson;
      /**
       * Return the next or previous visible element.
       * @param  {Element[]|NodeList} elementArray - An element array to find next or previous element.
       * @param  {Element} li - An element to find next or previous after this element.
       * @param  {boolean} isPrevious? - Specify when the need get previous element from array.
       */

      function getSiblingLI(elementArray, element, isPrevious) {
        cssClass = getModuleClass(defaultListBaseOptions.moduleName);

        if (!elementArray || !elementArray.length) {
          return void 0;
        }

        var siblingLI;
        var liIndex;
        var liCollections = Array.prototype.slice.call(elementArray);

        if (element) {
          liIndex = indexOf(element, liCollections);
        } else {
          liIndex = isPrevious === true ? liCollections.length : -1;
        }

        siblingLI = liCollections[liIndex + (isPrevious === true ? -1 : 1)];

        while (siblingLI && (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(siblingLI) || siblingLI.classList.contains(cssClass.disabled))) {
          liIndex = liIndex + (isPrevious === true ? -1 : 1);
          siblingLI = liCollections[liIndex];
        }

        return siblingLI;
      }

      ListBase.getSiblingLI = getSiblingLI;
      /**
       * Return the index of the li element
       * @param  {Element} item - An element to find next or previous after this element.
       * @param  {Element[]|NodeList} elementArray - An element array to find index of given li.
       */

      function indexOf(item, elementArray) {
        if (!elementArray || !item) {
          return void 0;
        } else {
          var liCollections = elementArray;
          liCollections = Array.prototype.slice.call(elementArray);
          return liCollections.indexOf(item);
        }
      }

      ListBase.indexOf = indexOf;
      /**
       * Returns the grouped data from given dataSource.
       * @param  {{[key:string]:Object}[]} dataSource - The JSON data which is necessary to process.
       * @param  {FieldsMapping} fields - Fields that are mapped from the data source.
       * @param  {SortOrder='None'} sortOrder- Specifies final result sort order.
       */

      function groupDataSource(dataSource, fields) {
        var sortOrder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'None';
        var curFields = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, ListBase.defaultMappedFields, fields);
        var cusQuery = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]().group(curFields.groupBy); // need to remove once sorting issues fixed in DataManager

        cusQuery = addSorting(sortOrder, 'key', cusQuery);
        var ds = getDataSource(dataSource, cusQuery);
        dataSource = [];

        for (var j = 0; j < ds.length; j++) {
          var itemObj = ds[j].items;
          var grpItem = {};
          var hdr = 'isHeader';
          grpItem[curFields.text] = ds[j].key;
          grpItem[hdr] = true;
          var newtext = curFields.text;

          if (newtext === 'id') {
            newtext = 'text';
            grpItem[newtext] = ds[j].key;
          }

          grpItem._id = 'group-list-item-' + (ds[j].key ? ds[j].key.toString().trim() : 'undefined');
          grpItem.items = itemObj;
          dataSource.push(grpItem);

          for (var k = 0; k < itemObj.length; k++) {
            dataSource.push(itemObj[k]);
          }
        }

        return dataSource;
      }

      ListBase.groupDataSource = groupDataSource;
      /**
       * Returns a sorted query object.
       * @param  {SortOrder} sortOrder - Specifies that sort order.
       * @param  {string} sortBy - Specifies sortBy fields.
       * @param  {Query=new Query()} query - Pass if any existing query.
       */

      function addSorting(sortOrder, sortBy) {
        var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();

        if (sortOrder === 'Ascending') {
          query.sortBy(sortBy, 'ascending', true);
        } else if (sortOrder === 'Descending') {
          query.sortBy(sortBy, 'descending', true);
        } else {
          for (var i = 0; i < query.queries.length; i++) {
            if (query.queries[i].fn === 'onSortBy') {
              query.queries.splice(i, 1);
            }
          }
        }

        return query;
      }

      ListBase.addSorting = addSorting;
      /**
       * Return an array of JSON Data that processed based on queries.
       * @param  {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.
       * @param  {Query} query - Specifies query that need to process.
       */

      function getDataSource(dataSource, query) {
        // tslint:disable-next-line
        return new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"](dataSource).executeLocal(query);
      }

      ListBase.getDataSource = getDataSource;
      /**
       * Created JSON data based the UL and LI element
       * @param  {HTMLElement|Element} element - UL element that need to convert as a JSON
       * @param  {ListBaseOptions} options? - Specifies listbase option for fields.
       */

      function createJsonFromElement(element, options) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var fields = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, ListBase.defaultMappedFields, curOpt.fields);
        var curEle = element.cloneNode(true);
        var jsonAr = [];
        curEle.classList.add('json-parent');
        var childs = curEle.querySelectorAll('.json-parent>li');
        curEle.classList.remove('json-parent');

        for (var i = 0; i < childs.length; i++) {
          var li = childs[i];
          var anchor = li.querySelector('a');
          var ul = li.querySelector('ul');
          var json = {};
          var childNodes = anchor ? anchor.childNodes : li.childNodes;
          var keys = Object.keys(childNodes);

          for (var _i116 = 0; _i116 < childNodes.length; _i116++) {
            if (!childNodes[Number(keys[_i116])].hasChildNodes()) {
              json[fields.text] = childNodes[Number(keys[_i116])].textContent;
            }
          }

          var attributes$$1 = getAllAttributes(li);

          if (attributes$$1.id) {
            json[fields.id] = attributes$$1.id;
            delete attributes$$1.id;
          } else {
            json[fields.id] = generateId();
          }

          if (Object.keys(attributes$$1).length) {
            json[fields.htmlAttributes] = attributes$$1;
          }

          if (anchor) {
            attributes$$1 = getAllAttributes(anchor);

            if (Object.keys(attributes$$1).length) {
              json[fields.urlAttributes] = attributes$$1;
            }
          }

          if (ul) {
            json[fields.child] = createJsonFromElement(ul, options);
          }

          jsonAr.push(json);
        }

        return jsonAr;
      }

      ListBase.createJsonFromElement = createJsonFromElement;

      function typeofData(data) {
        var match = {
          "typeof": null,
          item: null
        };

        for (var i = 0; i < data.length; i++) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i])) {
            return match = {
              "typeof": typeof data[i],
              item: data[i]
            };
          }
        }

        return match;
      }

      function setAttribute(element, elementAttributes) {
        var attr = {};
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(attr, elementAttributes);

        if (attr["class"]) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], attr["class"].split(' '));
          delete attr["class"];
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(element, attr);
      }

      function getAllAttributes(element) {
        var attributes$$1 = {};
        var attr = element.attributes;

        for (var index = 0; index < attr.length; index++) {
          attributes$$1[attr[index].nodeName] = attr[index].nodeValue;
        }

        return attributes$$1;
      }
      /**
       * Created UL element from content template.
       * @param  {string} template - that need to convert and generate li element.
       * @param  {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.
       * @param  {ListBaseOptions} options? - Specifies listbase option for fields.
       */


      function renderContentTemplate(createElement, template, dataSource, fields, options, prop) {
        cssClass = getModuleClass(defaultListBaseOptions.moduleName);
        var ulElement = createElement('ul', {
          className: cssClass.ul,
          attrs: {
            role: 'presentation'
          }
        });
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var curFields = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, ListBase.defaultMappedFields, fields);
        var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
        var liCollection = [];
        var id = generateId(); // generate id for drop-down-list option.

        for (var i = 0; i < dataSource.length; i++) {
          var fieldData = getFieldValues(dataSource[i], curFields);
          var curItem = dataSource[i];
          var isHeader = curItem.isHeader;
          var value = fieldData[curFields.value];

          if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {
            var curData = {
              dataSource: dataSource,
              curData: curItem,
              text: value,
              options: curOpt,
              fields: curFields
            };
            curOpt.itemCreating(curData);
          }

          if (curOpt.itemCreating && typeof curOpt.itemCreating === 'function') {
            fieldData = getFieldValues(dataSource[i], curFields);
            value = fieldData[curFields.value];
          }

          var li = createElement('li', {
            id: id + '-' + i,
            className: isHeader ? cssClass.group : cssClass.li,
            attrs: {
              role: 'presentation'
            }
          });

          if (isHeader) {
            li.innerText = fieldData[curFields.text];
          } else {
            var currentID = isHeader ? curOpt.groupTemplateID : curOpt.templateID;

            if (isHeader) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(curItem, options, 'groupTemplate', currentID, !!curOpt.isStringTemplate), li);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(curItem, options, 'template', currentID, !!curOpt.isStringTemplate), li);
            }

            li.setAttribute('data-value', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? 'null' : value);
            li.setAttribute('role', 'option');
          }

          if (curOpt.itemCreated && typeof curOpt.itemCreated === 'function') {
            var _curData3 = {
              dataSource: dataSource,
              curData: curItem,
              text: value,
              item: li,
              options: curOpt,
              fields: curFields
            };
            curOpt.itemCreated(_curData3);
          }

          liCollection.push(li);
        }

        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(liCollection, ulElement);
        return ulElement;
      }

      ListBase.renderContentTemplate = renderContentTemplate;
      /**
       * Created header items from group template.
       * @param  {string} template - that need to convert and generate li element.
       * @param  {{[key:string]:Object}[]} dataSource - Specifies local JSON data source.
       * @param  {FieldsMapping} fields - Specifies fields for mapping the dataSource.
       * @param  {Element[]} headerItems? - Specifies listbase header items.
       */

      function renderGroupTemplate(groupTemplate, groupDataSource, fields, headerItems, options) {
        var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(groupTemplate);
        var curFields = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, ListBase.defaultMappedFields, fields);
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var category = curFields.groupBy;

        var _iterator130 = _createForOfIteratorHelper(headerItems),
            _step130;

        try {
          for (_iterator130.s(); !(_step130 = _iterator130.n()).done;) {
            var header = _step130.value;
            var headerData = {};
            headerData[category] = header.textContent;
            header.innerHTML = '';
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(headerData, options, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), header);
          }
        } catch (err) {
          _iterator130.e(err);
        } finally {
          _iterator130.f();
        }

        return headerItems;
      }

      ListBase.renderGroupTemplate = renderGroupTemplate;

      function generateId() {
        return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
      }

      ListBase.generateId = generateId;

      function processSubChild(createElement, fieldData, fields, ds, options, element, level) {
        // Get SubList
        var subDS = fieldData[fields.child] || [];
        var hasChildren = fieldData[fields.hasChildren]; //Create Sub child

        if (subDS.length) {
          hasChildren = true;
          element.classList.add(cssClass.hasChild);

          if (options.processSubChild) {
            var subLi = createListFromJson(createElement, subDS, options, ++level);
            element.appendChild(subLi);
          }
        } // Create expand and collapse node


        if (!!options.expandCollapse && hasChildren && !options.template) {
          element.firstElementChild.classList.add(cssClass.iconWrapper);
          var expandElement = options.expandIconPosition === 'Left' ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"] : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"];
          expandElement([createElement('div', {
            className: 'e-icons ' + options.expandIconClass
          })], element.querySelector('.' + cssClass.textContent));
        }
      }

      function generateSingleLevelLI(createElement, item, fieldData, fields, className, innerElements, grpLI, id, index, options) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var ariaAttributes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultAriaAttributes, curOpt.ariaAttributes);
        var text = item;
        var value = item;
        var dataSource;

        if (typeof item !== 'string' && typeof item !== 'number' && typeof item !== 'boolean') {
          dataSource = item;
          text = typeof fieldData[fields.text] === 'boolean' || typeof fieldData[fields.text] === 'number' ? fieldData[fields.text] : fieldData[fields.text] || '';
          value = fieldData[fields.value];
        }

        var elementID;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataSource) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[fields.id]) && fieldData[fields.id] !== '') {
          elementID = id;
        } else {
          elementID = id + '-' + index;
        }

        var li = createElement('li', {
          className: (grpLI === true ? cssClass.group : cssClass.li) + ' ' + (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(className) ? '' : className),
          id: elementID,
          attrs: ariaAttributes.groupItemRole !== '' && ariaAttributes.itemRole !== '' ? {
            role: grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
          } : {}
        });

        if (dataSource && fieldData.hasOwnProperty(fields.enabled) && fieldData[fields.enabled].toString() === 'false') {
          li.classList.add(cssClass.disabled);
        }

        if (grpLI) {
          li.innerText = text;
        } else {
          li.setAttribute('data-value', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) ? 'null' : value);
          li.setAttribute('role', 'option');

          if (dataSource && fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes]) {
            setAttribute(li, fieldData[fields.htmlAttributes]);
          }

          if (innerElements.length && !curOpt.itemNavigable) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(innerElements, li);
          }

          if (dataSource && (fieldData[fields.url] || fieldData[fields.urlAttributes] && fieldData[fields.urlAttributes].href)) {
            li.appendChild(anchorTag(createElement, dataSource, fields, text, innerElements, curOpt.itemNavigable));
          } else {
            if (innerElements.length && curOpt.itemNavigable) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(innerElements, li);
            }

            li.appendChild(document.createTextNode(text));
          }
        }

        return li;
      }

      function getModuleClass(moduleName) {
        var moduleClass;
        return moduleClass = {
          li: "e-".concat(moduleName, "-item"),
          ul: "e-".concat(moduleName, "-parent e-ul"),
          group: "e-".concat(moduleName, "-group-item"),
          icon: "e-".concat(moduleName, "-icon"),
          text: "e-".concat(moduleName, "-text"),
          check: "e-".concat(moduleName, "-check"),
          checked: 'e-checked',
          selected: 'e-selected',
          expanded: 'e-expanded',
          textContent: 'e-text-content',
          hasChild: 'e-has-child',
          level: 'e-level',
          url: "e-".concat(moduleName, "-url"),
          collapsible: 'e-icon-collapsible',
          disabled: 'e-disabled',
          image: "e-".concat(moduleName, "-img"),
          iconWrapper: 'e-icon-wrapper',
          anchorWrap: 'e-anchor-wrap',
          navigable: 'e-navigable'
        };
      }

      function anchorTag(createElement, dataSource, fields, text, innerElements, isFullNavigation) {
        var fieldData = getFieldValues(dataSource, fields);
        var attr = {
          href: fieldData[fields.url]
        };

        if (fieldData.hasOwnProperty(fields.urlAttributes) && fieldData[fields.urlAttributes]) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(attr, fieldData[fields.urlAttributes]);
          attr.href = fieldData[fields.url] ? fieldData[fields.url] : fieldData[fields.urlAttributes].href;
        }

        var anchorTag;

        if (!isFullNavigation) {
          anchorTag = createElement('a', {
            className: cssClass.text + ' ' + cssClass.url,
            innerHTML: text
          });
        } else {
          anchorTag = createElement('a', {
            className: cssClass.text + ' ' + cssClass.url
          });
          var anchorWrapper = createElement('div', {
            className: cssClass.anchorWrap
          });

          if (innerElements && innerElements.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(innerElements, anchorWrapper);
          }

          anchorWrapper.appendChild(document.createTextNode(text));
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([anchorWrapper], anchorTag);
        }

        setAttribute(anchorTag, attr);
        return anchorTag;
      }
      /* tslint:disable:align */


      function generateLI(createElement, item, fieldData, fields, className, options) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var ariaAttributes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultAriaAttributes, curOpt.ariaAttributes);
        var text = item;
        var uID;
        var grpLI;
        var dataSource;

        if (typeof item !== 'string' && typeof item !== 'number') {
          dataSource = item;
          text = fieldData[fields.text] || ''; // tslint:disable-next-line

          uID = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData['_id']) ? fieldData[fields.id] : fieldData['_id'];
          grpLI = item.hasOwnProperty('isHeader') && item.isHeader ? true : false;
        }

        if (options && options.enableHtmlSanitizer) {
          text = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(text);
        }

        var li = createElement('li', {
          className: (grpLI === true ? cssClass.group : cssClass.li) + ' ' + (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(className) ? '' : className),
          attrs: ariaAttributes.groupItemRole !== '' && ariaAttributes.itemRole !== '' ? {
            role: grpLI === true ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
          } : {}
        });
        !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(uID) ? li.setAttribute('data-uid', uID) : li.setAttribute('data-uid', generateId());
        var blazId = 'BlazId';

        if (options && !!options.removeBlazorID && typeof item === 'object' && item.hasOwnProperty(blazId)) {
          delete item[blazId];
        }

        if (grpLI && options && options.groupTemplate) {
          var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(options.groupTemplate);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString(item, options, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), li);
        } else if (!grpLI && options && options.template) {
          var _compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(options.template);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(_compiledString(item, options, 'template', curOpt.templateID, !!curOpt.isStringTemplate), li);
        } else {
          var innerDiv = createElement('div', {
            className: cssClass.textContent,
            attrs: ariaAttributes.wrapperRole !== '' ? {
              role: ariaAttributes.wrapperRole
            } : {}
          });

          if (dataSource && (fieldData[fields.url] || fieldData[fields.urlAttributes] && fieldData[fields.urlAttributes].href)) {
            innerDiv.appendChild(anchorTag(createElement, dataSource, fields, text, null, curOpt.itemNavigable));
          } else {
            var element = createElement('span', {
              className: cssClass.text,
              attrs: ariaAttributes.itemText !== '' ? {
                role: ariaAttributes.itemText
              } : {}
            });

            if (options && options.enableHtmlSanitizer) {
              element.innerText = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(text);
            } else {
              element.innerHTML = text;
            }

            innerDiv.appendChild(element);
          }

          li.appendChild(innerDiv);
        }

        return li;
      }
      /**
       * Returns UL element based on the given LI element.
       * @param  {HTMLElement[]} liElement - Specifies array of LI element.
       * @param  {string} className? - Specifies class name that need to be added in UL element.
       * @param  {ListBaseOptions} options? - Specifies ListBase options.
       */


      function generateUL(createElement, liElement, className, options) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        var ariaAttributes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultAriaAttributes, curOpt.ariaAttributes);
        cssClass = getModuleClass(curOpt.moduleName);
        var ulElement = createElement('ul', {
          className: cssClass.ul + ' ' + (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(className) ? '' : className),
          attrs: ariaAttributes.listRole !== '' ? {
            role: ariaAttributes.listRole
          } : {}
        });
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(liElement, ulElement);
        return ulElement;
      }

      ListBase.generateUL = generateUL;
      /**
       * Returns LI element with additional DIV tag based on the given LI element.
       * @param  {liElement} liElement - Specifies LI element.
       * @param  {string} className? - Specifies class name that need to be added in created DIV element.
       * @param  {ListBaseOptions} options? - Specifies ListBase options.
       */

      function generateIcon(createElement, liElement, className, options) {
        var curOpt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, defaultListBaseOptions, options);
        cssClass = getModuleClass(curOpt.moduleName);
        var expandElement = curOpt.expandIconPosition === 'Left' ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"] : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"];
        expandElement([createElement('div', {
          className: 'e-icons ' + curOpt.expandIconClass + ' ' + (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(className) ? '' : className)
        })], liElement.querySelector('.' + cssClass.textContent));
        return liElement;
      }

      ListBase.generateIcon = generateIcon;
    })(ListBase || (ListBase = {}));
    /**
     * Used to get dataSource item from complex data using fields.
     * @param {{[key:string]:Object}|string[]|string} dataSource - Specifies an  JSON or String data.
     * @param {FieldsMapping} fields - Fields that are mapped from the dataSource.
     */


    function getFieldValues(dataItem, fields) {
      var fieldData = {};

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem) || typeof dataItem === 'string' || typeof dataItem === 'number' || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataItem.isHeader)) {
        return dataItem;
      } else {
        for (var _i117 = 0, _Object$keys46 = Object.keys(fields); _i117 < _Object$keys46.length; _i117++) {
          var field = _Object$keys46[_i117];
          var dataField = fields[field];
          var value = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataField) && typeof dataField === 'string' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(dataField, dataItem) : undefined;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            fieldData[dataField] = value;
          }
        }
      }

      return fieldData;
    }

    var __decorate = undefined && undefined.__decorate || function (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;
    }; // Effect Configuration Effect[] =  [fromViewBackward,fromViewForward,toViewBackward,toviewForward];


    var effectsConfig = {
      'None': [],
      'SlideLeft': ['SlideRightOut', 'SlideLeftOut', 'SlideLeftIn', 'SlideRightIn'],
      'SlideDown': ['SlideTopOut', 'SlideBottomOut', 'SlideBottomIn', 'SlideTopIn'],
      'Zoom': ['FadeOut', 'FadeZoomOut', 'FadeZoomIn', 'FadeIn'],
      'Fade': ['FadeOut', 'FadeOut', 'FadeIn', 'FadeIn']
    };
    var effectsRTLConfig = {
      'None': [],
      'SlideLeft': ['SlideLeftOut', 'SlideRightOut', 'SlideRightIn', 'SlideLeftIn'],
      'SlideDown': ['SlideBottomOut', 'SlideTopOut', 'SlideTopIn', 'SlideBottomIn'],
      'Zoom': ['FadeZoomOut', 'FadeOut', 'FadeIn', 'FadeZoomIn'],
      'Fade': ['FadeOut', 'FadeOut', 'FadeIn', 'FadeIn']
    }; // don't use space in classnames.

    var classNames = {
      root: 'e-listview',
      hover: 'e-hover',
      selected: 'e-active',
      focused: 'e-focused',
      parentItem: 'e-list-parent',
      listItem: 'e-list-item',
      listIcon: 'e-list-icon',
      textContent: 'e-text-content',
      listItemText: 'e-list-text',
      groupListItem: 'e-list-group-item',
      hasChild: 'e-has-child',
      view: 'e-view',
      header: 'e-list-header',
      headerText: 'e-headertext',
      headerTemplateText: 'e-headertemplate-text',
      text: 'e-text',
      disable: 'e-disabled',
      content: 'e-content',
      icon: 'e-icons',
      backIcon: 'e-icon-back',
      checkboxWrapper: 'e-checkbox-wrapper',
      checkbox: 'e-checkbox',
      checked: 'e-check',
      checklist: 'e-checklist',
      checkboxIcon: 'e-frame',
      checkboxRight: 'e-checkbox-right',
      checkboxLeft: 'e-checkbox-left',
      listviewCheckbox: 'e-listview-checkbox',
      itemCheckList: 'e-checklist',
      virtualElementContainer: 'e-list-virtualcontainer'
    };
    var LISTVIEW_TEMPLATE_PROPERTY = 'Template';
    var LISTVIEW_GROUPTEMPLATE_PROPERTY = 'GroupTemplate';
    var LISTVIEW_HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';
    var swipeVelocity = 0.5;
    /**
     * Represents the field settings of the ListView.
     */

    var FieldSettings = /*#__PURE__*/function (_syncfusion_ej2_base_27) {
      _inherits(FieldSettings, _syncfusion_ej2_base_27);

      var _super210 = _createSuper(FieldSettings);

      function FieldSettings() {
        _classCallCheck(this, FieldSettings);

        return _super210.apply(this, arguments);
      }

      return FieldSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('id')], FieldSettings.prototype, "id", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], FieldSettings.prototype, "text", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('isChecked')], FieldSettings.prototype, "isChecked", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('isVisible')], FieldSettings.prototype, "isVisible", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('enabled')], FieldSettings.prototype, "enabled", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('iconCss')], FieldSettings.prototype, "iconCss", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('child')], FieldSettings.prototype, "child", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('tooltip')], FieldSettings.prototype, "tooltip", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('groupBy')], FieldSettings.prototype, "groupBy", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], FieldSettings.prototype, "sortBy", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('htmlAttributes')], FieldSettings.prototype, "htmlAttributes", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('tableName')], FieldSettings.prototype, "tableName", void 0);
    /**
     * Represents the EJ2 ListView control.
     * ```html
     * <div id="listview">
     * <ul>
     * <li>Favorite</li>
     * <li>Documents</li>
     * <li>Downloads</li>
     * </ul>
     * </div>
     * ```
     * ```typescript
     *   var listviewObject = new ListView({});
     *   listviewObject.appendTo("#listview");
     * ```
     */


    var ListView = /*#__PURE__*/function (_syncfusion_ej2_base_28) {
      _inherits(ListView, _syncfusion_ej2_base_28);

      var _super211 = _createSuper(ListView);

      /**
       * Constructor for creating the widget
       */
      function ListView(options, element) {
        var _this563;

        _classCallCheck(this, ListView);

        _this563 = _super211.call(this, options, element);
        _this563.itemReRender = false;
        _this563.previousSelectedItems = [];
        _this563.hiddenItems = [];
        _this563.enabledItems = [];
        _this563.disabledItems = [];
        return _this563;
      }
      /**
       * @private
       */


      _createClass2(ListView, [{
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i118 = 0, _Object$keys47 = Object.keys(newProp); _i118 < _Object$keys47.length; _i118++) {
            var prop = _Object$keys47[_i118];

            switch (prop) {
              case 'htmlAttributes':
                this.setHTMLAttribute();
                break;

              case 'cssClass':
                this.setCSSClass(oldProp.cssClass);
                break;

              case 'enable':
                this.setEnable();
                break;

              case 'width':
              case 'height':
                this.setSize();
                break;

              case 'enableRtl':
                this.setEnableRTL();
                break;

              case 'fields':
                this.listBaseOption.fields = this.fields.properties;

                if (this.enableVirtualization) {
                  if (!(this.isServerRendered && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])())) {
                    this.virtualizationModule.reRenderUiVirtualization();
                  }
                } else {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && !this.enableVirtualization) {
                    this.itemReRender = true;
                  }

                  this.reRender();
                }

                break;

              case 'headerTitle':
                if (!this.curDSLevel.length) {
                  this.header(this.headerTitle, false, 'header');
                }

                break;

              case 'query':
                if (this.enableVirtualization) {
                  if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
                    this.virtualizationModule.reRenderUiVirtualization();
                  }
                } else {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && !this.enableVirtualization) {
                    this.itemReRender = true;
                  }

                  this.reRender();
                }

                break;

              case 'showHeader':
                this.header(this.headerTitle, false, 'header');
                break;

              case 'enableVirtualization':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentContainer)) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.contentContainer);
                }

                this.refresh();
                break;

              case 'showCheckBox':
              case 'checkBoxPosition':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
                  if (this.enableVirtualization) {
                    this.virtualizationModule.reRenderUiVirtualization();
                  } else {
                    this.setCheckbox();
                  }
                }

                break;

              case 'dataSource':
                if (this.enableVirtualization) {
                  if (!(this.isServerRendered && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])())) {
                    this.virtualizationModule.reRenderUiVirtualization();
                  }
                } else {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && !this.enableVirtualization) {
                    this.itemReRender = true;
                  }

                  this.reRender();
                }

                break;

              case 'sortOrder':
              case 'showIcon':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  // tslint:disable
                  this.interopAdaptor.invokeMethodAsync('ItemSorting'); //tslint:enable
                } else {
                  if (this.enableVirtualization) {
                    this.virtualizationModule.reRenderUiVirtualization();
                  } else {
                    this.listBaseOption.showIcon = this.showIcon;
                    this.curViewDS = this.getSubDS();
                    this.resetCurrentList();
                  }
                }

                break;

              default:
                break;
            }
          }
        } // Model Changes

      }, {
        key: "setHTMLAttribute",
        value: function setHTMLAttribute() {
          if (Object.keys(this.htmlAttributes).length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, this.htmlAttributes);
          }
        }
      }, {
        key: "setCSSClass",
        value: function setCSSClass(oldCSSClass) {
          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.cssClass.split(' ').filter(function (css) {
              return css;
            }));
          }

          if (oldCSSClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldCSSClass.split(' ').filter(function (css) {
              return css;
            }));
          }
        }
      }, {
        key: "setSize",
        value: function setSize() {
          this.element.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);
          this.element.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
          this.isWindow = this.element.clientHeight ? false : true;
        }
      }, {
        key: "setEnable",
        value: function setEnable() {
          this.enableElement(this.element, this.enable);
        }
      }, {
        key: "setEnableRTL",
        value: function setEnableRTL() {
          if (this.enableRtl) {
            this.element.classList.add('e-rtl');
          } else {
            this.element.classList.remove('e-rtl');
          }
        }
      }, {
        key: "enableElement",
        value: function enableElement(element, isEnabled) {
          if (isEnabled) {
            element.classList.remove(classNames.disable);
          } else {
            element.classList.add(classNames.disable);
          }
        } // Support Component Functions

      }, {
        key: "header",
        value: function header(text, showBack, prop) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            var args = {
              HeaderText: text,
              BackButton: showBack
            }; // tslint:disable

            this.interopAdaptor.invokeMethodAsync('HeaderTitle', args); // tslint:disable
          } else {
            if (this.headerEle === undefined && this.showHeader) {
              if (this.enableHtmlSanitizer) {
                this.setProperties({
                  headerTitle: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.headerTitle)
                }, true);
              }

              this.headerEle = this.createElement('div', {
                className: classNames.header
              });
              var innerHeaderEle = this.createElement('span', {
                className: classNames.headerText,
                innerHTML: this.headerTitle
              });
              var textEle = this.createElement('div', {
                className: classNames.text,
                innerHTML: innerHeaderEle.outerHTML
              });
              var hedBackButton = this.createElement('div', {
                className: classNames.icon + ' ' + classNames.backIcon + ' e-but-back',
                attrs: {
                  style: 'display:none;'
                }
              });
              this.headerEle.appendChild(hedBackButton);
              this.headerEle.appendChild(textEle);

              if (this.headerTemplate) {
                var compiledString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.headerTemplate);
                var headerTemplateEle = this.createElement('div', {
                  className: classNames.headerTemplateText
                });
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(compiledString({}, this, prop, this.LISTVIEW_HEADERTEMPLATE_ID), headerTemplateEle);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([headerTemplateEle], this.headerEle);
                this.updateBlazorTemplates(false, true, true);
              }

              if (this.headerTemplate && this.headerTitle) {
                textEle.classList.add('header');
              }

              this.element.classList.add('e-has-header');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.headerEle], this.element);
            } else if (this.headerEle) {
              if (this.showHeader) {
                this.headerEle.style.display = '';

                var _textEle = this.headerEle.querySelector('.' + classNames.headerText);

                var _hedBackButton = this.headerEle.querySelector('.' + classNames.backIcon);

                if (this.enableHtmlSanitizer) {
                  text = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(text);
                }

                _textEle.innerHTML = text;

                if (this.headerTemplate && showBack) {
                  _textEle.parentElement.classList.remove('header');

                  this.headerEle.querySelector('.' + classNames.headerTemplateText).classList.add('nested-header');
                }

                if (this.headerTemplate && !showBack) {
                  _textEle.parentElement.classList.add('header');

                  this.headerEle.querySelector('.' + classNames.headerTemplateText).classList.remove('nested-header');
                  this.headerEle.querySelector('.' + classNames.headerTemplateText).classList.add('header');
                }

                if (showBack === true) {
                  _hedBackButton.style.display = '';
                } else {
                  _hedBackButton.style.display = 'none';
                }
              } else {
                this.headerEle.style.display = 'none';
              }
            }
          }
        } // Animation Related Functions

      }, {
        key: "switchView",
        value: function switchView(fromView, toView, reverse) {
          var _this564 = this;

          if (fromView && toView) {
            var fPos = fromView.style.position;
            var overflow = this.element.style.overflow !== 'hidden' ? this.element.style.overflow : '';
            fromView.style.position = 'absolute';
            fromView.classList.add('e-view');
            var anim;
            var duration = this.animation.duration;

            if (this.animation.effect) {
              anim = this.enableRtl ? effectsRTLConfig[this.animation.effect] : effectsConfig[this.animation.effect];
            } else {
              var slideLeft = 'SlideLeft';
              anim = effectsConfig[slideLeft];
              reverse = this.enableRtl;
              duration = 0;
            }

            this.element.style.overflow = 'hidden';
            this.aniObj.animate(fromView, {
              name: reverse === true ? anim[0] : anim[1],
              duration: duration,
              timingFunction: this.animation.easing,
              end: function end(model) {
                fromView.style.display = 'none';
                _this564.element.style.overflow = overflow;
                fromView.style.position = fPos;
                fromView.classList.remove('e-view');
              }
            });
            toView.style.display = '';
            this.aniObj.animate(toView, {
              name: reverse === true ? anim[2] : anim[3],
              duration: duration,
              timingFunction: this.animation.easing,
              end: function end() {
                _this564.trigger('actionComplete');
              }
            });
            this.curUL = toView;
          }
        }
      }, {
        key: "preRender",
        value: function preRender() {
          this.listBaseOption = {
            template: this.template,
            headerTemplate: this.headerTemplate,
            groupTemplate: this.groupTemplate,
            expandCollapse: true,
            listClass: '',
            ariaAttributes: {
              itemRole: 'option',
              listRole: 'presentation',
              itemText: '',
              groupItemRole: 'group',
              wrapperRole: 'presentation'
            },
            fields: this.fields.properties,
            sortOrder: this.sortOrder,
            showIcon: this.showIcon,
            itemCreated: this.renderCheckbox.bind(this),
            templateID: "".concat(this.element.id).concat(LISTVIEW_TEMPLATE_PROPERTY),
            groupTemplateID: "".concat(this.element.id).concat(LISTVIEW_GROUPTEMPLATE_PROPERTY),
            enableHtmlSanitizer: this.enableHtmlSanitizer,
            removeBlazorID: true
          };
          this.initialization();
        }
      }, {
        key: "updateLiElementHeight",
        value: function updateLiElementHeight() {
          var liContainer = this.element.querySelector('.' + classNames.virtualElementContainer);

          if (liContainer.children[0]) {
            this.liElementHeight = liContainer.children[0].getBoundingClientRect().height; // tslint:disable

            this.interopAdaptor.invokeMethodAsync('LiElementHeight', this.liElementHeight); // tslint:enable
          }
        }
      }, {
        key: "initialization",
        value: function initialization() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.enableVirtualization) {
            var ulContainer = this.element.querySelector('.' + classNames.virtualElementContainer);

            if (ulContainer !== null) {
              if (this.height === '') {
                // tslint:disable
                this.interopAdaptor.invokeMethodAsync('SetComponentHeight', window.innerHeight); // tslint:enable

                this.isWindow = true;
                ulContainer.scrollIntoView();
              }

              if (this.height.toString().indexOf('%') !== -1) {
                // tslint:disable
                this.interopAdaptor.invokeMethodAsync('SetContainerHeight', this.element.getBoundingClientRect().height.toString()); // tslint:enable
              }

              if (ulContainer.children[0]) {
                this.liElementHeight = ulContainer.children[0].getBoundingClientRect().height; // tslint:disable

                this.interopAdaptor.invokeMethodAsync('LiElementHeight', this.liElementHeight); // tslint:enable
              }
            }
          }

          this.curDSLevel = [];
          this.animateOptions = {};
          this.curViewDS = [];
          this.currentLiElements = [];
          this.isNestedList = false;
          this.selectedData = [];
          this.selectedId = [];
          this.LISTVIEW_TEMPLATE_ID = "".concat(this.element.id).concat(LISTVIEW_TEMPLATE_PROPERTY);
          this.LISTVIEW_GROUPTEMPLATE_ID = "".concat(this.element.id).concat(LISTVIEW_GROUPTEMPLATE_PROPERTY);
          this.LISTVIEW_HEADERTEMPLATE_ID = "".concat(this.element.id).concat(LISTVIEW_HEADERTEMPLATE_PROPERTY);
          this.aniObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](this.animateOptions);
          this.removeElement(this.curUL);
          this.removeElement(this.ulElement);
          this.removeElement(this.headerEle);
          this.removeElement(this.contentContainer);
          this.curUL = this.ulElement = this.liCollection = this.headerEle = this.contentContainer = undefined;
        }
      }, {
        key: "renderCheckbox",
        value: function renderCheckbox(args) {
          if (args.item.classList.contains(classNames.hasChild)) {
            this.isNestedList = true;
          }

          if (this.showCheckBox && this.isValidLI(args.item)) {
            var checkboxElement;
            var fieldData;
            checkboxElement = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_2__["createCheckBox"])(this.createElement, false, {
              checked: false,
              enableRtl: this.enableRtl,
              cssClass: classNames.listviewCheckbox
            });
            checkboxElement.setAttribute('role', 'checkbox');
            var frameElement = checkboxElement.querySelector('.' + classNames.checkboxIcon);
            args.item.classList.add(classNames.itemCheckList);
            args.item.firstElementChild.classList.add(classNames.checkbox);

            if (typeof this.dataSource[0] !== 'string' && typeof this.dataSource[0] !== 'number') {
              fieldData = getFieldValues(args.curData, this.listBaseOption.fields);

              if (fieldData[this.listBaseOption.fields.isChecked]) {
                this.checkInternally(args, checkboxElement);
              }
            } else if ((typeof this.dataSource[0] === 'string' || typeof this.dataSource[0] === 'number') && this.selectedData.indexOf(args.text) !== -1) {
              this.checkInternally(args, checkboxElement);
            }

            checkboxElement.setAttribute('aria-checked', frameElement.classList.contains(classNames.checked) ? 'true' : 'false');

            if (this.checkBoxPosition === 'Left') {
              checkboxElement.classList.add(classNames.checkboxLeft);
              args.item.firstElementChild.classList.add(classNames.checkboxLeft);
              args.item.firstElementChild.insertBefore(checkboxElement, args.item.firstElementChild.childNodes[0]);
            } else {
              checkboxElement.classList.add(classNames.checkboxRight);
              args.item.firstElementChild.classList.add(classNames.checkboxRight);
              args.item.firstElementChild.appendChild(checkboxElement);
            }

            this.currentLiElements.push(args.item);
            this.checkBoxPosition === 'Left' ? this.virtualCheckBox = args.item.firstElementChild.children[0] : this.virtualCheckBox = args.item.firstElementChild.lastElementChild;
          }
        }
      }, {
        key: "checkInternally",
        value: function checkInternally(args, checkboxElement) {
          args.item.classList.add(classNames.selected);
          args.item.setAttribute('aria-selected', 'true');
          checkboxElement.querySelector('.' + classNames.checkboxIcon).classList.add(classNames.checked);
          checkboxElement.setAttribute('aria-checked', 'true');
        }
        /**
         * Checks the specific list item by passing the unchecked fields as an argument to this method.
         * @param  {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
         */

      }, {
        key: "checkItem",
        value: function checkItem(item) {
          this.toggleCheckBase(item, true);
        }
      }, {
        key: "toggleCheckBase",
        value: function toggleCheckBase(item, checked) {
          if (this.showCheckBox) {
            var liElement = item;

            if (item instanceof Object && item.constructor !== HTMLLIElement) {
              liElement = this.getLiFromObjOrElement(item);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
              var checkboxIcon = liElement.querySelector('.' + classNames.checkboxIcon);
              checked ? liElement.classList.add(classNames.selected) : liElement.classList.remove(classNames.selected);
              liElement.setAttribute('aria-selected', checked ? 'true' : 'false');
              checked ? checkboxIcon.classList.add(classNames.checked) : checkboxIcon.classList.remove(classNames.checked);
              checkboxIcon.parentElement.setAttribute('aria-checked', checked ? 'true' : 'false');
            }

            this.setSelectedItemData(liElement);
          }
        }
        /**
         * Uncheck the specific list item by passing the checked fields as an argument to this method.
         * @param  {Fields | HTMLElement | Element} item - It accepts Fields or HTML list element as an argument.
         */

      }, {
        key: "uncheckItem",
        value: function uncheckItem(item) {
          this.toggleCheckBase(item, false);
        }
        /**
         * Checks all the unchecked items in the ListView.
         */

      }, {
        key: "checkAllItems",
        value: function checkAllItems() {
          this.toggleAllCheckBase(true);
        }
        /**
         * Uncheck all the checked items in ListView.
         */

      }, {
        key: "uncheckAllItems",
        value: function uncheckAllItems() {
          this.toggleAllCheckBase(false);
        }
      }, {
        key: "toggleAllCheckBase",
        value: function toggleAllCheckBase(checked) {
          if (this.showCheckBox) {
            for (var i = 0; i < this.liCollection.length; i++) {
              var checkIcon = this.liCollection[i].querySelector('.' + classNames.checkboxIcon);

              if (checkIcon) {
                if (checked) {
                  if (!checkIcon.classList.contains(classNames.checked)) {
                    this.checkItem(this.liCollection[i]);
                  }
                } else {
                  if (checkIcon.classList.contains(classNames.checked)) {
                    this.uncheckItem(this.liCollection[i]);
                  }
                }
              }
            }

            if (this.enableVirtualization) {
              this.virtualizationModule.checkedItem(checked);
            }
          }
        }
      }, {
        key: "setCheckbox",
        value: function setCheckbox() {
          if (this.showCheckBox) {
            var liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.listItem));
            var args = {
              item: undefined,
              curData: undefined,
              dataSource: undefined,
              fields: undefined,
              options: undefined,
              text: ''
            };

            for (var i = 0; i < liCollection.length; i++) {
              var element = liCollection[i];
              args.item = element;
              args.curData = this.getItemData(element);

              if (element.querySelector('.' + classNames.checkboxWrapper)) {
                this.removeElement(element.querySelector('.' + classNames.checkboxWrapper));
              }

              this.renderCheckbox(args);

              if (args.item.classList.contains(classNames.selected)) {
                this.checkInternally(args, args.item.querySelector('.' + classNames.checkboxWrapper));
              }
            }
          } else {
            var _liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.itemCheckList));

            for (var _i119 = 0; _i119 < _liCollection.length; _i119++) {
              var _element3 = _liCollection[_i119];

              _element3.classList.remove(classNames.selected);

              _element3.firstElementChild.classList.remove(classNames.checkbox);

              this.removeElement(_element3.querySelector('.' + classNames.checkboxWrapper));
            }

            if (this.selectedItems) {
              this.selectedItems.item.classList.add(classNames.selected);
            }
          }
        }
        /**
         * Refresh the height of the list item.
         */

      }, {
        key: "refreshItemHeight",
        value: function refreshItemHeight() {
          this.virtualizationModule.refreshItemHeight();
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var target = e.target;
          var classList = target.classList;
          var closestElement;

          if (classList.contains(classNames.backIcon) || classList.contains(classNames.headerText)) {
            if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
              this.uncheckAllItems();
            }

            this.back();
          } else {
            var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target.parentNode, '.' + classNames.listItem);

            if (li === null) {
              li = target;
            }

            this.removeFocus();

            if (this.enable && this.showCheckBox && this.isValidLI(li)) {
              if (e.target.classList.contains(classNames.checkboxIcon)) {
                li.classList.add(classNames.focused);

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + classNames.checked))) {
                  var args = {
                    curData: undefined,
                    dataSource: undefined,
                    fields: undefined,
                    options: undefined,
                    text: undefined,
                    item: li
                  };
                  this.checkInternally(args, args.item.querySelector('.' + classNames.checkboxWrapper));
                } else {
                  this.uncheckItem(li);
                  li.classList.add(classNames.focused);
                }

                if (this.enableVirtualization) {
                  this.virtualizationModule.setCheckboxLI(li, e);
                }

                if (e) {
                  var eventArgs = this.selectEventData(li, e);
                  var checkIcon = li.querySelector('.' + classNames.checkboxIcon);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, {
                    isChecked: checkIcon.classList.contains(classNames.checked)
                  });
                  this.trigger('select', eventArgs);
                }
              } else if (li.classList.contains(classNames.hasChild)) {
                this.removeHover();
                this.removeSelect();
                this.removeSelect(li);
                this.setSelectLI(li, e);
                li.classList.remove(classNames.selected);
              } else {
                this.setCheckboxLI(li, e);
              }
            } else {
              this.setSelectLI(li, e);
            }

            closestElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, 'li');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(closestElement)) {
              if (closestElement.classList.contains('e-has-child') && !e.target.parentElement.classList.contains('e-listview-checkbox')) {
                closestElement.classList.add(classNames.disable);
              }
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.enableVirtualization) {
            var ulElementContainer = this.element.querySelector('.' + classNames.virtualElementContainer);

            if (ulElementContainer.querySelector('.e-active')) {
              // tslint:disable-next-line:no-any
              var selectedElements = ulElementContainer.querySelectorAll('.e-active'); // tslint:enable-next-line:no-any

              if (this.showCheckBox) {
                for (var i = 0; i < selectedElements.length; i++) {
                  // tslint:disable-next-line:no-any
                  if (!this.previousSelectedItems.includes(selectedElements[i].getAttribute('data-uid'))) {
                    this.previousSelectedItems.push(selectedElements[i].getAttribute('data-uid'));
                  } // tslint:enable-next-line:no-any

                }
              } else {
                this.previousSelectedItems[0] = ulElementContainer.querySelector('.e-active').getAttribute('data-uid');
              }
            }

            if (ulElementContainer.querySelector('.e-focused')) {
              // tslint:disable-next-line:no-any
              var focusElement = ulElementContainer.querySelector('.e-focused'); // tslint:enable-next-line:no-any

              if (!focusElement.classList.contains('e-active')) {
                var focusElementId = focusElement.getAttribute('data-uid'); // tslint:disable-next-line:no-any

                if (this.previousSelectedItems.includes(focusElementId)) {
                  var selectedElement1 = this.previousSelectedItems.slice(0, this.previousSelectedItems.indexOf(focusElementId));
                  var selectedElement2 = this.previousSelectedItems.slice(this.previousSelectedItems.indexOf(focusElementId) + 1, this.previousSelectedItems.length);
                  this.previousSelectedItems = selectedElement1.concat(selectedElement2);
                } // tslint:enable-next-line:no-any

              }
            }
          }
        }
      }, {
        key: "removeElement",
        value: function removeElement(element) {
          return element && element.parentNode && element.parentNode.removeChild(element);
        }
      }, {
        key: "hoverHandler",
        value: function hoverHandler(e) {
          var curLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target.parentNode, '.' + classNames.listItem);
          this.setHoverLI(curLi);
        }
      }, {
        key: "leaveHandler",
        value: function leaveHandler(e) {
          this.removeHover();
        }
      }, {
        key: "homeKeyHandler",
        value: function homeKeyHandler(e, end) {
          if (Object.keys(this.dataSource).length && this.curUL) {
            if (this.selectedItems) {
              this.selectedItems.item.setAttribute('aria-selected', 'false');
            }

            var li = this.curUL.querySelectorAll('.' + classNames.listItem);
            var focusedElement = this.curUL.querySelector('.' + classNames.focused) || this.curUL.querySelector('.' + classNames.selected);

            if (focusedElement) {
              focusedElement.classList.remove(classNames.focused);

              if (!this.showCheckBox) {
                focusedElement.classList.remove(classNames.selected);
              }
            }

            var index = !end ? 0 : li.length - 1;

            if (li[index].classList.contains(classNames.hasChild) || this.showCheckBox) {
              li[index].classList.add(classNames.focused);
            } else {
              this.setSelectLI(li[index], e);
            }

            if (li[index]) {
              this.element.setAttribute('aria-activedescendant', li[index].id.toString());
            } else {
              this.element.removeAttribute('aria-activedescendant');
            }
          }
        }
      }, {
        key: "onArrowKeyDown",
        value: function onArrowKeyDown(e, prev) {
          var siblingLI;
          var li;
          var hasChild = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.curUL.querySelector('.' + classNames.hasChild)) ? true : false;

          if (hasChild || this.showCheckBox) {
            li = this.curUL.querySelector('.' + classNames.focused) || this.curUL.querySelector('.' + classNames.selected);
            siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll('.' + classNames.listItem), li, prev);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(siblingLI)) {
              if (li) {
                li.classList.remove(classNames.focused);

                if (!this.showCheckBox) {
                  li.classList.remove(classNames.selected);
                }
              }

              if (siblingLI.classList.contains(classNames.hasChild) || this.showCheckBox) {
                siblingLI.classList.add(classNames.focused);
              } else {
                this.setSelectLI(siblingLI, e);
              }
            }
          } else {
            li = this.curUL.querySelector('.' + classNames.selected);
            siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll('.' + classNames.listItem), li, prev);
            this.setSelectLI(siblingLI, e);
          }

          if (siblingLI) {
            this.element.setAttribute('aria-activedescendant', siblingLI.id.toString());
          } else {
            this.element.removeAttribute('aria-activedescendant');
          }

          return siblingLI;
        }
      }, {
        key: "arrowKeyHandler",
        value: function arrowKeyHandler(e, prev) {
          var _this565 = this;

          e.preventDefault();

          if (Object.keys(this.dataSource).length && this.curUL) {
            var siblingLI = this.onArrowKeyDown(e, prev);
            var elementTop = this.element.getBoundingClientRect().top;
            var elementHeight = this.element.getBoundingClientRect().height;
            var firstItemBounds = this.curUL.querySelector('.' + classNames.listItem).getBoundingClientRect();
            var heightDiff;
            var groupItemBounds;

            if (this.fields.groupBy) {
              groupItemBounds = this.curUL.querySelector('.' + classNames.groupListItem).getBoundingClientRect();
            }

            if (siblingLI) {
              var siblingTop = siblingLI.getBoundingClientRect().top;
              var siblingHeight = siblingLI.getBoundingClientRect().height;

              if (!prev) {
                var height = this.isWindow ? window.innerHeight : elementHeight;
                heightDiff = this.isWindow ? siblingTop + siblingHeight : siblingTop - elementTop + siblingHeight;

                if (heightDiff > height) {
                  this.isWindow ? window.scroll(0, pageYOffset + (heightDiff - height)) : this.element.scrollTop = this.element.scrollTop + (heightDiff - height);
                }
              } else {
                heightDiff = this.isWindow ? siblingTop : siblingTop - elementTop;

                if (heightDiff < 0) {
                  this.isWindow ? window.scroll(0, pageYOffset + heightDiff) : this.element.scrollTop = this.element.scrollTop + heightDiff;
                }
              }
            } else if (this.enableVirtualization && prev && this.virtualizationModule.uiFirstIndex) {
              this.onUIScrolled = function () {
                _this565.onArrowKeyDown(e, prev);

                _this565.onUIScrolled = undefined;
              };

              heightDiff = this.virtualizationModule.listItemHeight;
              this.isWindow ? window.scroll(0, pageYOffset - heightDiff) : this.element.scrollTop = this.element.scrollTop - heightDiff;
            } else if (prev) {
              if (this.showHeader && this.headerEle) {
                var topHeight = groupItemBounds ? groupItemBounds.top : firstItemBounds.top;
                var headerBounds = this.headerEle.getBoundingClientRect();
                heightDiff = headerBounds.top < 0 ? headerBounds.height - topHeight : 0;
                this.isWindow ? window.scroll(0, pageYOffset - heightDiff) : this.element.scrollTop = 0;
              } else if (this.fields.groupBy) {
                heightDiff = this.isWindow ? groupItemBounds.top < 0 ? groupItemBounds.top : 0 : elementTop - firstItemBounds.top + groupItemBounds.height;
                this.isWindow ? window.scroll(0, pageYOffset + heightDiff) : this.element.scrollTop = this.element.scrollTop - heightDiff;
              }
            }
          }
        }
      }, {
        key: "enterKeyHandler",
        value: function enterKeyHandler(e) {
          if (Object.keys(this.dataSource).length && this.curUL) {
            var hasChild = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.curUL.querySelector('.' + classNames.hasChild)) ? true : false;
            var li = this.curUL.querySelector('.' + classNames.focused);

            if (hasChild && li) {
              li.classList.remove(classNames.focused);

              if (this.showCheckBox) {
                this.removeSelect();
                this.removeSelect(li);
                this.removeHover();
              }

              this.setSelectLI(li, e);
            }
          }
        }
      }, {
        key: "spaceKeyHandler",
        value: function spaceKeyHandler(e) {
          if (this.enable && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
            var li = this.curUL.querySelector('.' + classNames.focused);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.querySelector('.' + classNames.checked))) {
              var args = {
                curData: undefined,
                dataSource: undefined,
                fields: undefined,
                options: undefined,
                text: undefined,
                item: li
              };
              this.checkInternally(args, args.item.querySelector('.' + classNames.checkboxWrapper));
            } else {
              this.uncheckItem(li);
            }
          }
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          switch (e.keyCode) {
            case 36:
              this.homeKeyHandler(e);
              break;

            case 35:
              this.homeKeyHandler(e, true);
              break;

            case 40:
              this.arrowKeyHandler(e);
              break;

            case 38:
              this.arrowKeyHandler(e, true);
              break;

            case 13:
              this.enterKeyHandler(e);
              break;

            case 8:
              if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
                this.uncheckAllItems();
              }

              this.back();
              break;

            case 32:
              this.spaceKeyHandler(e);
              break;
          }
        }
      }, {
        key: "swipeActionHandler",
        value: function swipeActionHandler(e) {
          if (e.swipeDirection === 'Right' && e.velocity > swipeVelocity && e.originalEvent.type === 'touchend') {
            if (this.showCheckBox && this.curDSLevel[this.curDSLevel.length - 1]) {
              this.uncheckAllItems();
            }

            this.back();
          }
        }
      }, {
        key: "focusout",
        value: function focusout() {
          if (Object.keys(this.dataSource).length && this.curUL) {
            var focusedElement = this.curUL.querySelector('.' + classNames.focused);
            var activeElement = this.curUL.querySelector('[aria-selected = true]');

            if (focusedElement) {
              focusedElement.classList.remove(classNames.focused);

              if (activeElement && !this.showCheckBox) {
                activeElement.classList.add(classNames.selected);
              }
            }
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.keyActionHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

          if (!this.enableVirtualization) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseover', this.hoverHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseout', this.leaveHandler, this);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focusout', this.focusout, this);

          this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
            swipe: this.swipeActionHandler.bind(this)
          });
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

          if (!this.enableVirtualization) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.hoverHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseout', this.leaveHandler);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.hoverHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseout', this.leaveHandler);

          this.touchModule.destroy();
        }
      }, {
        key: "removeFocus",
        value: function removeFocus() {
          var focusedLI = this.element.querySelectorAll('.' + classNames.focused);

          var _iterator131 = _createForOfIteratorHelper(focusedLI),
              _step131;

          try {
            for (_iterator131.s(); !(_step131 = _iterator131.n()).done;) {
              var ele = _step131.value;
              ele.classList.remove(classNames.focused);
            }
          } catch (err) {
            _iterator131.e(err);
          } finally {
            _iterator131.f();
          }
        }
      }, {
        key: "removeHover",
        value: function removeHover() {
          var hoverLI = this.element.querySelector('.' + classNames.hover);

          if (hoverLI) {
            hoverLI.classList.remove(classNames.hover);
          }
        }
      }, {
        key: "removeSelect",
        value: function removeSelect(li) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            var selectedLI = this.element.querySelectorAll('.' + classNames.selected);

            var _iterator132 = _createForOfIteratorHelper(selectedLI),
                _step132;

            try {
              for (_iterator132.s(); !(_step132 = _iterator132.n()).done;) {
                var ele = _step132.value;

                if (this.showCheckBox && ele.querySelector('.' + classNames.checked)) {
                  continue;
                } else {
                  ele.setAttribute('aria-selected', 'false');
                  ele.classList.remove(classNames.selected);
                }
              }
            } catch (err) {
              _iterator132.e(err);
            } finally {
              _iterator132.f();
            }
          } else {
            li.classList.remove(classNames.selected);
            li.setAttribute('aria-selected', 'false');
          }
        }
      }, {
        key: "isValidLI",
        value: function isValidLI(li) {
          return li && li.classList.contains(classNames.listItem) && !li.classList.contains(classNames.groupListItem) && !li.classList.contains(classNames.disable);
        }
      }, {
        key: "setCheckboxLI",
        value: function setCheckboxLI(li, e) {
          if (this.isValidLI(li) && this.enable && this.showCheckBox) {
            if (this.curUL.querySelector('.' + classNames.focused)) {
              this.curUL.querySelector('.' + classNames.focused).classList.remove(classNames.focused);
            }

            li.classList.add(classNames.focused);
            var checkboxElement = li.querySelector('.' + classNames.checkboxWrapper);
            var checkIcon = checkboxElement.querySelector('.' + classNames.checkboxIcon + '.' + classNames.icon);
            this.removeHover();

            if (!checkIcon.classList.contains(classNames.checked)) {
              checkIcon.classList.add(classNames.checked);
              li.classList.add(classNames.selected);
              li.setAttribute('aria-selected', 'true');
            } else {
              checkIcon.classList.remove(classNames.checked);
              li.classList.remove(classNames.selected);
              li.setAttribute('aria-selected', 'false');
            }

            checkboxElement.setAttribute('aria-checked', checkIcon.classList.contains(classNames.checked) ? 'true' : 'false');
            var eventArgs = this.selectEventData(li, e);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, {
              isChecked: checkIcon.classList.contains(classNames.checked)
            });

            if (this.enableVirtualization) {
              this.virtualizationModule.setCheckboxLI(li, e);
            }

            this.trigger('select', eventArgs);
            this.setSelectedItemData(li);
            this.renderSubList(li);
          }
        }
      }, {
        key: "selectEventData",
        value: function selectEventData(li, e) {
          var data = this.getItemData(li);
          var fieldData = getFieldValues(data, this.listBaseOption.fields);
          var selectedItem;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) && typeof this.dataSource[0] === 'string' || typeof this.dataSource[0] === 'number') {
            selectedItem = {
              item: li,
              text: li && li.innerText.trim(),
              data: this.dataSource
            };
          } else {
            selectedItem = {
              item: li,
              text: fieldData && fieldData[this.listBaseOption.fields.text],
              data: data
            };
          }

          var eventArgs = {};
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, selectedItem);

          if (e) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(eventArgs, {
              isInteracted: true,
              event: e,
              index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li)
            });
          }

          return eventArgs;
        }
      }, {
        key: "setSelectedItemData",
        value: function setSelectedItemData(li) {
          var data = this.getItemData(li);
          var fieldData = getFieldValues(data, this.listBaseOption.fields);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) && (typeof this.dataSource[0] === 'string' || typeof this.dataSource[0] === 'number')) {
            this.selectedItems = {
              item: li,
              text: li && li.innerText.trim(),
              data: this.dataSource
            };
          } else {
            this.selectedItems = {
              item: li,
              text: fieldData && fieldData[this.listBaseOption.fields.text],
              data: data
            };
          }
        }
      }, {
        key: "setSelectLI",
        value: function setSelectLI(li, e) {
          if (this.isValidLI(li) && !li.classList.contains(classNames.selected) && this.enable) {
            if (!this.showCheckBox) {
              this.removeSelect();
            }

            li.classList.add(classNames.selected);
            li.setAttribute('aria-selected', 'true');
            this.removeHover();
            this.setSelectedItemData(li);

            if (this.enableVirtualization) {
              this.virtualizationModule.setSelectLI(li, e);
            }

            var eventArgs = this.selectEventData(li, e);
            this.trigger('select', eventArgs);
            this.selectedLI = li;
            this.renderSubList(li);
          }
        }
      }, {
        key: "setHoverLI",
        value: function setHoverLI(li) {
          if (this.isValidLI(li) && !li.classList.contains(classNames.hover) && this.enable) {
            var lastLi = this.element.querySelectorAll('.' + classNames.hover);

            if (lastLi && lastLi.length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(lastLi, classNames.hover);
            }

            if (!li.classList.contains(classNames.selected) || this.showCheckBox) {
              li.classList.add(classNames.hover);
            }
          }
        } //Data Source Related Functions

      }, {
        key: "getSubDS",
        value: function getSubDS() {
          var levelKeys = this.curDSLevel;

          if (levelKeys.length) {
            var ds = this.localData;

            var _iterator133 = _createForOfIteratorHelper(levelKeys),
                _step133;

            try {
              for (_iterator133.s(); !(_step133 = _iterator133.n()).done;) {
                var key = _step133.value;
                var field = {};
                field[this.fields.id] = key;
                this.curDSJSON = this.findItemFromDS(ds, field);
                var fieldData = getFieldValues(this.curDSJSON, this.listBaseOption.fields);
                ds = this.curDSJSON ? fieldData[this.fields.child] : ds;
              }
            } catch (err) {
              _iterator133.e(err);
            } finally {
              _iterator133.f();
            }

            return ds;
          }

          return this.localData;
        }
      }, {
        key: "getItemData",
        value: function getItemData(li) {
          var dataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.localData : this.dataSource;
          var fields = this.getElementUID(li);
          var curDS;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.' + classNames.hasChild)) && this.fields.groupBy) {
            curDS = this.curViewDS;
          } else {
            curDS = dataSource;
          }

          return this.findItemFromDS(curDS, fields);
        }
      }, {
        key: "findItemFromDS",
        value: function findItemFromDS(dataSource, fields, parent) {
          var _this566 = this;

          var resultJSON;

          if (dataSource && dataSource.length && fields) {
            dataSource.some(function (data) {
              var fieldData = getFieldValues(data, _this566.listBaseOption.fields); //(!(fid) || id === fid) && (!(ftext) || text === ftext) && (!!fid || !!ftext)

              if ((fields[_this566.fields.id] || fields[_this566.fields.text]) && (!fields[_this566.fields.id] || (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[_this566.fields.id]) && fieldData[_this566.fields.id].toString()) === fields[_this566.fields.id].toString()) && (!fields[_this566.fields.text] || fieldData[_this566.fields.text] === fields[_this566.fields.text])) {
                resultJSON = parent ? dataSource : data;
              } else if (typeof data !== 'object' && dataSource.indexOf(data) !== -1) {
                resultJSON = parent ? dataSource : data;
              } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields[_this566.fields.id]) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fieldData[_this566.fields.id])) {
                var li = _this566.element.querySelector('[data-uid="' + fields[_this566.fields.id] + '"]');

                if (li && li.innerText.trim() === fieldData[_this566.fields.text]) {
                  resultJSON = data;
                }
              } else if (fieldData.hasOwnProperty(_this566.fields.child) && fieldData[_this566.fields.child].length) {
                resultJSON = _this566.findItemFromDS(fieldData[_this566.fields.child], fields, parent);
              }

              return !!resultJSON;
            });
          } else {
            resultJSON = dataSource;
          }

          return resultJSON;
        }
      }, {
        key: "getQuery",
        value: function getQuery() {
          var columns = [];
          var query = this.query ? this.query : new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["Query"]();

          if (!this.query) {
            for (var _i120 = 0, _Object$keys48 = Object.keys(this.fields.properties); _i120 < _Object$keys48.length; _i120++) {
              var column = _Object$keys48[_i120];

              if (column !== 'tableName' && !!this.fields[column] && this.fields[column] !== ListBase.defaultMappedFields[column] && columns.indexOf(this.fields[column]) === -1) {
                columns.push(this.fields[column]);
              }
            }

            query.select(columns);

            if (this.fields.properties.hasOwnProperty('tableName')) {
              query.from(this.fields.tableName);
            }
          }

          return query;
        }
      }, {
        key: "setViewDataSource",
        value: function setViewDataSource() {
          var dataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.localData;

          if (dataSource && this.fields.groupBy) {
            if (this.sortOrder !== 'None') {
              this.curViewDS = ListBase.groupDataSource(ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, this.fields.sortBy)), this.listBaseOption.fields, this.sortOrder);
            } else {
              this.curViewDS = ListBase.groupDataSource(dataSource, this.listBaseOption.fields, this.sortOrder);
            }
          } else if (dataSource && this.sortOrder !== 'None') {
            this.curViewDS = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, this.fields.sortBy));
          } else {
            this.curViewDS = dataSource;
          }
        }
      }, {
        key: "isInAnimation",
        value: function isInAnimation() {
          return this.curUL.classList.contains('.e-animate');
        }
      }, {
        key: "setLocalData",
        value: function setLocalData() {
          var _this567 = this;

          this.trigger('actionBegin');
          var listViewComponent = this;

          if (this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"]) {
            this.dataSource.executeQuery(this.getQuery()).then(function (e) {
              if (_this567.isDestroyed) {
                return;
              }

              _this567.localData = e.result;

              if (!_this567.isServerRendered || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                listViewComponent.removeElement(listViewComponent.contentContainer);
              }

              _this567.renderList();

              _this567.trigger('actionComplete', e);
            })["catch"](function (e) {
              if (_this567.isDestroyed) {
                return;
              }

              _this567.trigger('actionFailure', e);
            });
          } else if (!this.dataSource || !this.dataSource.length) {
            var ul = this.element.querySelector('ul');

            if (ul) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(ul);
              this.setProperties({
                dataSource: ListBase.createJsonFromElement(ul)
              }, true);
              this.localData = this.dataSource;
              this.renderList();
              this.trigger('actionComplete', {
                data: this.localData
              });
            }
          } else {
            this.localData = this.dataSource;
            this.renderList();
            this.trigger('actionComplete', {
              data: this.localData
            });
          }
        }
      }, {
        key: "reRender",
        value: function reRender() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered || this.enableVirtualization) {
            this.resetBlazorTemplates();
            this.removeElement(this.headerEle);
            this.removeElement(this.ulElement);
            this.removeElement(this.contentContainer);

            if (Object.keys(window).indexOf('ejsInterop') === -1) {
              this.element.innerHTML = '';
            }

            this.headerEle = this.ulElement = this.liCollection = undefined;
            this.header();
          }

          this.setLocalData();
        }
      }, {
        key: "resetCurrentList",
        value: function resetCurrentList() {
          this.resetBlazorTemplates();
          this.setViewDataSource(this.curViewDS);
          this.contentContainer.innerHTML = '';
          this.createList();
          this.renderIntoDom(this.curUL);
        }
      }, {
        key: "setAttributes",
        value: function setAttributes(liElements) {
          for (var i = 0; i < liElements.length; i++) {
            var element = liElements[i];

            if (element.classList.contains('e-list-item')) {
              element.setAttribute('id', this.element.id + '_' + element.getAttribute('data-uid'));
              element.setAttribute('aria-selected', 'false');
              element.setAttribute('tabindex', '-1');
            }
          }
        }
      }, {
        key: "createList",
        value: function createList() {
          this.currentLiElements = [];
          this.isNestedList = false;
          this.ulElement = this.curUL = ListBase.createList(this.createElement, this.curViewDS, this.listBaseOption);
          this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);
          this.setAttributes(this.liCollection);
          this.updateBlazorTemplates(true);
        }
      }, {
        key: "resetBlazorTemplates",
        value: function resetBlazorTemplates() {
          // tslint:disable-next-line:no-any
          var templateCollection = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"];

          if (this.template) {
            templateCollection[this.LISTVIEW_TEMPLATE_ID] = [];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.LISTVIEW_TEMPLATE_ID, LISTVIEW_TEMPLATE_PROPERTY);
          }

          if (this.groupTemplate) {
            templateCollection[this.LISTVIEW_GROUPTEMPLATE_ID] = [];
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.LISTVIEW_GROUPTEMPLATE_ID, LISTVIEW_GROUPTEMPLATE_PROPERTY);
          }

          if (this.headerTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.LISTVIEW_HEADERTEMPLATE_ID, LISTVIEW_HEADERTEMPLATE_PROPERTY);
          }
        }
      }, {
        key: "updateBlazorTemplates",
        value: function updateBlazorTemplates() {
          var template = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
          var headerTemplate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
          var resetExistingElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

          if (this.template && template && !this.enableVirtualization) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_TEMPLATE_ID, LISTVIEW_TEMPLATE_PROPERTY, this, resetExistingElements);
          }

          if (this.groupTemplate && template && !this.enableVirtualization) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_GROUPTEMPLATE_ID, LISTVIEW_GROUPTEMPLATE_PROPERTY, this, resetExistingElements);
          }

          if (this.headerTemplate && headerTemplate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.LISTVIEW_HEADERTEMPLATE_ID, LISTVIEW_HEADERTEMPLATE_PROPERTY, this, resetExistingElements);
          }
        }
      }, {
        key: "exceptionEvent",
        value: function exceptionEvent(e) {
          this.trigger('actionFailure', e);
        }
      }, {
        key: "UpdateCurrentUL",
        value: function UpdateCurrentUL() {
          this.ulElement = this.curUL = this.element.querySelector('.' + classNames.parentItem);

          if (this.curUL) {
            // tslint:disable
            this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem); // tslint:enable
          }
        }
      }, {
        key: "removeActiveClass",
        value: function removeActiveClass() {
          var listViewComponent = this;
          setTimeout(function () {
            var ulContainer = listViewComponent.element.querySelector('.' + classNames.virtualElementContainer);

            for (var i = 0; i < ulContainer.childElementCount; i++) {
              var selectedElement = ulContainer.children[i];
              var elementIndex = void 0;
              var hiddenElementIndex = void 0;

              if (listViewComponent.showCheckBox) {
                if (listViewComponent.previousSelectedItems.length > 0) {
                  for (var j = 0; j < listViewComponent.previousSelectedItems.length; j++) {
                    if (selectedElement.getAttribute('data-uid') === listViewComponent.previousSelectedItems[j]) {
                      selectedElement.classList.add('e-active');
                      selectedElement.setAttribute('aria-selected', 'true');

                      if (selectedElement.querySelector('.e-frame.e-icons')) {
                        selectedElement.querySelector('.e-frame.e-icons').classList.add('e-check');
                      }

                      elementIndex = i;
                    } else {
                      if (elementIndex !== i) {
                        selectedElement.classList.remove('e-active');
                        selectedElement.removeAttribute('aria-selected');

                        if (selectedElement.querySelector('.e-check')) {
                          selectedElement.querySelector('.e-check').classList.remove('e-check');
                        }
                      }
                    }
                  }
                } else {
                  selectedElement.classList.remove('e-active');
                  selectedElement.removeAttribute('aria-selected');

                  if (selectedElement.querySelector('.e-check')) {
                    selectedElement.querySelector('.e-check').classList.remove('e-check');
                  }
                }
              } else {
                if (selectedElement.getAttribute('data-uid') === listViewComponent.previousSelectedItems[0]) {
                  selectedElement.classList.add('e-active');
                  selectedElement.setAttribute('aria-selected', 'true');
                } else {
                  selectedElement.classList.remove('e-active');
                  selectedElement.removeAttribute('aria-selected');
                }
              }

              if (listViewComponent.hiddenItems.length > 0) {
                for (var k = 0; k < listViewComponent.hiddenItems.length; k++) {
                  if (selectedElement.getAttribute('data-uid') === listViewComponent.previousSelectedItems[k]) {
                    selectedElement.style.display = 'none';
                    hiddenElementIndex = i;
                  } else {
                    if (hiddenElementIndex !== i) {
                      selectedElement.style.display = null;
                    }
                  }
                }
              }

              if (listViewComponent.enabledItems.length > 0) {
                for (var x = 0; x < listViewComponent.enabledItems.length; x++) {
                  if (selectedElement.getAttribute('data-uid') === listViewComponent.enabledItems[x]) {
                    if (selectedElement.classList.contains('e-disabled')) {
                      selectedElement.classList.remove('e-disabled');
                    }
                  }
                }
              }

              if (listViewComponent.disabledItems.length > 0) {
                for (var y = 0; y < listViewComponent.disabledItems.length; y++) {
                  if (selectedElement.getAttribute('data-uid') === listViewComponent.disabledItems[y]) {
                    if (!selectedElement.classList.contains('e-disabled')) {
                      selectedElement.classList.add('e-disabled');
                    }
                  }
                }
              }
            }
          }, 200);
        }
      }, {
        key: "renderingNestedList",
        value: function renderingNestedList() {
          var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.liElement.parentNode, '.' + classNames.parentItem);
          var ctrlId = this.element.id;
          var ulElement = document.getElementById(ctrlId);
          var currentListItem = ulElement.getElementsByTagName('UL')[ulElement.getElementsByTagName('UL').length - 1];
          this.switchView(ul, currentListItem);
          this.liElement = null;
        }
      }, {
        key: "renderSubList",
        value: function renderSubList(li) {
          this.liElement = li;
          var uID = li.getAttribute('data-uid');

          if (li.classList.contains(classNames.hasChild) && uID) {
            var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(li.parentNode, '.' + classNames.parentItem);
            var ele = this.element.querySelector('[pid=\'' + uID + '\']');
            this.curDSLevel.push(uID);
            this.setViewDataSource(this.getSubDS());

            if (!ele) {
              var data = this.curViewDS;

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                // tslint:disable
                this.interopAdaptor.invokeMethodAsync('ListChildDataSource', data); // tslint:enable
              } else {
                ele = ListBase.createListFromJson(this.createElement, data, this.listBaseOption, this.curDSLevel.length);
                var lists = ele.querySelectorAll('.' + classNames.listItem);
                this.setAttributes(lists);
                ele.setAttribute('pID', uID);
                ele.style.display = 'none';
                this.renderIntoDom(ele);
                this.updateBlazorTemplates(true);
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered || this.enableVirtualization) {
              this.switchView(ul, ele);
            }

            this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);

            if (this.selectedItems) {
              var fieldData = getFieldValues(this.selectedItems.data, this.listBaseOption.fields);
              this.header(fieldData[this.listBaseOption.fields.text], true, 'header');
            }

            this.selectedLI = undefined;
          }
        }
      }, {
        key: "renderIntoDom",
        value: function renderIntoDom(ele) {
          this.contentContainer.appendChild(ele);
        }
      }, {
        key: "renderList",
        value: function renderList(data) {
          this.setViewDataSource(data);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered || this.enableVirtualization) {
            if (this.enableVirtualization) {
              if (Object.keys(this.dataSource).length) {
                if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
                  if ((this.template || this.groupTemplate) && !this.virtualizationModule.isNgTemplate()) {
                    this.listBaseOption.template = null;
                    this.listBaseOption.groupTemplate = null;
                    this.listBaseOption.itemCreated = this.virtualizationModule.createUIItem.bind(this.virtualizationModule);
                  }
                }
              }

              this.virtualizationModule.uiVirtualization();
            } else {
              this.createList();
              this.contentContainer = this.createElement('div', {
                className: classNames.content
              });
              this.element.appendChild(this.contentContainer);
              this.renderIntoDom(this.ulElement);
            }
          }
        }
      }, {
        key: "getElementUID",
        value: function getElementUID(obj) {
          var fields = {};

          if (obj instanceof Element) {
            fields[this.fields.id] = obj.getAttribute('data-uid');
          } else {
            fields = obj;
          }

          return fields;
        }
        /**
         * Initializes the ListView component rendering.
         */

      }, {
        key: "render",
        value: function render() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || !this.isServerRendered) {
            this.element.classList.add(classNames.root);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              role: 'list',
              tabindex: '0'
            });
            this.setCSSClass();
            this.setEnableRTL();
            this.setEnable();
            this.setSize();
            this.wireEvents();
            this.header();
            this.setLocalData();
            this.setHTMLAttribute();
          } else {
            this.initBlazor(true);
          }

          this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
            selector: '.' + classNames.listItem
          });
          this.renderComplete();
        }
      }, {
        key: "initBlazor",
        value: function initBlazor(firstRender) {
          if (firstRender === null) {
            firstRender = false;
          }

          this.setLocalData();
          this.setViewDataSource(this.localData);
          this.contentContainer = this.element.querySelector('.' + classNames.content);

          if (firstRender) {
            this.wireEvents();
          }
        }
        /**
         * It is used to destroy the ListView component.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.resetBlazorTemplates();
          this.unWireEvents();
          var classAr = [classNames.root, classNames.disable, 'e-rtl', 'e-has-header', 'e-lib'].concat(this.cssClass.split(' ').filter(function (css) {
            return css;
          }));
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classAr);
          this.element.removeAttribute('role');
          this.element.removeAttribute('tabindex');
          this.curUL = this.ulElement = this.liCollection = this.headerEle = undefined;

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered)) {
            this.element.innerHTML = '';

            _get(_getPrototypeOf(ListView.prototype), "destroy", this).call(this);
          } else {
            this.element.style.display = 'none';
          }
        }
        /**
         * Switches back from the navigated sub list item.
         */

      }, {
        key: "back",
        value: function back() {
          var pID = this.curDSLevel[this.curDSLevel.length - 1];

          if (pID === undefined || this.isInAnimation()) {
            return;
          }

          this.curDSLevel.pop();
          this.setViewDataSource(this.getSubDS());
          var toUL = this.element.querySelector('[data-uid=\'' + pID + '\']');
          var fromUL = this.curUL;

          if (!toUL) {
            this.createList();
            this.renderIntoDom(this.ulElement);
            toUL = this.curUL;
          } else {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered && this.enableVirtualization) {
              toUL = toUL.parentElement.parentElement.parentElement;
            } else {
              toUL = toUL.parentElement;
            }
          }

          var fieldData = getFieldValues(this.curDSJSON, this.listBaseOption.fields);
          var text = fieldData[this.fields.text];
          this.switchView(fromUL, toUL, true);
          this.removeFocus();
          var li = this.element.querySelector('[data-uid=\'' + pID + '\']');
          li.classList.remove(classNames.disable);
          li.classList.add(classNames.focused);

          if (this.showCheckBox && li.querySelector('.' + classNames.checkboxIcon).classList.contains(classNames.checked)) {
            li.setAttribute('aria-selected', 'true');
          } else {
            li.classList.remove(classNames.selected);
            li.setAttribute('aria-selected', 'false');
          }

          this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);

          if (this.enableHtmlSanitizer) {
            this.setProperties({
              headerTitle: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.headerTitle)
            }, true);
          }

          this.header(this.curDSLevel.length ? text : this.headerTitle, this.curDSLevel.length ? true : false, 'header');
        }
        /**
         * Selects the list item from the ListView by passing the elements or field object.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "selectItem",
        value: function selectItem(item) {
          if (this.enableVirtualization) {
            this.virtualizationModule.selectItem(item);
          } else if (this.showCheckBox) {
            this.setCheckboxLI(this.getLiFromObjOrElement(item));
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) ? this.removeSelect() : this.setSelectLI(this.getLiFromObjOrElement(item));
          }
        }
      }, {
        key: "getLiFromObjOrElement",
        value: function getLiFromObjOrElement(obj) {
          var li;
          var dataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.localData : this.dataSource;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj)) {
            if (typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') {
              if (obj instanceof Element) {
                var uid = obj.getAttribute('data-uid').toString();

                for (var i = 0; i < this.liCollection.length; i++) {
                  if (this.liCollection[i].getAttribute('data-uid').toString() === uid) {
                    li = this.liCollection[i];
                    break;
                  }
                }
              } else {
                Array.prototype.some.call(this.curUL.querySelectorAll('.' + classNames.listItem), function (item) {
                  if (item.innerText.trim() === obj.toString()) {
                    li = item;
                    return true;
                  } else {
                    return false;
                  }
                });
              }
            } else {
              var resultJSON = this.getItemData(obj);
              var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);

              if (resultJSON) {
                li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');

                if (!this.enableVirtualization && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
                  var curLi = this.element.querySelectorAll('.' + classNames.listItem);

                  for (var _i121 = 0; _i121 < curLi.length; _i121++) {
                    if (curLi[_i121].innerText.trim() === fieldData[this.fields.text]) {
                      li = curLi[_i121];
                    }
                  }
                }
              }
            }
          }

          return li;
        }
        /**
         * Selects multiple list items from the ListView.
         * @param  {Fields[] | HTMLElement[] | Element[]} item - We can pass array of
         *  elements or array of fields Object with ID and Text fields.
         */

      }, {
        key: "selectMultipleItems",
        value: function selectMultipleItems(item) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            for (var i = 0; i < item.length; i++) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item[i])) {
                this.selectItem(item[i]);
              }
            }
          }
        }
      }, {
        key: "getParentId",
        value: function getParentId() {
          var parentId = [];

          if (this.isNestedList) {
            for (var i = this.curDSLevel.length - 1; i >= 0; i--) {
              parentId.push(this.curDSLevel[i]);
            }
          }

          return parentId;
        }
        /**
         * Gets the details of the currently selected item from the list items.
         * @blazorType ListSelectedItem<TValue>
         */

      }, {
        key: "getSelectedItems",
        value: function getSelectedItems() {
          // tslint:disable-next-line:no-any
          var finalValue;
          var isCompleted = false;
          this.selectedId = [];
          var dataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.localData : this.dataSource;

          if (this.enableVirtualization && !isCompleted) {
            finalValue = this.virtualizationModule.getSelectedItems();
            isCompleted = true;
          } else if (this.showCheckBox && !isCompleted) {
            // tslint:disable-next-line:no-any
            var liCollection = this.curUL.getElementsByClassName(classNames.selected);
            var liTextCollection = [];
            var liDataCollection = [];
            this.selectedId = [];
            var dataParent = [];

            for (var i = 0; i < liCollection.length; i++) {
              if (typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') {
                liTextCollection.push(liCollection[i].innerText.trim());
              } else {
                var tempData = this.getItemData(liCollection[i]);
                var fieldData = getFieldValues(tempData, this.listBaseOption.fields);

                if (this.isNestedList) {
                  dataParent.push({
                    data: tempData,
                    parentId: this.getParentId()
                  });
                } else {
                  liDataCollection.push(tempData);
                }

                if (fieldData) {
                  liTextCollection.push(fieldData[this.listBaseOption.fields.text]);
                  this.selectedId.push(fieldData[this.listBaseOption.fields.id]);
                } else {
                  liTextCollection.push(undefined);
                  this.selectedId.push(undefined);
                }
              }
            }

            if ((typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') && !isCompleted) {
              finalValue = {
                item: liCollection,
                data: dataSource,
                text: liTextCollection
              };
              isCompleted = true;
            }

            if (this.isNestedList && !isCompleted) {
              finalValue = {
                item: liCollection,
                data: dataParent,
                text: liTextCollection
              };
              isCompleted = true;
            } else if (!isCompleted) {
              finalValue = {
                item: liCollection,
                data: liDataCollection,
                text: liTextCollection
              };
              isCompleted = true;
            }
          } else if (!isCompleted) {
            var liElement = this.element.getElementsByClassName(classNames.selected)[0];

            var _fieldData = getFieldValues(this.getItemData(liElement), this.listBaseOption.fields);

            if ((typeof dataSource[0] === 'string' || typeof dataSource[0] === 'number') && !isCompleted) {
              finalValue = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement) ? {
                item: liElement,
                data: dataSource,
                text: liElement.innerText.trim()
              } : undefined;
              isCompleted = true;
            } else if (!isCompleted) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_fieldData) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liElement)) {
                finalValue = undefined;
                isCompleted = true;
              } else {
                this.selectedId.push(_fieldData[this.listBaseOption.fields.id]);
                finalValue = {
                  text: _fieldData[this.listBaseOption.fields.text],
                  item: liElement,
                  data: this.getItemData(liElement)
                };
                isCompleted = true;
              }
            }
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            // tslint:disable-next-line:no-any
            return this.blazorGetSelectedItems(finalValue);
          } else {
            return finalValue;
          }
        } // tslint:disable-next-line:no-any

      }, {
        key: "blazorGetSelectedItems",
        value: function blazorGetSelectedItems(finalGetSelectedItem) {
          var blazorSelectedItem = {
            data: [],
            index: [],
            parentId: [],
            text: []
          };

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem.data)) {
              if (this.showCheckBox && this.isNestedList) {
                for (var i = 0; i < finalGetSelectedItem.data.length; i++) {
                  blazorSelectedItem.data.push(finalGetSelectedItem.data[i].data);
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem.data[0]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem.data[0].parentId)) {
                  blazorSelectedItem.parentId = finalGetSelectedItem.data[0].parentId;
                }
              } else {
                blazorSelectedItem.data = this.convertItemsToArray(finalGetSelectedItem.data);
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem.text)) {
              blazorSelectedItem.text = this.convertItemsToArray(finalGetSelectedItem.text);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(finalGetSelectedItem.index)) {
              blazorSelectedItem.index = this.convertItemsToArray(finalGetSelectedItem.index);
            }
          }

          return blazorSelectedItem;
        } // tslint:disable-next-line:no-any

      }, {
        key: "convertItemsToArray",
        value: function convertItemsToArray(items) {
          return Array.isArray(items) ? _toConsumableArray(items) : [items];
        }
        /**
         * Finds out an item details from the current list.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         * @blazorType TValue
         */

      }, {
        key: "findItem",
        value: function findItem(item) {
          return this.getItemData(item);
        }
        /**
         * Enables the disabled list items by passing the Id and text fields.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "enableItem",
        value: function enableItem(item) {
          this.setItemState(item, true);

          if (this.enableVirtualization) {
            this.virtualizationModule.enableItem(item);
          }
        }
        /**
         * Disables the list items by passing the Id and text fields.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "disableItem",
        value: function disableItem(item) {
          this.setItemState(item, false);

          if (this.enableVirtualization) {
            this.virtualizationModule.disableItem(item);
          }
        } //A function that used to set state of the list item like enable, disable.

      }, {
        key: "setItemState",
        value: function setItemState(item, isEnable) {
          var resultJSON = this.getItemData(item);
          var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);

          if (resultJSON) {
            var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');

            if (isEnable) {
              if (li) {
                li.classList.remove(classNames.disable);
              }

              delete resultJSON[this.fields.enabled];
            } else if (!isEnable) {
              if (li) {
                li.classList.add(classNames.disable);
              }

              resultJSON[this.fields.enabled] = false;
            }
          }
        }
        /**
         * Shows the hide list item from the ListView.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "showItem",
        value: function showItem(item) {
          this.showHideItem(item, false, '');

          if (this.enableVirtualization) {
            this.virtualizationModule.showItem(item);
          }
        }
        /**
         * Hides an list item from the ListView.
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "hideItem",
        value: function hideItem(item) {
          this.showHideItem(item, true, 'none');

          if (this.enableVirtualization) {
            this.virtualizationModule.hideItem(item);
          }
        }
      }, {
        key: "showHideItem",
        value: function showHideItem(obj, isHide, display) {
          var resultJSON = this.getItemData(obj);
          var fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);

          if (resultJSON) {
            var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');

            if (li) {
              li.style.display = display;
            }

            if (isHide) {
              resultJSON[this.fields.isVisible] = false;
            } else {
              delete resultJSON[this.fields.isVisible];
            }
          }
        }
        /**
         * Adds the new list item(s) to the current ListView.
         * To add a new list item(s) in the ListView, we need to pass the `data` as an array of items that need
         * to be added and `fields` as the target item to which we need to add the given item(s) as its children.
         * For example fields: { text: 'Name', tooltip: 'Name', id:'id'}
         * @param  {{[key:string]:Object}[]} data - JSON Array Data that need to add.
         * @param  {Fields} fields - Target item to add the given data as its children (can be null).
         * @blazorArgsType data|object,fields|object
         */

      }, {
        key: "addItem",
        value: function addItem(data) {
          var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
          var dataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.localData : this.dataSource;
          this.addItemInternally(data, fields, dataSource);
        }
      }, {
        key: "addItemInternally",
        value: function addItemInternally(data, fields, dataSource) {
          if (data instanceof Array) {
            if (this.enableVirtualization) {
              this.virtualizationModule.addItem(data, fields, dataSource);
            } else {
              var ds = this.findItemFromDS(dataSource, fields);
              var child;

              if (ds) {
                var fieldData = getFieldValues(ds, this.listBaseOption.fields);
                child = fieldData[this.fields.child];

                if (!child) {
                  child = [];
                }

                child = child.concat(data);
              } // check for whether target is nested level or top level in list


              if (ds instanceof Array) {
                for (var i = 0; i < data.length; i++) {
                  dataSource.push(data[i]);
                  this.setViewDataSource(dataSource); // since it is top level target, get the content container's first child
                  // as it is always the top level UL

                  var targetUL = this.contentContainer ? this.contentContainer.children[0] : null; // check for whether the list was previously empty or not, if it is
                  // proceed to call initial render

                  if (this.contentContainer && targetUL) {
                    this.addItemIntoDom(data[i], targetUL, this.curViewDS);
                  } else {
                    this.reRender();
                  }
                }

                if (this.curUL) {
                  this.updateBlazorTemplates(true);
                }

                this.liCollection = this.curUL.querySelectorAll('.' + classNames.listItem);
              } else {
                // proceed as target item is in nested level, only if it is a valid target ds
                if (ds) {
                  ds[this.fields.child] = child;
                  this.addItemInNestedList(ds, data);
                }
              }
            }
          }
        }
      }, {
        key: "addItemInNestedList",
        value: function addItemInNestedList(targetItemData, itemQueue) {
          var targetItemId = targetItemData[this.fields.id];
          var targetChildDS = targetItemData[this.fields.child];
          var isAlreadyRenderedUL = this.element.querySelector('[pid=\'' + targetItemId + '\']');
          var targetLi = this.element.querySelector('[data-uid=\'' + targetItemId + '\']');
          var targetUL = isAlreadyRenderedUL ? isAlreadyRenderedUL : targetLi ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(targetLi, 'ul') : null;
          var targetDS = isAlreadyRenderedUL ? targetChildDS : [targetItemData];
          var isTargetEmptyChild = targetLi ? !targetLi.classList.contains(classNames.hasChild) : false;
          var isRefreshTemplateNeeded = false; // if li element is already rendered, that element needs to be refreshed so that
          // it becomes child viewable due to new child items are added now

          if (isTargetEmptyChild) {
            var targetRefreshedElement = ListBase.createListItemFromJson(this.createElement, targetDS, this.listBaseOption);
            this.setAttributes(targetRefreshedElement);
            targetUL.insertBefore(targetRefreshedElement[0], targetLi);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(targetLi);
            isRefreshTemplateNeeded = true;
          } // if it is already rendered element, we need to create and append new elements


          if (isAlreadyRenderedUL && itemQueue) {
            for (var i = 0; i < itemQueue.length; i++) {
              targetDS.push(itemQueue[i]);
              this.addItemIntoDom(itemQueue[i], targetUL, targetDS);
            }

            isRefreshTemplateNeeded = true;
          }

          if (isRefreshTemplateNeeded) {
            this.updateBlazorTemplates(true);
          }
        }
      }, {
        key: "addItemIntoDom",
        value: function addItemIntoDom(currentItem, targetUL, curViewDS) {
          var index = curViewDS.indexOf(currentItem);
          this.addListItem(currentItem, index, targetUL, curViewDS);
          var curItemDS = curViewDS[index - 1];

          if (curItemDS && curItemDS.isHeader && curItemDS.items.length === 1) {
            this.addListItem(curItemDS, index - 1, targetUL, curViewDS);
          }
        }
      }, {
        key: "addListItem",
        value: function addListItem(dataSource, index, ulElement, curViewDS) {
          var target = this.getLiFromObjOrElement(curViewDS[index + 1]) || this.getLiFromObjOrElement(curViewDS[index + 2]) || null;
          var li = ListBase.createListItemFromJson(this.createElement, [dataSource], this.listBaseOption);
          this.setAttributes(li);
          ulElement.insertBefore(li[0], target);
        }
        /**
         * Removes the list item from the data source based on a passed
         *  element like fields: { text: 'Name', tooltip: 'Name', id:'id'}
         * @param  {Fields | HTMLElement | Element} item - We can pass element Object or Fields as Object with ID and Text fields.
         */

      }, {
        key: "removeItem",
        value: function removeItem(item) {
          var listDataSource = this.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.localData : this.dataSource;

          if (this.enableVirtualization) {
            this.virtualizationModule.removeItem(item);
          } else {
            this.removeItemFromList(item, listDataSource);
            this.updateBlazorTemplates(true);
          }
        }
      }, {
        key: "removeItemFromList",
        value: function removeItemFromList(obj, listDataSource) {
          var _this568 = this;

          var curViewDS = this.curViewDS;
          var fields = obj instanceof Element ? this.getElementUID(obj) : obj;
          var dataSource;
          dataSource = this.findItemFromDS(listDataSource, fields, true);

          if (dataSource) {
            var data;
            data = this.findItemFromDS(dataSource, fields);
            var index = curViewDS.indexOf(data);
            var li = this.getLiFromObjOrElement(obj);
            var groupLi;
            this.validateNestedView(li);

            if (this.fields.groupBy && this.curViewDS[index - 1] && curViewDS[index - 1].isHeader && curViewDS[index - 1].items.length === 1) {
              if (li && li.previousElementSibling.classList.contains(classNames.groupListItem) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li.nextElementSibling) || li.nextElementSibling && li.nextElementSibling.classList.contains(classNames.groupListItem))) {
                groupLi = li.previousElementSibling;
              }
            }

            if (li) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(li);
            }

            if (groupLi) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(groupLi);
            } // tslint:disable-next-line:no-any


            var foundData = dataSource.length - 1 <= 0 ? this.findParent(this.localData, this.fields.id, function (value) {
              return value === data[_this568.fields.id];
            }, null) : null;
            var dsIndex = dataSource.indexOf(data);
            dataSource.splice(dsIndex, 1);
            this.setViewDataSource(listDataSource);

            if (foundData && foundData.parent && Array.isArray(foundData.parent[this.fields.child]) && foundData.parent[this.fields.child].length <= 0) {
              var parentLi = this.getLiFromObjOrElement(foundData.parent);

              if (parentLi) {
                var _li2 = ListBase.createListItemFromJson(this.createElement, [foundData.parent], this.listBaseOption);

                this.setAttributes(_li2);
                parentLi.parentElement.insertBefore(_li2[0], parentLi);
                parentLi.parentElement.removeChild(parentLi);
              }
            }

            if (dataSource.length <= 0) {
              this.back();
            }

            this.liCollection = Array.prototype.slice.call(this.element.querySelectorAll('.' + classNames.listItem));
          }
        } // validate before removing an element whether the current view is inside target element's child view

      }, {
        key: "validateNestedView",
        value: function validateNestedView(li) {
          var liID = li ? li.getAttribute('data-uid').toString().toLowerCase() : null;

          if (liID && this.curDSLevel && this.curDSLevel.length > 0) {
            while (this.curDSLevel.some(function (id) {
              return id.toString().toLowerCase() === liID;
            })) {
              this.back();
            }
          }
        }
        /**
         * Removes multiple items from the ListView by passing the array of elements or array of field objects.
         * @param  {Fields[] | HTMLElement[] | Element[]} item - We can pass array of elements or array of field Object with ID and Text fields.
         */

      }, {
        key: "removeMultipleItems",
        value: function removeMultipleItems(item) {
          if (item.length) {
            for (var i = 0; i < item.length; i++) {
              this.removeItem(item[i]);
            }

            this.updateBlazorTemplates(true);
          }
        } // tslint:disable-next-line:no-any

      }, {
        key: "findParent",
        value: function findParent(dataSource, id, callback, parent) {
          if (dataSource.hasOwnProperty(id) && callback(dataSource[id]) === true) {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, dataSource);
          }

          for (var i = 0; i < Object.keys(dataSource).length; i++) {
            if (dataSource[Object.keys(dataSource)[i]] && typeof dataSource[Object.keys(dataSource)[i]] === 'object') {
              // tslint:disable-next-line:no-any
              var result = this.findParent(dataSource[Object.keys(dataSource)[i]], id, callback, dataSource);

              if (result != null) {
                if (!result.parent) {
                  result.parent = parent;
                }

                return result;
              }
            }
          }

          return null;
        } // Module Required function

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'listview';
        }
      }, {
        key: "requiredModules",
        value: function requiredModules() {
          var modules = [];

          if (this.enableVirtualization) {
            modules.push({
              args: [this],
              member: 'virtualization'
            });
          }

          return modules;
        }
        /**
         * Get the properties to be maintained in the persisted state.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['cssClass', 'enableRtl', 'htmlAttributes', 'enable', 'fields', 'animation', 'headerTitle', 'sortOrder', 'showIcon', 'height', 'width', 'showCheckBox', 'checkBoxPosition']);
        }
      }]);

      return ListView;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListView.prototype, "cssClass", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListView.prototype, "enableVirtualization", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({})], ListView.prototype, "htmlAttributes", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], ListView.prototype, "enable", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], ListView.prototype, "dataSource", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], ListView.prototype, "query", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])(ListBase.defaultMappedFields, FieldSettings)], ListView.prototype, "fields", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({
      effect: 'SlideLeft',
      duration: 400,
      easing: 'ease'
    })], ListView.prototype, "animation", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], ListView.prototype, "sortOrder", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListView.prototype, "showIcon", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListView.prototype, "showCheckBox", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], ListView.prototype, "checkBoxPosition", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListView.prototype, "headerTitle", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListView.prototype, "showHeader", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ListView.prototype, "enableHtmlSanitizer", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListView.prototype, "height", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ListView.prototype, "width", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ListView.prototype, "template", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ListView.prototype, "headerTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], ListView.prototype, "groupTemplate", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListView.prototype, "select", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListView.prototype, "actionBegin", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListView.prototype, "actionComplete", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ListView.prototype, "actionFailure", void 0);

    ListView = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ListView);
    var listElementCount = 1.5;
    var windowElementCount = 3;

    var Virtualization = /*#__PURE__*/function () {
      function Virtualization(instance) {
        _classCallCheck(this, Virtualization);

        this.elementDifference = 0;
        this.listViewInstance = instance;
      }
      /**
       * For internal use only.
       * @private
       */


      _createClass2(Virtualization, [{
        key: "isNgTemplate",
        value: function isNgTemplate() {
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listViewInstance.templateRef) && typeof this.listViewInstance.templateRef !== 'string';
        }
        /**
         * For internal use only.
         * @private
         */

      }, {
        key: "uiVirtualization",
        value: function uiVirtualization() {
          this.wireScrollEvent(false);
          var curViewDS = this.listViewInstance.curViewDS;
          var firstDs = curViewDS.slice(0, 1);

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || this.listViewInstance.isServerRendered)) {
            this.listViewInstance.ulElement = this.listViewInstance.curUL = ListBase.createList(this.listViewInstance.createElement, firstDs, this.listViewInstance.listBaseOption);
            this.listViewInstance.contentContainer = this.listViewInstance.createElement('div', {
              className: classNames.content
            });
            this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer);
            this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement);
          }

          this.listItemHeight = this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height;
          this.expectedDomItemCount = this.ValidateItemCount(10000);
          this.domItemCount = this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length);
          this.uiFirstIndex = 0;
          this.uiLastIndex = this.domItemCount - 1;
          var otherDs = curViewDS.slice(1, this.domItemCount);

          if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() || this.listViewInstance.isServerRendered)) {
            var listItems = ListBase.createListItemFromJson(this.listViewInstance.createElement, otherDs, this.listViewInstance.listBaseOption);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(listItems, this.listViewInstance.ulElement);
            this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
            this.topElement = this.listViewInstance.createElement('div');
            this.listViewInstance.ulElement.insertBefore(this.topElement, this.listViewInstance.ulElement.firstElementChild);
            this.bottomElement = this.listViewInstance.createElement('div');
            this.listViewInstance.ulElement.insertBefore(this.bottomElement, null);
            this.totalHeight = Object.keys(curViewDS).length * this.listItemHeight - this.domItemCount * this.listItemHeight;
            this.topElement.style.height = 0 + 'px';
            this.bottomElement.style.height = this.totalHeight + 'px';
            this.topElementHeight = 0;
            this.bottomElementHeight = this.totalHeight;
          } else {
            this.listViewInstance.contentContainer = this.listViewInstance.element.querySelector('.e-content');
            this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
          }

          this.listDiff = 0;
          this.uiIndicesInitialization();
        }
      }, {
        key: "wireScrollEvent",
        value: function wireScrollEvent(destroy) {
          if (!destroy) {
            if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered)) {
              if (this.listViewInstance.isWindow) {
                this.onVirtualScroll = this.onVirtualUiScroll.bind(this);
                window.addEventListener('scroll', this.onVirtualScroll);
              } else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll, this);
              }
            } else {
              if (this.listViewInstance.isWindow) {
                // tslint:disable-next-line:no-any
                this.onVirtualScroll = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["debounce"])(this.onVirtualUiScroll.bind(this), 350); // tslint:enable-next-line:no-any      

                this.updateUl = this.updateUlContainer.bind(this);
                window.addEventListener('scroll', this.onVirtualScroll);
                window.addEventListener('scroll', this.updateUl);
              } else {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listViewInstance.element, 'scroll', Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["debounce"])(this.onVirtualUiScroll, 350), this);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.listViewInstance.element, 'scroll', this.updateUlContainer, this);
              }
            }
          } else {
            this.listViewInstance.isWindow ? window.removeEventListener('scroll', this.onVirtualScroll) : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listViewInstance.element, 'scroll', this.onVirtualUiScroll);
            this.listViewInstance.isWindow ? window.removeEventListener('scroll', this.updateUl) : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.listViewInstance.element, 'scroll', this.updateUlContainer);
          }
        }
      }, {
        key: "updateUlContainer",
        value: function updateUlContainer(e) {
          var listDiff;
          var virtualElementContainer = this.listViewInstance.ulElement.querySelector('.' + classNames.virtualElementContainer);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listViewInstance.liElementHeight)) {
            this.listViewInstance.updateLiElementHeight();
          }

          if (this.listViewInstance.isWindow) {
            // tslint:disable-next-line:no-any
            listDiff = Math.round(e.target.documentElement.scrollTop / this.listViewInstance.liElementHeight) - 2; // tslint:enable-next-line:no-any  
          } else {
            // tslint:disable-next-line:no-any
            listDiff = Math.round(e.target.scrollTop / this.listViewInstance.liElementHeight) - 2; // tslint:enable-next-line:no-any  
          }

          if ((listDiff - 1) * this.listViewInstance.liElementHeight < 0) {
            virtualElementContainer.style.top = '0px';
          } else {
            virtualElementContainer.style.top = listDiff * this.listViewInstance.liElementHeight + 'px';
          }
        }
      }, {
        key: "ValidateItemCount",
        value: function ValidateItemCount(dataSourceLength) {
          var height = parseFloat(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.listViewInstance.height));
          var itemCount;

          if (this.listViewInstance.isWindow) {
            itemCount = Math.round(window.innerHeight / this.listItemHeight * windowElementCount);
          } else {
            if (typeof this.listViewInstance.height === 'string' && this.listViewInstance.height.indexOf('%') !== -1) {
              // tslint:disable-next-line:max-line-length
              itemCount = Math.round(this.listViewInstance.element.getBoundingClientRect().height / this.listItemHeight * listElementCount);
            } else {
              itemCount = Math.round(height / this.listItemHeight * listElementCount);
            }
          }

          if (itemCount > dataSourceLength) {
            itemCount = dataSourceLength;
          }

          return itemCount;
        }
      }, {
        key: "uiIndicesInitialization",
        value: function uiIndicesInitialization() {
          this.uiIndices = {
            'activeIndices': [],
            'disabledItemIndices': [],
            'hiddenItemIndices': []
          };
          var data = this.listViewInstance.curViewDS;

          for (var i = 0; i < data.length; i++) {
            if (this.listViewInstance.showCheckBox && data[i][this.listViewInstance.fields.isChecked]) {
              this.uiIndices.activeIndices.push(i);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i][this.listViewInstance.fields.enabled]) && !data[i][this.listViewInstance.fields.enabled]) {
              this.uiIndices.disabledItemIndices.push(i);
            }
          }

          if (this.isNgTemplate()) {
            var items = this.listViewInstance.element.querySelectorAll('.' + classNames.listItem);

            for (var index = 0; index < items.length; index++) {
              items[index].context = this.listViewInstance.viewContainerRef.get(index).context;
            }
          }
        }
      }, {
        key: "refreshItemHeight",
        value: function refreshItemHeight() {
          if (this.listViewInstance.curViewDS.length) {
            var curViewDS = this.listViewInstance.curViewDS;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
              this.listViewInstance.ulElement.children[0].style.height = this.listViewInstance.liElementHeight * Object.keys(curViewDS).length + 'px';
            } else {
              this.listItemHeight = this.topElement.nextSibling.getBoundingClientRect().height;
              this.totalHeight = Object.keys(curViewDS).length * this.listItemHeight - this.domItemCount * this.listItemHeight;
              this.bottomElementHeight = this.totalHeight;
              this.bottomElement.style.height = this.totalHeight + 'px';
            }
          }
        }
      }, {
        key: "getscrollerHeight",
        value: function getscrollerHeight(startingHeight) {
          return this.listViewInstance.isWindow ? pageYOffset - startingHeight <= 0 ? 0 : pageYOffset - startingHeight : this.listViewInstance.element.scrollTop - startingHeight <= 0 ? 0 : this.listViewInstance.element.scrollTop - startingHeight;
        }
      }, {
        key: "onVirtualUiScroll",
        value: function onVirtualUiScroll(e) {
          var startingHeight;

          if (this.listViewInstance.isWindow) {
            startingHeight = this.listViewInstance.ulElement.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
          } else {
            startingHeight = this.listViewInstance.headerEle ? this.listViewInstance.headerEle.getBoundingClientRect().height : 0;
          }

          this.scrollPosition = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollPosition) ? 0 : this.scrollPosition;
          var scroll = this.getscrollerHeight(startingHeight);
          this.topElementHeight = this.listItemHeight * Math.floor(scroll / this.listItemHeight);
          this.bottomElementHeight = this.totalHeight - this.topElementHeight;

          var _ref69 = scroll <= this.totalHeight ? [this.topElementHeight, this.bottomElementHeight] : [this.totalHeight, 0];

          var _ref70 = _slicedToArray(_ref69, 2);

          this.topElementHeight = _ref70[0];
          this.bottomElementHeight = _ref70[1];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            var listDiff;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listViewInstance.liElementHeight)) {
              this.listViewInstance.updateLiElementHeight();
            }

            if (this.listViewInstance.isWindow) {
              listDiff = Math.round(document.documentElement.scrollTop / this.listViewInstance.liElementHeight);
            } else {
              // tslint:disable-next-line:no-any
              listDiff = Math.round(e.target.scrollTop / this.listViewInstance.liElementHeight); // tslint:enable-next-line:no-any
            }

            if (listDiff - 2 - this.elementDifference >= 3 || listDiff - 2 - this.elementDifference <= -1) {
              var args = {
                listDiff: listDiff - 2,
                selectedItems: this.listViewInstance.previousSelectedItems
              };
              this.listViewInstance.interopAdaptor.invokeMethodAsync('VirtalScrolling', args);

              if (this.listViewInstance.ulElement.querySelector('.e-focused')) {
                this.listViewInstance.ulElement.querySelector('.e-focused').classList.remove('e-focused');
              }

              this.elementDifference = listDiff - 2;
            }
          } else {
            if (this.topElementHeight !== parseFloat(this.topElement.style.height)) {
              this.topElement.style.height = this.topElementHeight + 'px';
              this.bottomElement.style.height = this.bottomElementHeight + 'px';

              if (scroll > this.scrollPosition) {
                var _listDiff = Math.round(this.topElementHeight / this.listItemHeight - this.listDiff);

                if (_listDiff > this.expectedDomItemCount + 5) {
                  this.onLongScroll(_listDiff, true);
                } else {
                  this.onNormalScroll(_listDiff, true);
                }
              } else {
                var _listDiff2 = Math.round(this.listDiff - this.topElementHeight / this.listItemHeight);

                if (_listDiff2 > this.expectedDomItemCount + 5) {
                  this.onLongScroll(_listDiff2, false);
                } else {
                  this.onNormalScroll(_listDiff2, false);
                }
              }
            }

            this.listDiff = Math.round(this.topElementHeight / this.listItemHeight);

            if (typeof this.listViewInstance.onUIScrolled === 'function') {
              this.listViewInstance.onUIScrolled();
            }
          }

          this.scrollPosition = scroll;
        }
      }, {
        key: "onLongScroll",
        value: function onLongScroll(listDiff, isScrollingDown) {
          var index = isScrollingDown ? this.uiFirstIndex + listDiff : this.uiFirstIndex - listDiff;
          var elements = this.listViewInstance.ulElement.querySelectorAll('li');

          for (var i = 0; i < elements.length; i++) {
            this.updateUI(elements[i], index);
            index++;
          }

          this.uiLastIndex = isScrollingDown ? this.uiLastIndex + listDiff : this.uiLastIndex - listDiff;
          this.uiFirstIndex = isScrollingDown ? this.uiFirstIndex + listDiff : this.uiFirstIndex - listDiff;
        }
      }, {
        key: "onNormalScroll",
        value: function onNormalScroll(listDiff, isScrollingDown) {
          if (isScrollingDown) {
            for (var i = 0; i < listDiff; i++) {
              var index = ++this.uiLastIndex;
              this.updateUI(this.topElement.nextElementSibling, index, this.bottomElement);
              this.uiFirstIndex++;
            }
          } else {
            for (var _i122 = 0; _i122 < listDiff; _i122++) {
              var _index3 = --this.uiFirstIndex;

              var target = this.topElement.nextSibling;
              this.updateUI(this.bottomElement.previousElementSibling, _index3, target);
              this.uiLastIndex--;
            }
          }
        }
      }, {
        key: "updateUiContent",
        value: function updateUiContent(element, index) {
          var curViewDs = this.listViewInstance.curViewDS;

          if (typeof this.listViewInstance.dataSource[0] === 'string' || typeof this.listViewInstance.dataSource[0] === 'number') {
            element.dataset.uid = ListBase.generateId();
            element.getElementsByClassName(classNames.listItemText)[0].innerHTML = this.listViewInstance.curViewDS[index].toString();
          } else {
            element.dataset.uid = curViewDs[index][this.listViewInstance.fields.id] ? curViewDs[index][this.listViewInstance.fields.id].toString() : ListBase.generateId();
            element.getElementsByClassName(classNames.listItemText)[0].innerHTML = curViewDs[index][this.listViewInstance.fields.text].toString();
          }

          if (this.listViewInstance.showIcon) {
            if (element.querySelector('.' + classNames.listIcon)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(element.querySelector('.' + classNames.listIcon));
            }

            if (this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]) {
              var textContent = element.querySelector('.' + classNames.textContent);
              var target = this.listViewInstance.createElement('div', {
                className: classNames.listIcon + ' ' + this.listViewInstance.curViewDS[index][this.listViewInstance.fields.iconCss]
              });
              textContent.insertBefore(target, element.querySelector('.' + classNames.listItemText));
            }
          }

          if (this.listViewInstance.showCheckBox && this.listViewInstance.fields.groupBy) {
            if (!this.checkListWrapper) {
              this.checkListWrapper = this.listViewInstance.curUL.querySelector('.' + classNames.checkboxWrapper).cloneNode(true);
            }

            var _textContent = element.querySelector('.' + classNames.textContent);

            if (this.listViewInstance.curViewDS[index].isHeader) {
              if (element.querySelector('.' + classNames.checkboxWrapper)) {
                element.classList.remove(classNames.checklist);

                _textContent.classList.remove(classNames.checkbox);

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(element.querySelector('.' + classNames.checkboxWrapper));
              }
            } else {
              if (!element.querySelector('.' + classNames.checkboxWrapper)) {
                element.classList.add(classNames.checklist);

                _textContent.classList.add(classNames.checkbox);

                _textContent.insertBefore(this.checkListWrapper.cloneNode(true), element.querySelector('.' + classNames.listItemText));
              }
            }
          }
        }
      }, {
        key: "changeElementAttributes",
        value: function changeElementAttributes(element, index) {
          element.classList.remove(classNames.disable);

          if (this.uiIndices.disabledItemIndices.length && this.uiIndices.disabledItemIndices.indexOf(index) !== -1) {
            element.classList.add(classNames.disable);
          }

          element.style.display = '';

          if (this.uiIndices.hiddenItemIndices.length && this.uiIndices.hiddenItemIndices.indexOf(index) !== -1) {
            element.style.display = 'none';
          }

          if (this.listViewInstance.showCheckBox) {
            var checklistElement = element.querySelector('.' + classNames.checkboxWrapper);
            element.classList.remove(classNames.selected);
            element.classList.remove(classNames.focused);

            if (checklistElement) {
              checklistElement.removeAttribute('aria-checked');
              checklistElement.firstElementChild.classList.remove(classNames.checked);
            }

            if (this.uiIndices.activeIndices.length && this.uiIndices.activeIndices.indexOf(index) !== -1 && !this.listViewInstance.curUL.querySelector(classNames.selected)) {
              element.classList.add(classNames.selected);
              checklistElement.firstElementChild.classList.add(classNames.checked);
              checklistElement.setAttribute('aria-checked', 'true');

              if (this.activeIndex === index) {
                element.classList.add(classNames.focused);
              }
            }
          } else {
            element.classList.remove(classNames.selected);
            element.removeAttribute('aria-selected');

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) && this.activeIndex === index && !this.listViewInstance.curUL.querySelector(classNames.selected)) {
              element.classList.add(classNames.selected);
              element.setAttribute('aria-selected', 'true');
            }
          }

          if (this.listViewInstance.fields.groupBy) {
            if (this.listViewInstance.curViewDS[index].isHeader) {
              if (element.classList.contains(classNames.listItem)) {
                element.classList.remove(classNames.listItem);
                element.setAttribute('role', 'group');
                element.classList.add(classNames.groupListItem);
              }
            } else {
              if (element.classList.contains(classNames.groupListItem)) {
                element.classList.remove(classNames.groupListItem);
                element.setAttribute('role', 'listitem');
                element.classList.add(classNames.listItem);
              }
            }
          }
        }
      }, {
        key: "findDSAndIndexFromId",
        value: function findDSAndIndexFromId(ds, fields) {
          var _this569 = this;

          var resultJSON = {};
          fields = this.listViewInstance.getElementUID(fields);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fields)) {
            ds.some(function (data, index) {
              if (fields[_this569.listViewInstance.fields.id] && fields[_this569.listViewInstance.fields.id].toString() === (data[_this569.listViewInstance.fields.id] && data[_this569.listViewInstance.fields.id].toString()) || fields === data) {
                resultJSON.index = index;
                resultJSON.data = data;
                return true;
              } else {
                return false;
              }
            });
          }

          return resultJSON;
        }
      }, {
        key: "getSelectedItems",
        value: function getSelectedItems() {
          var _this570 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeIndex) || this.listViewInstance.showCheckBox && this.uiIndices.activeIndices.length) {
            var dataCollection = [];
            var textCollection = [];

            if (typeof this.listViewInstance.dataSource[0] === 'string' || typeof this.listViewInstance.dataSource[0] === 'number') {
              var curViewDS = this.listViewInstance.curViewDS;

              if (this.listViewInstance.showCheckBox) {
                var indices = this.uiIndices.activeIndices;

                for (var i = 0; i < indices.length; i++) {
                  dataCollection.push(curViewDS[indices[i]]);
                }

                return {
                  text: dataCollection,
                  data: dataCollection,
                  index: this.uiIndices.activeIndices.map(function (index) {
                    return _this570.listViewInstance.dataSource.indexOf(curViewDS[index]);
                  })
                };
              } else {
                return {
                  text: curViewDS[this.activeIndex],
                  data: curViewDS[this.activeIndex],
                  index: this.listViewInstance.dataSource.indexOf(curViewDS[this.activeIndex])
                };
              }
            } else {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
                var scrollDiff = Math.round(this.listViewInstance.element.scrollTop / this.listViewInstance.liElementHeight) - 2;

                if (scrollDiff < 0) {
                  scrollDiff = 0;
                }

                this.activeIndex += scrollDiff;
              }

              var _curViewDS = this.listViewInstance.curViewDS;
              var text = this.listViewInstance.fields.text;

              if (this.listViewInstance.showCheckBox) {
                var indexArray = this.uiIndices.activeIndices;

                for (var _i123 = 0; _i123 < indexArray.length; _i123++) {
                  textCollection.push(_curViewDS[indexArray[_i123]][text]);
                  dataCollection.push(_curViewDS[indexArray[_i123]]);
                }

                var dataSource = this.listViewInstance.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? _curViewDS : this.listViewInstance.dataSource;
                return {
                  text: textCollection,
                  data: dataCollection,
                  index: this.uiIndices.activeIndices.map(function (index) {
                    return dataSource.indexOf(_curViewDS[index]);
                  })
                };
              } else {
                var _dataSource = this.listViewInstance.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? _curViewDS : this.listViewInstance.dataSource;

                return {
                  text: _curViewDS[this.activeIndex][this.listViewInstance.fields.text],
                  data: _curViewDS[this.activeIndex],
                  index: _dataSource.indexOf(_curViewDS[this.activeIndex])
                };
              }
            }
          } else {
            return undefined;
          }
        }
      }, {
        key: "selectItem",
        value: function selectItem(obj) {
          var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);

          if (Object.keys(resutJSON).length) {
            var isSelected = this.activeIndex === resutJSON.index;
            var isChecked;
            this.activeIndex = resutJSON.index;

            if (this.listViewInstance.showCheckBox) {
              if (this.uiIndices.activeIndices.indexOf(resutJSON.index) === -1) {
                isChecked = true;
                this.uiIndices.activeIndices.push(resutJSON.index);
              } else {
                isChecked = false;
                this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(resutJSON.index), 1);
              }

              if (this.listViewInstance.curUL.querySelector('.' + classNames.focused)) {
                this.listViewInstance.curUL.querySelector('.' + classNames.focused).classList.remove(classNames.focused);
              }
            }

            if (this.listViewInstance.getLiFromObjOrElement(obj)) {
              if (this.listViewInstance.showCheckBox) {
                this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(obj));
              } else {
                this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(obj));
              }
            } else {
              var eventArgs;

              if (typeof this.listViewInstance.dataSource[0] === 'string' || typeof this.listViewInstance.dataSource[0] === 'number') {
                eventArgs = {
                  text: this.listViewInstance.curViewDS[this.activeIndex],
                  data: this.listViewInstance.curViewDS[this.activeIndex],
                  index: this.activeIndex
                };
              } else {
                var curViewDS = this.listViewInstance.curViewDS;
                eventArgs = {
                  text: curViewDS[this.activeIndex][this.listViewInstance.fields.text],
                  data: curViewDS[this.activeIndex],
                  index: this.activeIndex
                };
              }

              if (this.listViewInstance.showCheckBox) {
                eventArgs.isChecked = isChecked;
                this.listViewInstance.trigger('select', eventArgs);
              } else if (!isSelected) {
                this.listViewInstance.removeSelect();
                this.listViewInstance.trigger('select', eventArgs);
              }
            }
          } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj) && !this.listViewInstance.showCheckBox) {
            this.listViewInstance.removeSelect();
            this.activeIndex = undefined;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            // tslint:disable-next-line:no-any
            var elementId = resutJSON.data[this.listViewInstance.fields.id]; // tslint:enable-next-line:no-any

            if (this.listViewInstance.showCheckBox) {
              if (!this.listViewInstance.previousSelectedItems.includes(elementId)) {
                this.listViewInstance.previousSelectedItems.push(elementId);
              } else {
                var indexPosition = this.listViewInstance.previousSelectedItems.indexOf(elementId);

                if (indexPosition > -1) {
                  this.listViewInstance.previousSelectedItems.splice(indexPosition, 1);
                }
              }
            } else {
              this.listViewInstance.previousSelectedItems[0] = elementId;
            }

            this.listViewInstance.removeActiveClass();
          }
        }
      }, {
        key: "enableItem",
        value: function enableItem(obj) {
          var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            var itemId = resutJSON.data[this.listViewInstance.fields.id];

            if (!this.listViewInstance.enabledItems.includes(itemId)) {
              this.listViewInstance.enabledItems.push(itemId);
              this.listViewInstance.removeActiveClass();
            }

            if (this.listViewInstance.disabledItems.includes(itemId)) {
              var indexPosition = this.listViewInstance.disabledItems.indexOf(itemId);

              if (indexPosition > -1) {
                this.listViewInstance.disabledItems.splice(indexPosition, 1);
              }
            }
          } else {
            if (Object.keys(resutJSON).length) {
              this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(resutJSON.index), 1);
            }
          }
        }
      }, {
        key: "disableItem",
        value: function disableItem(obj) {
          var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            var liElementId = resutJSON.data[this.listViewInstance.fields.id];

            if (!this.listViewInstance.disabledItems.includes(liElementId)) {
              this.listViewInstance.disabledItems.push(liElementId);
              this.listViewInstance.removeActiveClass();
            }

            if (this.listViewInstance.enabledItems.includes(liElementId)) {
              var indexPosition = this.listViewInstance.enabledItems.indexOf(liElementId);

              if (indexPosition > -1) {
                this.listViewInstance.enabledItems.splice(indexPosition, 1);
              }
            }
          } else {
            if (Object.keys(resutJSON).length && this.uiIndices.disabledItemIndices.indexOf(resutJSON.index) === -1) {
              this.uiIndices.disabledItemIndices.push(resutJSON.index);
            }
          }
        }
      }, {
        key: "showItem",
        value: function showItem(obj) {
          var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            // tslint:disable-next-line:no-any
            var hiddenElementId = resutJSON.data[this.listViewInstance.fields.id]; // tslint:enable-next-line:no-any

            if (this.listViewInstance.hiddenItems.includes(hiddenElementId)) {
              var indexPosition = this.listViewInstance.hiddenItems.indexOf(hiddenElementId);

              if (indexPosition > -1) {
                this.listViewInstance.previousSelectedItems.splice(indexPosition, 1);
                this.listViewInstance.removeActiveClass();
              }
            }
          } else {
            if (Object.keys(resutJSON).length) {
              this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index), 1);
            }
          }
        }
      }, {
        key: "hideItem",
        value: function hideItem(obj) {
          var resutJSON = this.findDSAndIndexFromId(this.listViewInstance.curViewDS, obj);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            // tslint:disable-next-line:no-any
            var elementId = resutJSON.data[this.listViewInstance.fields.id]; // tslint:enable-next-line:no-any

            if (!this.listViewInstance.hiddenItems.includes(elementId)) {
              this.listViewInstance.hiddenItems.push(elementId);
              this.listViewInstance.removeActiveClass();
            }
          } else {
            if (Object.keys(resutJSON).length && this.uiIndices.hiddenItemIndices.indexOf(resutJSON.index) === -1) {
              this.uiIndices.hiddenItemIndices.push(resutJSON.index);
            }
          }
        }
      }, {
        key: "removeItem",
        value: function removeItem(obj) {
          var dataSource;
          var curViewDS = this.listViewInstance.curViewDS;
          var resutJSON = this.findDSAndIndexFromId(curViewDS, obj);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            if (resutJSON.index !== undefined) {
              // tslint:disable
              this.listViewInstance.interopAdaptor.invokeMethodAsync('RemoveItemPosition', resutJSON.index); // tslint:enable
            }
          }

          if (Object.keys(resutJSON).length) {
            dataSource = resutJSON.data;

            if (curViewDS[resutJSON.index - 1] && curViewDS[resutJSON.index - 1].isHeader && curViewDS[resutJSON.index - 1].items.length === 1) {
              this.removeUiItem(resutJSON.index - 1);
              this.removeUiItem(resutJSON.index - 1);
            } else {
              if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered)) {
                this.removeUiItem(resutJSON.index);
              }
            }
          }

          var listDataSource = this.listViewInstance.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_1__["DataManager"] ? this.listViewInstance.localData : this.listViewInstance.dataSource;
          var index = listDataSource.indexOf(dataSource);

          if (index !== -1) {
            listDataSource.splice(index, 1);
            this.listViewInstance.setViewDataSource(listDataSource);
          } // recollect all the list item into collection


          this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
        }
      }, {
        key: "setCheckboxLI",
        value: function setCheckboxLI(li, e) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.listViewInstance.isServerRendered) {
            this.uiFirstIndex = Math.round(this.listViewInstance.element.scrollTop / 36) - 4;

            if (this.uiFirstIndex < 0) {
              this.uiFirstIndex = 0;
            }
          }

          var index = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;
          this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;

          if (li.classList.contains(classNames.selected)) {
            if (this.uiIndices.activeIndices.indexOf(index) === -1) {
              this.uiIndices.activeIndices.push(index);
            }
          } else {
            this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(index), 1);
          }
        }
      }, {
        key: "setSelectLI",
        value: function setSelectLI(li, e) {
          this.activeIndex = Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll('li'), li) + this.uiFirstIndex;
        }
      }, {
        key: "checkedItem",
        value: function checkedItem(checked) {
          if (checked) {
            this.uiIndices.activeIndices = [];
            this.activeIndex = undefined;
            var data = this.listViewInstance.curViewDS;

            for (var index = 0; index < data.length; index++) {
              if (!data[index].isHeader) {
                this.uiIndices.activeIndices.push(index);
              }
            }
          } else {
            this.activeIndex = undefined;
            this.uiIndices.activeIndices = [];
          }
        }
      }, {
        key: "addUiItem",
        value: function addUiItem(index) {
          // virtually new add list item based on the scollbar position
          // if the scroll bar is at the top, just pretend the new item has been added since no UI
          // change is required for the item that has been added at last but when scroll bar is at the bottom
          // just detach top and inject into bottom to mimic new item is added
          var curViewDs = this.listViewInstance.curViewDS;
          this.changeUiIndices(index, true);

          if (this.activeIndex && this.activeIndex >= index) {
            this.activeIndex++;
          }

          if (this.listViewInstance.showCheckBox && curViewDs[index][this.listViewInstance.fields.isChecked]) {
            this.uiIndices.activeIndices.push(index);
          }

          if (!parseFloat(this.bottomElement.style.height) && !parseFloat(this.topElement.style.height)) {
            this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) + this.listItemHeight + 'px';
          }

          if (parseFloat(this.bottomElement.style.height)) {
            var liItem = this.listViewInstance.curUL.lastElementChild.previousSibling;
            var target = this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 1]) || this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 2]);

            if (target) {
              this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) + this.listItemHeight + 'px';
              this.updateUI(liItem, index, target);
            }
          } else {
            var _liItem = this.listViewInstance.curUL.firstElementChild.nextSibling;

            var _target;

            if (Object.keys(this.listViewInstance.curViewDS).length - 1 === index) {
              _target = this.listViewInstance.curUL.lastElementChild;
            } else {
              _target = this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 1]) || this.listViewInstance.getLiFromObjOrElement(curViewDs[index + 2]);
            }

            this.topElement.style.height = parseFloat(this.topElement.style.height) + this.listItemHeight + 'px';
            this.uiFirstIndex++;
            this.uiLastIndex++;

            if (_target) {
              this.updateUI(_liItem, index, _target);
              this.listViewInstance.isWindow ? window.scrollTo(0, pageYOffset + this.listItemHeight) : this.listViewInstance.element.scrollTop += this.listItemHeight;
            }
          }

          this.totalHeight += this.listItemHeight;
          this.listDiff = Math.round(parseFloat(this.topElement.style.height) / this.listItemHeight);
        }
      }, {
        key: "removeUiItem",
        value: function removeUiItem(index) {
          this.totalHeight -= this.listItemHeight;
          var curViewDS = this.listViewInstance.curViewDS[index];
          var liItem = this.listViewInstance.getLiFromObjOrElement(curViewDS);
          this.listViewInstance.curViewDS.splice(index, 1);

          if (this.activeIndex && this.activeIndex >= index) {
            this.activeIndex--;
          }

          if (liItem) {
            if (this.domItemCount > Object.keys(this.listViewInstance.curViewDS).length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(liItem);
              this.domItemCount--;
              this.uiLastIndex--;
              this.totalHeight = 0;
            } else {
              if (liItem.classList.contains(classNames.disable)) {
                liItem.classList.remove(classNames.disable);
                this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(index), 1);
              }

              if (liItem.style.display === 'none') {
                liItem.style.display = '';
                this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(index), 1);
              }

              if (this.listViewInstance.showCheckBox && liItem.classList.contains(classNames.selected)) {
                this.listViewInstance.removeSelect();
                this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(index), 1);
                var checklistElement = liItem.querySelector('.' + classNames.checkboxWrapper);
                checklistElement.removeAttribute('aria-checked');
                checklistElement.firstElementChild.classList.remove(classNames.checked);

                if (liItem.classList.contains(classNames.focused)) {
                  liItem.classList.remove(classNames.focused);
                  this.activeIndex = undefined;
                }
              } else if (liItem.classList.contains(classNames.selected)) {
                this.listViewInstance.removeSelect();
                this.activeIndex = undefined;
              }

              if (!parseFloat(this.bottomElement.style.height) && !parseFloat(this.topElement.style.height)) {
                this.updateUI(liItem, this.uiLastIndex, this.bottomElement);
              } else if (parseFloat(this.bottomElement.style.height)) {
                this.bottomElement.style.height = parseFloat(this.bottomElement.style.height) - this.listItemHeight + 'px';
                this.updateUI(liItem, this.uiLastIndex, this.bottomElement);
              } else {
                this.topElement.style.height = parseFloat(this.topElement.style.height) - this.listItemHeight + 'px';
                this.updateUI(liItem, this.uiFirstIndex - 1, this.topElement.nextSibling);
                this.uiLastIndex--;
                this.uiFirstIndex--;
              }
            }
          }

          this.changeUiIndices(index, false);
          this.listDiff = Math.round(parseFloat(this.topElement.style.height) / this.listItemHeight);
        }
      }, {
        key: "changeUiIndices",
        value: function changeUiIndices(index, increment) {
          var keys = Object.keys(this.uiIndices);

          for (var ind = 0; ind < keys.length; ind++) {
            this.uiIndices[keys[ind]] = this.uiIndices[keys[ind]].map(function (i) {
              if (i >= index) {
                return increment ? ++i : --i;
              } else {
                return i;
              }
            });
          }
        }
      }, {
        key: "addItem",
        value: function addItem(data, fields, dataSource) {
          for (var i = 0; i < data.length; i++) {
            var currentItem = data[i]; // push the given data to main data array

            dataSource.push(currentItem); // recalculate all the group data or other datasource related things

            this.listViewInstance.setViewDataSource(dataSource); // render list items for first time due to no datasource present earlier

            if (!this.domItemCount) {
              // fresh rendering for first time
              if ((this.listViewInstance.template || this.listViewInstance.groupTemplate) && !this.isNgTemplate()) {
                this.listViewInstance.listBaseOption.template = null;
                this.listViewInstance.listBaseOption.groupTemplate = null;
                this.listViewInstance.listBaseOption.itemCreated = this.createUIItem.bind(this);
              }

              this.uiVirtualization(); // when expected expected DOM count doesn't meet the condition we need to create and inject new item into DOM
            } else if (this.domItemCount < this.expectedDomItemCount) {
              var ds = this.listViewInstance.findItemFromDS(dataSource, fields);

              if (ds instanceof Array) {
                if (this.listViewInstance.ulElement) {
                  var index = this.listViewInstance.curViewDS.indexOf(currentItem); // inject new list item into DOM

                  this.createAndInjectNewItem(currentItem, index); // check for group header item

                  var curViewDS = this.listViewInstance.curViewDS[index - 1];

                  if (curViewDS && curViewDS.isHeader && curViewDS.items.length === 1) {
                    // target group item index in datasource
                    --index; // inject new group header into DOM for previously created list item

                    this.createAndInjectNewItem(curViewDS, index);
                  }
                } // recollect all the list item into collection


                this.listViewInstance.liCollection = this.listViewInstance.curUL.querySelectorAll('li');
              }
            } else {
              var _index4 = this.listViewInstance.curViewDS.indexOf(currentItem); // virtually new add list item based on the scollbar position


              this.addUiItem(_index4); // check for group header item needs to be added

              var _curViewDS2 = this.listViewInstance.curViewDS[_index4 - 1];

              if (_curViewDS2 && _curViewDS2.isHeader && _curViewDS2.items.length === 1) {
                this.addUiItem(_index4 - 1);
              }
            }
          }
        }
      }, {
        key: "createAndInjectNewItem",
        value: function createAndInjectNewItem(itemData, index) {
          // generate li item for given datasource
          var target;
          var li = ListBase.createListItemFromJson(this.listViewInstance.createElement, [itemData], this.listViewInstance.listBaseOption); // check for target element whether to insert before last item or group item

          if (Object.keys(this.listViewInstance.curViewDS).length - 1 === index) {
            target = this.listViewInstance.curUL.lastElementChild;
          } else {
            // target group header's first child item to append its header
            target = this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 1]) || this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[index + 2]);
          } // insert before the target element


          this.listViewInstance.ulElement.insertBefore(li[0], target); // increment internal DOM count, last index count for new element

          this.domItemCount++;

          if (this.bottomElementHeight <= 0) {
            this.uiLastIndex++;
          } // recalculate the current item height, to avoid jumpy scroller


          this.refreshItemHeight();
        }
      }, {
        key: "createUIItem",
        value: function createUIItem(args) {
          var virtualTemplate = this.listViewInstance.template;
          var template = this.listViewInstance.createElement('div');
          var commonTemplate = '<div class="e-text-content" role="presentation"> ' + '<span class="e-list-text"> ${' + this.listViewInstance.fields.text + '} </span></div>';

          if (this.listViewInstance.showCheckBox) {
            // tslint:disable-next-line:no-any
            this.listViewInstance.renderCheckbox(args); // tslint:enable-next-line:no-any

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listViewInstance.virtualCheckBox) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.listViewInstance.virtualCheckBox.outerHTML)) {
              var div = document.createElement('div');
              div.innerHTML = this.listViewInstance.template || commonTemplate;
              div.children[0].classList.add('e-checkbox');
              this.listViewInstance.checkBoxPosition === 'Left' ? div.children[0].classList.add('e-checkbox-left') : div.children[0].classList.add('e-checkbox-right');

              if (this.listViewInstance.checkBoxPosition === 'Left') {
                div.children[0].insertBefore(this.listViewInstance.virtualCheckBox, div.childNodes[0].children[0]);
              } else {
                div.children[0].appendChild(this.listViewInstance.virtualCheckBox);
              }

              this.listViewInstance.template = div.innerHTML;
            }

            template.innerHTML = this.listViewInstance.template;
            this.listViewInstance.template = virtualTemplate;
          } else {
            template.innerHTML = this.listViewInstance.template || commonTemplate;
          } // tslint:disable-next-line:no-any


          var templateElements = template.getElementsByTagName('*');
          var groupTemplate = this.listViewInstance.createElement('div');

          if (this.listViewInstance.fields.groupBy) {
            groupTemplate.innerHTML = this.listViewInstance.groupTemplate || commonTemplate;
          } // tslint:disable-next-line:no-any


          var groupTemplateElements = groupTemplate.getElementsByTagName('*');

          if (args.curData.isHeader) {
            this.headerData = args.curData;
          }

          this.templateData = args.curData.isHeader ? args.curData.items[0] : args.curData;
          args.item.innerHTML = '';
          args.item.context = {
            data: args.curData,
            nodes: {
              flatTemplateNodes: [],
              groupTemplateNodes: []
            }
          };

          for (var i = 0; i < templateElements.length; i++) {
            this.compileTemplate(templateElements[i], args.item, false);
          }

          for (var _i124 = 0; _i124 < groupTemplateElements.length; _i124++) {
            this.compileTemplate(groupTemplateElements[_i124], args.item, true);
          }

          args.item.context.template = args.curData.isHeader ? template.firstElementChild : groupTemplate.firstElementChild;
          args.item.context.type = args.curData.isHeader ? 'flatList' : 'groupList';
          var element = args.curData.isHeader ? groupTemplate : template;
          args.item.insertBefore(element.firstElementChild, null);
        }
      }, {
        key: "compileTemplate",
        value: function compileTemplate(element, item, isHeader) {
          this.textProperty(element, item, isHeader);
          this.classProperty(element, item, isHeader);
          this.attributeProperty(element, item, isHeader);
        }
      }, {
        key: "onChange",
        value: function onChange(newData, listElement) {
          listElement.context.data = newData;
          var groupTemplateNodes = listElement.context.nodes.groupTemplateNodes;
          var flatTemplateNodes = listElement.context.nodes.flatTemplateNodes;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newData.isHeader) && newData.isHeader && listElement.context.type === 'groupList') {
            var element = listElement.firstElementChild;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(listElement.firstElementChild);
            listElement.insertBefore(listElement.context.template, null);
            listElement.context.template = element;
            listElement.context.type = 'flatList';

            for (var i = 0; i < groupTemplateNodes.length; i++) {
              groupTemplateNodes[i].onChange(newData);
            }
          } else if (!newData.isHeader && listElement.context.type === 'flatList') {
            var _element4 = listElement.firstElementChild;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(listElement.firstElementChild);
            listElement.insertBefore(listElement.context.template, null);
            listElement.context.template = _element4;
            listElement.context.type = 'groupList';

            for (var _i125 = 0; _i125 < flatTemplateNodes.length; _i125++) {
              flatTemplateNodes[_i125].onChange(newData);
            }
          } else if (!newData.isHeader) {
            for (var _i126 = 0; _i126 < flatTemplateNodes.length; _i126++) {
              flatTemplateNodes[_i126].onChange(newData);
            }
          } else {
            for (var _i127 = 0; _i127 < groupTemplateNodes.length; _i127++) {
              groupTemplateNodes[_i127].onChange(newData);
            }
          }
        }
      }, {
        key: "updateContextData",
        value: function updateContextData(listElement, node, isHeader) {
          if (isHeader) {
            listElement.context.nodes.groupTemplateNodes.push(node);
          } else {
            listElement.context.nodes.flatTemplateNodes.push(node);
          }
        }
      }, {
        key: "classProperty",
        value: function classProperty(element, listElement, isHeader) {
          var _this571 = this;

          var regex = new RegExp('\\${([^}]*)}', 'g');
          var resultantOutput = [];
          var regexMatch;

          while (regexMatch !== null) {
            var match = regex.exec(element.className);
            resultantOutput.push(match);
            regexMatch = match;

            if (regexMatch === null) {
              resultantOutput.pop();
            }
          }

          if (resultantOutput && resultantOutput.length) {
            var _loop25 = function _loop25(i) {
              var classNameMatch = resultantOutput[i];
              var classFunction = void 0;

              if (classNameMatch[1].indexOf('?') !== -1 && classNameMatch[1].indexOf(':') !== -1) {
                // tslint:disable-next-line:no-function-constructor-with-string-args
                classFunction = new Function('data', 'return ' + classNameMatch[1].replace(/\$/g, 'data.'));
              } else {
                // tslint:disable-next-line:no-function-constructor-with-string-args
                classFunction = new Function('data', 'return ' + 'data.' + classNameMatch[1]);
              }

              var subNode = {};

              if (isHeader) {
                subNode.bindedvalue = classFunction(_this571.headerData);
              } else {
                subNode.bindedvalue = classFunction(_this571.templateData);
              }

              subNode.onChange = function (value) {
                if (subNode.bindedvalue) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], subNode.bindedvalue.split(' ').filter(function (css) {
                    return css;
                  }));
                }

                var newCss = classFunction(value);

                if (newCss) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], newCss.split(' ').filter(function (css) {
                    return css;
                  }));
                }

                subNode.bindedvalue = newCss;
              };

              var className = classNameMatch[0].split(' ');

              for (var _i128 = 0; _i128 < className.length; _i128++) {
                element.classList.remove(className[_i128]);
              }

              if (subNode.bindedvalue) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], subNode.bindedvalue.split(' ').filter(function (css) {
                  return css;
                }));
              }

              _this571.updateContextData(listElement, subNode, isHeader);
            };

            for (var i = 0; i < resultantOutput.length; i++) {
              _loop25(i);
            }
          }
        }
      }, {
        key: "attributeProperty",
        value: function attributeProperty(element, listElement, isHeader) {
          var _this572 = this;

          var attributeNames = [];

          for (var i = 0; i < element.attributes.length; i++) {
            attributeNames.push(element.attributes[i].nodeName);
          }

          if (attributeNames.indexOf('class') !== -1) {
            attributeNames.splice(attributeNames.indexOf('class'), 1);
          }

          var _loop26 = function _loop26(_i129) {
            var attributeName = attributeNames[_i129];
            var attrNameMatch = new RegExp('\\${([^}]*)}', 'g').exec(attributeName) || [];
            var attrValueMatch = new RegExp('\\${([^}]*)}', 'g').exec(element.getAttribute(attributeName)) || [];
            var attributeNameFunction = void 0;
            var attributeValueFunction = void 0;

            if (attrNameMatch.length || attrValueMatch.length) {
              if (attrNameMatch[1]) {
                // tslint:disable-next-line:no-function-constructor-with-string-args
                attributeNameFunction = new Function('data', 'return ' + 'data.' + attrNameMatch[1]);
              }

              if (attrValueMatch[1]) {
                if (attrValueMatch[1].indexOf('?') !== -1 && attrValueMatch[1].indexOf(':') !== -1) {
                  // tslint:disable-next-line:no-function-constructor-with-string-args
                  attributeValueFunction = new Function('data', 'return ' + attrValueMatch[1].replace(/\$/g, 'data.'));
                } else {
                  // tslint:disable-next-line:no-function-constructor-with-string-args
                  attributeValueFunction = new Function('data', 'return ' + 'data.' + attrValueMatch[1]);
                }
              }

              var subNode = {};

              if (isHeader) {
                subNode.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this572.headerData), attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this572.headerData)];
              } else {
                subNode.bindedvalue = [attrNameMatch[1] === undefined ? undefined : attributeNameFunction(_this572.templateData), attrValueMatch[1] === undefined ? undefined : attributeValueFunction(_this572.templateData)];
              }

              subNode.attrName = subNode.bindedvalue[0] === undefined ? attributeName : subNode.bindedvalue[0];

              subNode.onChange = function (value) {
                var bindedvalue = subNode.bindedvalue[1] === undefined ? element.getAttribute(subNode.attrName) : attributeValueFunction(value);
                element.removeAttribute(subNode.attrName);
                subNode.attrName = subNode.bindedvalue[0] === undefined ? subNode.attrName : attributeNameFunction(value);
                element.setAttribute(subNode.attrName, bindedvalue);
                subNode.bindedvalue = [subNode.bindedvalue[0] === undefined ? undefined : attributeNameFunction(value), subNode.bindedvalue[1] === undefined ? undefined : attributeValueFunction(value)];
              };

              var attributeValue = subNode.bindedvalue[1] === undefined ? element.getAttribute(attributeName) : subNode.bindedvalue[1];
              element.removeAttribute(attributeName);
              element.setAttribute(subNode.attrName, attributeValue);

              _this572.updateContextData(listElement, subNode, isHeader);
            }
          };

          for (var _i129 = 0; _i129 < attributeNames.length; _i129++) {
            _loop26(_i129);
          }
        }
      }, {
        key: "textProperty",
        value: function textProperty(element, listElement, isHeader) {
          var _this573 = this;

          var regex = new RegExp('\\${([^}]*)}', 'g');
          var resultantOutput = [];
          var regexMatch;

          while (regexMatch !== null) {
            var match = regex.exec(element.innerText);
            resultantOutput.push(match);
            regexMatch = match;

            if (regexMatch === null) {
              resultantOutput.pop();
            }
          }

          var isChildHasTextContent = Array.prototype.some.call(element.children, function (element) {
            if (new RegExp('\\${([^}]*)}', 'g').exec(element.innerText)) {
              return true;
            } else {
              return false;
            }
          });

          if (resultantOutput && resultantOutput.length && !isChildHasTextContent) {
            var _loop27 = function _loop27(i) {
              var textPropertyMatch = resultantOutput[i];
              var subNode = {};
              var textFunction = void 0;

              if (textPropertyMatch[1].indexOf('?') !== -1 && textPropertyMatch[1].indexOf(':') !== -1) {
                // tslint:disable-next-line:no-function-constructor-with-string-args
                textFunction = new Function('data', 'return ' + textPropertyMatch[1].replace(/\$/g, 'data.'));
              } else {
                // tslint:disable-next-line:no-function-constructor-with-string-args
                textFunction = new Function('data', 'return ' + 'data.' + textPropertyMatch[1]);
              }

              if (isHeader) {
                subNode.bindedvalue = textFunction(_this573.headerData);
              } else {
                subNode.bindedvalue = textFunction(_this573.templateData);
              }

              subNode.onChange = function (value) {
                element.innerText = element.innerText.replace(subNode.bindedvalue, textFunction(value));
                subNode.bindedvalue = textFunction(value);
              };

              element.innerText = element.innerText.replace(textPropertyMatch[0], subNode.bindedvalue);

              _this573.updateContextData(listElement, subNode, isHeader);
            };

            for (var i = 0; i < resultantOutput.length; i++) {
              _loop27(i);
            }
          }
        }
      }, {
        key: "reRenderUiVirtualization",
        value: function reRenderUiVirtualization() {
          this.wireScrollEvent(true);

          if (this.listViewInstance.contentContainer) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.listViewInstance.contentContainer);
          }

          this.listViewInstance.preRender(); // resetting the dom count to 0, to avoid edge case of dataSource suddenly becoming zero
          // and then manually adding item using addItem API

          this.domItemCount = 0;
          this.listViewInstance.header();
          this.listViewInstance.setLocalData();
        }
      }, {
        key: "updateUI",
        value: function updateUI(element, index, targetElement) {
          var onChange = this.isNgTemplate() ? this.onNgChange : this.onChange;

          if (this.listViewInstance.template || this.listViewInstance.groupTemplate) {
            var curViewDS = this.listViewInstance.curViewDS[index];
            element.dataset.uid = curViewDS[this.listViewInstance.fields.id] ? curViewDS[this.listViewInstance.fields.id].toString() : ListBase.generateId();
            onChange(curViewDS, element, this);
          } else {
            this.updateUiContent(element, index);
          }

          this.changeElementAttributes(element, index);

          if (targetElement) {
            this.listViewInstance.ulElement.insertBefore(element, targetElement);
          }
        }
      }, {
        key: "onNgChange",
        value: function onNgChange(newData, listElement, virtualThis) {
          // compile given target element with template for new data
          var templateCompiler = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(virtualThis.listViewInstance.template);
          var resultElement = templateCompiler(newData);

          while (listElement.lastChild) {
            listElement.removeChild(listElement.lastChild);
          }

          listElement.appendChild(resultElement[0]);
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'virtualization';
        }
      }, {
        key: "destroy",
        value: function destroy() {
          this.wireScrollEvent(true);
        }
      }]);

      return Virtualization;
    }();
    /**
     * Listview Component
     */

    /**
     * Listview Component
     */


    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var Sortable_1;
    /**
     * Sortable Module provides support to enable sortable functionality in Dom Elements.
     * ```html
     * <div id="sortable">
     *   <div>Item 1</div>
     *   <div>Item 2</div>
     *   <div>Item 3</div>
     *   <div>Item 4</div>
     *   <div>Item 5</div>
     * </div>
     * ```
     * ```typescript
     *   let ele: HTMLElement = document.getElementById('sortable');
     *   let sortObj: Sortable = new Sortable(ele, {});
     * ```
     */

    var Sortable = Sortable_1 = /*#__PURE__*/function (_syncfusion_ej2_base_29) {
      _inherits(Sortable, _syncfusion_ej2_base_29);

      var _super212 = _createSuper(Sortable);

      function Sortable(element, options) {
        var _this574;

        _classCallCheck(this, Sortable);

        _this574 = _super212.call(this, options, element);

        _this574.getHelper = function (e) {
          var target = _this574.getSortableElement(e.sender.target);

          if (!_this574.isValidTarget(target, _assertThisInitialized(_this574))) {
            return false;
          }

          var element;

          if (_this574.helper) {
            element = _this574.helper({
              sender: target,
              element: e.element
            });
          } else {
            element = target.cloneNode(true);
            element.style.width = "".concat(target.offsetWidth, "px");
            element.style.height = "".concat(target.offsetHeight, "px");
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], ['e-sortableclone']);
          document.body.appendChild(element);
          return element;
        };

        _this574.onDrag = function (e) {
          _this574.trigger('drag', {
            event: e.event,
            element: _this574.element,
            target: e.target
          });

          var newInst = _this574.getSortableInstance(e.target);

          var target = _this574.getSortableElement(e.target, newInst);

          if ((_this574.isValidTarget(target, newInst) || e.target.className.indexOf('e-list-group-item') > -1) && _this574.curTarget !== target && (newInst.placeHolderElement ? newInst.placeHolderElement !== e.target : true)) {
            if (e.target.className.indexOf('e-list-group-item') > -1) {
              target = e.target;
            }

            _this574.curTarget = target;

            var oldIdx = _this574.getIndex(newInst.placeHolderElement, newInst);

            oldIdx = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldIdx) ? _this574.getIndex(_this574.target) : _this574.getIndex(target, newInst) < oldIdx || !oldIdx ? oldIdx : oldIdx - 1;
            newInst.placeHolderElement = _this574.getPlaceHolder(target, newInst);

            var newIdx = _this574.getIndex(target, newInst);

            var idx = newInst.element !== _this574.element ? newIdx : oldIdx < newIdx ? newIdx + 1 : newIdx;

            if (newInst.placeHolderElement) {
              if (e.target.className.indexOf('e-list-group-item') > -1) {
                newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[newIdx]);
              } else if (newInst.element !== _this574.element && idx === newInst.element.childElementCount - 1) {
                newInst.element.appendChild(newInst.placeHolderElement);
              } else {
                newInst.element.insertBefore(newInst.placeHolderElement, newInst.element.children[idx]);
              }

              _this574.refreshDisabled(oldIdx, newIdx, newInst);
            } else {
              _this574.updateItemClass(newInst);

              newInst.element.insertBefore(_this574.target, newInst.element.children[idx]);

              _this574.refreshDisabled(oldIdx, newIdx, newInst);

              _this574.curTarget = _this574.target;

              _this574.trigger('drop', {
                droppedElement: _this574.target,
                element: newInst.element,
                previousIndex: oldIdx,
                currentIndex: newIdx,
                target: e.target,
                helper: document.getElementsByClassName('e-sortableclone')[0],
                event: e.event,
                scope: _this574.scope
              });
            }
          }

          newInst = _this574.getSortableInstance(_this574.curTarget);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) && e.target !== newInst.placeHolderElement) {
            if (_this574.isPlaceHolderPresent(newInst)) {
              _this574.removePlaceHolder(newInst);
            }
          } else {
            var placeHolders = [].slice.call(document.getElementsByClassName('e-sortable-placeholder'));
            var inst;
            placeHolders.forEach(function (placeHolder) {
              inst = _this574.getSortableInstance(placeHolder);

              if (inst.element && inst !== newInst) {
                _this574.removePlaceHolder(inst);
              }
            });
          }
        };

        _this574.onDragStart = function (e) {
          _this574.target = _this574.getSortableElement(e.target);
          var cancelDrag = false;

          _this574.target.classList.add('e-grabbed');

          _this574.curTarget = _this574.target;
          e.helper = document.getElementsByClassName('e-sortableclone')[0];
          var args = {
            cancel: false,
            element: _this574.element,
            target: _this574.target
          };

          _this574.trigger('beforeDragStart', args, function (observedArgs) {
            if (observedArgs.cancel) {
              cancelDrag = observedArgs.cancel;

              _this574.onDragStop(e);
            }
          });

          if (cancelDrag) {
            return;
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"]) {
            _this574.trigger('dragStart', {
              event: e.event,
              element: _this574.element,
              target: _this574.target,
              bindEvents: e.bindEvents,
              dragElement: e.dragElement
            });
          } else {
            _this574.trigger('dragStart', {
              event: e.event,
              element: _this574.element,
              target: _this574.target
            });
          }
        };

        _this574.onDragStop = function (e) {
          var dropInst = _this574.getSortableInstance(_this574.curTarget);

          var prevIdx;
          var curIdx;
          var handled;
          prevIdx = _this574.getIndex(_this574.target);

          if (_this574.isPlaceHolderPresent(dropInst)) {
            var _curIdx = _this574.getIndex(dropInst.placeHolderElement, dropInst);

            var args = {
              previousIndex: prevIdx,
              currentIndex: _curIdx,
              target: e.target,
              droppedElement: _this574.target,
              helper: e.helper,
              cancel: false,
              handled: false
            };

            _this574.trigger('beforeDrop', args, function (observedArgs) {
              if (!observedArgs.cancel) {
                handled = observedArgs.handled;

                _this574.updateItemClass(dropInst);

                if (observedArgs.handled) {
                  var ele = _this574.target.cloneNode(true);

                  _this574.target.classList.remove('e-grabbed');

                  _this574.target = ele;
                }

                dropInst.element.insertBefore(_this574.target, dropInst.placeHolderElement);

                var _curIdx2 = _this574.getIndex(_this574.target, dropInst);

                prevIdx = _assertThisInitialized(_this574) === dropInst && prevIdx - _curIdx2 > 1 ? prevIdx - 1 : prevIdx;

                _this574.trigger('drop', {
                  event: e.event,
                  element: dropInst.element,
                  previousIndex: prevIdx,
                  currentIndex: _curIdx2,
                  target: e.target,
                  helper: e.helper,
                  droppedElement: _this574.target,
                  scopeName: _this574.scope,
                  handled: handled
                });
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(dropInst.placeHolderElement);
            });
          }

          dropInst = _this574.getSortableInstance(e.target);
          curIdx = dropInst.element.childElementCount;
          prevIdx = _this574.getIndex(_this574.target);

          if (dropInst.element === e.target) {
            var beforeDropArgs = {
              previousIndex: prevIdx,
              currentIndex: curIdx,
              target: e.target,
              droppedElement: _this574.target,
              helper: e.helper,
              cancel: false
            };

            _this574.trigger('beforeDrop', beforeDropArgs, function (observedArgs) {
              if (!observedArgs.cancel) {
                _this574.updateItemClass(dropInst);

                dropInst.element.appendChild(_this574.target);

                _this574.trigger('drop', {
                  event: e.event,
                  element: dropInst.element,
                  previousIndex: prevIdx,
                  currentIndex: curIdx,
                  target: e.target,
                  helper: e.helper,
                  droppedElement: _this574.target,
                  scopeName: _this574.scope
                });
              }
            });
          }

          _this574.target.classList.remove('e-grabbed');

          _this574.target = null;
          _this574.curTarget = null;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(e.helper);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(_this574.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"]).intDestroy(e.event);
        };

        _this574.bind();

        return _this574;
      }

      _createClass2(Sortable, [{
        key: "bind",
        value: function bind() {
          if (!this.element.id) {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('sortable');
          }

          if (!this.itemClass) {
            this.itemClass = 'e-sort-item';
            this.dataBind();
          }

          this.initializeDraggable();
        }
      }, {
        key: "initializeDraggable",
        value: function initializeDraggable() {
          new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            helper: this.getHelper,
            dragStart: this.onDragStart,
            drag: this.onDrag,
            dragStop: this.onDragStop,
            dragTarget: ".".concat(this.itemClass),
            enableTapHold: true,
            tapHoldThreshold: 200,
            queryPositionInfo: this.queryPositionInfo
          });
        }
      }, {
        key: "getPlaceHolder",
        value: function getPlaceHolder(target, instance) {
          if (instance.placeHolder) {
            if (this.isPlaceHolderPresent(instance)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(instance.placeHolderElement);
            }

            instance.placeHolderElement = instance.placeHolder({
              element: instance.element,
              grabbedElement: this.target,
              target: target
            });
            instance.placeHolderElement.classList.add('e-sortable-placeholder');
            return instance.placeHolderElement;
          }

          return null;
        }
      }, {
        key: "isValidTarget",
        value: function isValidTarget(target, instance) {
          return target && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compareElementParent"])(target, instance.element) && target.classList.contains(instance.itemClass) && !target.classList.contains('e-disabled');
        }
      }, {
        key: "removePlaceHolder",
        value: function removePlaceHolder(instance) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(instance.placeHolderElement);
          instance.placeHolderElement = null;
        }
      }, {
        key: "updateItemClass",
        value: function updateItemClass(instance) {
          if (this !== instance) {
            this.target.classList.remove(this.itemClass);
            this.target.classList.add(instance.itemClass);
          }
        }
      }, {
        key: "getSortableInstance",
        value: function getSortableInstance(element) {
          element = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, ".e-".concat(this.getModuleName()));

          if (element) {
            var inst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(element, Sortable_1);
            return inst.scope && this.scope && inst.scope === this.scope ? inst : this;
          } else {
            return this;
          }
        }
      }, {
        key: "refreshDisabled",
        value: function refreshDisabled(oldIdx, newIdx, instance) {
          if (instance === this) {
            var element;
            var increased = oldIdx < newIdx;
            var disabledIdx;
            var start = increased ? oldIdx : newIdx;
            var end = increased ? newIdx : oldIdx;

            while (start <= end) {
              element = this.element.children[start];

              if (element.classList.contains('e-disabled')) {
                disabledIdx = this.getIndex(element);
                this.element.insertBefore(element, this.element.children[increased ? disabledIdx + 2 : disabledIdx - 1]);
                start = increased ? disabledIdx + 2 : disabledIdx + 1;
              } else {
                start++;
              }
            }
          }
        }
      }, {
        key: "getIndex",
        value: function getIndex(target) {
          var instance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
          var idx;
          [].slice.call(instance.element.children).forEach(function (element, index) {
            if (element === target) {
              idx = index;
            }
          });
          return idx;
        }
      }, {
        key: "getSortableElement",
        value: function getSortableElement(element) {
          var instance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, ".".concat(instance.itemClass));
        }
      }, {
        key: "queryPositionInfo",
        value: function queryPositionInfo(value) {
          value.left = pageXOffset ? "".concat(parseFloat(value.left) - pageXOffset, "px") : value.left;
          value.top = pageYOffset ? "".concat(parseFloat(value.top) - pageYOffset, "px") : value.top;
          return value;
        }
      }, {
        key: "isPlaceHolderPresent",
        value: function isPlaceHolderPresent(instance) {
          return instance.placeHolderElement && !!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(instance.placeHolderElement, "#".concat(instance.element.id));
        }
        /**
         * It is used to sort array of elements from source element to destination element.
         * @param destination - Defines the destination element to which the sortable elements needs to be appended.
         * If it is null, then the Sortable library element will be considered as destination.
         * @param targetIndexes - Specifies the sortable elements indexes which needs to be sorted.
         * @param insertBefore - Specifies the index before which the sortable elements needs to be appended.
         * If it is null, elements will be appended as last child.
         * @method moveTo
         * @return {void}
         */

      }, {
        key: "moveTo",
        value: function moveTo(destination, targetIndexes, insertBefore) {
          _moveTo(this.element, destination, targetIndexes, insertBefore);
        }
        /**
         * It is used to destroy the Sortable library.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (this.itemClass === 'e-sort-item') {
            this.itemClass = null;
            this.dataBind();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getComponent"])(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"]).destroy();

          _get(_getPrototypeOf(Sortable.prototype), "destroy", this).call(this);
        }
      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'sortable';
        }
      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i130 = 0, _Object$keys49 = Object.keys(newProp); _i130 < _Object$keys49.length; _i130++) {
            var prop = _Object$keys49[_i130];

            switch (prop) {
              case 'itemClass':
                [].slice.call(this.element.children).forEach(function (element) {
                  if (element.classList.contains(oldProp.itemClass)) {
                    element.classList.remove(oldProp.itemClass);
                  }

                  if (newProp.itemClass) {
                    element.classList.add(newProp.itemClass);
                  }
                });
                break;
            }
          }
        }
      }]);

      return Sortable;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Base"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sortable.prototype, "enableAnimation", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Sortable.prototype, "itemClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Sortable.prototype, "scope", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Sortable.prototype, "helper", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Sortable.prototype, "placeHolder", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sortable.prototype, "drag", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sortable.prototype, "beforeDragStart", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sortable.prototype, "dragStart", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sortable.prototype, "beforeDrop", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sortable.prototype, "drop", void 0);

    Sortable = Sortable_1 = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Sortable);
    /**
     * It is used to sort array of elements from source element to destination element.
     * @private
     */

    function _moveTo(from, to, targetIndexes, insertBefore) {
      var targetElements = [];

      if (!to) {
        to = from;
      }

      if (targetIndexes && targetIndexes.length) {
        targetIndexes.forEach(function (index) {
          targetElements.push(from.children[index]);
        });
      } else {
        targetElements = [].slice.call(from.children);
      }

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(insertBefore)) {
        targetElements.forEach(function (target) {
          to.appendChild(target);
        });
      } else {
        var insertElement = to.children[insertBefore];
        targetElements.forEach(function (target) {
          to.insertBefore(target, insertElement);
        });
      }
    }
    /**
     * Sortable Module
     */

    /**
     * List Components
     */
    //# sourceMappingURL=ej2-lists.es2015.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-navigations/dist/es6/ej2-navigations.es2015.js":
  /*!*************************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-navigations/dist/es6/ej2-navigations.es2015.js ***!
    \*************************************************************************************/

  /*! exports provided: MenuAnimationSettings, MenuItem, HScroll, VScroll, Item, Toolbar, AccordionActionSettings, AccordionAnimationSettings, AccordionItem, Accordion, ContextMenu, Menu, TabActionSettings, TabAnimationSettings, Header, TabItem, Tab, FieldsSettings, ActionSettings, NodeAnimationSettings, TreeView, Sidebar */

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

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


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


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


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


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


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


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


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


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


    __webpack_require__.d(__webpack_exports__, "AccordionItem", function () {
      return AccordionItem;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Accordion", function () {
      return Accordion;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ContextMenu", function () {
      return ContextMenu;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Menu", function () {
      return Menu;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TabActionSettings", function () {
      return TabActionSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TabAnimationSettings", function () {
      return TabAnimationSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Header", function () {
      return Header;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TabItem", function () {
      return TabItem;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Tab", function () {
      return Tab;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "FieldsSettings", function () {
      return FieldsSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ActionSettings", function () {
      return ActionSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "NodeAnimationSettings", function () {
      return NodeAnimationSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TreeView", function () {
      return TreeView;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Sidebar", function () {
      return Sidebar;
    });
    /* harmony import */


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-lists */
    "./node_modules/@syncfusion/ej2-lists/dist/es6/ej2-lists.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-popups */
    "./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @syncfusion/ej2-buttons */
    "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @syncfusion/ej2-data */
    "./node_modules/@syncfusion/ej2-data/dist/es6/ej2-data.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! @syncfusion/ej2-inputs */
    "./node_modules/@syncfusion/ej2-inputs/dist/es6/ej2-inputs.es2015.js");

    var __decorate = undefined && undefined.__decorate || function (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;
    };

    var CLS_ROOT = 'e-hscroll';
    var CLS_RTL = 'e-rtl';
    var CLS_DISABLE = 'e-overlay';
    var CLS_HSCROLLBAR = 'e-hscroll-bar';
    var CLS_HSCROLLCON = 'e-hscroll-content';
    var CLS_NAVARROW = 'e-nav-arrow';
    var CLS_NAVRIGHTARROW = 'e-nav-right-arrow';
    var CLS_NAVLEFTARROW = 'e-nav-left-arrow';
    var CLS_HSCROLLNAV = 'e-scroll-nav';
    var CLS_HSCROLLNAVRIGHT = 'e-scroll-right-nav';
    var CLS_HSCROLLNAVLEFT = 'e-scroll-left-nav';
    var CLS_DEVICE = 'e-scroll-device';
    var CLS_OVERLAY = 'e-scroll-overlay';
    var CLS_RIGHTOVERLAY = 'e-scroll-right-overlay';
    var CLS_LEFTOVERLAY = 'e-scroll-left-overlay';
    var OVERLAY_MAXWID = 40;
    /**
     * HScroll module is introduces horizontal scroller when content exceeds the current viewing area.
     * It can be useful for the components like Toolbar, Tab which needs horizontal scrolling alone.
     * Hidden content can be view by touch moving or icon click.
     * ```html
     * <div id="scroll"/>
     * <script>
     *   var scrollObj = new HScroll();
     *   scrollObj.appendTo("#scroll");
     * </script>
     * ```
     */

    var HScroll = /*#__PURE__*/function (_syncfusion_ej2_base_30) {
      _inherits(HScroll, _syncfusion_ej2_base_30);

      var _super213 = _createSuper(HScroll);

      /**
       * Initializes a new instance of the HScroll class.
       * @param options  - Specifies HScroll model properties as options.
       * @param element  - Specifies the element for which horizontal scrolling applies.
       */
      function HScroll(options, element) {
        _classCallCheck(this, HScroll);

        return _super213.call(this, options, element);
      }
      /**
       * Initialize the event handler
       * @private
       */


      _createClass2(HScroll, [{
        key: "preRender",
        value: function preRender() {
          this.browser = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
          this.browserCheck = this.browser === 'mozilla';
          this.isDevice = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice;
          this.customStep = true;
          var element = this.element;
          this.ieCheck = this.browser === 'edge' || this.browser === 'msie';
          this.initialize();

          if (element.id === '') {
            element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('hscroll');
            this.uniqueId = true;
          }

          element.style.display = 'block';

          if (this.enableRtl) {
            element.classList.add(CLS_RTL);
          }
        }
        /**
         * To Initialize the horizontal scroll  rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
            scroll: this.touchHandler.bind(this),
            swipe: this.swipeHandler.bind(this)
          });

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.scrollEle, 'scroll', this.scrollHandler, this);

          if (!this.isDevice) {
            this.createNavIcon(this.element);
          } else {
            this.element.classList.add(CLS_DEVICE);
            this.createOverlay(this.element);
          }

          this.setScrollState();
        }
      }, {
        key: "setScrollState",
        value: function setScrollState() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollStep) || this.scrollStep < 0) {
            this.scrollStep = this.scrollEle.offsetWidth;
            this.customStep = false;
          } else {
            this.customStep = true;
          }
        }
      }, {
        key: "initialize",
        value: function initialize() {
          var scrollEle = this.createElement('div', {
            className: CLS_HSCROLLCON
          });
          var scrollDiv = this.createElement('div', {
            className: CLS_HSCROLLBAR
          });
          scrollDiv.setAttribute('tabindex', '-1');
          var ele = this.element;
          var innerEle = [].slice.call(ele.children);

          var _iterator134 = _createForOfIteratorHelper(innerEle),
              _step134;

          try {
            for (_iterator134.s(); !(_step134 = _iterator134.n()).done;) {
              var _ele2 = _step134.value;
              scrollEle.appendChild(_ele2);
            }
          } catch (err) {
            _iterator134.e(err);
          } finally {
            _iterator134.f();
          }

          scrollDiv.appendChild(scrollEle);
          ele.appendChild(scrollDiv);
          scrollDiv.style.overflowX = 'hidden';
          this.scrollEle = scrollDiv;
          this.scrollItems = scrollEle;
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['scrollStep'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'hScroll';
        }
        /**
         * Removes the control from the DOM and also removes all its related events.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var ele = this.element;
          ele.style.display = '';
          ele.classList.remove(CLS_ROOT);
          ele.classList.remove(CLS_DEVICE);
          var nav = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-' + ele.id + '_nav.' + CLS_HSCROLLNAV, ele);
          var overlay = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_OVERLAY, ele);
          [].slice.call(overlay).forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
          });

          var _iterator135 = _createForOfIteratorHelper([].slice.call(this.scrollItems.children)),
              _step135;

          try {
            for (_iterator135.s(); !(_step135 = _iterator135.n()).done;) {
              var elem = _step135.value;
              ele.appendChild(elem);
            }
          } catch (err) {
            _iterator135.e(err);
          } finally {
            _iterator135.f();
          }

          if (this.uniqueId) {
            this.element.removeAttribute('id');
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.scrollEle);

          if (nav.length > 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(nav[0]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nav[1])) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(nav[1]);
            }
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.scrollEle, 'scroll', this.scrollHandler);

          this.touchModule.destroy();
          this.touchModule = null;

          _get(_getPrototypeOf(HScroll.prototype), "destroy", this).call(this);
        }
        /**
         * Specifies the value to disable/enable the HScroll component.
         * When set to `true` , the component will be disabled.
         * @param  {boolean} value - Based on this Boolean value, HScroll will be enabled (false) or disabled (true).
         * @returns void.
         */

      }, {
        key: "disable",
        value: function disable(value) {
          var navEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);
          value ? this.element.classList.add(CLS_DISABLE) : this.element.classList.remove(CLS_DISABLE);
          [].slice.call(navEles).forEach(function (el) {
            el.setAttribute('tabindex', !value ? '0' : '-1');
          });
        }
      }, {
        key: "createOverlay",
        value: function createOverlay(element) {
          var id = element.id.concat('_nav');
          var rightOverlayEle = this.createElement('div', {
            className: CLS_OVERLAY + ' ' + CLS_RIGHTOVERLAY
          });
          var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);
          var rightEle = this.createElement('div', {
            id: id.concat('_right'),
            className: clsRight
          });
          var navItem = this.createElement('div', {
            className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons'
          });
          rightEle.appendChild(navItem);
          var leftEle = this.createElement('div', {
            className: CLS_OVERLAY + ' ' + CLS_LEFTOVERLAY
          });

          if (this.ieCheck) {
            rightEle.classList.add('e-ie-align');
          }

          element.appendChild(rightOverlayEle);
          element.appendChild(rightEle);
          element.insertBefore(leftEle, element.firstChild);
          this.eventBinding([rightEle]);
        }
      }, {
        key: "createNavIcon",
        value: function createNavIcon(element) {
          var id = element.id.concat('_nav');
          var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);
          var nav = this.createElement('div', {
            id: id.concat('_right'),
            className: clsRight
          });
          nav.setAttribute('aria-disabled', 'false');
          var navItem = this.createElement('div', {
            className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons'
          });
          var clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);
          var navEle = this.createElement('div', {
            id: id.concat('_left'),
            className: clsLeft + ' ' + CLS_DISABLE
          });
          navEle.setAttribute('aria-disabled', 'true');
          var navLeftItem = this.createElement('div', {
            className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons'
          });
          navEle.appendChild(navLeftItem);
          nav.appendChild(navItem);
          element.appendChild(nav);
          element.insertBefore(navEle, element.firstChild);

          if (this.ieCheck) {
            nav.classList.add('e-ie-align');
            navEle.classList.add('e-ie-align');
          }

          this.eventBinding([nav, navEle]);
        }
      }, {
        key: "onKeyPress",
        value: function onKeyPress(e) {
          var _this575 = this;

          if (e.key === 'Enter') {
            var timeoutFun = function timeoutFun() {
              _this575.keyTimeout = true;

              _this575.eleScrolling(10, e.target, true);
            };

            this.keyTimer = window.setTimeout(function () {
              timeoutFun();
            }, 100);
          }
        }
      }, {
        key: "onKeyUp",
        value: function onKeyUp(e) {
          if (e.key !== 'Enter') {
            return;
          }

          if (this.keyTimeout) {
            this.keyTimeout = false;
          } else {
            e.target.click();
          }

          clearTimeout(this.keyTimer);
        }
      }, {
        key: "eventBinding",
        value: function eventBinding(ele) {
          var _this576 = this;

          [].slice.call(ele).forEach(function (el) {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](el, {
              tapHold: _this576.tabHoldHandler.bind(_this576),
              tapHoldThreshold: 500
            });
            el.addEventListener('keydown', _this576.onKeyPress.bind(_this576));
            el.addEventListener('keyup', _this576.onKeyUp.bind(_this576));
            el.addEventListener('mouseup', _this576.repeatScroll.bind(_this576));
            el.addEventListener('touchend', _this576.repeatScroll.bind(_this576));
            el.addEventListener('contextmenu', function (e) {
              e.preventDefault();
            });

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(el, 'click', _this576.clickEventHandler, _this576);
          });
        }
      }, {
        key: "repeatScroll",
        value: function repeatScroll() {
          clearInterval(this.timeout);
        }
      }, {
        key: "tabHoldHandler",
        value: function tabHoldHandler(e) {
          var _this577 = this;

          var trgt = e.originalEvent.target;
          trgt = this.contains(trgt, CLS_HSCROLLNAV) ? trgt.firstElementChild : trgt;
          var scrollDis = 10;

          var timeoutFun = function timeoutFun() {
            _this577.eleScrolling(scrollDis, trgt, true);
          };

          this.timeout = window.setInterval(function () {
            timeoutFun();
          }, 50);
        }
      }, {
        key: "contains",
        value: function contains(ele, className) {
          return ele.classList.contains(className);
        }
      }, {
        key: "eleScrolling",
        value: function eleScrolling(scrollDis, trgt, isContinuous) {
          var element = this.scrollEle;
          var rootEle = this.element;
          var classList$$1 = trgt.classList;

          if (classList$$1.contains(CLS_HSCROLLNAV)) {
            classList$$1 = trgt.querySelector('.' + CLS_NAVARROW).classList;
          }

          if (this.contains(rootEle, CLS_RTL) && this.browserCheck) {
            scrollDis = -scrollDis;
          }

          var scrlLeft = element.scrollLeft;

          if (!this.contains(rootEle, CLS_RTL) || this.browserCheck || this.ieCheck) {
            if (classList$$1.contains(CLS_NAVRIGHTARROW)) {
              this.frameScrollRequest(scrollDis, 'add', isContinuous);
            } else {
              this.frameScrollRequest(scrollDis, '', isContinuous);
            }
          } else {
            if (classList$$1.contains(CLS_NAVLEFTARROW)) {
              this.frameScrollRequest(scrollDis, 'add', isContinuous);
            } else {
              this.frameScrollRequest(scrollDis, '', isContinuous);
            }
          }
        }
      }, {
        key: "clickEventHandler",
        value: function clickEventHandler(e) {
          this.eleScrolling(this.scrollStep, e.target, false);
        }
      }, {
        key: "swipeHandler",
        value: function swipeHandler(e) {
          var swipeEle = this.scrollEle;
          var distance;

          if (e.velocity <= 1) {
            distance = e.distanceX / (e.velocity * 10);
          } else {
            distance = e.distanceX / e.velocity;
          }

          var start = 0.5;

          var animate = function animate() {
            var step = Math.sin(start);

            if (step <= 0) {
              window.cancelAnimationFrame(step);
            } else {
              if (e.swipeDirection === 'Left') {
                swipeEle.scrollLeft += distance * step;
              } else if (e.swipeDirection === 'Right') {
                swipeEle.scrollLeft -= distance * step;
              }

              start -= 0.5;
              window.requestAnimationFrame(animate);
            }
          };

          animate();
        }
      }, {
        key: "scrollUpdating",
        value: function scrollUpdating(scrollVal, action) {
          if (action === 'add') {
            this.scrollEle.scrollLeft += scrollVal;
          } else {
            this.scrollEle.scrollLeft -= scrollVal;
          }
        }
      }, {
        key: "frameScrollRequest",
        value: function frameScrollRequest(scrollVal, action, isContinuous) {
          var _this578 = this;

          var step = 10;

          if (isContinuous) {
            this.scrollUpdating(scrollVal, action);
            return;
          }

          if (!this.customStep) {
            [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_OVERLAY, this.element)).forEach(function (el) {
              scrollVal -= el.offsetWidth;
            });
          }

          var animate = function animate() {
            var scrollValue;
            var scrollStep;

            if (_this578.contains(_this578.element, CLS_RTL) && _this578.browserCheck) {
              scrollValue = -scrollVal;
              scrollStep = -step;
            } else {
              scrollValue = scrollVal;
              scrollStep = step;
            }

            if (scrollValue < step) {
              window.cancelAnimationFrame(scrollStep);
            } else {
              _this578.scrollUpdating(scrollStep, action);

              scrollVal -= scrollStep;
              window.requestAnimationFrame(animate);
            }
          };

          animate();
        }
      }, {
        key: "touchHandler",
        value: function touchHandler(e) {
          var ele = this.scrollEle;
          var distance;
          distance = e.distanceX;

          if (this.ieCheck && this.contains(this.element, CLS_RTL)) {
            distance = -distance;
          }

          if (e.scrollDirection === 'Left') {
            ele.scrollLeft = ele.scrollLeft + distance;
          } else if (e.scrollDirection === 'Right') {
            ele.scrollLeft = ele.scrollLeft - distance;
          }
        }
      }, {
        key: "arrowDisabling",
        value: function arrowDisabling(addDisable, removeDisable) {
          if (this.isDevice) {
            var arrowEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(addDisable) ? removeDisable : addDisable;
            var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(addDisable)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(arrowIcon, [CLS_NAVRIGHTARROW], [CLS_NAVLEFTARROW]);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);
            }
          } else {
            addDisable.classList.add(CLS_DISABLE);
            addDisable.setAttribute('aria-disabled', 'true');
            addDisable.removeAttribute('tabindex');
            removeDisable.classList.remove(CLS_DISABLE);
            removeDisable.setAttribute('aria-disabled', 'false');
            removeDisable.setAttribute('tabindex', '0');
          }

          this.repeatScroll();
        }
      }, {
        key: "scrollHandler",
        value: function scrollHandler(e) {
          var target = e.target;
          var width = target.offsetWidth;
          var rootEle = this.element;
          var navLeftEle = this.element.querySelector('.' + CLS_HSCROLLNAVLEFT);
          var navRightEle = this.element.querySelector('.' + CLS_HSCROLLNAVRIGHT);
          var leftOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);
          var rightOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);
          var scrollLeft = target.scrollLeft;

          if (scrollLeft <= 0) {
            scrollLeft = -scrollLeft;
          }

          if (this.isDevice) {
            if (this.enableRtl && !(this.browserCheck || this.ieCheck)) {
              leftOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);
              rightOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);
            }

            if (scrollLeft < OVERLAY_MAXWID) {
              leftOverlay.style.width = scrollLeft + 'px';
            } else {
              leftOverlay.style.width = '40px';
            }

            if (target.scrollWidth - Math.ceil(width + scrollLeft) < OVERLAY_MAXWID) {
              rightOverlay.style.width = target.scrollWidth - Math.ceil(width + scrollLeft) + 'px';
            } else {
              rightOverlay.style.width = '40px';
            }
          }

          if (scrollLeft === 0) {
            if (!this.contains(rootEle, CLS_RTL) || this.browserCheck || this.ieCheck) {
              this.arrowDisabling(navLeftEle, navRightEle);
            } else {
              this.arrowDisabling(navRightEle, navLeftEle);
            }
          } else if (Math.ceil(width + scrollLeft + .1) >= target.scrollWidth) {
            if (!this.contains(rootEle, CLS_RTL) || this.browserCheck || this.ieCheck) {
              this.arrowDisabling(navRightEle, navLeftEle);
            } else {
              this.arrowDisabling(navLeftEle, navRightEle);
            }
          } else {
            var disEle = this.element.querySelector('.' + CLS_HSCROLLNAV + '.' + CLS_DISABLE);

            if (disEle) {
              disEle.classList.remove(CLS_DISABLE);
              disEle.setAttribute('aria-disabled', 'false');
              disEle.setAttribute('tabindex', '0');
            }
          }
        }
        /**
         * Gets called when the model property changes.The data that describes the old and new values of property that changed.
         * @param  {HScrollModel} newProp
         * @param  {HScrollModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i131 = 0, _Object$keys50 = Object.keys(newProp); _i131 < _Object$keys50.length; _i131++) {
            var prop = _Object$keys50[_i131];

            switch (prop) {
              case 'scrollStep':
                this.setScrollState();
                break;

              case 'enableRtl':
                newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);
                break;
            }
          }
        }
      }]);

      return HScroll;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], HScroll.prototype, "scrollStep", void 0);

    HScroll = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], HScroll);

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var CLS_ROOT$1 = 'e-vscroll';
    var CLS_RTL$1 = 'e-rtl';
    var CLS_DISABLE$1 = 'e-overlay';
    var CLS_VSCROLLBAR = 'e-vscroll-bar';
    var CLS_VSCROLLCON = 'e-vscroll-content';
    var CLS_NAVARROW$1 = 'e-nav-arrow';
    var CLS_NAVUPARROW = 'e-nav-up-arrow';
    var CLS_NAVDOWNARROW = 'e-nav-down-arrow';
    var CLS_VSCROLLNAV = 'e-scroll-nav';
    var CLS_VSCROLLNAVUP = 'e-scroll-up-nav';
    var CLS_VSCROLLNAVDOWN = 'e-scroll-down-nav';
    var CLS_DEVICE$1 = 'e-scroll-device';
    var CLS_OVERLAY$1 = 'e-scroll-overlay';
    var CLS_UPOVERLAY = 'e-scroll-up-overlay';
    var CLS_DOWNOVERLAY = 'e-scroll-down-overlay';
    var OVERLAY_MAXWID$1 = 40;
    /**
     * VScroll module is introduces vertical scroller when content exceeds the current viewing area.
     * It can be useful for the components like Toolbar, Tab which needs vertical scrolling alone.
     * Hidden content can be view by touch moving or icon click.
     * ```html
     * <div id="scroll"/>
     * <script>
     *   var scrollObj = new VScroll();
     *   scrollObj.appendTo("#scroll");
     * </script>
     * ```
     */

    var VScroll = /*#__PURE__*/function (_syncfusion_ej2_base_31) {
      _inherits(VScroll, _syncfusion_ej2_base_31);

      var _super214 = _createSuper(VScroll);

      /**
       * Initializes a new instance of the VScroll class.
       * @param options  - Specifies VScroll model properties as options.
       * @param element  - Specifies the element for which vertical scrolling applies.
       */
      function VScroll(options, element) {
        _classCallCheck(this, VScroll);

        return _super214.call(this, options, element);
      }
      /**
       * Initialize the event handler
       * @private
       */


      _createClass2(VScroll, [{
        key: "preRender",
        value: function preRender() {
          this.browser = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
          this.browserCheck = this.browser === 'mozilla';
          this.isDevice = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice;
          this.customStep = true;
          var ele = this.element;
          this.ieCheck = this.browser === 'edge' || this.browser === 'msie';
          this.initialize();

          if (ele.id === '') {
            ele.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('vscroll');
            this.uniqueId = true;
          }

          ele.style.display = 'block';

          if (this.enableRtl) {
            ele.classList.add(CLS_RTL$1);
          }
        }
        /**
         * To Initialize the vertical scroll rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
            scroll: this.touchHandler.bind(this),
            swipe: this.swipeHandler.bind(this)
          });

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.scrollEle, 'scroll', this.scrollEventHandler, this);

          if (!this.isDevice) {
            this.createNavIcon(this.element);
          } else {
            this.element.classList.add(CLS_DEVICE$1);
            this.createOverlayElement(this.element);
          }

          this.setScrollState();

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'wheel', this.wheelEventHandler, this);
        }
      }, {
        key: "setScrollState",
        value: function setScrollState() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollStep) || this.scrollStep < 0) {
            this.scrollStep = this.scrollEle.offsetHeight;
            this.customStep = false;
          } else {
            this.customStep = true;
          }
        }
      }, {
        key: "initialize",
        value: function initialize() {
          var scrollCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_VSCROLLCON
          });
          var scrollBar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_VSCROLLBAR
          });
          scrollBar.setAttribute('tabindex', '-1');
          var ele = this.element;
          var innerEle = [].slice.call(ele.children);

          var _iterator136 = _createForOfIteratorHelper(innerEle),
              _step136;

          try {
            for (_iterator136.s(); !(_step136 = _iterator136.n()).done;) {
              var _ele3 = _step136.value;
              scrollCnt.appendChild(_ele3);
            }
          } catch (err) {
            _iterator136.e(err);
          } finally {
            _iterator136.f();
          }

          scrollBar.appendChild(scrollCnt);
          ele.appendChild(scrollBar);
          scrollBar.style.overflowY = 'hidden';
          this.scrollEle = scrollBar;
          this.scrollItems = scrollCnt;
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['scrollStep'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'vScroll';
        }
        /**
         * Removes the control from the DOM and also removes all its related events.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var el = this.element;
          el.style.display = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [CLS_ROOT$1, CLS_DEVICE$1]);
          var navs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-' + el.id + '_nav.' + CLS_VSCROLLNAV, el);
          var overlays = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_OVERLAY$1, el);
          [].slice.call(overlays).forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
          });

          var _iterator137 = _createForOfIteratorHelper([].slice.call(this.scrollItems.children)),
              _step137;

          try {
            for (_iterator137.s(); !(_step137 = _iterator137.n()).done;) {
              var elem = _step137.value;
              el.appendChild(elem);
            }
          } catch (err) {
            _iterator137.e(err);
          } finally {
            _iterator137.f();
          }

          if (this.uniqueId) {
            this.element.removeAttribute('id');
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.scrollEle);

          if (navs.length > 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(navs[0]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(navs[1])) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(navs[1]);
            }
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.scrollEle, 'scroll', this.scrollEventHandler);

          this.touchModule.destroy();
          this.touchModule = null;

          _get(_getPrototypeOf(VScroll.prototype), "destroy", this).call(this);
        }
        /**
         * Specifies the value to disable/enable the VScroll component.
         * When set to `true` , the component will be disabled.
         * @param  {boolean} value - Based on this Boolean value, VScroll will be enabled (false) or disabled (true).
         * @returns void.
         */

      }, {
        key: "disable",
        value: function disable(value) {
          var navEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-scroll-nav:not(.' + CLS_DISABLE$1 + ')', this.element);
          value ? this.element.classList.add(CLS_DISABLE$1) : this.element.classList.remove(CLS_DISABLE$1);
          [].slice.call(navEle).forEach(function (el) {
            el.setAttribute('tabindex', !value ? '0' : '-1');
          });
        }
      }, {
        key: "createOverlayElement",
        value: function createOverlayElement(element) {
          var id = element.id.concat('_nav');
          var downOverlayEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_OVERLAY$1 + ' ' + CLS_DOWNOVERLAY
          });
          var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);
          var downEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: id.concat('down'),
            className: clsDown
          });
          var navItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW$1 + ' e-icons'
          });
          downEle.appendChild(navItem);
          var upEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_OVERLAY$1 + ' ' + CLS_UPOVERLAY
          });

          if (this.ieCheck) {
            downEle.classList.add('e-ie-align');
          }

          element.appendChild(downOverlayEle);
          element.appendChild(downEle);
          element.insertBefore(upEle, element.firstChild);
          this.eventBinding([downEle]);
        }
      }, {
        key: "createNavIcon",
        value: function createNavIcon(element) {
          var id = element.id.concat('_nav');
          var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);
          var nav = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: id.concat('_down'),
            className: clsDown
          });
          nav.setAttribute('aria-disabled', 'false');
          var navItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW$1 + ' e-icons'
          });
          var clsUp = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVUP);
          var navElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            id: id.concat('_up'),
            className: clsUp + ' ' + CLS_DISABLE$1
          });
          navElement.setAttribute('aria-disabled', 'true');
          var navUpItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
            className: CLS_NAVUPARROW + ' ' + CLS_NAVARROW$1 + ' e-icons'
          });
          navElement.appendChild(navUpItem);
          nav.appendChild(navItem);
          nav.setAttribute('tabindex', '0');
          element.appendChild(nav);
          element.insertBefore(navElement, element.firstChild);

          if (this.ieCheck) {
            nav.classList.add('e-ie-align');
            navElement.classList.add('e-ie-align');
          }

          this.eventBinding([nav, navElement]);
        }
      }, {
        key: "onKeyPress",
        value: function onKeyPress(ev) {
          var _this579 = this;

          if (ev.key === 'Enter') {
            var timeoutFun = function timeoutFun() {
              _this579.keyTimeout = true;

              _this579.eleScrolling(10, ev.target, true);
            };

            this.keyTimer = window.setTimeout(function () {
              timeoutFun();
            }, 100);
          }
        }
      }, {
        key: "onKeyUp",
        value: function onKeyUp(ev) {
          if (ev.key !== 'Enter') {
            return;
          }

          if (this.keyTimeout) {
            this.keyTimeout = false;
          } else {
            ev.target.click();
          }

          clearTimeout(this.keyTimer);
        }
      }, {
        key: "eventBinding",
        value: function eventBinding(element) {
          var _this580 = this;

          [].slice.call(element).forEach(function (ele) {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](ele, {
              tapHold: _this580.tabHoldHandler.bind(_this580),
              tapHoldThreshold: 500
            });
            ele.addEventListener('keydown', _this580.onKeyPress.bind(_this580));
            ele.addEventListener('keyup', _this580.onKeyUp.bind(_this580));
            ele.addEventListener('mouseup', _this580.repeatScroll.bind(_this580));
            ele.addEventListener('touchend', _this580.repeatScroll.bind(_this580));
            ele.addEventListener('contextmenu', function (e) {
              e.preventDefault();
            });

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(ele, 'click', _this580.clickEventHandler, _this580);
          });
        }
      }, {
        key: "repeatScroll",
        value: function repeatScroll() {
          clearInterval(this.timeout);
        }
      }, {
        key: "tabHoldHandler",
        value: function tabHoldHandler(ev) {
          var _this581 = this;

          var trgt = ev.originalEvent.target;
          trgt = this.contains(trgt, CLS_VSCROLLNAV) ? trgt.firstElementChild : trgt;
          var scrollDistance = 10;

          var timeoutFun = function timeoutFun() {
            _this581.eleScrolling(scrollDistance, trgt, true);
          };

          this.timeout = window.setInterval(function () {
            timeoutFun();
          }, 50);
        }
      }, {
        key: "contains",
        value: function contains(element, className) {
          return element.classList.contains(className);
        }
      }, {
        key: "eleScrolling",
        value: function eleScrolling(scrollDis, trgt, isContinuous) {
          var rootElement = this.element;
          var classList$$1 = trgt.classList;

          if (classList$$1.contains(CLS_VSCROLLNAV)) {
            classList$$1 = trgt.querySelector('.' + CLS_NAVARROW$1).classList;
          }

          if (classList$$1.contains(CLS_NAVDOWNARROW)) {
            this.frameScrollRequest(scrollDis, 'add', isContinuous);
          } else if (classList$$1.contains(CLS_NAVUPARROW)) {
            this.frameScrollRequest(scrollDis, '', isContinuous);
          }
        }
      }, {
        key: "clickEventHandler",
        value: function clickEventHandler(event) {
          this.eleScrolling(this.scrollStep, event.target, false);
        }
      }, {
        key: "wheelEventHandler",
        value: function wheelEventHandler(e) {
          e.preventDefault();
          this.frameScrollRequest(this.scrollStep, e.deltaY > 0 ? 'add' : '', false);
        }
      }, {
        key: "swipeHandler",
        value: function swipeHandler(e) {
          var swipeElement = this.scrollEle;
          var distance;

          if (e.velocity <= 1) {
            distance = e.distanceY / (e.velocity * 10);
          } else {
            distance = e.distanceY / e.velocity;
          }

          var start = 0.5;

          var animate = function animate() {
            var step = Math.sin(start);

            if (step <= 0) {
              window.cancelAnimationFrame(step);
            } else {
              if (e.swipeDirection === 'Up') {
                swipeElement.scrollTop += distance * step;
              } else if (e.swipeDirection === 'Down') {
                swipeElement.scrollTop -= distance * step;
              }

              start -= 0.02;
              window.requestAnimationFrame(animate);
            }
          };

          animate();
        }
      }, {
        key: "scrollUpdating",
        value: function scrollUpdating(scrollVal, action) {
          if (action === 'add') {
            this.scrollEle.scrollTop += scrollVal;
          } else {
            this.scrollEle.scrollTop -= scrollVal;
          }
        }
      }, {
        key: "frameScrollRequest",
        value: function frameScrollRequest(scrollValue, action, isContinuous) {
          var _this582 = this;

          var step = 10;

          if (isContinuous) {
            this.scrollUpdating(scrollValue, action);
            return;
          }

          if (!this.customStep) {
            [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_OVERLAY$1, this.element)).forEach(function (el) {
              scrollValue -= el.offsetHeight;
            });
          }

          var animate = function animate() {
            if (scrollValue < step) {
              window.cancelAnimationFrame(step);
            } else {
              _this582.scrollUpdating(step, action);

              scrollValue -= step;
              window.requestAnimationFrame(animate);
            }
          };

          animate();
        }
      }, {
        key: "touchHandler",
        value: function touchHandler(e) {
          var el = this.scrollEle;
          var distance;
          distance = e.distanceY;

          if (e.scrollDirection === 'Up') {
            el.scrollTop = el.scrollTop + distance;
          } else if (e.scrollDirection === 'Down') {
            el.scrollTop = el.scrollTop - distance;
          }
        }
      }, {
        key: "arrowDisabling",
        value: function arrowDisabling(addDisableCls, removeDisableCls) {
          if (this.isDevice) {
            var arrowEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(addDisableCls) ? removeDisableCls : addDisableCls;
            var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW$1);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(addDisableCls)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(arrowIcon, [CLS_NAVDOWNARROW], [CLS_NAVUPARROW]);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(arrowIcon, [CLS_NAVUPARROW], [CLS_NAVDOWNARROW]);
            }
          } else {
            addDisableCls.classList.add(CLS_DISABLE$1);
            addDisableCls.setAttribute('aria-disabled', 'true');
            addDisableCls.removeAttribute('tabindex');
            removeDisableCls.classList.remove(CLS_DISABLE$1);
            removeDisableCls.setAttribute('aria-disabled', 'false');
            removeDisableCls.setAttribute('tabindex', '0');
          }

          this.repeatScroll();
        }
      }, {
        key: "scrollEventHandler",
        value: function scrollEventHandler(e) {
          var target = e.target;
          var height = target.offsetHeight;
          var rootEle = this.element;
          var navUpEle = this.element.querySelector('.' + CLS_VSCROLLNAVUP);
          var navDownEle = this.element.querySelector('.' + CLS_VSCROLLNAVDOWN);
          var upOverlay = this.element.querySelector('.' + CLS_UPOVERLAY);
          var downOverlay = this.element.querySelector('.' + CLS_DOWNOVERLAY);
          var scrollTop = target.scrollTop;

          if (scrollTop <= 0) {
            scrollTop = -scrollTop;
          }

          if (this.isDevice) {
            if (scrollTop < OVERLAY_MAXWID$1) {
              upOverlay.style.height = scrollTop + 'px';
            } else {
              upOverlay.style.height = '40px';
            }

            if (target.scrollHeight - Math.ceil(height + scrollTop) < OVERLAY_MAXWID$1) {
              downOverlay.style.height = target.scrollHeight - Math.ceil(height + scrollTop) + 'px';
            } else {
              downOverlay.style.height = '40px';
            }
          }

          if (scrollTop === 0) {
            this.arrowDisabling(navUpEle, navDownEle);
          } else if (Math.ceil(height + scrollTop + .1) >= target.scrollHeight) {
            this.arrowDisabling(navDownEle, navUpEle);
          } else {
            var disEle = this.element.querySelector('.' + CLS_VSCROLLNAV + '.' + CLS_DISABLE$1);

            if (disEle) {
              disEle.classList.remove(CLS_DISABLE$1);
              disEle.setAttribute('aria-disabled', 'false');
              disEle.setAttribute('tabindex', '0');
            }
          }
        }
        /**
         * Gets called when the model property changes.The data that describes the old and new values of property that changed.
         * @param  {VScrollModel} newProp
         * @param  {VScrollModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i132 = 0, _Object$keys51 = Object.keys(newProp); _i132 < _Object$keys51.length; _i132++) {
            var prop = _Object$keys51[_i132];

            switch (prop) {
              case 'scrollStep':
                this.setScrollState();
                break;

              case 'enableRtl':
                newProp.enableRtl ? this.element.classList.add(CLS_RTL$1) : this.element.classList.remove(CLS_RTL$1);
                break;
            }
          }
        }
      }]);

      return VScroll;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], VScroll.prototype, "scrollStep", void 0);

    VScroll = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], VScroll);

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var ENTER = 'enter';
    var ESCAPE = 'escape';
    var FOCUSED = 'e-focused';
    var HEADER = 'e-menu-header';
    var SELECTED = 'e-selected';
    var SEPARATOR = 'e-separator';
    var UPARROW = 'uparrow';
    var DOWNARROW = 'downarrow';
    var LEFTARROW = 'leftarrow';
    var RIGHTARROW = 'rightarrow';
    var HOME = 'home';
    var END = 'end';
    var CARET = 'e-caret';
    var ITEM = 'e-menu-item';
    var DISABLED = 'e-disabled';
    var HIDE = 'e-menu-hide';
    var ICONS = 'e-icons';
    var RTL = 'e-rtl';
    var POPUP = 'e-menu-popup';
    var TEMPLATE_PROPERTY = 'Template';
    /**
     * Configures the field options of the Menu.
     */

    var FieldSettings = /*#__PURE__*/function (_syncfusion_ej2_base_32) {
      _inherits(FieldSettings, _syncfusion_ej2_base_32);

      var _super215 = _createSuper(FieldSettings);

      function FieldSettings() {
        _classCallCheck(this, FieldSettings);

        return _super215.apply(this, arguments);
      }

      return FieldSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('id')], FieldSettings.prototype, "itemId", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('parentId')], FieldSettings.prototype, "parentId", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], FieldSettings.prototype, "text", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('iconCss')], FieldSettings.prototype, "iconCss", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('url')], FieldSettings.prototype, "url", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('separator')], FieldSettings.prototype, "separator", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('items')], FieldSettings.prototype, "children", void 0);
    /**
     * Specifies menu items.
     */


    var MenuItem = /*#__PURE__*/function (_syncfusion_ej2_base_33) {
      _inherits(MenuItem, _syncfusion_ej2_base_33);

      var _super216 = _createSuper(MenuItem);

      function MenuItem() {
        _classCallCheck(this, MenuItem);

        return _super216.apply(this, arguments);
      }

      return MenuItem;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MenuItem.prototype, "iconCss", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuItem.prototype, "id", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MenuItem.prototype, "separator", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MenuItem)], MenuItem.prototype, "items", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuItem.prototype, "text", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuItem.prototype, "url", void 0);
    /**
     * Animation configuration settings.
     */


    var MenuAnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_34) {
      _inherits(MenuAnimationSettings, _syncfusion_ej2_base_34);

      var _super217 = _createSuper(MenuAnimationSettings);

      function MenuAnimationSettings() {
        _classCallCheck(this, MenuAnimationSettings);

        return _super217.apply(this, arguments);
      }

      return MenuAnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')], MenuAnimationSettings.prototype, "effect", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)], MenuAnimationSettings.prototype, "duration", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('ease')], MenuAnimationSettings.prototype, "easing", void 0);
    /**
     * @private
     * Base class for Menu and ContextMenu components.
     */


    var MenuBase = /*#__PURE__*/function (_syncfusion_ej2_base_35) {
      _inherits(MenuBase, _syncfusion_ej2_base_35);

      var _super218 = _createSuper(MenuBase);

      /**
       * Constructor for creating the widget.
       * @private
       */
      function MenuBase(options, element) {
        var _this583;

        _classCallCheck(this, MenuBase);

        _this583 = _super218.call(this, options, element);
        _this583.navIdx = [];
        _this583.animation = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({});
        _this583.isTapHold = false;
        _this583.tempItem = [];
        return _this583;
      }
      /**
       * Initialized third party configuration settings.
       * @private
       */


      _createClass2(MenuBase, [{
        key: "preRender",
        value: function preRender() {
          if (!this.isMenu) {
            var ul;

            if (this.element.tagName === 'EJS-CONTEXTMENU') {
              ul = this.createElement('ul', {
                id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(this.getModuleName()),
                className: 'e-control e-lib e-' + this.getModuleName()
              });
              var ejInst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', this.element);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ['e-control', 'e-lib', 'e-' + this.getModuleName()]);
              this.clonedElement = this.element;
              this.element = ul;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInst, this.element);
            } else {
              ul = this.createElement('ul', {
                id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(this.getModuleName())
              });
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([].slice.call(this.element.cloneNode(true).children), ul);
              var refEle = this.element.nextElementSibling;
              refEle ? this.element.parentElement.insertBefore(ul, refEle) : this.element.parentElement.appendChild(ul);
              this.clonedElement = ul;
            }

            this.clonedElement.style.display = 'none';
          }

          if (this.element.tagName === 'EJS-MENU') {
            var ele = this.element;
            var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', ele);

            var _ul2 = this.createElement('ul');

            var wrapper = this.createElement('EJS-MENU', {
              className: 'e-' + this.getModuleName() + '-wrapper'
            });

            for (var idx = 0, _len43 = ele.attributes.length; idx < _len43; idx++) {
              _ul2.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
            }

            ele.parentNode.insertBefore(wrapper, ele);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
            ele = _ul2;
            wrapper.appendChild(ele);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, ele);
            this.clonedElement = wrapper;
            this.element = ele;

            if (!this.element.id) {
              this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(this.getModuleName());
            }
          }
        }
        /**
         * Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initialize();
          this.renderItems();

          if (this.isMenu && this.template && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var menuTemplateId = this.element.id + TEMPLATE_PROPERTY;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(menuTemplateId, TEMPLATE_PROPERTY);

            if (Object.keys(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"]).length) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(this.tempItem, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"][menuTemplateId], [], true);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(menuTemplateId, TEMPLATE_PROPERTY, this);
          }

          this.wireEvents();
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          var wrapper = this.getWrapper();

          if (!wrapper) {
            wrapper = this.createElement('div', {
              className: 'e-' + this.getModuleName() + '-wrapper'
            });

            if (this.isMenu) {
              this.element.parentElement.insertBefore(wrapper, this.element);
            } else {
              document.body.appendChild(wrapper);
            }
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], this.cssClass.split(' '));
          }

          if (this.enableRtl) {
            wrapper.classList.add(RTL);
          }

          wrapper.appendChild(this.element);

          if (this.isMenu && this.hamburgerMode) {
            if (!this.target) {
              this.createHeaderContainer(wrapper);
            }
          }
        }
      }, {
        key: "renderItems",
        value: function renderItems() {
          if (!this.items.length) {
            var items = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createJsonFromElement(this.element, {
              fields: {
                child: 'items'
              }
            });

            this.setProperties({
              items: items
            }, true);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.element = this.removeChildElement(this.element);
            } else {
              this.element.innerHTML = '';
            }
          }

          var ul = this.createItems(this.items);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(Array.prototype.slice.call(ul.children), this.element);
          this.element.classList.add('e-menu-parent');

          if (this.isMenu) {
            var wrapper = this.getWrapper();
            this.element.classList.contains('e-vertical') ? this.addScrolling(wrapper, this.element, 'vscroll', wrapper.offsetHeight, this.element.offsetHeight) : this.addScrolling(wrapper, this.element, 'hscroll', wrapper.offsetWidth, this.element.offsetWidth);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var wrapper = this.getWrapper();

          if (this.target) {
            var target;
            var targetElems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(this.target);

            for (var i = 0, _len44 = targetElems.length; i < _len44; i++) {
              target = targetElems[i];

              if (this.isMenu) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'click', this.menuHeaderClickHandler, this);
              } else {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) {
                  new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](target, {
                    tapHold: this.touchHandler.bind(this)
                  });
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'contextmenu', this.cmenuHandler, this);
                }
              }
            }

            this.targetElement = target;

            if (!this.isMenu) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.targetElement, 'scroll', this.scrollHandler, this);

              var _iterator138 = _createForOfIteratorHelper(Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getScrollableParent"])(this.targetElement)),
                  _step138;

              try {
                for (_iterator138.s(); !(_step138 = _iterator138.n()).done;) {
                  var parent = _step138.value;

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(parent, 'scroll', this.scrollHandler, this);
                }
              } catch (err) {
                _iterator138.e(err);
              } finally {
                _iterator138.f();
              }
            }
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.delegateMoverHandler = this.moverHandler.bind(this);
            this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown', this.delegateMouseDownHandler, this);
          }

          this.delegateClickHandler = this.clickHandler.bind(this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'click', this.delegateClickHandler, this);

          this.wireKeyboardEvent(wrapper);
          this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(wrapper, {
            selector: '.' + ITEM
          });
        }
      }, {
        key: "wireKeyboardEvent",
        value: function wireKeyboardEvent(element) {
          var keyConfigs = {
            downarrow: DOWNARROW,
            uparrow: UPARROW,
            enter: ENTER,
            leftarrow: LEFTARROW,
            rightarrow: RIGHTARROW,
            escape: ESCAPE
          };

          if (this.isMenu) {
            keyConfigs.home = HOME;
            keyConfigs.end = END;
          }

          new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](element, {
            keyAction: this.keyBoardHandler.bind(this),
            keyConfigs: keyConfigs
          });
        }
      }, {
        key: "mouseDownHandler",
        value: function mouseDownHandler(e) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-' + this.getModuleName() + '-wrapper') !== this.getWrapper() && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-' + this.getModuleName() + '-popup')) {
            this.closeMenu(this.isMenu ? null : this.navIdx.length, e);
          }
        }
      }, {
        key: "keyBoardHandler",
        value: function keyBoardHandler(e) {
          var actionName = '';
          var trgt = e.target;
          var actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains('e-vertical') && this.navIdx.length < 1;
          e.preventDefault();

          if (this.enableScrolling && e.keyCode === 13 && trgt.classList.contains('e-scroll-nav')) {
            this.removeLIStateByClass([FOCUSED, SELECTED], [Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.e-' + this.getModuleName() + '-wrapper')]);
          }

          if (actionNeeded) {
            switch (e.action) {
              case RIGHTARROW:
                actionName = RIGHTARROW;
                e.action = DOWNARROW;
                break;

              case LEFTARROW:
                actionName = LEFTARROW;
                e.action = UPARROW;
                break;

              case DOWNARROW:
                actionName = DOWNARROW;
                e.action = RIGHTARROW;
                break;

              case UPARROW:
                actionName = UPARROW;
                e.action = '';
                break;
            }
          } else if (this.enableRtl) {
            switch (e.action) {
              case LEFTARROW:
                actionNeeded = true;
                actionName = LEFTARROW;
                e.action = RIGHTARROW;
                break;

              case RIGHTARROW:
                actionNeeded = true;
                actionName = RIGHTARROW;
                e.action = LEFTARROW;
                break;
            }
          }

          switch (e.action) {
            case DOWNARROW:
            case UPARROW:
            case END:
            case HOME:
              this.upDownKeyHandler(e);
              break;

            case RIGHTARROW:
              this.rightEnterKeyHandler(e);
              break;

            case LEFTARROW:
              this.leftEscKeyHandler(e);
              break;

            case ENTER:
              if (this.hamburgerMode && trgt.tagName === 'SPAN' && trgt.classList.contains('e-menu-icon')) {
                this.menuHeaderClickHandler(e);
              } else {
                this.rightEnterKeyHandler(e);
              }

              break;

            case ESCAPE:
              this.leftEscKeyHandler(e);
              break;
          }

          if (actionNeeded) {
            e.action = actionName;
          }
        }
      }, {
        key: "upDownKeyHandler",
        value: function upDownKeyHandler(e) {
          var cul = this.getUlByNavIdx();
          var defaultIdx = e.action === DOWNARROW || e.action === HOME ? 0 : cul.childElementCount - 1;
          var fliIdx = defaultIdx;
          var fli = this.getLIByClass(cul, FOCUSED);

          if (fli) {
            if (e.action !== END && e.action !== HOME) {
              fliIdx = this.getIdx(cul, fli);
            }

            fli.classList.remove(FOCUSED);

            if (e.action !== END && e.action !== HOME) {
              e.action === DOWNARROW ? fliIdx++ : fliIdx--;

              if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {
                fliIdx = defaultIdx;
              }
            }
          }

          var cli = cul.children[fliIdx];
          fliIdx = this.isValidLI(cli, fliIdx, e.action);
          cul.children[fliIdx].classList.add(FOCUSED);
          cul.children[fliIdx].focus();
        }
      }, {
        key: "isValidLI",
        value: function isValidLI(cli, index, action) {
          var wrapper = this.getWrapper();
          var cul = this.getUlByNavIdx();

          if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {
            action === DOWNARROW || action === RIGHTARROW ? index++ : index--;
          }

          cli = cul.children[index];

          if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {
            index = this.isValidLI(cli, index, action);
          }

          return index;
        }
      }, {
        key: "getUlByNavIdx",
        value: function getUlByNavIdx() {
          var navIdxLen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.navIdx.length;

          if (this.isMenu) {
            var popup = [this.getWrapper()].concat([].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + POPUP)))[navIdxLen];
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(popup) ? null : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-menu-parent', popup);
          } else {
            return this.getWrapper().children[navIdxLen];
          }
        }
      }, {
        key: "rightEnterKeyHandler",
        value: function rightEnterKeyHandler(e) {
          var eventArgs;
          var cul = this.getUlByNavIdx();
          var fli = this.getLIByClass(cul, FOCUSED);

          if (fli) {
            var fliIdx = this.getIdx(cul, fli);
            var navIdx = this.navIdx.concat(fliIdx);
            var item = this.getItem(navIdx);

            if (item.items.length) {
              this.navIdx.push(fliIdx);
              this.keyType = 'right';
              this.action = e.action;
              this.openMenu(fli, item, -1, -1, e);
            } else {
              if (e.action === ENTER) {
                if (this.isMenu && this.navIdx.length === 0) {
                  this.removeLIStateByClass([SELECTED], [this.getWrapper()]);
                } else {
                  fli.classList.remove(FOCUSED);
                }

                fli.classList.add(SELECTED);
                eventArgs = {
                  element: fli,
                  item: item,
                  event: e
                };
                this.trigger('select', eventArgs);
                this.closeMenu(null, e);
              }
            }
          }
        }
      }, {
        key: "leftEscKeyHandler",
        value: function leftEscKeyHandler(e) {
          if (this.navIdx.length) {
            this.keyType = 'left';
            this.closeMenu(this.navIdx.length, e);
          } else {
            if (e.action === ESCAPE) {
              this.closeMenu(null, e);
            }
          }
        }
      }, {
        key: "scrollHandler",
        value: function scrollHandler(e) {
          this.closeMenu(null, e);
        }
      }, {
        key: "touchHandler",
        value: function touchHandler(e) {
          this.isTapHold = true;
          this.cmenuHandler(e.originalEvent);
        }
      }, {
        key: "cmenuHandler",
        value: function cmenuHandler(e) {
          e.preventDefault();
          this.isCMenu = true;
          this.pageX = e.changedTouches ? e.changedTouches[0].pageX + 1 : e.pageX + 1;
          this.pageY = e.changedTouches ? e.changedTouches[0].pageY + 1 : e.pageY + 1;
          this.closeMenu(null, e);

          if (this.isCMenu) {
            if (this.canOpen(e.target)) {
              this.openMenu(null, null, this.pageY, this.pageX, e);
            }

            this.isCMenu = false;
          }
        }
      }, {
        key: "closeMenu",
        value: function closeMenu() {
          var _this584 = this;

          var ulIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
          var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

          if (this.isMenuVisible()) {
            var sli;
            var ul;
            var item;
            var items;
            var beforeCloseArgs;
            var wrapper = this.getWrapper();
            var popups = this.getPopups();
            var isClose = false;
            var cnt = this.isMenu ? popups.length + 1 : wrapper.childElementCount;
            ul = this.isMenu && cnt !== 1 ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-ul', popups[cnt - 2]) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.e-menu-parent', wrapper)[cnt - 1];

            if (this.isMenu && ul.classList.contains('e-menu')) {
              sli = this.getLIByClass(ul, SELECTED);

              if (sli) {
                sli.classList.remove(SELECTED);
              }

              isClose = true;
            }

            if (!isClose) {
              var liElem = e && e.target && this.getLI(e.target);
              item = this.navIdx.length ? this.getItem(this.navIdx) : null;
              items = item ? item.items : this.items;
              beforeCloseArgs = {
                element: ul,
                parentItem: this.isMenu && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? this.getMenuItemModel(item, ulIndex) : item,
                items: items,
                event: e,
                cancel: false
              };
              this.trigger('beforeClose', beforeCloseArgs, function (observedCloseArgs) {
                var popupEle;
                var closeArgs;
                var popupId = '';
                var popupObj;
                var isOpen = !observedCloseArgs.cancel;

                if (isOpen || _this584.isCMenu) {
                  if (_this584.isMenu) {
                    popupEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(ul, '.' + POPUP);

                    if (_this584.hamburgerMode) {
                      popupEle.parentElement.style.minHeight = '';
                      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(ul, '.e-menu-item').setAttribute('aria-expanded', 'false');
                    }

                    _this584.unWireKeyboardEvent(popupEle);

                    _this584.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(popupEle.children[0], VScroll), popupEle.children[0]);

                    popupObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(popupEle, _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"]);
                    popupObj.hide();
                    popupId = popupEle.id;
                    popupObj.destroy();
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(popupEle);
                  } else {
                    _this584.toggleAnimation(ul, false);
                  }

                  closeArgs = {
                    element: ul,
                    parentItem: item,
                    items: items
                  };

                  _this584.trigger('onClose', closeArgs);

                  _this584.navIdx.pop();
                }

                var trgtliId;
                var closedLi;
                var trgtLi;

                var trgtpopUp = _this584.getWrapper() && _this584.getUlByNavIdx();

                if (_this584.isCMenu) {
                  if (_this584.canOpen(e.target)) {
                    _this584.openMenu(null, null, _this584.pageY, _this584.pageX, e);
                  }

                  _this584.isCMenu = false;
                }

                if (_this584.isMenu && trgtpopUp && popupId.length) {
                  trgtliId = new RegExp('(.*)-ej2menu-' + _this584.element.id + '-popup').exec(popupId)[1];
                  closedLi = trgtpopUp.querySelector('[id="' + trgtliId + '"]');
                  trgtLi = liElem && trgtpopUp.querySelector('[id="' + liElem.id + '"]');
                }

                var submenus = liElem && liElem.querySelectorAll('.e-menu-item');

                if (isOpen && _this584.hamburgerMode && ulIndex && !submenus.length) {
                  _this584.afterCloseMenu(e);
                } else if (isOpen && !_this584.hamburgerMode && _this584.navIdx.length && closedLi && !trgtLi) {
                  _this584.closeMenu(_this584.navIdx[_this584.navIdx.length - 1], e);
                } else if (isOpen && !ulIndex && (_this584.hamburgerMode && _this584.navIdx.length || _this584.navIdx.length === 1)) {
                  _this584.closeMenu(null, e);
                } else if (isOpen && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ulIndex) && _this584.navIdx.length) {
                  _this584.closeMenu(null, e);
                } else if (isOpen && !_this584.isMenu && !ulIndex && _this584.navIdx.length === 0 && !_this584.isMenusClosed) {
                  _this584.isMenusClosed = true;

                  _this584.closeMenu(0, e);
                } else if (isOpen && _this584.isMenu && e && e.target && _this584.navIdx.length !== 0 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-menu-parent.e-control')) {
                  _this584.closeMenu(0, e);
                } else {
                  if (isOpen && (_this584.keyType === 'right' || _this584.keyType === 'click')) {
                    _this584.afterCloseMenu(e);
                  } else {
                    var cul = _this584.getUlByNavIdx();

                    var _sli = _this584.getLIByClass(cul, SELECTED);

                    if (_sli) {
                      _sli.setAttribute('aria-expanded', 'false');

                      _sli.classList.remove(SELECTED);

                      if (liElem) {
                        _sli.classList.add(FOCUSED);

                        _sli.focus();
                      }
                    }

                    if (!isOpen && _this584.hamburgerMode && liElem && liElem.getAttribute('aria-expanded') === 'false' && liElem.getAttribute('aria-haspopup') === 'true') {
                      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(liElem, '.e-menu-parent.e-control')) {
                        _this584.navIdx = [];
                      } else {
                        _this584.navIdx.pop();
                      }

                      _this584.navIdx.push(_this584.cliIdx);

                      var _item3 = _this584.getItem(_this584.navIdx);

                      liElem.setAttribute('aria-expanded', 'true');

                      _this584.openMenu(liElem, _item3, -1, -1, e);
                    }
                  }
                }

                _this584.removeStateWrapper();
              });
            }
          }
        }
      }, {
        key: "getMenuItemModel",
        value: function getMenuItemModel(item, level) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            return null;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(level)) {
            level = 0;
          }

          var fields = this.getFields(level);
          return {
            text: item[fields.text],
            id: item[fields.id],
            items: item[fields.child],
            separator: item[fields.separator],
            iconCss: item[fields.iconCss],
            url: item[fields.url]
          };
        }
      }, {
        key: "destroyScrollObj",
        value: function destroyScrollObj(scrollObj, scrollEle) {
          if (scrollObj) {
            scrollObj.destroy();
            scrollEle.parentElement.appendChild(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-menu-parent', scrollEle));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(scrollEle);
          }
        }
      }, {
        key: "getPopups",
        value: function getPopups() {
          var _this585 = this;

          var popups = [];
          [].slice.call(document.querySelectorAll('.' + POPUP)).forEach(function (elem) {
            if (_this585.getIndex(elem.querySelector('.' + ITEM).id, true).length) {
              popups.push(elem);
            }
          });
          return popups;
        }
      }, {
        key: "isMenuVisible",
        value: function isMenuVisible() {
          return this.navIdx.length > 0 || this.element.classList.contains('e-contextmenu') && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.element).valueOf();
        }
      }, {
        key: "canOpen",
        value: function canOpen(target) {
          var canOpen = true;

          if (this.filter) {
            canOpen = false;
            var filter = this.filter.split(' ');

            for (var i = 0, _len45 = filter.length; i < _len45; i++) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + filter[i])) {
                canOpen = true;
                break;
              }
            }
          }

          return canOpen;
        }
      }, {
        key: "openMenu",
        value: function openMenu(li, item) {
          var top = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
          var left = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
          var e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
          var target = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : this.targetElement;
          var wrapper = this.getWrapper();
          this.lItem = li;
          var elemId = this.element.id !== '' ? this.element.id : 'menu';
          this.isMenusClosed = false;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(top)) {
            top = -1;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(left)) {
            left = -1;
          }

          if (li) {
            this.uList = this.createItems(item[this.getField('children', this.navIdx.length - 1)]);

            if (!this.isMenu && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              wrapper.lastChild.style.display = 'none';
              var data = {
                text: item[this.getField('text')].toString(),
                iconCss: ICONS + ' e-previous'
              };
              var hdata = new MenuItem(this.items[0], 'items', data, true);
              var hli = this.createItems([hdata]).children[0];
              hli.classList.add(HEADER);
              this.uList.insertBefore(hli, this.uList.children[0]);
            }

            if (this.isMenu) {
              this.popupWrapper = this.createElement('div', {
                className: 'e-' + this.getModuleName() + '-wrapper ' + POPUP,
                id: li.id + '-ej2menu-' + elemId + '-popup'
              });

              if (this.hamburgerMode) {
                top = li.offsetHeight;
                li.appendChild(this.popupWrapper);
              } else {
                document.body.appendChild(this.popupWrapper);
              }

              this.isNestedOrVertical = this.element.classList.contains('e-vertical') || this.navIdx.length !== 1;
              this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);

              if (this.hamburgerMode) {
                this.calculateIndentSize(this.uList, li);
              } else {
                if (this.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.popupWrapper], this.cssClass.split(' '));
                }

                this.popupObj.hide();
              }

              this.triggerBeforeOpen(li, this.uList, item, e, 0, 0, 'menu');
            } else {
              this.uList.style.zIndex = this.element.style.zIndex;
              wrapper.appendChild(this.uList);
              this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');
            }
          } else {
            this.uList = this.element;
            this.uList.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getZindexPartial"])(target ? target : this.element).toString();
            this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');
          }

          if (this.isMenu && this.template && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            var menuTemplateId = this.element.id + TEMPLATE_PROPERTY;

            if (Object.keys(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"]).length) {
              var itemFromBlazorTemplate = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"][menuTemplateId];
              this.tempItem = this.tempItem.concat(itemFromBlazorTemplate);
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["blazorTemplates"][menuTemplateId] = this.tempItem;
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(menuTemplateId, TEMPLATE_PROPERTY, this);
          }
        }
      }, {
        key: "calculateIndentSize",
        value: function calculateIndentSize(ul, li) {
          var liStyle = getComputedStyle(li);
          var liIndent = parseInt(liStyle.textIndent, 10);

          if (this.navIdx.length < 2 && !li.classList.contains('e-blankicon')) {
            liIndent *= 2;
          } else {
            liIndent += liIndent / 4;
          }

          ul.style.textIndent = liIndent + 'px';
          var blankIconElem = ul.querySelectorAll('.e-blankicon');

          if (blankIconElem && blankIconElem.length) {
            var menuIconElem = ul.querySelector('.e-menu-icon');
            var menuIconElemStyle = getComputedStyle(menuIconElem);
            var blankIconIndent = parseInt(menuIconElemStyle.marginRight, 10) + menuIconElem.offsetWidth + liIndent;

            for (var i = 0; i < blankIconElem.length; i++) {
              blankIconElem[i].style.textIndent = blankIconIndent + 'px';
            }
          }
        }
      }, {
        key: "generatePopup",
        value: function generatePopup(popupWrapper, ul, li, isNestedOrVertical) {
          var _this586 = this;

          var popupObj = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"](popupWrapper, {
            actionOnScroll: this.hamburgerMode ? 'none' : 'reposition',
            relateTo: li,
            collision: this.hamburgerMode ? {
              X: 'none',
              Y: 'none'
            } : {
              X: isNestedOrVertical || this.enableRtl ? 'none' : 'flip',
              Y: 'fit'
            },
            position: isNestedOrVertical && !this.hamburgerMode ? {
              X: 'right',
              Y: 'top'
            } : {
              X: 'left',
              Y: 'bottom'
            },
            targetType: 'relative',
            enableRtl: this.enableRtl,
            content: ul,
            open: function open() {
              var scrollEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-menu-vscroll', popupObj.element);

              if (scrollEle) {
                scrollEle.style.height = 'inherit';
                scrollEle.style.maxHeight = '';
              }

              var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-ul', popupObj.element);
              popupObj.element.style.maxHeight = '';
              ul.focus();

              _this586.triggerOpen(ul);
            }
          });
          return popupObj;
        }
      }, {
        key: "createHeaderContainer",
        value: function createHeaderContainer(wrapper) {
          wrapper = wrapper || this.getWrapper();
          var spanElem = this.createElement('span', {
            className: 'e-' + this.getModuleName() + '-header'
          });
          var tempTitle = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.title) : this.title;
          var spanTitle = this.createElement('span', {
            className: 'e-' + this.getModuleName() + '-title',
            innerHTML: tempTitle
          });
          var spanIcon = this.createElement('span', {
            className: 'e-icons e-' + this.getModuleName() + '-icon',
            attrs: {
              'tabindex': '0'
            }
          });
          spanElem.appendChild(spanTitle);
          spanElem.appendChild(spanIcon);
          wrapper.insertBefore(spanElem, this.element);
        }
      }, {
        key: "openHamburgerMenu",
        value: function openHamburgerMenu(e) {
          if (this.hamburgerMode) {
            this.triggerBeforeOpen(null, this.element, null, e, 0, 0, 'hamburger');
          }
        }
      }, {
        key: "closeHamburgerMenu",
        value: function closeHamburgerMenu(e) {
          var _this587 = this;

          if (this.hamburgerMode) {
            var beforeCloseArgs;
            beforeCloseArgs = {
              element: this.element,
              parentItem: null,
              event: e,
              items: this.items,
              cancel: false
            };
            this.trigger('beforeClose', beforeCloseArgs, function (observedHamburgerCloseArgs) {
              if (!observedHamburgerCloseArgs.cancel) {
                _this587.closeMenu(null, e);

                _this587.element.classList.add('e-hide-menu');

                _this587.trigger('onClose', {
                  element: _this587.element,
                  parentItem: null,
                  items: _this587.items
                });
              }
            });
          }
        }
      }, {
        key: "callFit",
        value: function callFit(element, x, y, top, left) {
          return Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["fit"])(element, null, {
            X: x,
            Y: y
          }, {
            top: top,
            left: left
          });
        }
      }, {
        key: "triggerBeforeOpen",
        value: function triggerBeforeOpen(li, ul, item, e, top, left, type) {
          var _this588 = this;

          var navIdx = this.getIndex(li ? li.id : null, true);
          var items = li ? item[this.getField('children', this.navIdx.length - 1)] : this.items;
          var eventArgs = {
            element: ul,
            items: items,
            parentItem: this.isMenu && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? this.getMenuItemModel(item, this.navIdx.length - 1) : item,
            event: e,
            cancel: false,
            top: top,
            left: left
          };
          var menuType = type;
          var collide;
          this.trigger('beforeOpen', eventArgs, function (observedOpenArgs) {
            switch (menuType) {
              case 'menu':
                if (!_this588.hamburgerMode) {
                  _this588.top = observedOpenArgs.top;
                  _this588.left = observedOpenArgs.left;
                }

                _this588.popupWrapper.style.display = 'block';

                if (!_this588.hamburgerMode) {
                  _this588.popupWrapper.style.maxHeight = _this588.popupWrapper.getBoundingClientRect().height + 'px';

                  _this588.addScrolling(_this588.popupWrapper, _this588.uList, 'vscroll', _this588.popupWrapper.offsetHeight, _this588.uList.offsetHeight);

                  _this588.checkScrollOffset(e);
                }

                if (!_this588.hamburgerMode && !_this588.left && !_this588.top) {
                  _this588.popupObj.refreshPosition(_this588.lItem, true);

                  _this588.left = parseInt(_this588.popupWrapper.style.left, 10);
                  _this588.top = parseInt(_this588.popupWrapper.style.top, 10);

                  if (_this588.enableRtl) {
                    _this588.left = _this588.isNestedOrVertical ? _this588.left - _this588.popupWrapper.offsetWidth - _this588.lItem.parentElement.offsetWidth + 2 : _this588.left - _this588.popupWrapper.offsetWidth + _this588.lItem.offsetWidth;
                  }

                  collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(_this588.popupWrapper, null, _this588.left, _this588.top);

                  if ((_this588.isNestedOrVertical || _this588.enableRtl) && (collide.indexOf('right') > -1 || collide.indexOf('left') > -1)) {
                    _this588.popupObj.collision.X = 'none';
                    var offWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this588.lItem, '.e-' + _this588.getModuleName() + '-wrapper').offsetWidth;
                    _this588.left = _this588.enableRtl ? Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(_this588.lItem, _this588.isNestedOrVertical ? 'right' : 'left', 'top').left : _this588.left - _this588.popupWrapper.offsetWidth - offWidth + 2;
                  }

                  collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(_this588.popupWrapper, null, _this588.left, _this588.top);

                  if (collide.indexOf('left') > -1 || collide.indexOf('right') > -1) {
                    _this588.left = _this588.callFit(_this588.popupWrapper, true, false, _this588.top, _this588.left).left;
                  }

                  _this588.popupWrapper.style.left = _this588.left + 'px';
                } else {
                  _this588.popupObj.collision = {
                    X: 'none',
                    Y: 'none'
                  };
                }

                _this588.popupWrapper.style.display = '';
                break;

              case 'none':
                _this588.top = observedOpenArgs.top;
                _this588.left = observedOpenArgs.left;
                break;

              case 'hamburger':
                if (!observedOpenArgs.cancel) {
                  _this588.element.classList.remove('e-hide-menu');

                  _this588.triggerOpen(_this588.element);
                }

                break;
            }

            if (menuType !== 'hamburger') {
              if (observedOpenArgs.cancel) {
                if (_this588.isMenu) {
                  _this588.popupObj.destroy();

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_this588.popupWrapper);
                } else if (ul.className.indexOf('e-ul') > -1) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ul);
                }

                _this588.navIdx.pop();
              } else {
                if (_this588.isMenu) {
                  if (_this588.hamburgerMode) {
                    _this588.popupWrapper.style.top = _this588.top + 'px';
                    _this588.popupWrapper.style.left = 0 + 'px';

                    _this588.toggleAnimation(_this588.popupWrapper);
                  } else {
                    _this588.wireKeyboardEvent(_this588.popupWrapper);

                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(_this588.popupWrapper, {
                      selector: '.' + ITEM
                    });
                    _this588.popupWrapper.style.left = _this588.left + 'px';
                    _this588.popupWrapper.style.top = _this588.top + 'px';
                    var animationOptions = _this588.animationSettings.effect !== 'None' ? {
                      name: _this588.animationSettings.effect,
                      duration: _this588.animationSettings.duration,
                      timingFunction: _this588.animationSettings.easing
                    } : null;

                    _this588.popupObj.show(animationOptions, _this588.lItem);
                  }
                } else {
                  _this588.setPosition(_this588.lItem, _this588.uList, _this588.top, _this588.left);

                  _this588.toggleAnimation(_this588.uList);
                }
              }
            }

            if (_this588.keyType === 'right') {
              var cul = _this588.getUlByNavIdx();

              li.classList.remove(FOCUSED);
              var index;

              if (_this588.isMenu && _this588.navIdx.length === 1) {
                _this588.removeLIStateByClass([SELECTED], [_this588.getWrapper()]);
              }

              li.classList.add(SELECTED);

              if (_this588.action === ENTER) {
                var _eventArgs2 = {
                  element: li,
                  item: item,
                  event: e
                };

                _this588.trigger('select', _eventArgs2);
              }

              li.focus();
              cul = _this588.getUlByNavIdx();
              index = _this588.isValidLI(cul.children[0], 0, _this588.action);
              cul.children[index].classList.add(FOCUSED);
              cul.children[index].focus();
            }
          });
        }
      }, {
        key: "checkScrollOffset",
        value: function checkScrollOffset(e) {
          var wrapper = this.getWrapper();

          if (wrapper.children[0].classList.contains('e-menu-hscroll') && this.navIdx.length === 1) {
            var trgt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? this.element : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + ITEM);
            var offsetEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-hscroll-bar', wrapper);
            var offsetLeft;
            var offsetRight;

            if (offsetEle.scrollLeft > trgt.offsetLeft) {
              offsetEle.scrollLeft -= offsetEle.scrollLeft - trgt.offsetLeft;
            }

            offsetLeft = offsetEle.scrollLeft + offsetEle.offsetWidth;
            offsetRight = trgt.offsetLeft + trgt.offsetWidth;

            if (offsetLeft < offsetRight) {
              offsetEle.scrollLeft += offsetRight - offsetLeft;
            }
          }
        }
      }, {
        key: "addScrolling",
        value: function addScrolling(wrapper, ul, scrollType, wrapperOffset, contentOffset) {
          if (this.enableScrolling && wrapperOffset < contentOffset) {
            var scrollEle = this.createElement('div', {
              className: 'e-menu-' + scrollType
            });
            wrapper.appendChild(scrollEle);
            scrollEle.appendChild(ul);
            scrollEle.style.maxHeight = wrapper.style.maxHeight;
            var scrollObj;
            wrapper.style.overflow = 'hidden';

            if (scrollType === 'vscroll') {
              scrollObj = new VScroll({
                enableRtl: this.enableRtl
              }, scrollEle);
              scrollObj.scrollStep = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-' + scrollType + '-bar', wrapper).offsetHeight / 2;
            } else {
              scrollObj = new HScroll({
                enableRtl: this.enableRtl
              }, scrollEle);
              scrollObj.scrollStep = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-' + scrollType + '-bar', wrapper).offsetWidth;
            }
          }
        }
      }, {
        key: "setPosition",
        value: function setPosition(li, ul, top, left) {
          var px = 'px';
          this.toggleVisiblity(ul);

          if (ul === this.element || left > -1 && top > -1) {
            var collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(ul, null, left, top);

            if (collide.indexOf('right') > -1) {
              left = left - ul.offsetWidth;
            }

            if (collide.indexOf('bottom') > -1) {
              var offset = this.callFit(ul, false, true, top, left);
              top = offset.top - 20;
            }

            collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(ul, null, left, top);

            if (collide.indexOf('left') > -1) {
              var _offset = this.callFit(ul, true, false, top, left);

              left = _offset.left;
            }
          } else {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              top = Number(this.element.style.top.replace(px, ''));
              left = Number(this.element.style.left.replace(px, ''));
            } else {
              var x = this.enableRtl ? 'left' : 'right';

              var _offset2 = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(li, x, 'top');

              top = _offset2.top;
              left = _offset2.left;

              var _collide = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["isCollide"])(ul, null, this.enableRtl ? left - ul.offsetWidth : left, top);

              var xCollision = _collide.indexOf('left') > -1 || _collide.indexOf('right') > -1;

              if (xCollision) {
                _offset2 = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(li, this.enableRtl ? 'right' : 'left', 'top');
                left = _offset2.left;
              }

              if (this.enableRtl || xCollision) {
                left = this.enableRtl && xCollision ? left : left - ul.offsetWidth;
              }

              if (_collide.indexOf('bottom') > -1) {
                _offset2 = this.callFit(ul, false, true, top, left);
                top = _offset2.top;
              }
            }
          }

          this.toggleVisiblity(ul, false);
          ul.style.top = top + px;
          ul.style.left = left + px;
        }
      }, {
        key: "toggleVisiblity",
        value: function toggleVisiblity(ul) {
          var isVisible$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          ul.style.visibility = isVisible$$1 ? 'hidden' : '';
          ul.style.display = isVisible$$1 ? 'block' : 'none';
        }
      }, {
        key: "createItems",
        value: function createItems(items) {
          var _this589 = this;

          var level = this.navIdx ? this.navIdx.length : 0;
          var fields = this.getFields(level); // tslint:disable-next-line:no-any

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.template && items.length && items[0].properties) {
            var itemsObj = [];
            items.forEach(function (item, index) {
              itemsObj.push({});
              itemsObj[index][fields.text] = item[fields.text];

              if (!item[fields.id]) {
                item[fields.id] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('menuitem');
              }

              itemsObj[index][fields.id] = item[fields.id];
              itemsObj[index][fields.iconCss] = item[fields.iconCss];
              itemsObj[index][fields.url] = item[fields.url];
              itemsObj[index][fields.child] = item[fields.child];
              itemsObj[index][fields.separator] = item[fields.separator];
            });
            items = itemsObj;
          }

          var showIcon = this.hasField(items, this.getField('iconCss', level));
          var listBaseOptions = {
            showIcon: showIcon,
            moduleName: 'menu',
            fields: fields,
            template: this.template,
            itemNavigable: true,
            itemCreating: function itemCreating(args) {
              if (!args.curData[args.fields[fields.id]]) {
                args.curData[args.fields[fields.id]] = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('menuitem');
              }

              args.curData.htmlAttributes = {
                role: 'menuitem',
                tabindex: '-1'
              };

              if (_this589.isMenu && !args.curData[_this589.getField('separator', level)]) {
                args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text];
              }

              if (args.curData[args.fields[fields.iconCss]] === '') {
                args.curData[args.fields[fields.iconCss]] = null;
              }
            },
            itemCreated: function itemCreated(args) {
              if (args.curData[_this589.getField('separator', level)]) {
                args.item.classList.add(SEPARATOR);
                args.item.removeAttribute('role');
              }

              if (showIcon && !args.curData[args.fields.iconCss] && !args.curData[_this589.getField('separator', level)]) {
                args.item.classList.add('e-blankicon');
              }

              if (args.curData[args.fields.child] && args.curData[args.fields.child].length) {
                var span = _this589.createElement('span', {
                  className: ICONS + ' ' + CARET
                });

                args.item.appendChild(span);
                args.item.setAttribute('aria-haspopup', 'true');
                args.item.setAttribute('aria-expanded', 'false');

                if (!_this589.isMenu) {
                  args.item.removeAttribute('role');
                }

                args.item.classList.add('e-menu-caret-icon');
              }

              if (_this589.isMenu && _this589.template) {
                args.item.setAttribute('id', args.curData[args.fields.id].toString());
                args.item.removeAttribute('data-uid');

                if (args.item.classList.contains('e-level-1')) {
                  args.item.classList.remove('e-level-1');
                }

                if (args.item.classList.contains('e-has-child')) {
                  args.item.classList.remove('e-has-child');
                }
              }

              var eventArgs = {
                item: args.curData,
                element: args.item
              };

              _this589.trigger('beforeItemRender', eventArgs);
            }
          };
          this.setProperties({
            'items': this.items
          }, true);

          if (this.isMenu) {
            listBaseOptions.templateID = this.element.id + TEMPLATE_PROPERTY;
          }

          var ul = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createList(this.createElement, items, listBaseOptions, !this.template);

          ul.setAttribute('tabindex', '0');

          if (this.isMenu) {
            ul.setAttribute('role', 'menu');
          }

          return ul;
        }
      }, {
        key: "moverHandler",
        value: function moverHandler(e) {
          var trgt = e.target;
          this.liTrgt = trgt;
          var cli = this.getLI(trgt);
          var wrapper = cli ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cli, '.e-' + this.getModuleName() + '-wrapper') : this.getWrapper();
          var hdrWrapper = this.getWrapper();
          var regex = new RegExp('-ej2menu-(.*)-popup');
          var ulId;
          var isDifferentElem = false;

          if (!wrapper) {
            return;
          }

          if (wrapper.id !== '') {
            ulId = regex.exec(wrapper.id)[1];
          } else {
            ulId = wrapper.querySelector('ul').id;
          }

          if (ulId !== this.element.id) {
            this.removeLIStateByClass([FOCUSED, SELECTED], [this.getWrapper()]);

            if (this.navIdx.length) {
              isDifferentElem = true;
            } else {
              return;
            }
          }

          if (cli && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cli, '.e-' + this.getModuleName() + '-wrapper') && !isDifferentElem) {
            this.removeLIStateByClass([FOCUSED], this.isMenu ? [wrapper].concat(this.getPopups()) : [wrapper]);
            this.removeLIStateByClass([FOCUSED], this.isMenu ? [hdrWrapper].concat(this.getPopups()) : [hdrWrapper]);
            cli.classList.add(FOCUSED);

            if (!this.showItemOnClick) {
              this.clickHandler(e);
            }
          } else if (this.isMenu && this.showItemOnClick && !isDifferentElem) {
            this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));
          }

          if (this.isMenu) {
            if (!this.showItemOnClick && trgt.parentElement !== wrapper && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.e-' + this.getModuleName() + '-popup') && (!cli || cli && !this.getIndex(cli.id, true).length)) {
              this.removeLIStateByClass([FOCUSED], [wrapper]);

              if (this.navIdx.length) {
                this.isClosed = true;
                this.closeMenu(null, e);
              }
            } else if (isDifferentElem && !this.showItemOnClick) {
              if (this.navIdx.length) {
                this.isClosed = true;
                this.closeMenu(null, e);
              }
            }

            if (!this.isClosed) {
              this.removeStateWrapper();
            }

            this.isClosed = false;
          }
        }
      }, {
        key: "removeStateWrapper",
        value: function removeStateWrapper() {
          if (this.liTrgt) {
            var wrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.liTrgt, '.e-menu-vscroll');

            if (this.liTrgt.tagName === 'DIV' && wrapper) {
              this.removeLIStateByClass([FOCUSED, SELECTED], [wrapper]);
            }
          }
        }
      }, {
        key: "removeLIStateByClass",
        value: function removeLIStateByClass(classList$$1, element) {
          var li;

          var _loop28 = function _loop28(i) {
            classList$$1.forEach(function (className) {
              li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + className, element[i]);

              if (li) {
                li.classList.remove(className);
              }
            });
          };

          for (var i = 0; i < element.length; i++) {
            _loop28(i);
          }
        }
      }, {
        key: "getField",
        value: function getField(propName) {
          var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
          var fieldName = this.fields[propName];
          return typeof fieldName === 'string' ? fieldName : !fieldName[level] ? fieldName[fieldName.length - 1].toString() : fieldName[level].toString();
        }
      }, {
        key: "getFields",
        value: function getFields() {
          var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
          return {
            id: this.getField('itemId', level),
            iconCss: this.getField('iconCss', level),
            text: this.getField('text', level),
            url: this.getField('url', level),
            child: this.getField('children', level),
            separator: this.getField('separator', level)
          };
        }
      }, {
        key: "hasField",
        value: function hasField(items, field) {
          for (var i = 0, _len46 = items.length; i < _len46; i++) {
            if (items[i][field]) {
              return true;
            }
          }

          return false;
        }
      }, {
        key: "menuHeaderClickHandler",
        value: function menuHeaderClickHandler(e) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-menu-wrapper').querySelector('ul.e-menu-parent').id !== this.element.id) {
            return;
          }

          this.element.classList.contains('e-hide-menu') ? this.openHamburgerMenu(e) : this.closeHamburgerMenu(e);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          if (this.isTapHold) {
            this.isTapHold = false;
          } else {
            var wrapper = this.getWrapper();
            var trgt = e.target;
            var cli = this.cli = this.getLI(trgt);
            var regex = new RegExp('-ej2menu-(.*)-popup');
            var cliWrapper = cli ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cli, '.e-' + this.getModuleName() + '-wrapper') : null;
            var isInstLI = cli && cliWrapper && (this.isMenu ? this.getIndex(cli.id, true).length > 0 : wrapper.firstElementChild.id === cliWrapper.firstElementChild.id);

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isMenu) {
              this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));
              this.mouseDownHandler(e);
            }

            if (cli && cliWrapper && this.isMenu) {
              var cliWrapperId = cliWrapper.id ? regex.exec(cliWrapper.id)[1] : cliWrapper.querySelector('.e-menu-parent').id;

              if (this.element.id !== cliWrapperId) {
                return;
              }
            }

            if (isInstLI && e.type === 'click' && !cli.classList.contains(HEADER)) {
              this.setLISelected(cli);
              var navIdx = this.getIndex(cli.id, true);
              var item = this.getItem(navIdx);
              var eventArgs = {
                element: cli,
                item: item,
                event: e
              };
              this.trigger('select', eventArgs);
            }

            if (isInstLI && (e.type === 'mouseover' || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice || this.showItemOnClick)) {
              var ul;

              if (cli.classList.contains(HEADER)) {
                ul = wrapper.children[this.navIdx.length - 1];
                this.toggleAnimation(ul);
                var sli = this.getLIByClass(ul, SELECTED);

                if (sli) {
                  sli.classList.remove(SELECTED);
                }

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(cli.parentNode);
                this.navIdx.pop();
              } else {
                if (!cli.classList.contains(SEPARATOR)) {
                  this.showSubMenu = true;
                  var cul = cli.parentNode;
                  this.cliIdx = this.getIdx(cul, cli);

                  if (this.isMenu || !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                    var culIdx = this.isMenu ? Array.prototype.indexOf.call([wrapper].concat(this.getPopups()), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(cul, '.' + 'e-' + this.getModuleName() + '-wrapper')) : this.getIdx(wrapper, cul);

                    if (this.navIdx[culIdx] === this.cliIdx) {
                      this.showSubMenu = false;
                    }

                    if (culIdx !== this.navIdx.length && (e.type !== 'mouseover' || this.showSubMenu)) {
                      var _sli2 = this.getLIByClass(cul, SELECTED);

                      if (_sli2) {
                        _sli2.classList.remove(SELECTED);
                      }

                      this.isClosed = true;
                      this.keyType = 'click';

                      if (this.showItemOnClick) {
                        this.setLISelected(cli);
                      }

                      this.closeMenu(culIdx + 1, e);

                      if (this.showItemOnClick) {
                        this.setLISelected(cli);
                      }
                    }
                  }

                  if (!this.isClosed) {
                    this.afterCloseMenu(e);
                  }

                  this.isClosed = false;
                }
              }
            } else {
              if (this.isMenu && trgt.tagName === 'DIV' && this.navIdx.length && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.e-menu-vscroll')) {
                var popupEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + POPUP);
                var cIdx = Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1;

                if (cIdx < this.navIdx.length) {
                  this.closeMenu(cIdx + 1, e);
                  this.removeLIStateByClass([FOCUSED, SELECTED], [popupEle]);
                }
              } else if (this.isMenu && this.hamburgerMode && trgt.tagName === 'SPAN' && trgt.classList.contains('e-menu-icon')) {
                this.menuHeaderClickHandler(e);
              } else {
                if (trgt.tagName !== 'UL' || (this.isMenu ? trgt.parentElement.classList.contains('e-menu-wrapper') && !this.getIndex(trgt.querySelector('.' + ITEM).id, true).length : trgt.parentElement !== wrapper)) {
                  if (!cli) {
                    this.removeLIStateByClass([SELECTED], [wrapper]);
                  }

                  if (!cli || !cli.querySelector('.' + CARET)) {
                    this.closeMenu(null, e);
                  }
                }
              }
            }
          }
        }
      }, {
        key: "afterCloseMenu",
        value: function afterCloseMenu(e) {
          var isHeader;

          if (this.showSubMenu) {
            if (this.showItemOnClick && this.navIdx.length === 0) {
              isHeader = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-menu-parent.e-control');
            } else {
              isHeader = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.e-menu-parent.e-control');
            }

            var idx = this.navIdx.concat(this.cliIdx);
            var item = this.getItem(idx);

            if (item && item[this.getField('children', idx.length - 1)] && item[this.getField('children', idx.length - 1)].length) {
              if (e.type === 'mouseover' || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.isMenu) {
                this.setLISelected(this.cli);
              }

              if (!this.hamburgerMode && isHeader || this.hamburgerMode && this.cli.getAttribute('aria-expanded') === 'false') {
                this.cli.setAttribute('aria-expanded', 'true');
                this.navIdx.push(this.cliIdx);
                this.openMenu(this.cli, item, null, null, e);
              }
            } else {
              if (e.type !== 'mouseover') {
                this.closeMenu(null, e);
              }
            }

            if (!isHeader) {
              var cul = this.getUlByNavIdx();
              var sli = this.getLIByClass(cul, SELECTED);

              if (sli) {
                sli.setAttribute('aria-expanded', 'false');
                sli.classList.remove(SELECTED);
              }
            }
          }

          this.keyType = '';
        }
      }, {
        key: "setLISelected",
        value: function setLISelected(li) {
          var sli = this.getLIByClass(li.parentElement, SELECTED);

          if (sli) {
            sli.classList.remove(SELECTED);
          }

          if (!this.isMenu) {
            li.classList.remove(FOCUSED);
          }

          li.classList.add(SELECTED);
        }
      }, {
        key: "getLIByClass",
        value: function getLIByClass(ul, classname) {
          for (var i = 0, _len47 = ul.children.length; i < _len47; i++) {
            if (ul.children[i].classList.contains(classname)) {
              return ul.children[i];
            }
          }

          return null;
        }
        /**
         * This method is used to get the index of the menu item in the Menu based on the argument.
         * @param item - item be passed to get the index | id to be passed to get the item index.
         * @param isUniqueId - Set `true` if it is a unique id.
         * @returns void
         */

      }, {
        key: "getItemIndex",
        value: function getItemIndex(item, isUniqueId) {
          var idx;

          if (typeof item === 'string') {
            idx = item;
          } else {
            idx = item.id;
          }

          var isText = isUniqueId === false ? false : true;
          var navIdx = this.getIndex(idx, isText);
          return navIdx;
        }
        /**
         * This method is used to set the menu item in the Menu based on the argument.
         * @param item - item need to be updated.
         * @param id - id to be passed to update the item.
         * @param isUniqueId - Set `true` if it is a unique id.
         * @returns void
         */

      }, {
        key: "setItem",
        value: function setItem(item, id, isUniqueId) {
          var idx = id ? id : item.id;
          var isText = isUniqueId === false ? false : true;
          var navIdx = this.getIndex(idx, isText);
          var newItem = this.getItem(navIdx);
          newItem.iconCss = item.iconCss;
          newItem.id = item.id;
          newItem.text = item.text;
          newItem.url = item.url;
          newItem.separator = item.separator;
          newItem.items = item.items;
        }
      }, {
        key: "getItem",
        value: function getItem(navIdx) {
          navIdx = navIdx.slice();
          var idx = navIdx.pop();
          var items = this.getItems(navIdx);
          return items[idx];
        }
      }, {
        key: "getItems",
        value: function getItems(navIdx) {
          var items = this.items;

          for (var i = 0; i < navIdx.length; i++) {
            items = items[navIdx[i]][this.getField('children', i)];
          }

          return items;
        }
      }, {
        key: "setItems",
        value: function setItems(newItems, navIdx) {
          var items = this.getItems(navIdx);
          items.splice(0, items.length);

          for (var i = 0; i < newItems.length; i++) {
            items.splice(i, 0, newItems[i]);
          }
        }
      }, {
        key: "getIdx",
        value: function getIdx(ul, li) {
          var skipHdr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
          var idx = Array.prototype.indexOf.call(ul.querySelectorAll('li'), li);

          if (this.isMenu && this.template && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            idx = Array.prototype.indexOf.call(ul.querySelectorAll(li.tagName), li);
          } else {
            idx = Array.prototype.indexOf.call(ul.children, li);
          }

          if (skipHdr && ul.children[0].classList.contains(HEADER)) {
            idx--;
          }

          return idx;
        }
      }, {
        key: "getLI",
        value: function getLI(elem) {
          if (elem.tagName === 'LI' && elem.classList.contains('e-menu-item')) {
            return elem;
          }

          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(elem, 'li.e-menu-item');
        }
      }, {
        key: "updateItemsByNavIdx",
        value: function updateItemsByNavIdx() {
          var items = this.items;
          var count = 0;

          for (var index = 0; index < this.navIdx.length; index++) {
            items = items[index].items;

            if (!items) {
              break;
            }

            count++;
            var ul = this.getUlByNavIdx(count);

            if (!ul) {
              break;
            }

            this.updateItem(ul, items);
          }
        }
      }, {
        key: "removeChildElement",
        value: function removeChildElement(elem) {
          while (elem.firstElementChild) {
            elem.removeChild(elem.firstElementChild);
          }

          return elem;
        }
        /**
         * Called internally if any of the property value changed
         * @private
         * @param {MenuBaseModel} newProp
         * @param {MenuBaseModel} oldProp
         * @returns void
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var _this590 = this;

          var wrapper = this.getWrapper();

          for (var _i133 = 0, _Object$keys52 = Object.keys(newProp); _i133 < _Object$keys52.length; _i133++) {
            var prop = _Object$keys52[_i133];

            switch (prop) {
              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([wrapper], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], newProp.cssClass.split(' '));
                }

                break;

              case 'enableRtl':
                wrapper.classList.toggle(RTL);
                break;

              case 'showItemOnClick':
                this.unWireEvents();
                this.showItemOnClick = newProp.showItemOnClick;
                this.wireEvents();
                break;

              case 'enableScrolling':
                if (newProp.enableScrolling) {
                  (function () {
                    var ul = void 0;
                    _this590.element.classList.contains('e-vertical') ? _this590.addScrolling(wrapper, _this590.element, 'vscroll', wrapper.offsetHeight, _this590.element.offsetHeight) : _this590.addScrolling(wrapper, _this590.element, 'hscroll', wrapper.offsetWidth, _this590.element.offsetWidth);

                    _this590.getPopups().forEach(function (wrapper) {
                      ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-ul', wrapper);

                      _this590.addScrolling(wrapper, ul, 'vscroll', wrapper.offsetHeight, ul.offsetHeight);
                    });
                  })();
                } else {
                  (function () {
                    var ul = wrapper.children[0];
                    _this590.element.classList.contains('e-vertical') ? _this590.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul, VScroll), ul) : _this590.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul, HScroll), ul);
                    wrapper.style.overflow = '';
                    wrapper.appendChild(_this590.element);

                    _this590.getPopups().forEach(function (wrapper) {
                      ul = wrapper.children[0];

                      _this590.destroyScrollObj(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(ul, VScroll), ul);

                      wrapper.style.overflow = '';
                    });
                  })();
                }

                break;

              case 'items':
                var idx = void 0;
                var navIdx = void 0;
                var item = void 0;

                if (!Object.keys(oldProp.items).length) {
                  this.updateItem(this.element, this.items);

                  for (var i = 1, count = wrapper.childElementCount; i < count; i++) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper.lastElementChild);
                  }

                  if (this.isMenu && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    this.updateItemsByNavIdx();
                  } else {
                    this.navIdx = [];
                  }
                } else {
                  var keys = Object.keys(newProp.items);

                  for (var _i134 = 0; _i134 < keys.length; _i134++) {
                    navIdx = this.getChangedItemIndex(newProp, [], Number(keys[_i134]));

                    if (navIdx.length <= this.getWrapper().children.length) {
                      idx = navIdx.pop();
                      item = this.getItems(navIdx);
                      this.insertAfter([item[idx]], item[idx].text);
                      this.removeItem(item, navIdx, idx);
                      this.setItems(item, navIdx);
                    }

                    navIdx.length = 0;
                  }
                }

                break;
            }
          }
        }
      }, {
        key: "updateItem",
        value: function updateItem(ul, items) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            ul = this.removeChildElement(ul);
          } else {
            ul.innerHTML = '';
          }

          var lis = [].slice.call(this.createItems(items).children);
          lis.forEach(function (li) {
            ul.appendChild(li);
          });
        }
      }, {
        key: "getChangedItemIndex",
        value: function getChangedItemIndex(newProp, index, idx) {
          index.push(idx);
          var key = Object.keys(newProp.items[idx]).pop();

          if (key === 'items') {
            var item = newProp.items[idx];
            var popStr = Object.keys(item.items).pop();

            if (popStr) {
              this.getChangedItemIndex(item, index, Number(popStr));
            }
          } else {
            if (key === 'isParentArray' && index.length > 1) {
              index.pop();
            }
          }

          return index;
        }
      }, {
        key: "removeItem",
        value: function removeItem(item, navIdx, idx) {
          item.splice(idx, 1);
          var uls = this.getWrapper().children;

          if (navIdx.length < uls.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(uls[navIdx.length].children[idx]);
          }
        }
        /**
         * Used to unwire the bind events.
         * @private
         */

      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          var targetSelctor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.target;
          var wrapper = this.getWrapper();

          if (targetSelctor) {
            var target;
            var touchModule;
            var targetElems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(targetSelctor);

            for (var i = 0, _len48 = targetElems.length; i < _len48; i++) {
              target = targetElems[i];

              if (this.isMenu) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'click', this.menuHeaderClickHandler);
              } else {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIos) {
                  touchModule = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(target, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"]);

                  if (touchModule) {
                    touchModule.destroy();
                  }
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'contextmenu', this.cmenuHandler);
                }
              }
            }

            if (!this.isMenu) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.targetElement, 'scroll', this.scrollHandler);

              var _iterator139 = _createForOfIteratorHelper(Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getScrollableParent"])(this.targetElement)),
                  _step139;

              try {
                for (_iterator139.s(); !(_step139 = _iterator139.n()).done;) {
                  var parent = _step139.value;

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(parent, 'scroll', this.scrollHandler);
                }
              } catch (err) {
                _iterator139.e(err);
              } finally {
                _iterator139.f();
              }
            }
          }

          if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown', this.delegateMouseDownHandler);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.delegateClickHandler);

          this.unWireKeyboardEvent(wrapper);
          this.rippleFn();
        }
      }, {
        key: "unWireKeyboardEvent",
        value: function unWireKeyboardEvent(element) {
          var keyboardModule = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"]);

          if (keyboardModule) {
            keyboardModule.destroy();
          }
        }
      }, {
        key: "toggleAnimation",
        value: function toggleAnimation(ul) {
          var _this591 = this;

          var isMenuOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var pUlHeight;
          var pElement;

          if (this.animationSettings.effect === 'None' || !isMenuOpen) {
            this.end(ul, isMenuOpen);
          } else {
            this.animation.animate(ul, {
              name: this.animationSettings.effect,
              duration: this.animationSettings.duration,
              timingFunction: this.animationSettings.easing,
              begin: function begin(options) {
                if (_this591.hamburgerMode) {
                  pElement = options.element.parentElement;
                  options.element.style.position = 'absolute';
                  pUlHeight = pElement.offsetHeight;
                  options.element.style.maxHeight = options.element.offsetHeight + 'px';
                  pElement.style.maxHeight = '';
                } else {
                  options.element.style.display = 'block';
                  options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';
                }
              },
              progress: function progress(options) {
                if (_this591.hamburgerMode) {
                  pElement.style.minHeight = pUlHeight + options.element.offsetHeight + 'px';
                }
              },
              end: function end(options) {
                if (_this591.hamburgerMode) {
                  options.element.style.position = '';
                  options.element.style.maxHeight = '';
                  pElement.style.minHeight = '';
                  options.element.style.top = 0 + 'px';
                  options.element.children[0].focus();

                  _this591.triggerOpen(options.element.children[0]);
                } else {
                  _this591.end(options.element, isMenuOpen);
                }
              }
            });
          }
        }
      }, {
        key: "triggerOpen",
        value: function triggerOpen(ul) {
          var item = this.navIdx.length ? this.getItem(this.navIdx) : null;
          var eventArgs = {
            element: ul,
            parentItem: item,
            items: item ? item.items : this.items
          };
          this.trigger('onOpen', eventArgs);
        }
      }, {
        key: "end",
        value: function end(ul, isMenuOpen) {
          if (isMenuOpen) {
            ul.style.display = 'block';
            ul.style.maxHeight = '';
            this.triggerOpen(ul);

            if (ul.querySelector('.' + FOCUSED)) {
              ul.querySelector('.' + FOCUSED).focus();
            } else {
              var ele;
              ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];

              if (ele) {
                ele.querySelector('.' + SELECTED).focus();
              } else {
                this.element.focus();
              }
            }
          } else {
            if (ul === this.element) {
              var fli = this.getLIByClass(this.element, FOCUSED);

              if (fli) {
                fli.classList.remove(FOCUSED);
              }

              var sli = this.getLIByClass(this.element, SELECTED);

              if (sli) {
                sli.classList.remove(SELECTED);
              }

              ul.style.display = 'none';
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ul);
            }
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @returns string
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return '';
        }
        /**
         * Get wrapper element.
         * @returns Element
         * @private
         */

      }, {
        key: "getWrapper",
        value: function getWrapper() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.e-' + this.getModuleName() + '-wrapper');
        }
      }, {
        key: "getIndex",
        value: function getIndex(data, isUniqueId) {
          var items = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.items;
          var nIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
          var isCallBack = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
          var level = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
          var item;
          level = isCallBack ? level + 1 : 0;

          for (var i = 0, _len49 = items.length; i < _len49; i++) {
            item = items[i];

            if ((isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)]) === data) {
              nIndex.push(i);
              break;
            } else if (item[this.getField('children', level)] && item[this.getField('children', level)].length) {
              nIndex = this.getIndex(data, isUniqueId, item[this.getField('children', level)], nIndex, true, level);

              if (nIndex[nIndex.length - 1] === -1) {
                if (i !== _len49 - 1) {
                  nIndex.pop();
                }
              } else {
                nIndex.unshift(i);
                break;
              }
            } else {
              if (i === _len49 - 1) {
                nIndex.push(-1);
              }
            }
          }

          return !isCallBack && nIndex[0] === -1 ? [] : nIndex;
        }
        /**
         * This method is used to enable or disable the menu items in the Menu based on the items and enable argument.
         * @param items Text items that needs to be enabled/disabled.
         * @param enable Set `true`/`false` to enable/disable the list items.
         * @param isUniqueId - Set `true` if it is a unique id.
         * @returns void
         */

      }, {
        key: "enableItems",
        value: function enableItems(items) {
          var enable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
          var isUniqueId = arguments.length > 2 ? arguments[2] : undefined;
          var ul;
          var idx;
          var navIdx;
          var disabled = DISABLED;
          var skipItem;

          for (var i = 0; i < items.length; i++) {
            navIdx = this.getIndex(items[i], isUniqueId);

            if (this.navIdx.length) {
              if (navIdx.length !== 1) {
                skipItem = false;

                for (var _i135 = 0, _len50 = navIdx.length - 1; _i135 < _len50; _i135++) {
                  if (navIdx[_i135] !== this.navIdx[_i135]) {
                    skipItem = true;
                    break;
                  }
                }

                if (skipItem) {
                  continue;
                }
              }
            } else {
              if (navIdx.length !== 1) {
                continue;
              }
            }

            idx = navIdx.pop();
            ul = this.getUlByNavIdx(navIdx.length);

            if (ul) {
              if (enable) {
                if (this.isMenu) {
                  ul.children[idx].classList.remove(disabled);
                  ul.children[idx].removeAttribute('aria-disabled');
                } else {
                  if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !ul.classList.contains('e-contextmenu')) {
                    ul.children[idx + 1].classList.remove(disabled);
                  } else {
                    ul.children[idx].classList.remove(disabled);
                  }
                }
              } else {
                if (this.isMenu) {
                  ul.children[idx].classList.add(disabled);
                  ul.children[idx].setAttribute('aria-disabled', 'true');
                } else {
                  if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !ul.classList.contains('e-contextmenu')) {
                    ul.children[idx + 1].classList.add(disabled);
                  } else {
                    ul.children[idx].classList.add(disabled);
                  }
                }
              }
            }
          }
        }
        /**
         * This method is used to show the menu items in the Menu based on the items text.
         * @param items Text items that needs to be shown.
         * @param isUniqueId - Set `true` if it is a unique id.
         * @returns void
         */

      }, {
        key: "showItems",
        value: function showItems(items, isUniqueId) {
          this.showHideItems(items, false, isUniqueId);
        }
        /**
         * This method is used to hide the menu items in the Menu based on the items text.
         * @param items Text items that needs to be hidden.
         * @returns void
         */

      }, {
        key: "hideItems",
        value: function hideItems(items, isUniqueId) {
          this.showHideItems(items, true, isUniqueId);
        }
      }, {
        key: "showHideItems",
        value: function showHideItems(items, ishide, isUniqueId) {
          var ul;
          var index;
          var navIdx;

          for (var i = 0; i < items.length; i++) {
            navIdx = this.getIndex(items[i], isUniqueId);
            index = navIdx.pop();
            ul = this.getUlByNavIdx(navIdx.length);

            if (ul) {
              if (ishide) {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !ul.classList.contains('e-contextmenu')) {
                  ul.children[index + 1].classList.add(HIDE);
                } else {
                  ul.children[index].classList.add(HIDE);
                }
              } else {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !ul.classList.contains('e-contextmenu')) {
                  ul.children[index + 1].classList.remove(HIDE);
                } else {
                  ul.children[index].classList.remove(HIDE);
                }
              }
            }
          }
        }
        /**
         * It is used to remove the menu items from the Menu based on the items text.
         * @param items Text items that needs to be removed.
         * @returns void
         */

      }, {
        key: "removeItems",
        value: function removeItems(items, isUniqueId) {
          var idx;
          var navIdx;
          var iitems;

          for (var i = 0; i < items.length; i++) {
            navIdx = this.getIndex(items[i], isUniqueId);
            idx = navIdx.pop();
            iitems = this.getItems(navIdx);
            this.removeItem(iitems, navIdx, idx);
          }
        }
        /**
         * It is used to insert the menu items after the specified menu item text.
         * @param items Items that needs to be inserted.
         * @param text Text item after that the element to be inserted.
         * @returns void
         */

      }, {
        key: "insertAfter",
        value: function insertAfter(items, text, isUniqueId) {
          this.insertItems(items, text, isUniqueId);
        }
        /**
         * It is used to insert the menu items before the specified menu item text.
         * @param items Items that needs to be inserted.
         * @param text Text item before that the element to be inserted.
         * @param isUniqueId - Set `true` if it is a unique id.
         * @returns void
         */

      }, {
        key: "insertBefore",
        value: function insertBefore(items, text, isUniqueId) {
          this.insertItems(items, text, isUniqueId, false);
        }
      }, {
        key: "insertItems",
        value: function insertItems(items, text, isUniqueId) {
          var isAfter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
          var li;
          var idx;
          var navIdx;
          var iitems;
          var menuitem;
          var showIcon;

          for (var i = 0; i < items.length; i++) {
            navIdx = this.getIndex(text, isUniqueId);
            idx = navIdx.pop();
            iitems = this.getItems(navIdx);
            menuitem = new MenuItem(iitems[0], 'items', items[i], true);
            iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
            var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);

            if (navIdx.length < uls.length) {
              idx = isAfter ? idx + 1 : idx;
              showIcon = this.hasField(iitems, this.getField('iconCss', navIdx.length - 1));
              li = this.createItems(iitems).children[idx];
              var ul = this.isMenu ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-menu-parent', uls[navIdx.length]) : uls[navIdx.length];
              ul.insertBefore(li, ul.children[idx]);
            }
          }
        }
      }, {
        key: "removeAttributes",
        value: function removeAttributes() {
          var _this592 = this;

          ['top', 'left', 'display', 'z-index'].forEach(function (key) {
            _this592.element.style.removeProperty(key);
          });
          ['role', 'tabindex', 'class', 'style'].forEach(function (key) {
            if (key === 'class' && _this592.element.classList.contains('e-menu-parent')) {
              _this592.element.classList.remove('e-menu-parent');
            }

            if (['class', 'style'].indexOf(key) === -1 || !_this592.element.getAttribute(key)) {
              _this592.element.removeAttribute(key);
            }

            if (_this592.isMenu && key === 'class' && _this592.element.classList.contains('e-vertical')) {
              _this592.element.classList.remove('e-vertical');
            }
          });
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var wrapper = this.getWrapper();

          if (wrapper) {
            this.unWireEvents();

            if (!this.isMenu) {
              this.clonedElement.style.display = '';

              if (this.clonedElement.tagName === 'EJS-CONTEXTMENU') {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.clonedElement], ['e-control', 'e-lib', 'e-' + this.getModuleName()]);
                this.element = this.clonedElement;
              } else {
                if (this.refreshing && this.clonedElement.childElementCount && this.clonedElement.children[0].tagName === 'LI') {
                  this.setProperties({
                    'items': []
                  }, true);
                }

                if (document.getElementById(this.clonedElement.id)) {
                  var refEle = this.clonedElement.nextElementSibling;
                  refEle && refEle !== wrapper ? this.clonedElement.parentElement.insertBefore(this.element, refEle) : this.clonedElement.parentElement.appendChild(this.element);

                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    this.element = this.removeChildElement(this.element);
                  } else {
                    this.element.innerHTML = '';
                  }

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([].slice.call(this.clonedElement.children), this.element);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.clonedElement);
                  this.removeAttributes();
                }
              }

              this.clonedElement = null;
            } else {
              this.closeMenu();

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                this.element = this.removeChildElement(this.element);
              } else {
                this.element.innerHTML = '';
              }

              this.removeAttributes();
              wrapper.parentNode.insertBefore(this.element, wrapper);
            }

            if (this.isMenu && this.clonedElement) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element);
              wrapper.style.display = '';
              wrapper.classList.remove('e-' + this.getModuleName() + '-wrapper');
              wrapper.removeAttribute('data-ripple');
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(wrapper);
            }

            _get(_getPrototypeOf(MenuBase.prototype), "destroy", this).call(this);
          }
        }
      }]);

      return MenuBase;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "beforeItemRender", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "beforeOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "onOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "beforeClose", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "onClose", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "select", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], MenuBase.prototype, "created", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuBase.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MenuBase.prototype, "showItemOnClick", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuBase.prototype, "target", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], MenuBase.prototype, "filter", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], MenuBase.prototype, "template", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MenuBase.prototype, "enableScrolling", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], MenuBase.prototype, "enableHtmlSanitizer", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      itemId: "id",
      text: "text",
      parentId: "parentId",
      iconCss: "iconCss",
      url: "url",
      separator: "separator",
      children: "items"
    }, FieldSettings)], MenuBase.prototype, "fields", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MenuItem)], MenuBase.prototype, "items", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      duration: 400,
      easing: 'ease',
      effect: 'SlideDown'
    }, MenuAnimationSettings)], MenuBase.prototype, "animationSettings", void 0);

    MenuBase = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], MenuBase);
    /**
     * Navigation Common modules
     */

    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };

    var CLS_VERTICAL = 'e-vertical';
    var CLS_ITEMS = 'e-toolbar-items';
    var BZ_ITEMS = 'e-blazor-toolbar-items';
    var CLS_ITEM = 'e-toolbar-item';
    var CLS_RTL$2 = 'e-rtl';
    var CLS_SEPARATOR = 'e-separator';
    var CLS_POPUPICON = 'e-popup-up-icon';
    var CLS_POPUPDOWN = 'e-popup-down-icon';
    var CLS_POPUPOPEN = 'e-popup-open';
    var CLS_TEMPLATE = 'e-template';
    var CLS_DISABLE$2 = 'e-overlay';
    var CLS_POPUPTEXT = 'e-toolbar-text';
    var CLS_TBARTEXT = 'e-popup-text';
    var CLS_TBAROVERFLOW = 'e-overflow-show';
    var CLS_POPOVERFLOW = 'e-overflow-hide';
    var CLS_TBARBTN = 'e-tbar-btn';
    var CLS_TBARNAV = 'e-hor-nav';
    var CLS_TBARSCRLNAV = 'e-scroll-nav';
    var CLS_TBARRIGHT = 'e-toolbar-right';
    var CLS_TBARLEFT = 'e-toolbar-left';
    var CLS_TBARCENTER = 'e-toolbar-center';
    var CLS_TBARPOS = 'e-tbar-pos';
    var CLS_HSCROLLCNT = 'e-hscroll-content';
    var CLS_VSCROLLCNT = 'e-vscroll-content';
    var CLS_HSCROLLBAR$1 = 'e-hscroll-bar';
    var CLS_POPUPNAV = 'e-hor-nav';
    var CLS_POPUPCLASS = 'e-toolbar-pop';
    var CLS_POPUP = 'e-toolbar-popup';
    var CLS_TBARBTNTEXT = 'e-tbar-btn-text';
    var CLS_TBARNAVACT = 'e-nav-active';
    var CLS_TBARIGNORE = 'e-ignore';
    var CLS_POPPRI = 'e-popup-alone';
    var CLS_HIDDEN = 'e-hidden';
    var CLS_MULTIROW = 'e-toolbar-multirow';
    var CLS_MULTIROWPOS = 'e-multirow-pos';
    var CLS_MULTIROW_SEPARATOR = 'e-multirow-separator';
    var CLS_EXTENDABLE_SEPARATOR = 'e-extended-separator';
    var CLS_EXTEANDABLE_TOOLBAR = 'e-extended-toolbar';
    var CLS_EXTENDABLECLASS = 'e-toolbar-extended';
    var CLS_EXTENDPOPUP = 'e-expended-nav';
    var CLS_EXTENDEDPOPOPEN = 'e-tbar-extended';
    /**
     * An item object that is used to configure Toolbar commands.
     */

    var Item = /*#__PURE__*/function (_syncfusion_ej2_base_36) {
      _inherits(Item, _syncfusion_ej2_base_36);

      var _super219 = _createSuper(Item);

      function Item() {
        _classCallCheck(this, Item);

        return _super219.apply(this, arguments);
      }

      return Item;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "id", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "text", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Item.prototype, "width", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "cssClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Item.prototype, "showAlwaysInPopup", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Item.prototype, "disabled", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "prefixIcon", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "suffixIcon", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Item.prototype, "visible", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], Item.prototype, "overflow", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "template", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Button')], Item.prototype, "type", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Both')], Item.prototype, "showTextOn", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Item.prototype, "htmlAttributes", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "tooltipText", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], Item.prototype, "align", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Item.prototype, "click", void 0);
    /**
     * The Toolbar control contains a group of commands that are aligned horizontally.
     * ```html
     * <div id="toolbar"/>
     * <script>
     *   var toolbarObj = new Toolbar();
     *   toolbarObj.appendTo("#toolbar");
     * </script>
     * ```
     */


    var Toolbar = /*#__PURE__*/function (_syncfusion_ej2_base_37) {
      _inherits(Toolbar, _syncfusion_ej2_base_37);

      var _super220 = _createSuper(Toolbar);

      /**
       * Initializes a new instance of the Toolbar class.
       * @param options  - Specifies Toolbar model properties as options.
       * @param element  - Specifies the element that is rendered as a Toolbar.
       */
      function Toolbar(options, element) {
        var _this593;

        _classCallCheck(this, Toolbar);

        _this593 = _super220.call(this, options, element);
        _this593.resizeContext = _this593.resize.bind(_assertThisInitialized(_this593));
        /**
         * Contains the keyboard configuration of the Toolbar.
         */

        _this593.keyConfigs = {
          moveLeft: 'leftarrow',
          moveRight: 'rightarrow',
          moveUp: 'uparrow',
          moveDown: 'downarrow',
          popupOpen: 'enter',
          popupClose: 'escape',
          tab: 'tab',
          home: 'home',
          end: 'end'
        };
        return _this593;
      }
      /**
       * Removes the control from the DOM and also removes all its related events.
       * @returns void.
       */


      _createClass2(Toolbar, [{
        key: "destroy",
        value: function destroy() {
          var _this594 = this;

          _get(_getPrototypeOf(Toolbar.prototype), "destroy", this).call(this);

          this.unwireEvents();
          this.tempId.forEach(function (ele) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this594.element.querySelector(ele))) {
              document.body.appendChild(_this594.element.querySelector(ele)).style.display = 'none';
            }
          });

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
            this.resetServerItems();
          } else {
            var subControls = this.element.querySelectorAll('.e-control');
            [].slice.call(subControls).forEach(function (node) {
              var instances = node.ej2_instances;

              if (instances) {
                var instance = instances[0];

                if (instance) {
                  instance.destroy();
                }
              }
            });
          }

          while (this.element.lastElementChild && !this.element.lastElementChild.classList.contains(BZ_ITEMS)) {
            this.element.removeChild(this.element.lastElementChild);
          }

          if (this.trgtEle) {
            this.element.appendChild(this.ctrlTem);
          }

          this.clearProperty();
          this.popObj = null;
          this.tbarAlign = null;
          this.remove(this.element, 'e-toolpop');

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], this.cssClass.split(' '));
          }

          this.element.removeAttribute('style');
          ['aria-disabled', 'aria-orientation', 'aria-haspopup', 'role'].forEach(function (attrb) {
            return _this594.element.removeAttribute(attrb);
          });
        }
        /**
         * Initialize the event handler
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          var eventArgs = {
            enableCollision: this.enableCollision,
            scrollStep: this.scrollStep
          };
          this.trigger('beforeCreate', eventArgs);
          this.enableCollision = eventArgs.enableCollision;
          this.scrollStep = eventArgs.scrollStep;
          this.scrollModule = null;
          this.popObj = null;
          this.tempId = [];
          this.tbarItemsCol = this.items;
          this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
          this.isExtendedOpen = false;
          this.popupPriCount = 0;

          if (this.enableRtl) {
            this.add(this.element, CLS_RTL$2);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

          window.addEventListener('resize', this.resizeContext);

          if (this.allowKeyboard) {
            this.wireKeyboardEvent();
          }
        }
      }, {
        key: "wireKeyboardEvent",
        value: function wireKeyboardEvent() {
          this.keyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigs
          });

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.docKeyDown, this);

          this.element.setAttribute('tabIndex', '0');
        }
      }, {
        key: "unwireKeyboardEvent",
        value: function unwireKeyboardEvent() {
          if (this.keyModule) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.docKeyDown);

            this.keyModule.destroy();
            this.keyModule = null;
          }
        }
      }, {
        key: "docKeyDown",
        value: function docKeyDown(e) {
          if (e.target.tagName === 'INPUT') {
            return;
          }

          var popCheck = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popObj) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element) && this.overflowMode !== 'Extended';

          if (e.keyCode === 9 && e.target.classList.contains('e-hor-nav') === true && popCheck) {
            this.popObj.hide({
              name: 'FadeOut',
              duration: 100
            });
          }

          var keyCheck = e.keyCode === 40 || e.keyCode === 38 || e.keyCode === 35 || e.keyCode === 36;

          if (keyCheck) {
            e.preventDefault();
          }
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

          this.destroyScroll();
          this.unwireKeyboardEvent();
          window.removeEventListener('resize', this.resizeContext);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'scroll', this.docEvent);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'click', this.docEvent);
        }
      }, {
        key: "clearProperty",
        value: function clearProperty() {
          this.tbarEle = [];
          this.tbarAlgEle = {
            lefts: [],
            centers: [],
            rights: []
          };
        }
      }, {
        key: "docEvent",
        value: function docEvent(e) {
          var popEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-popup');

          if (this.popObj && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element) && !popEle && this.overflowMode === 'Popup') {
            this.popObj.hide({
              name: 'FadeOut',
              duration: 100
            });
          }
        }
      }, {
        key: "destroyScroll",
        value: function destroyScroll() {
          if (this.scrollModule) {
            if (this.tbarAlign) {
              this.add(this.scrollModule.element, CLS_TBARPOS);
            }

            this.scrollModule.destroy();
            this.scrollModule = null;
          }
        }
      }, {
        key: "destroyItems",
        value: function destroyItems() {
          [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(el);
          });
          var tbarItems = this.element.querySelector('.' + CLS_ITEMS);

          if (this.tbarAlign) {
            [].slice.call(tbarItems.children).forEach(function (el) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(el);
            });
            this.tbarAlign = false;
            this.remove(tbarItems, CLS_TBARPOS);
          }

          this.clearProperty();
        }
      }, {
        key: "destroyMode",
        value: function destroyMode() {
          if (this.scrollModule) {
            this.remove(this.scrollModule.element, CLS_RTL$2);
            this.destroyScroll();
          }

          this.remove(this.element, CLS_EXTENDEDPOPOPEN);
          this.remove(this.element, CLS_EXTEANDABLE_TOOLBAR);
          var tempEle = this.element.querySelector('.e-toolbar-multirow');

          if (tempEle) {
            this.remove(tempEle, CLS_MULTIROW);
          }

          if (this.popObj) {
            this.popupRefresh(this.popObj.element, true);
          }
        }
      }, {
        key: "add",
        value: function add(ele, val) {
          ele.classList.add(val);
        }
      }, {
        key: "remove",
        value: function remove(ele, val) {
          ele.classList.remove(val);
        }
      }, {
        key: "elementFocus",
        value: function elementFocus(ele) {
          var fChild = ele.firstElementChild;

          if (fChild) {
            fChild.focus();
            this.activeEleSwitch(ele);
          } else {
            ele.focus();
          }
        }
      }, {
        key: "clstElement",
        value: function clstElement(tbrNavChk, trgt) {
          var clst;

          if (tbrNavChk && this.popObj && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element)) {
            clst = this.popObj.element.querySelector('.' + CLS_ITEM);
          } else if (this.element === trgt || tbrNavChk) {
            // tslint:disable-next-line:max-line-length
            clst = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE$2 + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');
          } else {
            clst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM);
          }

          return clst;
        }
      }, {
        key: "keyHandling",
        value: function keyHandling(clst, e, trgt, navChk, scrollChk) {
          var popObj = this.popObj;
          var rootEle = this.element;
          var popAnimate = {
            name: 'FadeOut',
            duration: 100
          };

          switch (e.action) {
            case 'moveRight':
              if (this.isVertical) {
                return;
              }

              if (rootEle === trgt) {
                this.elementFocus(clst);
              } else if (!navChk) {
                this.eleFocus(clst, 'next');
              }

              break;

            case 'moveLeft':
              if (this.isVertical) {
                return;
              }

              if (!navChk) {
                this.eleFocus(clst, 'previous');
              }

              break;

            case 'home':
            case 'end':
              var ele;
              var nodes;

              if (clst) {
                var popupCheck = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(clst, '.e-popup');

                if (popupCheck) {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element)) {
                    nodes = [].slice.call(popupCheck.children);

                    if (e.action === 'home') {
                      ele = nodes[0];
                    } else {
                      ele = nodes[nodes.length - 1];
                    }
                  }
                } else {
                  nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM);

                  if (e.action === 'home') {
                    ele = nodes[0];
                  } else {
                    ele = nodes[nodes.length - 1];
                  }
                }

                if (ele) {
                  this.elementFocus(ele);
                }
              }

              break;

            case 'moveUp':
            case 'moveDown':
              var value = e.action === 'moveUp' ? 'previous' : 'next';

              if (!this.isVertical) {
                if (popObj && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.e-popup')) {
                  var popEle = popObj.element;
                  var popFrstEle = popEle.firstElementChild;

                  if (value === 'previous' && popFrstEle === clst || value === 'next' && popEle.lastElementChild === clst) {
                    return;
                  } else {
                    this.eleFocus(clst, value);
                  }
                } else if (e.action === 'moveDown' && popObj && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(popObj.element)) {
                  this.elementFocus(clst);
                }
              } else {
                if (e.action === 'moveUp') {
                  this.eleFocus(clst, 'previous');
                } else {
                  this.eleFocus(clst, 'next');
                }
              }

              break;

            case 'tab':
              if (!scrollChk && !navChk) {
                var _ele4 = clst.firstElementChild;

                if (rootEle === trgt) {
                  if (this.activeEle) {
                    this.activeEle.focus();
                  } else {
                    this.activeEleRemove(_ele4);

                    _ele4.focus();
                  }

                  this.element.removeAttribute('tabindex');
                }
              }

              break;

            case 'popupClose':
              if (popObj && this.overflowMode !== 'Extended') {
                popObj.hide(popAnimate);
              }

              break;

            case 'popupOpen':
              if (!navChk) {
                return;
              }

              if (popObj && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(popObj.element)) {
                popObj.element.style.top = rootEle.offsetHeight + 'px';
                popObj.show({
                  name: 'FadeIn',
                  duration: 100
                });
              } else {
                popObj.hide(popAnimate);
              }

              break;
          }
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          var trgt = e.target;

          if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE$2)) {
            return;
          }

          e.preventDefault();
          var clst;
          var tbrNavChk = trgt.classList.contains(CLS_TBARNAV);
          var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);
          clst = this.clstElement(tbrNavChk, trgt);

          if (clst || tbarScrollChk) {
            this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
          }
        }
        /**
         * Specifies the value to disable/enable the Toolbar component.
         * When set to `true`, the component will be disabled.
         * @param  {boolean} value - Based on this Boolean value, Toolbar will be enabled (false) or disabled (true).
         * @returns void.
         */

      }, {
        key: "disable",
        value: function disable(value) {
          var rootEle = this.element;
          value ? rootEle.classList.add(CLS_DISABLE$2) : rootEle.classList.remove(CLS_DISABLE$2);
          rootEle.setAttribute('tabindex', !value ? '0' : '-1');

          if (this.activeEle) {
            this.activeEle.setAttribute('tabindex', !value ? '0' : '-1');
          }

          if (this.scrollModule) {
            this.scrollModule.disable(value);
          }

          if (this.popObj) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element) && this.overflowMode !== 'Extended') {
              this.popObj.hide();
            }

            rootEle.querySelector('#' + rootEle.id + '_nav').setAttribute('tabindex', !value ? '0' : '-1');
          }
        }
      }, {
        key: "eleContains",
        value: function eleContains(el) {
          // tslint:disable-next-line:max-line-length
          return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE$2) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(el); // tslint:enable-next-line:max-line-length
        }
      }, {
        key: "eleFocus",
        value: function eleFocus(closest$$1, pos) {
          var sib = Object(closest$$1)[pos + 'ElementSibling'];

          if (sib) {
            var skipEle = this.eleContains(sib);

            if (skipEle) {
              this.eleFocus(sib, pos);
              return;
            }

            this.elementFocus(sib);
          } else if (this.tbarAlign) {
            var elem = Object(closest$$1.parentElement)[pos + 'ElementSibling'];

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(elem) && elem.children.length === 0) {
              elem = Object(elem)[pos + 'ElementSibling'];
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(elem) && elem.children.length > 0) {
              if (pos === 'next') {
                var el = elem.querySelector('.' + CLS_ITEM);

                if (this.eleContains(el)) {
                  this.eleFocus(el, pos);
                } else {
                  el.firstElementChild.focus();
                  this.activeEleSwitch(el);
                }
              } else {
                var _el = elem.lastElementChild;

                if (this.eleContains(_el)) {
                  this.eleFocus(_el, pos);
                } else {
                  this.elementFocus(_el);
                }
              }
            }
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var _this595 = this;

          var trgt = e.target;
          var clsList = trgt.classList;
          var ele = this.element;
          var isPopupElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_POPUPCLASS));
          var popupNav = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_TBARNAV);

          if (!popupNav) {
            popupNav = trgt;
          }

          if (!ele.children[0].classList.contains('e-hscroll') && !ele.children[0].classList.contains('e-vscroll') && clsList.contains(CLS_TBARNAV)) {
            clsList = trgt.querySelector('.e-icons').classList;
          }

          if (clsList.contains(CLS_POPUPICON) || clsList.contains(CLS_POPUPDOWN)) {
            this.popupClickHandler(ele, popupNav, CLS_RTL$2);
          }

          var itemObj;
          var clst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CLS_ITEM);

          if ((Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clst) || clst.classList.contains(CLS_DISABLE$2)) && !popupNav.classList.contains(CLS_TBARNAV)) {
            return;
          }

          if (clst) {
            var tempItem = this.items[this.tbarEle.indexOf(clst)];

            if (tempItem && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
              itemObj = {
                id: tempItem.id,
                text: tempItem.text,
                width: tempItem.width,
                cssClass: tempItem.cssClass,
                showAlwaysInPopup: tempItem.showAlwaysInPopup,
                disabled: tempItem.disabled,
                prefixIcon: tempItem.prefixIcon,
                suffixIcon: tempItem.suffixIcon,
                visible: tempItem.visible,
                overflow: tempItem.overflow,
                template: tempItem.template,
                type: tempItem.type,
                showTextOn: tempItem.showTextOn,
                htmlAttributes: tempItem.htmlAttributes,
                tooltipText: tempItem.tooltipText,
                align: tempItem.align,
                click: tempItem.click
              };
            } else {
              itemObj = tempItem;
            }
          }

          var eventArgs = {
            originalEvent: e,
            item: itemObj
          };

          if (itemObj && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemObj.click)) {
            this.trigger('items[' + this.tbarEle.indexOf(clst) + '].click', eventArgs);
          }

          if (!eventArgs.cancel) {
            this.trigger('clicked', eventArgs, function (clickedArgs) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this595.popObj) && isPopupElement && !clickedArgs.cancel && _this595.overflowMode === 'Popup' && clickedArgs.item && clickedArgs.item.type !== 'Input') {
                _this595.popObj.hide({
                  name: 'FadeOut',
                  duration: 100
                });
              }
            });
          }
        }
      }, {
        key: "popupClickHandler",
        value: function popupClickHandler(ele, popupNav, CLS_RTL) {
          var popObj = this.popObj;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(popObj.element)) {
            popupNav.classList.remove(CLS_TBARNAVACT);
            popObj.hide({
              name: 'FadeOut',
              duration: 100
            });
          } else {
            if (ele.classList.contains(CLS_RTL)) {
              popObj.enableRtl = true;
              popObj.position = {
                X: 'left',
                Y: 'top'
              };
            }

            if (popObj.offsetX === 0 && !ele.classList.contains(CLS_RTL)) {
              popObj.enableRtl = false;
              popObj.position = {
                X: 'right',
                Y: 'top'
              };
            }

            popObj.dataBind();
            popObj.refreshPosition();
            popObj.element.style.top = this.getElementOffsetY() + 'px';

            if (this.overflowMode === 'Extended') {
              popObj.element.style.minHeight = '0px';
            }

            popupNav.classList.add(CLS_TBARNAVACT);
            popObj.show({
              name: 'FadeIn',
              duration: 100
            });
          }
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initialize();
          this.renderControl();
          this.wireEvents();
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
          var height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name !== 'msie' || this.height !== 'auto' || this.overflowMode === 'MultiRow') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'height': height
            });
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
            'width': width
          });
          var ariaAttr = {
            'role': 'toolbar',
            'aria-disabled': 'false',
            'aria-haspopup': 'false',
            'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical'
          };
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, ariaAttr);

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.cssClass.split(' '));
          }
        }
      }, {
        key: "renderControl",
        value: function renderControl() {
          var ele = this.element;
          this.trgtEle = ele.children.length > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isServerRendered ? ele.querySelector('div') : null;
          this.tbarAlgEle = {
            lefts: [],
            centers: [],
            rights: []
          };
          this.renderItems();
          this.renderLayout();
        }
      }, {
        key: "renderLayout",
        value: function renderLayout() {
          this.renderOverflowMode();

          if (this.tbarAlign) {
            this.itemPositioning();
          }

          if (this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element)) {
            this.popupRefresh(this.popObj.element, false);
          }

          this.separator();
        }
      }, {
        key: "itemsAlign",
        value: function itemsAlign(items, itemEleDom) {
          var innerItem;
          var innerPos;

          if (!this.tbarEle) {
            this.tbarEle = [];
          }

          for (var i = 0; i < items.length; i++) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
              this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;
              var itemEleBlaDom = this.element.querySelector('.' + BZ_ITEMS);
              innerItem = itemEleBlaDom.querySelector('.' + CLS_ITEM + '[data-index="' + i + '"]');

              if (!innerItem) {
                continue;
              }

              if (items[i].overflow !== 'Show' && items[i].showAlwaysInPopup && !innerItem.classList.contains(CLS_SEPARATOR)) {
                this.popupPriCount++;
              }

              if (items[i].htmlAttributes) {
                this.setAttr(items[i].htmlAttributes, innerItem);
              }

              if (items[i].type === 'Button') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(innerItem);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItem, 'click', this.itemClick, this);
              }
            } else {
              innerItem = this.renderSubComponent(items[i], i);
            }

            if (this.tbarEle.indexOf(innerItem) === -1) {
              this.tbarEle.push(innerItem);
            }

            if (!this.tbarAlign) {
              this.tbarItemAlign(items[i], itemEleDom, i);
            }

            innerPos = itemEleDom.querySelector('.e-toolbar-' + items[i].align.toLowerCase());

            if (innerPos) {
              if (!(items[i].showAlwaysInPopup && items[i].overflow !== 'Show')) {
                this.tbarAlgEle[(items[i].align + 's').toLowerCase()].push(innerItem);
              }

              innerPos.appendChild(innerItem);
            } else {
              itemEleDom.appendChild(innerItem);
            }
          }
        }
      }, {
        key: "serverItemsRerender",
        value: function serverItemsRerender() {
          this.destroyMode();
          this.resetServerItems();
          this.serverItemsRefresh();
        }
      }, {
        key: "serverItemsRefresh",
        value: function serverItemsRefresh() {
          var wrapBlaEleDom = this.element.querySelector('.' + BZ_ITEMS);

          if (wrapBlaEleDom.children.length > 0) {
            this.itemsAlign(this.items, this.element.querySelector('.' + CLS_ITEMS));
            this.renderLayout();
            this.refreshOverflow();
          }
        }
      }, {
        key: "resetServerItems",
        value: function resetServerItems() {
          var wrapBlaEleDom = this.element.querySelector('.' + BZ_ITEMS);
          var itemEles = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEMS + ' .' + CLS_ITEM, this.element));
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(itemEles, wrapBlaEleDom);
          this.clearProperty();
        }
        /** @hidden */

      }, {
        key: "changeOrientation",
        value: function changeOrientation() {
          var ele = this.element;

          if (this.isVertical) {
            ele.classList.remove(CLS_VERTICAL);
            this.isVertical = false;

            if (this.height === 'auto' || this.height === '100%') {
              ele.style.height = this.height;
            }

            ele.setAttribute('aria-orientation', 'horizontal');
          } else {
            ele.classList.add(CLS_VERTICAL);
            this.isVertical = true;
            ele.setAttribute('aria-orientation', 'vertical');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height),
              'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width)
            });
          }

          this.destroyMode();
          this.refreshOverflow();
        }
      }, {
        key: "initScroll",
        value: function initScroll(element, innerItems) {
          if (!this.scrollModule && this.checkOverflow(element, innerItems[0])) {
            if (this.tbarAlign) {
              this.element.querySelector('.' + CLS_ITEMS + ' .' + CLS_TBARCENTER).removeAttribute('style');
            }

            if (this.isVertical) {
              this.scrollModule = new VScroll({
                scrollStep: this.scrollStep,
                enableRtl: this.enableRtl
              }, innerItems[0]);
            } else {
              this.scrollModule = new HScroll({
                scrollStep: this.scrollStep,
                enableRtl: this.enableRtl
              }, innerItems[0]);
            }

            this.remove(this.scrollModule.element, CLS_TBARPOS);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              overflow: 'hidden'
            });
          }
        }
      }, {
        key: "itemWidthCal",
        value: function itemWidthCal(items) {
          var _this596 = this;

          var width = 0;
          var style;
          [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, items)).forEach(function (el) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(el)) {
              style = window.getComputedStyle(el);
              width += _this596.isVertical ? el.offsetHeight : el.offsetWidth;
              width += parseFloat(_this596.isVertical ? style.marginTop : style.marginRight);
              width += parseFloat(_this596.isVertical ? style.marginBottom : style.marginLeft);
            }
          });
          return width;
        }
      }, {
        key: "getScrollCntEle",
        value: function getScrollCntEle(innerItem) {
          var trgClass = this.isVertical ? '.e-vscroll-content' : '.e-hscroll-content';
          return innerItem.querySelector(trgClass);
        }
      }, {
        key: "checkOverflow",
        value: function checkOverflow(element, innerItem) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(innerItem) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(element)) {
            return false;
          }

          var eleWidth = this.isVertical ? element.offsetHeight : element.offsetWidth;
          var itemWidth = this.isVertical ? innerItem.offsetHeight : innerItem.offsetWidth;

          if (this.tbarAlign || this.scrollModule || eleWidth === itemWidth) {
            itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);
          }

          var popNav = element.querySelector('.' + CLS_TBARNAV);
          var scrollNav = element.querySelector('.' + CLS_TBARSCRLNAV);
          var navEleWidth = 0;

          if (popNav) {
            navEleWidth = this.isVertical ? popNav.offsetHeight : popNav.offsetWidth;
          } else if (scrollNav) {
            navEleWidth = this.isVertical ? scrollNav.offsetHeight * 2 : scrollNav.offsetWidth * 2;
          }

          if (itemWidth > eleWidth - navEleWidth) {
            return true;
          } else {
            return false;
          }
        }
        /**
         * Refresh the whole Toolbar component without re-rendering.
         * - It is used to manually refresh the Toolbar overflow modes such as scrollable, popup, multi row, and extended.
         * - It will refresh the Toolbar component after loading items dynamically.
         * @returns void.
         */

      }, {
        key: "refreshOverflow",
        value: function refreshOverflow() {
          this.resize();
        }
      }, {
        key: "toolbarAlign",
        value: function toolbarAlign(innerItems) {
          if (this.tbarAlign) {
            this.add(innerItems, CLS_TBARPOS);
            this.itemPositioning();
          }
        }
      }, {
        key: "renderOverflowMode",
        value: function renderOverflowMode() {
          var ele = this.element;
          var innerItems = ele.querySelector('.' + CLS_ITEMS);
          var priorityCheck = this.popupPriCount > 0;

          if (ele && ele.children.length > 0) {
            this.offsetWid = ele.offsetWidth;
            this.remove(this.element, 'e-toolpop');

            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' && this.height === 'auto') {
              ele.style.height = '';
            }

            switch (this.overflowMode) {
              case 'Scrollable':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollModule)) {
                  this.initScroll(ele, [].slice.call(ele.getElementsByClassName(CLS_ITEMS)));
                }

                break;

              case 'Popup':
                this.add(this.element, 'e-toolpop');

                if (this.tbarAlign) {
                  this.removePositioning();
                }

                if (this.checkOverflow(ele, innerItems) || priorityCheck) {
                  this.setOverflowAttributes(ele);
                }

                this.toolbarAlign(innerItems);
                break;

              case 'MultiRow':
                this.add(innerItems, CLS_MULTIROW);

                if (this.checkOverflow(ele, innerItems) && this.tbarAlign) {
                  this.removePositioning();
                  this.add(innerItems, CLS_MULTIROWPOS);
                }

                if (ele.style.overflow === 'hidden') {
                  ele.style.overflow = '';
                }

                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' || ele.style.height !== 'auto') {
                  ele.style.height = 'auto';
                }

                break;

              case 'Extended':
                this.add(this.element, CLS_EXTEANDABLE_TOOLBAR);

                if (this.checkOverflow(ele, innerItems) || priorityCheck) {
                  if (this.tbarAlign) {
                    this.removePositioning();
                  }

                  this.setOverflowAttributes(ele);
                }

                this.toolbarAlign(innerItems);
            }
          }
        }
      }, {
        key: "setOverflowAttributes",
        value: function setOverflowAttributes(ele) {
          this.createPopupEle(ele, [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));
          this.element.querySelector('.' + CLS_TBARNAV).setAttribute('tabIndex', '0');
          this.element.querySelector('.' + CLS_TBARNAV).setAttribute('role', 'list');
        }
      }, {
        key: "separator",
        value: function separator() {
          var element = this.element;
          var eleItem = [].slice.call(element.querySelectorAll('.' + CLS_SEPARATOR));
          var eleInlineItem;
          var multiVar = element.querySelector('.' + CLS_MULTIROW_SEPARATOR);
          var extendVar = element.querySelector('.' + CLS_EXTENDABLE_SEPARATOR);
          eleInlineItem = this.overflowMode === 'MultiRow' ? multiVar : extendVar;

          if (eleInlineItem !== null) {
            if (this.overflowMode === 'MultiRow') {
              eleInlineItem.classList.remove(CLS_MULTIROW_SEPARATOR);
            } else if (this.overflowMode === 'Extended') {
              eleInlineItem.classList.remove(CLS_EXTENDABLE_SEPARATOR);
            }
          }

          for (var i = 0; i <= eleItem.length - 1; i++) {
            if (eleItem[i].offsetLeft < 30 && eleItem[i].offsetLeft !== 0) {
              if (this.overflowMode === 'MultiRow') {
                eleItem[i].classList.add(CLS_MULTIROW_SEPARATOR);
              } else if (this.overflowMode === 'Extended') {
                eleItem[i].classList.add(CLS_EXTENDABLE_SEPARATOR);
              }
            }
          }
        }
      }, {
        key: "createPopupEle",
        value: function createPopupEle(ele, innerEle) {
          var innerNav = ele.querySelector('.' + CLS_TBARNAV);
          var vertical = this.isVertical;

          if (!innerNav) {
            this.createPopupIcon(ele);
          }

          innerNav = ele.querySelector('.' + CLS_TBARNAV);
          var innerNavDom = vertical ? innerNav.offsetHeight : innerNav.offsetWidth;
          var eleWidth = (vertical ? ele.offsetHeight : ele.offsetWidth) - innerNavDom;
          this.element.classList.remove('e-rtl');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
            direction: 'initial'
          });
          this.checkPriority(ele, innerEle, eleWidth, true);

          if (this.enableRtl) {
            this.element.classList.add('e-rtl');
          }

          this.element.style.removeProperty('direction');
          this.createPopup();
        }
      }, {
        key: "pushingPoppedEle",
        value: function pushingPoppedEle(tbarObj, popupPri, ele, eleHeight, sepHeight) {
          var element = tbarObj.element;
          var nodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TBAROVERFLOW, ele);
          var nodeIndex = 0;
          var poppedEle = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_POPUP, element.querySelector('.' + CLS_ITEMS)));
          var nodePri = 0;
          poppedEle.forEach(function (el, index) {
            nodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TBAROVERFLOW, ele);

            if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {
              if (tbarObj.tbResize && nodes.length > index) {
                ele.insertBefore(el, nodes[index]);
                ++nodePri;
              } else {
                ele.insertBefore(el, ele.children[nodes.length]);
                ++nodePri;
              }
            } else if (el.classList.contains(CLS_TBAROVERFLOW)) {
              ele.insertBefore(el, ele.firstChild);
              ++nodePri;
            } else if (tbarObj.tbResize && el.classList.contains(CLS_POPOVERFLOW) && ele.children.length > 0 && nodes.length === 0) {
              ele.insertBefore(el, ele.firstChild);
              ++nodePri;
            } else if (el.classList.contains(CLS_POPOVERFLOW)) {
              popupPri.push(el);
            } else if (tbarObj.tbResize) {
              ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]);
              ++nodeIndex;
            } else {
              ele.appendChild(el);
            }

            if (el.classList.contains(CLS_SEPARATOR)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(el, {
                display: '',
                height: sepHeight + 'px'
              });
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(el, {
                display: '',
                height: eleHeight + 'px'
              });
            }
          });
          popupPri.forEach(function (el) {
            ele.appendChild(el);
          });
          var tbarEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));

          for (var i = tbarEle.length - 1; i >= 0; i--) {
            var tbarElement = tbarEle[i];

            if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(tbarElement, {
                display: 'none'
              });
            } else {
              break;
            }
          }
        }
      }, {
        key: "createPopup",
        value: function createPopup() {
          var element = this.element;
          var eleHeight;
          var eleItem;
          var sepHeight;
          var sepItem;

          if (this.overflowMode === 'Extended') {
            sepItem = element.querySelector('.' + CLS_SEPARATOR + ':not(.' + CLS_POPUP + ')');
            sepHeight = element.style.height === 'auto' || element.style.height === '' ? null : sepItem.offsetHeight;
          }

          eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');
          eleHeight = element.style.height === 'auto' || element.style.height === '' ? null : eleItem && eleItem.offsetHeight;
          var ele;
          var popupPri = [];

          if (element.querySelector('#' + element.id + '_popup.' + CLS_POPUPCLASS)) {
            ele = element.querySelector('#' + element.id + '_popup.' + CLS_POPUPCLASS);
          } else {
            var extendEle = this.createElement('div', {
              id: element.id + '_popup',
              className: CLS_POPUPCLASS + ' ' + CLS_EXTENDABLECLASS
            });
            var popupEle = this.createElement('div', {
              id: element.id + '_popup',
              className: CLS_POPUPCLASS
            });
            ele = this.overflowMode === 'Extended' ? extendEle : popupEle;
          }

          this.pushingPoppedEle(this, popupPri, ele, eleHeight, sepHeight);
          this.popupInit(element, ele);
        }
      }, {
        key: "getElementOffsetY",
        value: function getElementOffsetY() {
          return this.overflowMode === 'Extended' && window.getComputedStyle(this.element).getPropertyValue('box-sizing') === 'border-box' ? this.element.clientHeight : this.element.offsetHeight;
        }
      }, {
        key: "popupInit",
        value: function popupInit(element, ele) {
          if (!this.popObj) {
            element.appendChild(ele);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              overflow: ''
            });
            var eleStyles = window.getComputedStyle(this.element);
            var popup = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"](null, {
              relateTo: this.element,
              offsetY: this.isVertical ? 0 : this.getElementOffsetY(),
              enableRtl: this.enableRtl,
              open: this.popupOpen.bind(this),
              close: this.popupClose.bind(this),
              collision: {
                Y: this.enableCollision ? 'flip' : 'none'
              },
              position: this.enableRtl ? {
                X: 'left',
                Y: 'top'
              } : {
                X: 'right',
                Y: 'top'
              }
            });
            popup.appendTo(ele);

            if (this.overflowMode === 'Extended') {
              popup.width = parseFloat(eleStyles.width) + parseFloat(eleStyles.borderRightWidth) * 2;
              popup.offsetX = 0;
            }

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'scroll', this.docEvent.bind(this));

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'click ', this.docEvent.bind(this));

            popup.element.style.maxHeight = popup.element.offsetHeight + 'px';

            if (this.isVertical) {
              popup.element.style.visibility = 'hidden';
            }

            if (this.isExtendedOpen) {
              var popupNav = this.element.querySelector('.' + CLS_TBARNAV);
              popupNav.classList.add(CLS_TBARNAVACT);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(popupNav.firstElementChild, [CLS_POPUPICON], [CLS_POPUPDOWN]);
              this.element.querySelector('.' + CLS_EXTENDABLECLASS).classList.add(CLS_POPUPOPEN);
            } else {
              popup.hide();
            }

            this.popObj = popup;
            this.element.setAttribute('aria-haspopup', 'true');
          } else {
            var popupEle = this.popObj.element;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(popupEle, {
              maxHeight: '',
              display: 'block'
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(popupEle, {
              maxHeight: popupEle.offsetHeight + 'px',
              display: ''
            });
          }
        }
      }, {
        key: "tbarPopupHandler",
        value: function tbarPopupHandler(isOpen) {
          if (this.overflowMode === 'Extended') {
            isOpen ? this.add(this.element, CLS_EXTENDEDPOPOPEN) : this.remove(this.element, CLS_EXTENDEDPOPOPEN);
          }
        }
      }, {
        key: "popupOpen",
        value: function popupOpen(e) {
          var popObj = this.popObj;

          if (!this.isVertical) {
            popObj.offsetY = this.getElementOffsetY();
            popObj.dataBind();
          }

          var popupEle = this.popObj.element;
          var toolEle = this.popObj.element.parentElement;
          var popupNav = toolEle.querySelector('.' + CLS_TBARNAV);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(popObj.element, {
            height: 'auto',
            maxHeight: ''
          });
          popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';

          if (this.overflowMode === 'Extended') {
            popObj.element.style.minHeight = '';
          }

          var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["calculatePosition"])(toolEle).top;
          var popIcon = popupNav.firstElementChild;
          popupNav.classList.add(CLS_TBARNAVACT);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);
          this.tbarPopupHandler(true);
          var scrollVal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(window.scrollY) ? 0 : window.scrollY;

          if (!this.isVertical && window.innerHeight + scrollVal < popupElePos && this.element.offsetTop < popupEle.offsetHeight) {
            var overflowHeight = popupEle.offsetHeight - (popupElePos - window.innerHeight - scrollVal + 5);
            popObj.height = overflowHeight + 'px';

            for (var i = 0; i <= popupEle.childElementCount; i++) {
              var ele = popupEle.children[i];

              if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
                overflowHeight = ele.offsetTop;
                break;
              }
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(popObj.element, {
              maxHeight: overflowHeight + 'px'
            });
          } else if (this.isVertical) {
            var tbEleData = this.element.getBoundingClientRect();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(popObj.element, {
              maxHeight: tbEleData.top + this.element.offsetHeight + 'px',
              bottom: 0,
              visibility: ''
            });
          }

          if (popObj) {
            popObj.refreshPosition();
          }
        }
      }, {
        key: "popupClose",
        value: function popupClose(e) {
          var element = this.element;
          var popupNav = element.querySelector('.' + CLS_TBARNAV);
          var popIcon = popupNav.firstElementChild;
          popupNav.classList.remove(CLS_TBARNAVACT);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);
          this.tbarPopupHandler(false);
        }
      }, {
        key: "checkPriority",
        value: function checkPriority(ele, inEle, eleWidth, pre) {
          var popPriority = this.popupPriCount > 0;
          var len = inEle.length;
          var eleWid = eleWidth;
          var eleOffset;
          var checkoffset;
          var sepCheck = 0;
          var itemCount = 0;
          var itemPopCount = 0;

          var checkClass = function checkClass(ele, val) {
            var rVal = false;
            val.forEach(function (cls) {
              if (ele.classList.contains(cls)) {
                rVal = true;
              }
            });
            return rVal;
          };

          for (var i = len - 1; i >= 0; i--) {
            var mrgn = void 0;
            var compuStyle = window.getComputedStyle(inEle[i]);

            if (this.isVertical) {
              mrgn = parseFloat(compuStyle.marginTop);
              mrgn += parseFloat(compuStyle.marginBottom);
            } else {
              mrgn = parseFloat(compuStyle.marginRight);
              mrgn += parseFloat(compuStyle.marginLeft);
            }

            var fstEleCheck = inEle[i] === this.tbarEle[0];

            if (fstEleCheck) {
              this.tbarEleMrgn = mrgn;
            }

            eleOffset = this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth;

            var _eleWid = fstEleCheck ? eleOffset + mrgn : eleOffset;

            if (checkClass(inEle[i], [CLS_POPPRI]) && popPriority) {
              inEle[i].classList.add(CLS_POPUP);

              if (this.isVertical) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], {
                  display: 'none',
                  minHeight: _eleWid + 'px'
                });
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], {
                  display: 'none',
                  minWidth: _eleWid + 'px'
                });
              }

              itemPopCount++;
            }

            if (this.isVertical) {
              checkoffset = inEle[i].offsetTop + inEle[i].offsetHeight + mrgn > eleWidth;
            } else {
              checkoffset = inEle[i].offsetLeft + inEle[i].offsetWidth + mrgn > eleWidth;
            }

            if (checkoffset) {
              if (inEle[i].classList.contains(CLS_SEPARATOR)) {
                if (this.overflowMode === 'Extended') {
                  if (itemCount === itemPopCount) {
                    var sepEle = inEle[i];

                    if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
                      inEle[i].classList.add(CLS_POPUP);
                      itemPopCount++;
                    }
                  }

                  itemCount++;
                } else if (this.overflowMode === 'Popup') {
                  if (sepCheck > 0 && itemCount === itemPopCount) {
                    var _sepEle = inEle[i + itemCount + (sepCheck - 1)];

                    if (checkClass(_sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {
                      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_sepEle, {
                        display: 'none'
                      });
                    }
                  }

                  sepCheck++;
                  itemCount = 0;
                  itemPopCount = 0;
                }
              } else {
                itemCount++;
              }

              if (inEle[i].classList.contains(CLS_TBAROVERFLOW) && pre) {
                eleWidth -= (this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth) + mrgn;
              } else if (!checkClass(inEle[i], [CLS_SEPARATOR, CLS_TBARIGNORE])) {
                inEle[i].classList.add(CLS_POPUP);

                if (this.isVertical) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], {
                    display: 'none',
                    minHeight: _eleWid + 'px'
                  });
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(inEle[i], {
                    display: 'none',
                    minWidth: _eleWid + 'px'
                  });
                }

                itemPopCount++;
              } else {
                eleWidth -= (this.isVertical ? inEle[i].offsetHeight : inEle[i].offsetWidth) + mrgn;
              }
            }
          }

          if (pre) {
            var popedEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM + ':not(.' + CLS_POPUP + ')', this.element);
            this.checkPriority(ele, popedEle, eleWid, false);
          }
        }
      }, {
        key: "createPopupIcon",
        value: function createPopupIcon(element) {
          var id = element.id.concat('_nav');
          var className = 'e-' + element.id.concat('_nav ' + CLS_POPUPNAV);
          className = this.overflowMode === 'Extended' ? className + ' ' + CLS_EXTENDPOPUP : className;
          var nav = this.createElement('div', {
            id: id,
            className: className
          });

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'edge') {
            nav.classList.add('e-ie-align');
          }

          var navItem = this.createElement('div', {
            className: CLS_POPUPDOWN + ' e-icons'
          });
          nav.appendChild(navItem);
          nav.setAttribute('tabindex', '0');
          nav.setAttribute('role', 'list');
          element.appendChild(nav);
        }
      }, {
        key: "tbarPriRef",
        value: function tbarPriRef(inEle, indx, sepPri, el, des, elWid, wid, ig) {
          var ignoreCount = ig;
          var popEle = this.popObj.element;
          var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';
          var priEleCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;

          var checkClass = function checkClass(ele, val) {
            return ele.classList.contains(val);
          };

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])(query, inEle).length === 0) {
            var eleSep = inEle.children[indx - (indx - sepPri) - 1];
            var ignoreCheck = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eleSep) && checkClass(eleSep, CLS_TBARIGNORE);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(eleSep) || ignoreCheck) {
              var sepDisplay = 'none';
              eleSep.style.display = 'inherit';
              var eleSepWidth = eleSep.offsetWidth + parseFloat(window.getComputedStyle(eleSep).marginRight) * 2;
              var prevSep = eleSep.previousElementSibling;

              if (elWid + eleSepWidth < wid || des) {
                inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(prevSep)) {
                  prevSep.style.display = '';
                }
              } else {
                if (prevSep.classList.contains(CLS_SEPARATOR)) {
                  prevSep.style.display = sepDisplay;
                }
              }

              eleSep.style.display = '';
            } else {
              inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);
            }
          } else {
            inEle.insertBefore(el, inEle.children[indx + ignoreCount - priEleCnt]);
          }
        }
      }, {
        key: "popupRefresh",
        value: function popupRefresh(popupEle, destroy) {
          var _this597 = this;

          var ele = this.element;
          var isVer = this.isVertical;
          var popNav = ele.querySelector('.' + CLS_TBARNAV);
          var innerEle = ele.querySelector('.' + CLS_ITEMS);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(popNav)) {
            return;
          }

          innerEle.removeAttribute('style');
          popupEle.style.display = 'block';
          var dimension;

          if (isVer) {
            dimension = ele.offsetHeight - (popNav.offsetHeight + innerEle.offsetHeight);
          } else {
            dimension = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);
          }

          var popupEleWidth = 0;
          [].slice.call(popupEle.children).forEach(function (el) {
            popupEleWidth += _this597.popupEleWidth(el);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(el, {
              'position': ''
            });
          });

          if (dimension + (isVer ? popNav.offsetHeight : popNav.offsetWidth) > popupEleWidth && this.popupPriCount === 0) {
            destroy = true;
          }

          this.popupEleRefresh(dimension, popupEle, destroy);
          popupEle.style.display = '';

          if (popupEle.children.length === 0 && popNav && this.popObj) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(popNav);
            popNav = null;
            this.popObj.destroy();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.popObj.element);
            this.popObj = null;
            ele.setAttribute('aria-haspopup', 'false');
          }
        }
      }, {
        key: "ignoreEleFetch",
        value: function ignoreEleFetch(index, innerEle) {
          var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));
          var ignoreInx = [];
          var count = 0;

          if (ignoreEle.length > 0) {
            ignoreEle.forEach(function (ele) {
              ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
            });
          } else {
            return 0;
          }

          ignoreInx.forEach(function (val) {
            if (val <= index) {
              count++;
            }
          });
          return count;
        }
      }, {
        key: "checkPopupRefresh",
        value: function checkPopupRefresh(root, popEle) {
          popEle.style.display = 'block';
          var elWid = this.popupEleWidth(popEle.firstElementChild);
          popEle.firstElementChild.style.removeProperty('Position');
          var tbarWidth = root.offsetWidth - root.querySelector('.' + CLS_TBARNAV).offsetWidth;
          var tbarItemsWid = root.querySelector('.' + CLS_ITEMS).offsetWidth;
          popEle.style.removeProperty('display');

          if (tbarWidth > elWid + tbarItemsWid) {
            return true;
          }

          return false;
        }
      }, {
        key: "popupEleWidth",
        value: function popupEleWidth(el) {
          el.style.position = 'absolute';
          var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;
          var btnText = el.querySelector('.' + CLS_TBARBTNTEXT);

          if (el.classList.contains('e-tbtn-align') || el.classList.contains(CLS_TBARTEXT)) {
            var btn = el.children[0];

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(btnText) && el.classList.contains(CLS_TBARTEXT)) {
              btnText.style.display = 'none';
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(btnText) && el.classList.contains(CLS_POPUPTEXT)) {
              btnText.style.display = 'block';
            }

            btn.style.minWidth = '0%';
            elWidth = parseFloat(!this.isVertical ? el.style.minWidth : el.style.minHeight);
            btn.style.minWidth = '';
            btn.style.minHeight = '';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(btnText)) {
              btnText.style.display = '';
            }
          }

          return elWidth;
        }
      }, {
        key: "popupEleRefresh",
        value: function popupEleRefresh(width, popupEle, destroy) {
          var _this598 = this;

          var popPriority = this.popupPriCount > 0;
          var eleSplice = this.tbarEle;
          var priEleCnt;
          var index;
          var checkOverflow;
          var innerEle = this.element.querySelector('.' + CLS_ITEMS);
          var ignoreCount = 0;

          var _iterator140 = _createForOfIteratorHelper([].slice.call(popupEle.children)),
              _step140;

          try {
            for (_iterator140.s(); !(_step140 = _iterator140.n()).done;) {
              var el = _step140.value;

              if (el.classList.contains(CLS_POPPRI) && popPriority && !destroy) {
                continue;
              }

              var elWidth = this.popupEleWidth(el);

              if (el === this.tbarEle[0]) {
                elWidth += this.tbarEleMrgn;
              }

              el.style.position = '';

              if (elWidth < width || destroy) {
                (function () {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(el, {
                    minWidth: '',
                    height: '',
                    minHeight: ''
                  });

                  if (!el.classList.contains(CLS_POPOVERFLOW)) {
                    el.classList.remove(CLS_POPUP);
                  }

                  index = _this598.tbarEle.indexOf(el);

                  if (_this598.tbarAlign) {
                    var pos = _this598.items[index].align;
                    index = _this598.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);
                    eleSplice = _this598.tbarAlgEle[(pos + 's').toLowerCase()];
                    innerEle = _this598.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());
                  }

                  var sepBeforePri = 0;

                  if (_this598.overflowMode !== 'Extended') {
                    eleSplice.slice(0, index).forEach(function (el) {
                      if (el.classList.contains(CLS_TBAROVERFLOW) || el.classList.contains(CLS_SEPARATOR)) {
                        if (el.classList.contains(CLS_SEPARATOR)) {
                          el.style.display = '';
                          width -= el.offsetWidth;
                        }

                        sepBeforePri++;
                      }
                    });
                  }

                  ignoreCount = _this598.ignoreEleFetch(index, innerEle);

                  if (el.classList.contains(CLS_TBAROVERFLOW)) {
                    _this598.tbarPriRef(innerEle, index, sepBeforePri, el, destroy, elWidth, width, ignoreCount);

                    width -= el.offsetWidth;
                  } else if (index === 0) {
                    innerEle.insertBefore(el, innerEle.firstChild);
                    width -= el.offsetWidth;
                  } else {
                    priEleCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TBAROVERFLOW, _this598.popObj.element).length;
                    innerEle.insertBefore(el, innerEle.children[index + ignoreCount - priEleCnt]);
                    width -= el.offsetWidth;
                  }

                  el.style.height = '';
                })();
              } else {
                break;
              }
            }
          } catch (err) {
            _iterator140.e(err);
          } finally {
            _iterator140.f();
          }

          checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);

          if (checkOverflow && !destroy) {
            this.renderOverflowMode();
          }
        }
      }, {
        key: "removePositioning",
        value: function removePositioning() {
          var item = this.element.querySelector('.' + CLS_ITEMS);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) || !item.classList.contains(CLS_TBARPOS)) {
            return;
          }

          this.remove(item, CLS_TBARPOS);
          var innerItem = [].slice.call(item.childNodes);
          innerItem[1].removeAttribute('style');
          innerItem[2].removeAttribute('style');
        }
      }, {
        key: "refreshPositioning",
        value: function refreshPositioning() {
          var item = this.element.querySelector('.' + CLS_ITEMS);
          this.add(item, CLS_TBARPOS);
          this.itemPositioning();
        }
      }, {
        key: "itemPositioning",
        value: function itemPositioning() {
          var item = this.element.querySelector('.' + CLS_ITEMS);
          var margin;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) || !item.classList.contains(CLS_TBARPOS)) {
            return;
          }

          var popupNav = this.element.querySelector('.' + CLS_TBARNAV);
          var innerItem;

          if (this.scrollModule) {
            var trgClass = this.isVertical ? CLS_VSCROLLCNT : CLS_HSCROLLCNT;
            innerItem = [].slice.call(item.querySelector('.' + trgClass).children);
          } else {
            innerItem = [].slice.call(item.childNodes);
          }

          if (this.isVertical) {
            margin = innerItem[0].offsetHeight + innerItem[2].offsetHeight;
          } else {
            margin = innerItem[0].offsetWidth + innerItem[2].offsetWidth;
          }

          var tbarWid = this.isVertical ? this.element.offsetHeight : this.element.offsetWidth;

          if (popupNav) {
            tbarWid -= this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth;
            var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';
            innerItem[2].removeAttribute('style');

            if (this.isVertical) {
              this.enableRtl ? innerItem[2].style.top = popWid : innerItem[2].style.bottom = popWid;
            } else {
              this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
            }
          }

          if (tbarWid <= margin) {
            return;
          }

          var value = (tbarWid - margin - (!this.isVertical ? innerItem[1].offsetWidth : innerItem[1].offsetHeight)) / 2;
          innerItem[1].removeAttribute('style');
          var mrgn = (!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value + 'px';

          if (this.isVertical) {
            this.enableRtl ? innerItem[1].style.marginBottom = mrgn : innerItem[1].style.marginTop = mrgn;
          } else {
            this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
          }
        }
      }, {
        key: "tbarItemAlign",
        value: function tbarItemAlign(item, itemEle, pos) {
          var _this599 = this;

          if (item.showAlwaysInPopup && item.overflow !== 'Show') {
            return;
          }

          var alignDiv = [];
          alignDiv.push(this.createElement('div', {
            className: CLS_TBARLEFT
          }));
          alignDiv.push(this.createElement('div', {
            className: CLS_TBARCENTER
          }));
          alignDiv.push(this.createElement('div', {
            className: CLS_TBARRIGHT
          }));

          if (pos === 0 && item.align !== 'Left') {
            alignDiv.forEach(function (ele) {
              itemEle.appendChild(ele);
            });
            this.tbarAlign = true;
            this.add(itemEle, CLS_TBARPOS);
          } else if (item.align !== 'Left') {
            var alignEle = itemEle.childNodes;
            var leftAlign = alignDiv[0];
            [].slice.call(alignEle).forEach(function (el) {
              _this599.tbarAlgEle.lefts.push(el);

              leftAlign.appendChild(el);
            });
            itemEle.appendChild(leftAlign);
            itemEle.appendChild(alignDiv[1]);
            itemEle.appendChild(alignDiv[2]);
            this.tbarAlign = true;
            this.add(itemEle, CLS_TBARPOS);
          }
        }
      }, {
        key: "ctrlTemplate",
        value: function ctrlTemplate() {
          var _this600 = this;

          this.ctrlTem = this.trgtEle.cloneNode(true);
          this.add(this.trgtEle, CLS_ITEMS);
          this.tbarEle = [];
          var innerEle = [].slice.call(this.trgtEle.children);
          innerEle.forEach(function (ele) {
            if (ele.tagName === 'DIV') {
              _this600.tbarEle.push(ele);

              ele.setAttribute('aria-disabled', 'false');

              _this600.add(ele, CLS_ITEM);
            }
          });
        }
      }, {
        key: "renderItems",
        value: function renderItems() {
          var ele = this.element;
          var items = this.items;

          if (this.trgtEle != null) {
            this.ctrlTemplate();
          } else if (ele && items.length > 0) {
            var itemEleDom;

            if (ele && ele.children.length > 0) {
              itemEleDom = ele.querySelector('.' + CLS_ITEMS);
            }

            if (!itemEleDom) {
              itemEleDom = this.createElement('div', {
                className: CLS_ITEMS
              });
            }

            this.itemsAlign(items, itemEleDom);
            ele.appendChild(itemEleDom);
          }
        }
      }, {
        key: "setAttr",
        value: function setAttr(attr, element) {
          var key = Object.keys(attr);
          var keyVal;

          for (var i = 0; i < key.length; i++) {
            keyVal = key[i];
            keyVal === 'class' ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
          }
        }
        /**
         * Enables or disables the specified Toolbar item.
         * @param  {number|HTMLElement|NodeList} items - DOM element or an array of items to be enabled or disabled.
         * @param  {boolean} isEnable  - Boolean value that determines whether the command should be enabled or disabled.
         * By default, `isEnable` is set to true.
         * @returns void.
         */

      }, {
        key: "enableItems",
        value: function enableItems(items, isEnable) {
          var elements = items;
          var len = elements.length;
          var ele;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isEnable)) {
            isEnable = true;
          }

          var enable = function enable(isEnable, ele) {
            if (isEnable) {
              ele.classList.remove(CLS_DISABLE$2);
              ele.setAttribute('aria-disabled', 'false');
            } else {
              ele.classList.add(CLS_DISABLE$2);
              ele.setAttribute('aria-disabled', 'true');
            }
          };

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(len) && len >= 1) {
            for (var a = 0, element = [].slice.call(elements); a < len; a++) {
              var itemElement = element[a];

              if (typeof itemElement === 'number') {
                ele = this.getElementByIndex(itemElement);

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
                  return;
                } else {
                  elements[a] = ele;
                }
              } else {
                ele = itemElement;
              }

              enable(isEnable, ele);
            }

            isEnable ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(elements, CLS_DISABLE$2) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(elements, CLS_DISABLE$2);
          } else {
            if (typeof elements === 'number') {
              ele = this.getElementByIndex(elements);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
                return;
              }
            } else {
              ele = items;
            }

            enable(isEnable, ele);
          }
        }
      }, {
        key: "getElementByIndex",
        value: function getElementByIndex(index) {
          if (this.tbarEle[index]) {
            return this.tbarEle[index];
          }

          return null;
        }
        /**
         * Adds new items to the Toolbar that accepts an array as Toolbar items.
         * @param  {ItemsModel[]} items - DOM element or an array of items to be added to the Toolbar.
         * @param  {number} index - Number value that determines where the command is to be added. By default, index is 0.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "addItems",
        value: function addItems(items, index) {
          var innerItems;
          this.extendedOpen();
          var itemsDiv = this.element.querySelector('.' + CLS_ITEMS);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(itemsDiv)) {
            this.itemsRerender(items);
            return;
          }

          var innerEle;
          var itemAgn = 'Left';

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            index = 0;
          }

          items.forEach(function (e) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.align) && e.align !== 'Left' && itemAgn === 'Left') {
              itemAgn = e.align;
            }
          });

          var _iterator141 = _createForOfIteratorHelper(items),
              _step141;

          try {
            for (_iterator141.s(); !(_step141 = _iterator141.n()).done;) {
              var item = _step141.value;

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.type)) {
                item.type = 'Button';
              }

              innerItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element);
              item.align = itemAgn;
              innerEle = this.renderSubComponent(item, index);

              if (this.tbarEle.length >= index && innerItems.length >= 0) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollModule)) {
                  this.destroyMode();
                }

                var algIndex = item.align[0] === 'L' ? 0 : item.align[0] === 'C' ? 1 : 2;
                var ele = void 0;

                if (!this.tbarAlign && itemAgn !== 'Left') {
                  this.tbarItemAlign(item, itemsDiv, 1);
                  this.tbarAlign = true;
                  ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
                  ele.appendChild(innerEle);
                  this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);
                  this.refreshPositioning();
                } else if (this.tbarAlign) {
                  ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(innerItems[0], '.' + CLS_ITEMS).children[algIndex];
                  ele.insertBefore(innerEle, ele.children[index]);
                  this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);
                  this.refreshPositioning();
                } else if (innerItems.length === 0) {
                  innerItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEMS, this.element);
                  innerItems[0].appendChild(innerEle);
                } else {
                  innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]);
                }

                this.items.splice(index, 0, item);
                this.tbarEle.splice(index, 0, innerEle);
                index++;
                this.offsetWid = itemsDiv.offsetWidth;
              }
            }
          } catch (err) {
            _iterator141.e(err);
          } finally {
            _iterator141.f();
          }

          itemsDiv.style.width = '';
          this.renderOverflowMode();
        }
        /**
         * Removes the items from the Toolbar. Acceptable arguments are index of item/HTMLElement/node list.
         * @param  {number|HTMLElement|NodeList|HTMLElement[]} args
         * Index or DOM element or an Array of item which is to be removed from the Toolbar.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "removeItems",
        value: function removeItems(args) {
          var elements = args;
          var index;
          var innerItems = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));

          if (typeof elements === 'number') {
            index = parseInt(args.toString(), 10);
            this.removeItemByIndex(index, innerItems);
          } else {
            if (elements && elements.length > 1) {
              var _iterator142 = _createForOfIteratorHelper([].slice.call(elements)),
                  _step142;

              try {
                for (_iterator142.s(); !(_step142 = _iterator142.n()).done;) {
                  var ele = _step142.value;
                  index = this.tbarEle.indexOf(ele);
                  this.removeItemByIndex(index, innerItems);
                  innerItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element);
                }
              } catch (err) {
                _iterator142.e(err);
              } finally {
                _iterator142.f();
              }
            } else {
              var _ele5 = elements && elements.length && elements.length === 1 ? elements[0] : args;

              index = innerItems.indexOf(_ele5);
              this.removeItemByIndex(index, innerItems);
            }
          }

          this.resize();
        }
      }, {
        key: "removeItemByIndex",
        value: function removeItemByIndex(index, innerItems) {
          if (this.tbarEle[index] && innerItems[index]) {
            var eleIdx = this.tbarEle.indexOf(innerItems[index]);

            if (this.tbarAlign) {
              var indexAgn;
              indexAgn = this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].indexOf(this.tbarEle[eleIdx]);
              this.tbarAlgEle[(this.items[eleIdx].align + 's').toLowerCase()].splice(indexAgn, 1);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(innerItems[index]);
            this.items.splice(eleIdx, 1);
            this.tbarEle.splice(eleIdx, 1);
          }
        }
      }, {
        key: "templateRender",
        value: function templateRender(templateProp, innerEle, item, index) {
          var itemType = item.type;
          var eleObj = templateProp;
          var isComponent;

          if (typeof templateProp === 'object') {
            isComponent = typeof eleObj.appendTo === 'function';
          }

          if (typeof templateProp === 'string' || !isComponent) {
            var templateFn;
            var val = templateProp;
            val = typeof templateProp === 'string' ? templateProp.trim() : templateProp;

            try {
              if (typeof templateProp === 'object' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateProp.tagName)) {
                innerEle.appendChild(templateProp);
              } else if (document.querySelectorAll(val).length) {
                var ele = document.querySelector(val);
                var tempStr = ele.outerHTML.trim();
                innerEle.appendChild(ele);
                ele.style.display = '';

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tempStr)) {
                  this.tempId.push(val);
                }
              }
            } catch (e) {
              templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(val);
            }

            var tempArray;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn)) {
              var toolbarTemplateID = this.element.id + index + '_template';
              tempArray = templateFn({}, this, 'template', toolbarTemplateID, this.isStringTemplate);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tempArray) && tempArray.length > 0) {
              [].slice.call(tempArray).forEach(function (ele) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele.tagName)) {
                  ele.style.display = '';
                }

                innerEle.appendChild(ele);
              });
            }
          } else if (itemType === 'Input') {
            var _ele6 = this.createElement('input');

            item.id ? _ele6.id = item.id : _ele6.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('tbr-ipt');
            innerEle.appendChild(_ele6);
            eleObj.appendTo(_ele6);
          }

          this.add(innerEle, CLS_TEMPLATE);
          this.tbarEle.push(innerEle);
        }
      }, {
        key: "buttonRendering",
        value: function buttonRendering(item, innerEle) {
          var dom = this.createElement('button', {
            className: CLS_TBARBTN
          });
          dom.setAttribute('type', 'button');
          var textStr = item.text;
          var iconCss;
          var iconPos;
          item.id ? dom.id = item.id : dom.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-tbr-btn');
          var btnTxt = this.createElement('span', {
            className: 'e-tbar-btn-text'
          });

          if (textStr) {
            btnTxt.innerHTML = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(textStr) : textStr;
            dom.appendChild(btnTxt);
            dom.classList.add('e-tbtn-txt');
          } else {
            this.add(innerEle, 'e-tbtn-align');
          }

          if (item.prefixIcon || item.suffixIcon) {
            if (item.prefixIcon && item.suffixIcon || item.prefixIcon) {
              iconCss = item.prefixIcon + ' e-icons';
              iconPos = 'Left';
            } else {
              iconCss = item.suffixIcon + ' e-icons';
              iconPos = 'Right';
            }
          }

          var btnObj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["Button"]({
            iconCss: iconCss,
            iconPosition: iconPos
          });
          btnObj.createElement = this.createElement;
          btnObj.appendTo(dom);

          if (item.width) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(dom, {
              'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(item.width)
            });
          }

          return dom;
        }
      }, {
        key: "renderSubComponent",
        value: function renderSubComponent(item, index) {
          var innerEle;
          var dom;
          innerEle = this.createElement('div', {
            className: CLS_ITEM
          });
          innerEle.setAttribute('aria-disabled', 'false');
          var tempDom = this.createElement('div', {
            innerHTML: this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(item.tooltipText) : item.tooltipText
          });

          if (!this.tbarEle) {
            this.tbarEle = [];
          }

          if (item.htmlAttributes) {
            this.setAttr(item.htmlAttributes, innerEle);
          }

          if (item.tooltipText) {
            innerEle.setAttribute('title', tempDom.textContent);
          }

          if (item.cssClass) {
            innerEle.className = innerEle.className + ' ' + item.cssClass;
          }

          if (item.template) {
            this.templateRender(item.template, innerEle, item, index);
          } else {
            switch (item.type) {
              case 'Button':
                dom = this.buttonRendering(item, innerEle);
                dom.setAttribute('tabindex', '-1');
                dom.setAttribute('aria-label', item.text || item.tooltipText);
                innerEle.appendChild(dom);
                innerEle.addEventListener('click', this.itemClick.bind(this));
                break;

              case 'Separator':
                this.add(innerEle, CLS_SEPARATOR);
                break;
            }
          }

          if (item.showTextOn) {
            var sTxt = item.showTextOn;

            if (sTxt === 'Toolbar') {
              this.add(innerEle, CLS_POPUPTEXT);
              this.add(innerEle, 'e-tbtn-align');
            } else if (sTxt === 'Overflow') {
              this.add(innerEle, CLS_TBARTEXT);
            }
          }

          if (item.overflow) {
            var overflow = item.overflow;

            if (overflow === 'Show') {
              this.add(innerEle, CLS_TBAROVERFLOW);
            } else if (overflow === 'Hide') {
              if (!innerEle.classList.contains(CLS_SEPARATOR)) {
                this.add(innerEle, CLS_POPOVERFLOW);
              }
            }
          }

          if (item.overflow !== 'Show' && item.showAlwaysInPopup && !innerEle.classList.contains(CLS_SEPARATOR)) {
            this.add(innerEle, CLS_POPPRI);
            this.popupPriCount++;
          }

          if (item.disabled) {
            this.add(innerEle, CLS_DISABLE$2);
          }

          if (item.visible === false) {
            this.add(innerEle, CLS_HIDDEN);
          }

          return innerEle;
        }
      }, {
        key: "itemClick",
        value: function itemClick(e) {
          this.activeEleSwitch(e.currentTarget);
        }
      }, {
        key: "activeEleSwitch",
        value: function activeEleSwitch(ele) {
          this.activeEleRemove(ele.firstElementChild);
          this.activeEle.focus();
        }
      }, {
        key: "activeEleRemove",
        value: function activeEleRemove(curEle) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.activeEle)) {
            this.activeEle.setAttribute('tabindex', '-1');
          }

          this.activeEle = curEle;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {
            curEle.removeAttribute('tabindex');
          } else {
            this.activeEle.setAttribute('tabindex', '0');
          }
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'toolbar';
        }
      }, {
        key: "itemsRerender",
        value: function itemsRerender(newProp) {
          this.items = this.tbarItemsCol;
          this.destroyMode();
          this.destroyItems();
          this.items = newProp;
          this.tbarItemsCol = this.items;
          this.renderItems();
          this.renderOverflowMode();
        }
      }, {
        key: "resize",
        value: function resize() {
          var ele = this.element;
          this.tbResize = true;

          if (this.tbarAlign) {
            this.itemPositioning();
          }

          if (this.popObj && this.overflowMode === 'Popup') {
            this.popObj.hide();
          }

          var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);

          if (!checkOverflow) {
            this.destroyScroll();
            var multirowele = ele.querySelector('.' + CLS_ITEMS);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(multirowele)) {
              this.remove(multirowele, CLS_MULTIROWPOS);

              if (this.tbarAlign) {
                this.add(multirowele, CLS_TBARPOS);
              }
            }
          }

          if (checkOverflow && this.scrollModule && this.offsetWid === ele.offsetWidth) {
            return;
          }

          if (this.offsetWid > ele.offsetWidth || checkOverflow) {
            this.renderOverflowMode();
          }

          if (this.popObj) {
            if (this.overflowMode === 'Extended') {
              var eleStyles = window.getComputedStyle(this.element);
              this.popObj.width = parseFloat(eleStyles.width) + parseFloat(eleStyles.borderRightWidth) * 2;
            }

            if (this.tbarAlign) {
              this.removePositioning();
            }

            this.popupRefresh(this.popObj.element, false);

            if (this.tbarAlign) {
              this.refreshPositioning();
            }
          }

          if (this.element.querySelector('.' + CLS_HSCROLLBAR$1)) {
            this.scrollStep = this.element.querySelector('.' + CLS_HSCROLLBAR$1).offsetWidth;
          }

          this.offsetWid = ele.offsetWidth;
          this.tbResize = false;
          this.separator();
        }
      }, {
        key: "extendedOpen",
        value: function extendedOpen() {
          var sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);

          if (this.overflowMode === 'Extended' && sib) {
            this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);
          }
        }
        /**
         * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
         * @param  {ToolbarModel} newProp
         * @param  {ToolbarModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var tEle = this.element;
          this.extendedOpen();

          for (var _i136 = 0, _Object$keys53 = Object.keys(newProp); _i136 < _Object$keys53.length; _i136++) {
            var prop = _Object$keys53[_i136];

            switch (prop) {
              case 'items':
                if (!(newProp.items instanceof Array && oldProp.items instanceof Array) && !this.isServerRendered) {
                  var changedProb = Object.keys(newProp.items);

                  for (var i = 0; i < changedProb.length; i++) {
                    var index = parseInt(Object.keys(newProp.items)[i], 10);
                    var property = Object.keys(newProp.items[index])[0];
                    var newProperty = Object(newProp.items[index])[property];

                    if (this.tbarAlign || property === 'align') {
                      this.refresh();
                      this.trigger('created');
                      break;
                    }

                    var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;
                    var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;

                    if (popupPriCheck || this.items[index].showAlwaysInPopup && booleanCheck) {
                      --this.popupPriCount;
                    }

                    if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollModule)) {
                      this.destroyMode();
                    }

                    var itemCol = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(itemCol[index]);
                    this.tbarEle.splice(index, 1);
                    this.addItems([this.items[index]], index);
                    this.items.splice(index, 1);

                    if (this.items[index].template) {
                      this.tbarEle.splice(this.items.length, 1);
                    }
                  }
                } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered) {
                  this.serverItemsRerender();
                  this.notify('onItemsChanged', {});
                } else {
                  this.itemsRerender(newProp.items);
                }

                break;

              case 'width':
                var wid = tEle.offsetWidth;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(tEle, {
                  'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width)
                });
                this.renderOverflowMode();

                if (this.popObj && wid < tEle.offsetWidth) {
                  this.popupRefresh(this.popObj.element, false);
                }

                break;

              case 'height':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height)
                });
                break;

              case 'overflowMode':
                this.destroyMode();
                this.renderOverflowMode();

                if (this.enableRtl) {
                  this.add(tEle, CLS_RTL$2);
                }

                this.refreshOverflow();
                break;

              case 'enableRtl':
                newProp.enableRtl ? this.add(tEle, CLS_RTL$2) : this.remove(tEle, CLS_RTL$2);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.scrollModule)) {
                  newProp.enableRtl ? this.add(this.scrollModule.element, CLS_RTL$2) : this.remove(this.scrollModule.element, CLS_RTL$2);
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popObj)) {
                  newProp.enableRtl ? this.add(this.popObj.element, CLS_RTL$2) : this.remove(this.popObj.element, CLS_RTL$2);
                }

                if (this.tbarAlign) {
                  this.itemPositioning();
                }

                break;

              case 'scrollStep':
                if (this.scrollModule) {
                  this.scrollModule.scrollStep = this.scrollStep;
                }

                break;

              case 'enableCollision':
                if (this.popObj) {
                  this.popObj.collision = {
                    Y: this.enableCollision ? 'flip' : 'none'
                  };
                }

                break;

              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], newProp.cssClass.split(' '));
                }

                break;

              case 'allowKeyboard':
                this.unwireKeyboardEvent();

                if (newProp.allowKeyboard) {
                  this.wireKeyboardEvent();
                }

                break;
            }
          }
        }
        /**
         * Shows or hides the Toolbar item that is in the specified index.
         * @param  {number | HTMLElement} index - Index value of target item or DOM element  of items to be hidden or shown.
         * @param  {boolean} value - Based on this Boolean value, item will be hide (true) or show (false). By default, value is false.
         * @returns void.
         */

      }, {
        key: "hideItem",
        value: function hideItem(index, value) {
          var isElement = typeof index === 'object' ? true : false;
          var eleIndex = index;
          var initIndex;
          var ele;
          var innerItems = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));

          if (isElement) {
            ele = index;
          } else if (this.tbarEle[eleIndex]) {
            var _innerItems = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));

            ele = _innerItems[eleIndex];
          }

          if (ele) {
            value ? ele.classList.add(CLS_HIDDEN) : ele.classList.remove(CLS_HIDDEN);

            if (value && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele.firstElementChild.getAttribute('tabindex'))) {
                ele.firstElementChild.setAttribute('tabindex', '-1');

                var _innerItems2 = [].slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM, this.element));

                if (isElement) {
                  eleIndex = _innerItems2.indexOf(ele);
                }

                var nextEle = _innerItems2[++eleIndex];

                while (nextEle) {
                  var skipEle = this.eleContains(nextEle);

                  if (!skipEle) {
                    nextEle.firstElementChild.removeAttribute('tabindex');
                    break;
                  }

                  nextEle = _innerItems2[++eleIndex];
                }
              }
            } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.getAttribute('tabindex')) && !ele.classList.contains(CLS_SEPARATOR)) {
              initIndex = 0;
              var setFlag = false;
              var removeFlag = false;
              var initELe = innerItems[initIndex];

              while (initELe) {
                if (!initELe.classList.contains(CLS_SEPARATOR)) {
                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(initELe.firstElementChild.getAttribute('tabindex'))) {
                    initELe.firstElementChild.setAttribute('tabindex', '-1');
                    setFlag = true;
                  } else {
                    if (setFlag && removeFlag) {
                      break;
                    }

                    var _skipEle = this.eleContains(initELe);

                    if (!_skipEle) {
                      initELe.firstElementChild.removeAttribute('tabindex');
                      removeFlag = true;
                    }

                    initELe = innerItems[++initIndex];
                  }
                } else {
                  initELe = innerItems[++initIndex];
                }
              }
            }

            this.refreshOverflow();
          }
        }
      }]);

      return Toolbar;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Item)], Toolbar.prototype, "items", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Toolbar.prototype, "width", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Toolbar.prototype, "height", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Toolbar.prototype, "cssClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Scrollable')], Toolbar.prototype, "overflowMode", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Toolbar.prototype, "scrollStep", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Toolbar.prototype, "enableCollision", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Toolbar.prototype, "enableHtmlSanitizer", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Toolbar.prototype, "allowKeyboard", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Toolbar.prototype, "clicked", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Toolbar.prototype, "created", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Toolbar.prototype, "destroyed", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Toolbar.prototype, "beforeCreate", void 0);

    Toolbar = __decorate$3([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Toolbar);
    /**
     * Toolbar modules
     */

    var __decorate$4 = undefined && undefined.__decorate || function (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;
    };

    var CLS_ACRDN_ROOT = 'e-acrdn-root';
    var CLS_ROOT$2 = 'e-accordion';
    var CLS_ITEM$1 = 'e-acrdn-item';
    var CLS_ITEMFOCUS = 'e-item-focus';
    var CLS_ITEMHIDE = 'e-hide';
    var CLS_HEADER = 'e-acrdn-header';
    var CLS_HEADERICN = 'e-acrdn-header-icon';
    var CLS_HEADERCTN = 'e-acrdn-header-content';
    var CLS_CONTENT = 'e-acrdn-panel';
    var CLS_CTENT = 'e-acrdn-content';
    var CLS_TOOGLEICN = 'e-toggle-icon';
    var CLS_COLLAPSEICN = 'e-tgl-collapse-icon e-icons';
    var CLS_EXPANDICN = 'e-expand-icon';
    var CLS_RTL$3 = 'e-rtl';
    var CLS_CTNHIDE = 'e-content-hide';
    var CLS_SLCT = 'e-select';
    var CLS_SLCTED = 'e-selected';
    var CLS_ACTIVE = 'e-active';
    var CLS_ANIMATE = 'e-animate';
    var CLS_DISABLE$3 = 'e-overlay';
    var CLS_TOGANIMATE = 'e-toggle-animation';
    var CLS_NEST = 'e-nested';
    var CLS_EXPANDSTATE = 'e-expand-state';
    var CLS_CONTAINER = 'e-accordion-container';
    /**
     * Objects used for configuring the Accordion expanding item action properties.
     */

    var AccordionActionSettings = /*#__PURE__*/function (_syncfusion_ej2_base_38) {
      _inherits(AccordionActionSettings, _syncfusion_ej2_base_38);

      var _super221 = _createSuper(AccordionActionSettings);

      function AccordionActionSettings() {
        _classCallCheck(this, AccordionActionSettings);

        return _super221.apply(this, arguments);
      }

      return AccordionActionSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')], AccordionActionSettings.prototype, "effect", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)], AccordionActionSettings.prototype, "duration", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('linear')], AccordionActionSettings.prototype, "easing", void 0);
    /**
     * Objects used for configuring the Accordion animation properties.
     */


    var AccordionAnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_39) {
      _inherits(AccordionAnimationSettings, _syncfusion_ej2_base_39);

      var _super222 = _createSuper(AccordionAnimationSettings);

      function AccordionAnimationSettings() {
        _classCallCheck(this, AccordionAnimationSettings);

        return _super222.apply(this, arguments);
      }

      return AccordionAnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideUp',
      duration: 400,
      easing: 'linear'
    }, AccordionActionSettings)], AccordionAnimationSettings.prototype, "collapse", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideDown',
      duration: 400,
      easing: 'linear'
    }, AccordionActionSettings)], AccordionAnimationSettings.prototype, "expand", void 0);
    /**
     * An item object that is used to configure Accordion items.
     */


    var AccordionItem = /*#__PURE__*/function (_syncfusion_ej2_base_40) {
      _inherits(AccordionItem, _syncfusion_ej2_base_40);

      var _super223 = _createSuper(AccordionItem);

      function AccordionItem() {
        _classCallCheck(this, AccordionItem);

        return _super223.apply(this, arguments);
      }

      return AccordionItem;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AccordionItem.prototype, "content", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AccordionItem.prototype, "header", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AccordionItem.prototype, "cssClass", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], AccordionItem.prototype, "iconCss", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], AccordionItem.prototype, "expanded", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], AccordionItem.prototype, "visible", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], AccordionItem.prototype, "disabled", void 0);
    /**
     * The Accordion is a vertically collapsible content panel that displays one or more panels at a time within the available space.
     * ```html
     * <div id='accordion'/>
     * <script>
     *   var accordionObj = new Accordion();
     *   accordionObj.appendTo('#accordion');
     * </script>
     * ```
     */


    var Accordion = /*#__PURE__*/function (_syncfusion_ej2_base_41) {
      _inherits(Accordion, _syncfusion_ej2_base_41);

      var _super224 = _createSuper(Accordion);

      /**
       * Initializes a new instance of the Accordion class.
       * @param options  - Specifies Accordion model properties as options.
       * @param element  - Specifies the element that is rendered as an Accordion.
       */
      function Accordion(options, element) {
        var _this601;

        _classCallCheck(this, Accordion);

        _this601 = _super224.call(this, options, element);
        /**
         * Contains the keyboard configuration of the Accordion.
         */

        _this601.keyConfigs = {
          moveUp: 'uparrow',
          moveDown: 'downarrow',
          enter: 'enter',
          space: 'space',
          home: 'home',
          end: 'end'
        };
        return _this601;
      }
      /**
       * Removes the control from the DOM and also removes all its related events.
       * @returns void
       */


      _createClass2(Accordion, [{
        key: "destroy",
        value: function destroy() {
          var _this602 = this;

          var ele = this.element;

          _get(_getPrototypeOf(Accordion.prototype), "destroy", this).call(this);

          this.unwireEvents();
          this.isDestroy = true;
          this.restoreContent(null);
          [].slice.call(ele.children).forEach(function (el) {
            if (!el.classList.contains('blazor-template')) {
              ele.removeChild(el);
            }
          });

          if (this.trgtEle) {
            while (this.ctrlTem.firstElementChild) {
              ele.appendChild(this.ctrlTem.firstElementChild);
            }
          }

          ele.classList.remove(CLS_ACRDN_ROOT);
          ele.removeAttribute('style');
          ['aria-disabled', 'aria-multiselectable', 'role', 'data-ripple'].forEach(function (attrb) {
            _this602.element.removeAttribute(attrb);
          });

          if (!this.isNested && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isRippleEnabled"]) {
            this.removeRippleEffect();
          }
        }
      }, {
        key: "preRender",
        value: function preRender() {
          var nested = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + CLS_CONTENT);
          this.isNested = false;
          this.templateEle = [];

          if (!this.isDestroy) {
            this.isDestroy = false;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nested)) {
            nested.classList.add(CLS_NEST);
            this.isNested = true;
          } else {
            this.element.classList.add(CLS_ACRDN_ROOT);
          }

          if (this.enableRtl) {
            this.add(this.element, CLS_RTL$3);
          }
        }
      }, {
        key: "add",
        value: function add(ele, val) {
          ele.classList.add(val);
        }
      }, {
        key: "remove",
        value: function remove(ele, val) {
          ele.classList.remove(val);
        }
        /**
         * To initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (!this.isServerRendered) {
            this.initializeheaderTemplate();
            this.initializeItemTemplate();
            this.initialize();
            this.renderControl();
          } else {
            this.wireFocusEvents();
          }

          this.wireEvents();
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          var width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
          var height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
            'width': width,
            'height': height
          });
          var ariaAttr = {
            'aria-disabled': 'false',
            'role': 'presentation',
            'aria-multiselectable': 'true'
          };

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.initExpand)) {
            this.initExpand = [];
          }

          if (this.expandedIndices.length > 0) {
            this.initExpand = this.expandedIndices;
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, ariaAttr);

          if (this.expandMode === 'Single') {
            this.element.setAttribute('aria-multiselectable', 'false');
          }
        }
      }, {
        key: "renderControl",
        value: function renderControl() {
          this.trgtEle = this.element.children.length > 0 && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isStringTemplate) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div', this.element) : null;
          this.renderItems();
          this.initItemExpand();
        }
      }, {
        key: "wireFocusEvents",
        value: function wireFocusEvents() {
          var acrdItem = [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1));

          var _iterator143 = _createForOfIteratorHelper(acrdItem),
              _step143;

          try {
            for (_iterator143.s(); !(_step143 = _iterator143.n()).done;) {
              var item = _step143.value;
              var headerEle = item.querySelector('.' + CLS_HEADER);

              if (item.childElementCount > 0 && headerEle) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].clearEvents(headerEle);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(headerEle, 'focus', this.focusIn, this);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(headerEle, 'blur', this.focusOut, this);
              }
            }
          } catch (err) {
            _iterator143.e(err);
          } finally {
            _iterator143.f();
          }
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.keyModule)) {
            this.keyModule.destroy();
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

          if (!this.isNested && !this.isDestroy) {
            this.removeRippleEffect = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, {
              selector: '.' + CLS_HEADER
            });
          }

          if (!this.isNested) {
            this.keyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
              keyAction: this.keyActionHandler.bind(this),
              keyConfigs: this.keyConfigs,
              eventName: 'keydown'
            });
          }
        }
      }, {
        key: "templateParser",
        value: function templateParser(template) {
          if (template) {
            try {
              if (document.querySelectorAll(template).length) {
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
              }
            } catch (error) {
              return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            }
          }

          return undefined;
        }
      }, {
        key: "initializeheaderTemplate",
        value: function initializeheaderTemplate() {
          if (this.headerTemplate) {
            this.headerTemplateFn = this.templateParser(this.headerTemplate);
          }
        }
      }, {
        key: "initializeItemTemplate",
        value: function initializeItemTemplate() {
          if (this.itemTemplate) {
            this.itemTemplateFn = this.templateParser(this.itemTemplate);
          }
        }
      }, {
        key: "getheaderTemplate",
        value: function getheaderTemplate() {
          return this.headerTemplateFn;
        }
      }, {
        key: "getItemTemplate",
        value: function getItemTemplate() {
          return this.itemTemplateFn;
        }
      }, {
        key: "focusIn",
        value: function focusIn(e) {
          e.target.parentElement.classList.add(CLS_ITEMFOCUS);
        }
      }, {
        key: "focusOut",
        value: function focusOut(e) {
          e.target.parentElement.classList.remove(CLS_ITEMFOCUS);
        }
      }, {
        key: "ctrlTemplate",
        value: function ctrlTemplate() {
          this.ctrlTem = this.element.cloneNode(true);
          var innerEles;
          var rootEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTAINER, this.element);

          if (rootEle) {
            innerEles = rootEle.children;
          } else {
            innerEles = this.element.children;
          }

          var items = [];
          /* tslint:disable */

          [].slice.call(innerEles).forEach(function (el) {
            items.push({
              header: el.childElementCount > 0 && el.children[0] ? el.children[0] : '',
              content: el.childElementCount > 1 && el.children[1] ? el.children[1] : ''
            });
            el.parentNode.removeChild(el);
          });
          /* tslint:enable */

          if (rootEle) {
            this.element.removeChild(rootEle);
          }

          this.setProperties({
            items: items
          }, true);
        }
      }, {
        key: "toggleIconGenerate",
        value: function toggleIconGenerate() {
          var tglIcon = this.createElement('div', {
            className: CLS_TOOGLEICN
          });
          var hdrColIcon = this.createElement('span', {
            className: CLS_COLLAPSEICN
          });
          tglIcon.appendChild(hdrColIcon);
          return tglIcon;
        }
      }, {
        key: "initItemExpand",
        value: function initItemExpand() {
          var len = this.initExpand.length;

          if (len === 0) {
            return;
          }

          if (this.expandMode === 'Single') {
            this.expandItem(true, this.initExpand[len - 1]);
          } else {
            for (var i = 0; i < len; i++) {
              this.expandItem(true, this.initExpand[i]);
            }
          }
        }
      }, {
        key: "renderItems",
        value: function renderItems() {
          var _this603 = this;

          var ele = this.element;
          var innerItem;
          var innerDataSourceItem;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.trgtEle)) {
            this.ctrlTemplate();
          }

          if (this.dataSource.length > 0) {
            this.dataSource.forEach(function (item, index) {
              innerDataSourceItem = _this603.renderInnerItem(item, index);
              ele.appendChild(innerDataSourceItem);

              if (innerDataSourceItem.childElementCount > 0) {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerDataSourceItem.querySelector('.' + CLS_HEADER), 'focus', _this603.focusIn, _this603);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerDataSourceItem.querySelector('.' + CLS_HEADER), 'blur', _this603.focusOut, _this603);
              }
            });
          } else {
            var items = this.items;

            if (ele && items.length > 0) {
              items.forEach(function (item, index) {
                innerItem = _this603.renderInnerItem(item, index);
                ele.appendChild(innerItem);

                if (innerItem.childElementCount > 0) {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItem.querySelector('.' + CLS_HEADER), 'focus', _this603.focusIn, _this603);

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItem.querySelector('.' + CLS_HEADER), 'blur', _this603.focusOut, _this603);
                }
              });
            }
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var _this604 = this;

          var trgt = e.target;
          var items = this.getItems();
          var eventArgs = {};
          var index;
          var tglIcon;
          var acrdEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ROOT$2);

          if (acrdEle !== this.element) {
            return;
          }

          trgt.classList.add('e-target');
          var acrdnItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM$1);
          var acrdnHdr = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_HEADER);
          var acrdnCtn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_CONTENT);

          if (acrdnItem && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(acrdnHdr) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(acrdnCtn))) {
            acrdnHdr = acrdnItem.children[0];
            acrdnCtn = acrdnItem.children[1];
          }

          if (acrdnHdr) {
            tglIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TOOGLEICN, acrdnHdr);
          }

          var acrdnCtnItem;

          if (acrdnHdr) {
            acrdnCtnItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(acrdnHdr, '.' + CLS_ITEM$1);
          } else if (acrdnCtn) {
            acrdnCtnItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(acrdnCtn, '.' + CLS_ITEM$1);
          }

          index = this.getIndexByItem(acrdnItem);

          if (acrdnCtnItem) {
            eventArgs.item = items[this.getIndexByItem(acrdnCtnItem)];
          }

          eventArgs.originalEvent = e;
          var ctnCheck = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tglIcon) && acrdnItem.childElementCount <= 1;

          if (ctnCheck && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(acrdnCtn) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER + ' .' + CLS_TOOGLEICN, acrdnCtnItem)))) {
            if (!this.isServerRendered) {
              acrdnItem.appendChild(this.contentRendering(index));
              this.ariaAttrUpdate(acrdnItem);
              this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
            } else {
              var id = acrdnItem.id;

              if (this.items.length > 0) {
                // tslint:disable-next-line:no-any
                this.interopAdaptor.invokeMethodAsync('OnItemClick', index).then(function () {
                  if (_this604.isDestroyed) {
                    return;
                  }

                  _this604.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
                });
              } else {
                // tslint:disable-next-line:no-any
                this.interopAdaptor.invokeMethodAsync('OnDataClick', id).then(function () {
                  if (_this604.isDestroyed) {
                    return;
                  }

                  _this604.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
                });
              }
            }
          } else {
            this.afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem);
          }
        }
      }, {
        key: "afterContentRender",
        value: function afterContentRender(trgt, eventArgs, acrdnItem, acrdnHdr, acrdnCtn, acrdnCtnItem) {
          var _this605 = this;

          var acrdActive = [];
          this.trigger('clicked', eventArgs);
          var cntclkCheck = acrdnCtn && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-target', acrdnCtn));
          var inlineAcrdnSel = '.' + CLS_CONTENT + ' .' + CLS_ROOT$2;
          var inlineEleAcrdn = acrdnCtn && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_ROOT$2, acrdnCtn)) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, inlineAcrdnSel));
          var nestContCheck = acrdnCtn && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_ROOT$2, acrdnCtn)) || !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ROOT$2) === this.element);
          cntclkCheck = cntclkCheck && (inlineEleAcrdn || nestContCheck);
          trgt.classList.remove('e-target');

          if (trgt.classList.contains(CLS_CONTENT) || trgt.classList.contains(CLS_CTENT) || cntclkCheck) {
            return;
          }

          var acrdcontainer = this.element.querySelector('.' + CLS_CONTAINER);
          var acrdnchild = acrdcontainer ? acrdcontainer.children : this.element.children;
          [].slice.call(acrdnchild).forEach(function (el) {
            if (el.classList.contains(CLS_ACTIVE)) {
              acrdActive.push(el);
            }
          });
          var acrdAniEle = [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1 + ' [' + CLS_ANIMATE + ']'));

          if (acrdAniEle.length > 0) {
            var _iterator144 = _createForOfIteratorHelper(acrdAniEle),
                _step144;

            try {
              for (_iterator144.s(); !(_step144 = _iterator144.n()).done;) {
                var el = _step144.value;
                acrdActive.push(el.parentElement);
              }
            } catch (err) {
              _iterator144.e(err);
            } finally {
              _iterator144.f();
            }
          }

          var sameContentCheck = acrdActive.indexOf(acrdnCtnItem) !== -1 && acrdnCtn.getAttribute('e-animate') === 'true';
          var sameHeader = false;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(acrdnItem) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(acrdnHdr)) {
            var _acrdnCtn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, acrdnItem);

            var acrdnRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(acrdnItem, '.' + CLS_ACRDN_ROOT);
            var expandState = acrdnRoot.querySelector('.' + CLS_EXPANDSTATE);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_acrdnCtn)) {
              return;
            }

            sameHeader = expandState === acrdnItem;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(_acrdnCtn) && (!sameContentCheck || acrdnCtnItem.classList.contains(CLS_SLCTED))) {
              this.collapse(_acrdnCtn);
            } else {
              if (acrdActive.length > 0 && this.expandMode === 'Single' && !sameContentCheck) {
                acrdActive.forEach(function (el) {
                  _this605.collapse(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, el));

                  el.classList.remove(CLS_EXPANDSTATE);
                });
              }

              this.expand(_acrdnCtn);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(expandState) && !sameHeader) {
              expandState.classList.remove(CLS_EXPANDSTATE);
            }
          }
        }
      }, {
        key: "eleMoveFocus",
        value: function eleMoveFocus(action, root, trgt) {
          var clst;
          var clstItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM$1);

          if (trgt === root) {
            clst = (action === 'moveUp' ? trgt.lastElementChild : trgt).querySelector('.' + CLS_HEADER);
          } else if (trgt.classList.contains(CLS_HEADER)) {
            clstItem = action === 'moveUp' ? clstItem.previousElementSibling : clstItem.nextElementSibling;

            if (clstItem) {
              clst = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, clstItem);
            }
          }

          if (clst) {
            clst.focus();
          }
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          var trgt = e.target;
          var header = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, CLS_HEADER);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(header) && !trgt.classList.contains(CLS_ROOT$2) && !trgt.classList.contains(CLS_HEADER)) {
            return;
          }

          var clst;
          var root = this.element;
          var content;

          switch (e.action) {
            case 'moveUp':
              this.eleMoveFocus(e.action, root, trgt);
              break;

            case 'moveDown':
              this.eleMoveFocus(e.action, root, trgt);
              break;

            case 'space':
            case 'enter':
              content = trgt.nextElementSibling;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(content) && content.classList.contains(CLS_CONTENT)) {
                if (content.getAttribute('e-animate') !== 'true') {
                  trgt.click();
                }
              } else {
                trgt.click();
              }

              break;

            case 'home':
            case 'end':
              clst = e.action === 'home' ? root.firstElementChild.children[0] : root.lastElementChild.children[0];
              clst.focus();
              break;
          }
        }
      }, {
        key: "headerEleGenerate",
        value: function headerEleGenerate() {
          var header = this.createElement('div', {
            className: CLS_HEADER,
            id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('acrdn_header')
          });
          var items = this.getItems();
          var ariaAttr = {
            'tabindex': '0',
            'role': 'heading',
            'aria-selected': 'false',
            'aria-disabled': 'false',
            'aria-level': items.length.toString()
          };
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(header, ariaAttr);
          return header;
        }
      }, {
        key: "renderInnerItem",
        value: function renderInnerItem(item, index) {
          var innerEle;
          innerEle = this.createElement('div', {
            className: CLS_ITEM$1
          });
          innerEle.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('acrdn_item');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(innerEle, {
            'aria-expanded': 'false'
          });

          if (this.headerTemplate) {
            var ctnEle = this.headerEleGenerate();
            var hdrEle = this.createElement('div', {
              className: CLS_HEADERCTN
            });
            ctnEle.appendChild(hdrEle);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(this.getheaderTemplate()(item, this, 'headerTemplate', this.element.id + '_headerTemplate', false), hdrEle);
            innerEle.appendChild(ctnEle);
            ctnEle.appendChild(this.toggleIconGenerate());
            this.add(innerEle, CLS_SLCT);
            return innerEle;
          }

          if (item.header && this.angularnativeCondiCheck(item, 'header')) {
            if (this.enableHtmlSanitizer && typeof item.header === 'string') {
              item.header = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(item.header);
            }

            var _ctnEle = this.headerEleGenerate();

            var _hdrEle = this.createElement('div', {
              className: CLS_HEADERCTN
            });

            _ctnEle.appendChild(_hdrEle);

            _ctnEle.appendChild(this.fetchElement(_hdrEle, item.header, index, true));

            innerEle.appendChild(_ctnEle);
          }

          var hdr = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, innerEle);

          if (item.expanded && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) && !this.enablePersistence) {
            if (this.initExpand.indexOf(index) === -1) {
              this.initExpand.push(index);
            }
          }

          if (item.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([innerEle], item.cssClass.split(' '));
          }

          if (item.disabled) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([innerEle], CLS_DISABLE$3);
          }

          if (item.visible === false) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([innerEle], CLS_ITEMHIDE);
          }

          if (item.iconCss) {
            var hdrIcnEle = this.createElement('div', {
              className: CLS_HEADERICN
            });
            var icon = this.createElement('span', {
              className: item.iconCss + ' e-icons'
            });
            hdrIcnEle.appendChild(icon);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hdr)) {
              hdr = this.headerEleGenerate();
              hdr.appendChild(hdrIcnEle);
              innerEle.appendChild(hdr);
            } else {
              hdr.insertBefore(hdrIcnEle, hdr.childNodes[0]);
            }
          }

          if (item.content && this.angularnativeCondiCheck(item, 'content')) {
            var hdrIcon = this.toggleIconGenerate();

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hdr)) {
              hdr = this.headerEleGenerate();
              innerEle.appendChild(hdr);
            }

            hdr.appendChild(hdrIcon);
            this.add(innerEle, CLS_SLCT);
          }

          return innerEle;
        }
      }, {
        key: "angularnativeCondiCheck",
        value: function angularnativeCondiCheck(item, prop) {
          var property = prop === 'content' ? item.content : item.header;
          var content = property;

          if (this.isAngular && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(content.elementRef)) {
            var data = content.elementRef.nativeElement.data;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) || data === '' || data.indexOf('bindings=') === -1) {
              return true;
            }

            var parseddata = JSON.parse(content.elementRef.nativeElement.data.replace('bindings=', ''));

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parseddata) && parseddata['ng-reflect-ng-if'] === 'false') {
              return false;
            } else {
              return true;
            }
          } else {
            return true;
          }
        }
      }, {
        key: "fetchElement",
        value: function fetchElement(ele, value, index, isHeader) {
          var templateFn;
          var temString;

          try {
            if (document.querySelectorAll(value).length) {
              var eleVal = document.querySelector(value);
              temString = eleVal.outerHTML.trim();
              ele.appendChild(eleVal);
              eleVal.style.display = '';
            }
          } catch (e) {
            if (typeof value === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && value.indexOf('<div>Blazor') !== 0) {
              ele.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(value);
              /* tslint:disable */
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.trgtEle) && value instanceof HTMLElement) {
              ele.appendChild(value);
              ele.firstElementChild.style.display = '';
              /* tslint:enable */
            } else {
              templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(value);
            }
          }

          var tempArray;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn)) {
            var templateProps;

            if (ele.classList.contains(CLS_HEADERCTN)) {
              templateProps = this.element.id + index + '_header';
            } else if (ele.classList.contains(CLS_CTENT)) {
              templateProps = this.element.id + index + '_content';
            }

            tempArray = templateFn({}, null, null, templateProps, this.isStringTemplate);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tempArray) && tempArray.length > 0 && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tempArray[0].tagName) && tempArray.length === 1)) {
            [].slice.call(tempArray).forEach(function (el) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(el.tagName)) {
                el.style.display = '';
              }

              ele.appendChild(el);
            });
          } else if (ele.childElementCount === 0) {
            ele.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(value);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(temString)) {
            if (this.templateEle.indexOf(value) === -1) {
              this.templateEle.push(value);
            }
          }

          return ele;
        }
      }, {
        key: "ariaAttrUpdate",
        value: function ariaAttrUpdate(itemEle) {
          var header = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, itemEle);
          var content = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT, itemEle);
          header.setAttribute('aria-controls', content.id);
          content.setAttribute('aria-labelledby', header.id);
          content.setAttribute('role', 'definition');
        }
      }, {
        key: "contentRendering",
        value: function contentRendering(index) {
          var itemcnt = this.createElement('div', {
            className: CLS_CONTENT + ' ' + CLS_CTNHIDE,
            id: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('acrdn_panel')
          });
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(itemcnt, {
            'aria-hidden': 'true'
          });
          var ctn = this.createElement('div', {
            className: CLS_CTENT
          });

          if (this.dataSource.length > 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(this.getItemTemplate()(this.dataSource[index], this, 'itemTemplate', this.element.id + '_itemTemplate', false), ctn);
            itemcnt.appendChild(ctn);
          } else {
            if (this.enableHtmlSanitizer && typeof this.items[index].content) {
              this.items[index].content = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.items[index].content);
            }

            itemcnt.appendChild(this.fetchElement(ctn, this.items[index].content, index, false));
          }

          return itemcnt;
        }
      }, {
        key: "expand",
        value: function expand(trgt) {
          var _this606 = this;

          var eventArgs;
          var items = this.getItems();
          var trgtItemEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM$1);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgt) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(trgt) && trgt.getAttribute('e-animate') !== 'true' || trgtItemEle.classList.contains(CLS_DISABLE$3)) {
            return;
          }

          var acrdnRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgtItemEle, '.' + CLS_ACRDN_ROOT);
          var expandState = acrdnRoot.querySelector('.' + CLS_EXPANDSTATE);
          var animation = {
            name: this.animation.expand.effect,
            duration: this.animation.expand.duration,
            timingFunction: this.animation.expand.easing
          };
          var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TOOGLEICN, trgtItemEle).firstElementChild;
          eventArgs = {
            element: trgtItemEle,
            item: items[this.getIndexByItem(trgtItemEle)],
            index: this.getIndexByItem(trgtItemEle),
            content: trgtItemEle.querySelector('.' + CLS_CONTENT),
            isExpanded: true
          };
          this.trigger('expanding', eventArgs, function (expandArgs) {
            if (!expandArgs.cancel) {
              icon.classList.add(CLS_TOGANIMATE);

              _this606.expandedItemsPush(trgtItemEle);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(expandState)) {
                expandState.classList.remove(CLS_EXPANDSTATE);
              }

              trgtItemEle.classList.add(CLS_EXPANDSTATE);

              if (animation.name === 'None') {
                _this606.expandProgress('begin', icon, trgt, trgtItemEle, expandArgs);

                _this606.expandProgress('end', icon, trgt, trgtItemEle, expandArgs);
              } else {
                _this606.expandAnimation(animation.name, icon, trgt, trgtItemEle, animation, expandArgs);
              }
            }
          });
        }
      }, {
        key: "expandAnimation",
        value: function expandAnimation(ef, icn, trgt, trgtItemEle, animate, args) {
          var _this607 = this;

          var height;
          this.lastActiveItemId = trgtItemEle.id;

          if (ef === 'SlideDown') {
            animate.begin = function () {
              _this607.expandProgress('begin', icn, trgt, trgtItemEle, args);

              trgt.style.position = 'absolute';
              height = trgtItemEle.offsetHeight;
              trgt.style.maxHeight = trgt.offsetHeight + 'px';
              trgtItemEle.style.maxHeight = '';
            };

            animate.progress = function () {
              trgtItemEle.style.minHeight = height + trgt.offsetHeight + 'px';
            };

            animate.end = function () {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(trgt, {
                'position': '',
                'maxHeight': ''
              });
              trgtItemEle.style.minHeight = '';

              _this607.expandProgress('end', icn, trgt, trgtItemEle, args);
            };
          } else {
            animate.begin = function () {
              _this607.expandProgress('begin', icn, trgt, trgtItemEle, args);
            };

            animate.end = function () {
              _this607.expandProgress('end', icn, trgt, trgtItemEle, args);
            };
          }

          new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animate).animate(trgt);
        }
      }, {
        key: "expandProgress",
        value: function expandProgress(progress, icon, trgt, trgtItemEle, eventArgs) {
          this.remove(trgt, CLS_CTNHIDE);
          this.add(trgtItemEle, CLS_SLCTED);
          this.add(icon, CLS_EXPANDICN);

          if (progress === 'end') {
            this.add(trgtItemEle, CLS_ACTIVE);
            trgt.setAttribute('aria-hidden', 'false');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(trgtItemEle, {
              'aria-expanded': 'true'
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(trgt.previousElementSibling, {
              'aria-selected': 'true'
            });
            icon.classList.remove(CLS_TOGANIMATE);
            this.trigger('expanded', eventArgs);
          }
        }
      }, {
        key: "expandedItemsPush",
        value: function expandedItemsPush(item) {
          var index = this.getIndexByItem(item);

          if (this.expandedIndices.indexOf(index) === -1) {
            var temp = [].slice.call(this.expandedIndices);
            temp.push(index);
            this.setProperties({
              expandedIndices: temp
            }, true);
          }
        }
      }, {
        key: "getIndexByItem",
        value: function getIndexByItem(item) {
          var itemEle = this.getItemElements();
          return [].slice.call(itemEle).indexOf(item);
        }
      }, {
        key: "getItemElements",
        value: function getItemElements() {
          var itemEle = [];
          var itemCollection = this.element.children;
          [].slice.call(itemCollection).forEach(function (el) {
            if (el.classList.contains(CLS_ITEM$1)) {
              itemEle.push(el);
            }
          });
          return itemEle;
        }
      }, {
        key: "expandedItemsPop",
        value: function expandedItemsPop(item) {
          var index = this.getIndexByItem(item);
          var temp = [].slice.call(this.expandedIndices);
          temp.splice(temp.indexOf(index), 1);
          this.setProperties({
            expandedIndices: temp
          }, true);
        }
      }, {
        key: "collapse",
        value: function collapse(trgt) {
          var _this608 = this;

          var eventArgs;
          var items = this.getItems();
          var trgtItemEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '.' + CLS_ITEM$1);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgt) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(trgt) || trgtItemEle.classList.contains(CLS_DISABLE$3)) {
            return;
          }

          var animation = {
            name: this.animation.collapse.effect,
            duration: this.animation.collapse.duration,
            timingFunction: this.animation.collapse.easing
          };
          var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TOOGLEICN, trgtItemEle).firstElementChild;
          eventArgs = {
            element: trgtItemEle,
            item: items[this.getIndexByItem(trgtItemEle)],
            index: this.getIndexByItem(trgtItemEle),
            content: trgtItemEle.querySelector('.' + CLS_CONTENT),
            isExpanded: false
          };
          this.trigger('expanding', eventArgs, function (expandArgs) {
            if (!expandArgs.cancel) {
              _this608.expandedItemsPop(trgtItemEle);

              trgtItemEle.classList.add(CLS_EXPANDSTATE);
              icon.classList.add(CLS_TOGANIMATE);

              if (animation.name === 'None') {
                _this608.collapseProgress('begin', icon, trgt, trgtItemEle, expandArgs);

                _this608.collapseProgress('end', icon, trgt, trgtItemEle, expandArgs);
              } else {
                _this608.collapseAnimation(animation.name, trgt, trgtItemEle, icon, animation, expandArgs);
              }
            }
          });
        }
      }, {
        key: "collapseAnimation",
        value: function collapseAnimation(ef, trgt, trgtItEl, icn, animate, args) {
          var _this609 = this;

          var height;
          var trgtHeight;
          var itemHeight;
          var remain;
          this.lastActiveItemId = trgtItEl.id;

          if (ef === 'SlideUp') {
            animate.begin = function () {
              itemHeight = trgtItEl.offsetHeight;
              trgtItEl.style.minHeight = itemHeight + 'px';
              trgt.style.position = 'absolute';
              height = trgtItEl.offsetHeight;
              trgtHeight = trgt.offsetHeight;
              trgt.style.maxHeight = trgtHeight + 'px';

              _this609.collapseProgress('begin', icn, trgt, trgtItEl, args);
            };

            animate.progress = function () {
              remain = height - (trgtHeight - trgt.offsetHeight);

              if (remain < itemHeight) {
                trgtItEl.style.minHeight = remain + 'px';
              }
            };

            animate.end = function () {
              trgt.style.display = 'none';

              _this609.collapseProgress('end', icn, trgt, trgtItEl, args);

              trgtItEl.style.minHeight = '';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(trgt, {
                'position': '',
                'maxHeight': '',
                'display': ''
              });
            };
          } else {
            animate.begin = function () {
              _this609.collapseProgress('begin', icn, trgt, trgtItEl, args);
            };

            animate.end = function () {
              _this609.collapseProgress('end', icn, trgt, trgtItEl, args);
            };
          }

          new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animate).animate(trgt);
        }
      }, {
        key: "collapseProgress",
        value: function collapseProgress(progress, icon, trgt, trgtItemEle, eventArgs) {
          this.remove(icon, CLS_EXPANDICN);
          this.remove(trgtItemEle, CLS_SLCTED);

          if (progress === 'end') {
            this.add(trgt, CLS_CTNHIDE);
            icon.classList.remove(CLS_TOGANIMATE);
            this.remove(trgtItemEle, CLS_ACTIVE);
            trgt.setAttribute('aria-hidden', 'true');
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(trgtItemEle, {
              'aria-expanded': 'false'
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(trgt.previousElementSibling, {
              'aria-selected': 'false'
            });
            this.trigger('expanded', eventArgs);
          }
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'accordion';
        }
      }, {
        key: "itemAttribUpdate",
        value: function itemAttribUpdate() {
          var items = this.getItems();
          var itemEle = this.getItemElements();
          var itemLen = items.length;
          itemEle.forEach(function (ele) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, ele).setAttribute('aria-level', '' + itemLen);
          });
        }
      }, {
        key: "getItems",
        value: function getItems() {
          var items;

          if (this.itemTemplate && this.headerTemplate) {
            items = this.dataSource;
          } else {
            items = this.items;
          }

          return items;
        }
        /**
         * Adds new item to the Accordion with the specified index of the Accordion.
         * @param  {AccordionItemModel | AccordionItemModel[] | Object | Object[]} item - Item array that is to be added to the Accordion.
         * @param  {number} index - Number value that determines where the item should be added.
         * By default, item is added at the last index if the index is not specified.
         * @returns void
         * @deprecated
         */

      }, {
        key: "addItem",
        value: function addItem(item, index) {
          var _this610 = this;

          var ele = this.element;
          var itemEle = this.getItemElements();
          var items = this.getItems();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            index = items.length;
          }

          if (ele.childElementCount >= index) {
            var addItems = item instanceof Array ? item : [item];
            addItems.forEach(function (addItem, i) {
              var itemIndex = index + i;
              items.splice(itemIndex, 0, addItem);

              var innerItemEle = _this610.renderInnerItem(addItem, itemIndex);

              if (ele.childElementCount === itemIndex) {
                ele.appendChild(innerItemEle);
              } else {
                ele.insertBefore(innerItemEle, itemEle[itemIndex]);
              }

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItemEle.querySelector('.' + CLS_HEADER), 'focus', _this610.focusIn, _this610);

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(innerItemEle.querySelector('.' + CLS_HEADER), 'blur', _this610.focusOut, _this610);

              _this610.itemAttribUpdate();

              _this610.expandedIndices = [];

              _this610.expandedItemRefresh(ele);

              if (addItem && addItem.expanded) {
                _this610.expandItem(true, itemIndex);
              }
            });
          }
        }
      }, {
        key: "expandedItemRefresh",
        value: function expandedItemRefresh(ele) {
          var _this611 = this;

          var itemEle = this.getItemElements();
          [].slice.call(itemEle).forEach(function (el) {
            if (el.classList.contains(CLS_SLCTED)) {
              _this611.expandedItemsPush(el);
            }
          });
        }
        /**
         * Dynamically removes item from Accordion.
         * @param  {number} index - Number value that determines which item should be removed.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "removeItem",
        value: function removeItem(index) {
          var itemEle = this.getItemElements();
          var ele = itemEle[index];
          var items = this.getItems();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return;
          }

          this.restoreContent(index);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
          items.splice(index, 1);
          this.itemAttribUpdate();
          this.expandedIndices = [];
          this.expandedItemRefresh(this.element);
        }
        /**
         * Sets focus to the specified index item header in Accordion.
         * @param  {number} index - Number value that determines which item should be focused.
         * @returns void.
         */

      }, {
        key: "select",
        value: function select(index) {
          var itemEle = this.getItemElements();
          var ele = itemEle[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER, ele))) {
            return;
          }

          ele.children[0].focus();
        }
        /**
         * Shows or hides the specified item from Accordion.
         * @param  {number} index - Number value that determines which item should be hidden/shown.
         * @param  {Boolean} isHidden - Boolean value that determines the action either hide (true) or show (false). Default value is false.
         *  If the `isHidden` value is false, the item is shown or else item it is hidden.
         * @returns void.
         */

      }, {
        key: "hideItem",
        value: function hideItem(index, isHidden) {
          var itemEle = this.getItemElements();
          var ele = itemEle[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isHidden)) {
            isHidden = true;
          }

          isHidden ? this.add(ele, CLS_ITEMHIDE) : this.remove(ele, CLS_ITEMHIDE);
        }
        /**
         * Enables/Disables the specified Accordion item.
         * @param  {number} index - Number value that determines which item should be enabled/disabled.
         * @param  {boolean} isEnable - Boolean value that determines the action as enable (true) or disable (false).
         * If the `isEnable` value is true, the item is enabled or else it is disabled.
         * @returns void.
         */

      }, {
        key: "enableItem",
        value: function enableItem(index, isEnable) {
          var itemEle = this.getItemElements();
          var ele = itemEle[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return;
          }

          var eleHeader = ele.firstElementChild;

          if (isEnable) {
            this.remove(ele, CLS_DISABLE$3);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(eleHeader, {
              'tabindex': '0',
              'aria-disabled': 'false'
            });
            eleHeader.focus();
          } else {
            if (ele.classList.contains(CLS_ACTIVE)) {
              this.expandItem(false, index);
              this.eleMoveFocus('movedown', this.element, eleHeader);
            }

            this.add(ele, CLS_DISABLE$3);
            eleHeader.setAttribute('aria-disabled', 'true');
            eleHeader.removeAttribute('tabindex');
          }
        }
        /**
         * Refresh the Accordion component.
         * @returns void.
         */

      }, {
        key: "refresh",
        value: function refresh() {
          if (!this.isServerRendered) {
            _get(_getPrototypeOf(Accordion.prototype), "refresh", this).call(this);
          }
        }
        /**
         * Expands/Collapses the specified Accordion item.
         * @param  {boolean} isExpand - Boolean value that determines the action as expand or collapse.
         * @param  {number} index - Number value that determines which item should be expanded/collapsed.`index` is optional parameter.
         *  Without Specifying index, based on the `isExpand` value all Accordion item can be expanded or collapsed.
         * @returns void.
         */

      }, {
        key: "expandItem",
        value: function expandItem(isExpand, index) {
          var _this612 = this;

          var itemEle = this.getItemElements();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            if (this.expandMode === 'Single' && isExpand) {
              var ele = itemEle[itemEle.length - 1];
              this.itemExpand(isExpand, ele, this.getIndexByItem(ele));
            } else {
              var item = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + this.lastActiveItemId, this.element);
              [].slice.call(itemEle).forEach(function (el) {
                _this612.itemExpand(isExpand, el, _this612.getIndexByItem(el));

                el.classList.remove(CLS_EXPANDSTATE);
              });
              var expandedItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_EXPANDSTATE, this.element);

              if (expandedItem) {
                expandedItem.classList.remove(CLS_EXPANDSTATE);
              }

              if (item) {
                item.classList.add(CLS_EXPANDSTATE);
              }
            }
          } else {
            var _ele7 = itemEle[index];

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_ele7) || !_ele7.classList.contains(CLS_SLCT) || _ele7.classList.contains(CLS_ACTIVE) && isExpand) {
              return;
            } else {
              if (this.expandMode === 'Single') {
                this.expandItem(false);
              }

              this.itemExpand(isExpand, _ele7, index);
            }
          }
        }
      }, {
        key: "itemExpand",
        value: function itemExpand(isExpand, ele, index) {
          var _this613 = this;

          var ctn = ele.children[1];

          if (ele.classList.contains(CLS_DISABLE$3)) {
            return;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ctn) && isExpand) {
            if (!this.isServerRendered) {
              ctn = this.contentRendering(index);
              ele.appendChild(ctn);
              this.ariaAttrUpdate(ele);
              this.expand(ctn);
            } else {
              var id = ele.id;

              if (this.items.length > 0) {
                // tslint:disable-next-line:no-any
                this.interopAdaptor.invokeMethodAsync('OnItemClick', index).then(function () {
                  if (_this613.isDestroyed) {
                    return;
                  }

                  ctn = ele.children[1];

                  _this613.expand(ctn);
                });
              } else {
                // tslint:disable-next-line:no-any
                this.interopAdaptor.invokeMethodAsync('OnDataClick', id).then(function () {
                  if (_this613.isDestroyed) {
                    return;
                  }

                  ctn = ele.children[1];

                  _this613.expand(ctn);
                });
              }
            }
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ctn)) {
            isExpand ? this.expand(ctn) : this.collapse(ctn);
          }
        }
      }, {
        key: "destroyItems",
        value: function destroyItems() {
          this.restoreContent(null);
          [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM$1)).forEach(function (el) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(el);
          });
        }
      }, {
        key: "restoreContent",
        value: function restoreContent(index) {
          var ctnElePos;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            ctnElePos = this.element;
          } else {
            ctnElePos = this.element.querySelectorAll('.' + CLS_ITEM$1)[index];
          }

          this.templateEle.forEach(function (eleStr) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ctnElePos.querySelector(eleStr))) {
              document.body.appendChild(ctnElePos.querySelector(eleStr)).style.display = 'none';
            }
          });
        }
      }, {
        key: "updateItem",
        value: function updateItem(item, index) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            var items = this.getItems();
            var itemObj = items[index];
            items.splice(index, 1);
            this.restoreContent(index);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(item);
            this.addItem(itemObj, index);
          }
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['expandedIndices'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
         * @param  {AccordionModel} newProp
         * @param  {AccordionModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var acrdn = this.element;
          var isRefresh = false;

          for (var _i137 = 0, _Object$keys54 = Object.keys(newProp); _i137 < _Object$keys54.length; _i137++) {
            var prop = _Object$keys54[_i137];

            switch (prop) {
              case 'items':
                if (this.isServerRendered) {
                  this.wireFocusEvents();
                  break;
                }

                if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
                  var changedProp = Object.keys(newProp.items);

                  for (var j = 0; j < changedProp.length; j++) {
                    var index = parseInt(Object.keys(newProp.items)[j], 10);
                    var property = Object.keys(newProp.items[index])[0];
                    var item = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM$1, this.element)[index];
                    var oldVal = Object(oldProp.items[index])[property];
                    var newVal = Object(newProp.items[index])[property];
                    var temp = property;

                    if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || temp === 'content' && oldVal === '') {
                      this.updateItem(item, index);
                    }

                    if (property === 'cssClass' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                      item.classList.remove(oldVal);
                      item.classList.add(newVal);
                    }

                    if (property === 'visible' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                      Object(newProp.items[index])[property] === false ? item.classList.add(CLS_ITEMHIDE) : item.classList.remove(CLS_ITEMHIDE);
                    }

                    if (property === 'disabled' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                      this.enableItem(index, !newVal);
                    }

                    if (property === 'content' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item) && item.children.length === 2) {
                      if (item.classList.contains(CLS_SLCTED)) {
                        this.expandItem(false, index);
                      }

                      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(item.querySelector('.' + CLS_CONTENT));
                    }
                  }
                } else {
                  isRefresh = true;
                }

                break;

              case 'dataSource':
              case 'expandedIndices':
                if (this.expandedIndices === null) {
                  this.expandedIndices = [];
                }

                isRefresh = true;
                break;

              case 'headerTemplate':
                this.initializeheaderTemplate();
                isRefresh = true;
                break;

              case 'itemTemplate':
                this.initializeItemTemplate();
                isRefresh = true;
                break;

              case 'enableRtl':
                newProp.enableRtl ? this.add(acrdn, CLS_RTL$3) : this.remove(acrdn, CLS_RTL$3);
                break;

              case 'height':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height)
                });
                break;

              case 'width':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width)
                });
                break;

              case 'expandMode':
                if (newProp.expandMode === 'Single') {
                  this.element.setAttribute('aria-multiselectable', 'false');

                  if (this.expandedIndices.length > 1) {
                    this.expandItem(false);
                  }
                } else {
                  this.element.setAttribute('aria-multiselectable', 'true');
                }

                break;
            }
          }

          if (isRefresh && !this.isServerRendered) {
            this.initExpand = [];

            if (this.expandedIndices.length > 0) {
              this.initExpand = this.expandedIndices;
            }

            this.destroyItems();
            this.renderItems();
            this.initItemExpand();
          }
        }
      }]);

      return Accordion;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], AccordionItem)], Accordion.prototype, "items", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], Accordion.prototype, "dataSource", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Accordion.prototype, "itemTemplate", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Accordion.prototype, "headerTemplate", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], Accordion.prototype, "width", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Accordion.prototype, "height", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], Accordion.prototype, "expandedIndices", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Multiple')], Accordion.prototype, "expandMode", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Accordion.prototype, "enableHtmlSanitizer", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AccordionAnimationSettings)], Accordion.prototype, "animation", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Accordion.prototype, "clicked", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Accordion.prototype, "expanding", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Accordion.prototype, "expanded", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Accordion.prototype, "created", void 0);

    __decorate$4([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Accordion.prototype, "destroyed", void 0);

    Accordion = __decorate$4([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Accordion);
    /**
     * Accordion all modules
     */

    var __decorate$5 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../common/menu-base-model.d.ts'/>

    /**
     * The ContextMenu is a graphical user interface that appears on the user right click/touch hold operation.
     * ```html
     * <div id = 'target'></div>
     * <ul id = 'contextmenu'></ul>
     * ```
     * ```typescript
     * <script>
     * var contextMenuObj = new ContextMenu({items: [{ text: 'Cut' }, { text: 'Copy' },{ text: 'Paste' }], target: '#target'});
     * </script>
     * ```
     */


    var ContextMenu = /*#__PURE__*/function (_MenuBase) {
      _inherits(ContextMenu, _MenuBase);

      var _super225 = _createSuper(ContextMenu);

      /**
       * Constructor for creating the widget.
       * @private
       */
      function ContextMenu(options, element) {
        _classCallCheck(this, ContextMenu);

        return _super225.call(this, options, element);
      }
      /**
       * For internal use only - prerender processing.
       * @private
       */


      _createClass2(ContextMenu, [{
        key: "preRender",
        value: function preRender() {
          this.isMenu = false;
          this.element.id = this.element.id || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-contextmenu');

          _get(_getPrototypeOf(ContextMenu.prototype), "preRender", this).call(this);
        }
      }, {
        key: "initialize",
        value: function initialize() {
          _get(_getPrototypeOf(ContextMenu.prototype), "initialize", this).call(this);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'role': 'context menu',
            'tabindex': '0'
          });
          this.element.style.zIndex = Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["getZindexPartial"])(this.element).toString();
        }
        /**
         * This method is used to open the ContextMenu in specified position.
         * @param top - To specify ContextMenu vertical positioning.
         * @param left - To specify ContextMenu horizontal positioning.
         * @param target - To calculate z-index for ContextMenu based upon the specified target.
         * @method open
         * @returns void
         */

      }, {
        key: "open",
        value: function open(top, left, target) {
          _get(_getPrototypeOf(ContextMenu.prototype), "openMenu", this).call(this, null, null, top, left, null, target);
        }
        /**
         * Closes the ContextMenu if it is opened.
         */

      }, {
        key: "close",
        value: function close() {
          _get(_getPrototypeOf(ContextMenu.prototype), "closeMenu", this).call(this);
        }
        /**
         * Called internally if any of the property value changed
         * @private
         * @param {ContextMenuModel} newProp
         * @param {ContextMenuModel} oldProp
         * @returns void
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          _get(_getPrototypeOf(ContextMenu.prototype), "onPropertyChanged", this).call(this, newProp, oldProp);

          for (var _i138 = 0, _Object$keys55 = Object.keys(newProp); _i138 < _Object$keys55.length; _i138++) {
            var prop = _Object$keys55[_i138];

            switch (prop) {
              case 'filter':
                this.close();
                this.filter = newProp.filter;
                break;

              case 'target':
                this.unWireEvents(oldProp.target);
                this.wireEvents();
                break;
            }
          }
        }
        /**
         * Get module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'contextmenu';
        }
      }]);

      return ContextMenu;
    }(MenuBase);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ContextMenu.prototype, "target", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ContextMenu.prototype, "filter", void 0);

    __decorate$5([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], MenuItem)], ContextMenu.prototype, "items", void 0);

    ContextMenu = __decorate$5([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ContextMenu);
    /**
     * ContextMenu modules
     */

    var __decorate$6 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../common/menu-base-model.d.ts'/>


    var VMENU = 'e-vertical';
    var SCROLLABLE = 'e-scrollable';
    var HAMBURGER = 'e-hamburger';
    /**
     * The Menu is a graphical user interface that serve as navigation headers for your application or site.
     * ```html
     * <ul id = 'menu'></ul>
     * ```
     * ```typescript
     * <script>
     * var menuObj = new Menu({ items: [{ text: 'Home' }, { text: 'Contact Us' },{ text: 'Login' }]});
     * menuObj.appendTo("#menu");
     * </script>
     * ```
     */

    var Menu = /*#__PURE__*/function (_MenuBase2) {
      _inherits(Menu, _MenuBase2);

      var _super226 = _createSuper(Menu);

      /**
       * Constructor for creating the component.
       * @private
       */
      function Menu(options, element) {
        var _this614;

        _classCallCheck(this, Menu);

        _this614 = _super226.call(this, options, element);
        _this614.tempItems = [];
        return _this614;
      }
      /**
       * Get module name.
       * @returns string
       * @private
       */


      _createClass2(Menu, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'menu';
        }
        /**
         * For internal use only - prerender processing.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          this.isMenu = true;
          this.element.id = this.element.id || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('ej2-menu');

          if (this.template) {
            try {
              if (document.querySelectorAll(this.template).length) {
                this.template = document.querySelector(this.template).innerHTML.trim();
                this.clearChanges();
              }
            } catch (e) {
              /* action on catch */
            }
          } else {
            this.updateMenuItems(this.items);
          }

          _get(_getPrototypeOf(Menu.prototype), "preRender", this).call(this);
        }
      }, {
        key: "initialize",
        value: function initialize() {
          _get(_getPrototypeOf(Menu.prototype), "initialize", this).call(this);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'role': 'menubar',
            'tabindex': '0'
          });

          if (this.orientation === 'Vertical') {
            this.element.classList.add(VMENU);

            if (this.hamburgerMode && !this.target) {
              this.element.previousElementSibling.classList.add(VMENU);
            }

            this.element.setAttribute('aria-orientation', 'vertical');
          } else {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && !this.enableScrolling) {
              this.element.parentElement.classList.add(SCROLLABLE);
            }
          }

          if (this.hamburgerMode) {
            this.element.parentElement.classList.add(HAMBURGER);

            if (this.orientation === 'Horizontal') {
              this.element.classList.add('e-hide-menu');
            }
          }
        }
      }, {
        key: "updateMenuItems",
        value: function updateMenuItems(items) {
          this.tempItems = items;
          this.items = [];
          this.tempItems.map(this.createMenuItems, this);
          this.setProperties({
            items: this.items
          }, true);
          this.tempItems = [];
        }
        /**
         * Called internally if any of the property value changed
         * @private
         * @param {MenuModel} newProp
         * @param {MenuModel} oldProp
         * @returns void
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i139 = 0, _Object$keys56 = Object.keys(newProp); _i139 < _Object$keys56.length; _i139++) {
            var prop = _Object$keys56[_i139];

            switch (prop) {
              case 'orientation':
                if (newProp.orientation === 'Vertical') {
                  this.element.classList.add(VMENU);

                  if (this.hamburgerMode) {
                    if (!this.target) {
                      this.element.previousElementSibling.classList.add(VMENU);
                    }

                    this.element.classList.remove('e-hide-menu');
                  }

                  this.element.setAttribute('aria-orientation', 'vertical');
                } else {
                  this.element.classList.remove(VMENU);

                  if (this.hamburgerMode) {
                    if (!this.target) {
                      this.element.previousElementSibling.classList.remove(VMENU);
                    }

                    this.element.classList.add('e-hide-menu');
                  }

                  this.element.removeAttribute('aria-orientation');
                }

                break;

              case 'items':
                if (!Object.keys(oldProp.items).length) {
                  this.updateMenuItems(newProp.items);
                }

                break;

              case 'hamburgerMode':
                if (!this.element.previousElementSibling) {
                  _get(_getPrototypeOf(Menu.prototype), "createHeaderContainer", this).call(this);
                }

                if (newProp.hamburgerMode) {
                  this.element.parentElement.classList.add(HAMBURGER);
                } else {
                  this.element.parentElement.classList.remove(HAMBURGER);
                }

                if (this.orientation === 'Vertical') {
                  if (!this.target) {
                    this.element.previousElementSibling.classList.add(VMENU);
                  }

                  this.element.classList.remove('e-hide-menu');
                } else {
                  if (this.target) {
                    this.element.previousElementSibling.classList.add(VMENU);
                  } else {
                    this.element.previousElementSibling.classList.remove(VMENU);
                  }

                  this.element.classList[newProp.hamburgerMode ? 'add' : 'remove']('e-hide-menu');
                }

                break;

              case 'title':
                if (this.hamburgerMode && this.element.previousElementSibling) {
                  newProp.title = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(newProp.title) : newProp.title;
                  this.element.previousElementSibling.querySelector('.e-menu-title').innerHTML = newProp.title;
                }

                break;

              case 'target':
                if (this.hamburgerMode) {
                  this.unWireEvents(oldProp.target);
                  this.wireEvents();

                  if (this.orientation === 'Horizontal') {
                    if (!newProp.target) {
                      if (!this.element.previousElementSibling) {
                        _get(_getPrototypeOf(Menu.prototype), "createHeaderContainer", this).call(this);
                      }

                      this.element.previousElementSibling.classList.remove(VMENU);
                    } else {
                      this.element.previousElementSibling.classList.add(VMENU);
                    }

                    this.element.classList.add('e-hide-menu');
                  }
                }

                break;
            }
          }

          _get(_getPrototypeOf(Menu.prototype), "onPropertyChanged", this).call(this, newProp, oldProp);
        }
      }, {
        key: "createMenuItems",
        value: function createMenuItems(item) {
          var pIdField;
          var idx;
          var i;
          var items = this.items;
          pIdField = this.getField('parentId');

          if (item[pIdField]) {
            idx = this.getIndex(item[pIdField].toString(), true);

            for (i = 0; i < idx.length; i++) {
              if (!items[idx[i]].items) {
                items[idx[i]].items = [];
              }

              items = items[idx[i]].items;
            }

            items.push(item);
          } else {
            this.items.push(item);
          }
        }
        /**
         * This method is used to open the Menu in hamburger mode.
         * @method open
         * @returns void
         */

      }, {
        key: "open",
        value: function open() {
          _get(_getPrototypeOf(Menu.prototype), "openHamburgerMenu", this).call(this);
        }
        /**
         * Closes the Menu if it is opened in hamburger mode.
         */

      }, {
        key: "close",
        value: function close() {
          _get(_getPrototypeOf(Menu.prototype), "closeHamburgerMenu", this).call(this);
        }
      }]);

      return Menu;
    }(MenuBase);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Horizontal')], Menu.prototype, "orientation", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Menu.prototype, "target", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Menu.prototype, "template", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Menu.prototype, "enableScrolling", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Menu.prototype, "hamburgerMode", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Menu')], Menu.prototype, "title", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Menu.prototype, "enableHtmlSanitizer", void 0);

    __decorate$6([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      itemId: "id",
      text: "text",
      parentId: "parentId",
      iconCss: "iconCss",
      url: "url",
      separator: "separator",
      children: "items"
    }, FieldSettings)], Menu.prototype, "fields", void 0);

    Menu = __decorate$6([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Menu);
    /**
     * Menu modules
     */

    var __decorate$7 = undefined && undefined.__decorate || function (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;
    };

    var CLS_TAB = 'e-tab';
    var CLS_HEADER$1 = 'e-tab-header';
    var CLS_BLA_TEM = 'blazor-template';
    var CLS_CONTENT$1 = 'e-content';
    var CLS_NEST$1 = 'e-nested';
    var CLS_ITEMS$1 = 'e-items';
    var CLS_ITEM$2 = 'e-item';
    var CLS_TEMPLATE$1 = 'e-template';
    var CLS_RTL$4 = 'e-rtl';
    var CLS_ACTIVE$1 = 'e-active';
    var CLS_DISABLE$4 = 'e-disable';
    var CLS_HIDDEN$1 = 'e-hidden';
    var CLS_FOCUS = 'e-focused';
    var CLS_ICONS = 'e-icons';
    var CLS_ICON = 'e-icon';
    var CLS_ICON_TAB = 'e-icon-tab';
    var CLS_ICON_CLOSE = 'e-close-icon';
    var CLS_CLOSE_SHOW = 'e-close-show';
    var CLS_TEXT = 'e-tab-text';
    var CLS_INDICATOR = 'e-indicator';
    var CLS_WRAP = 'e-tab-wrap';
    var CLS_TEXT_WRAP = 'e-text-wrap';
    var CLS_TAB_ICON = 'e-tab-icon';
    var CLS_TB_ITEMS = 'e-toolbar-items';
    var CLS_TB_ITEM = 'e-toolbar-item';
    var CLS_TB_POP = 'e-toolbar-pop';
    var CLS_TB_POPUP = 'e-toolbar-popup';
    var CLS_HOR_NAV = 'e-hor-nav';
    var CLS_POPUP_OPEN = 'e-popup-open';
    var CLS_POPUP_CLOSE = 'e-popup-close';
    var CLS_PROGRESS = 'e-progress';
    var CLS_IGNORE = 'e-ignore';
    var CLS_OVERLAY$2 = 'e-overlay';
    var CLS_HSCRCNT = 'e-hscroll-content';
    var CLS_VSCRCNT = 'e-vscroll-content';
    var CLS_VTAB = 'e-vertical-tab';
    var CLS_VERTICAL$1 = 'e-vertical';
    var CLS_VLEFT = 'e-vertical-left';
    var CLS_VRIGHT = 'e-vertical-right';
    var CLS_HBOTTOM = 'e-horizontal-bottom';
    var CLS_FILL = 'e-fill-mode';
    /**
     * Objects used for configuring the Tab selecting item action properties.
     */

    var TabActionSettings = /*#__PURE__*/function (_syncfusion_ej2_base_42) {
      _inherits(TabActionSettings, _syncfusion_ej2_base_42);

      var _super227 = _createSuper(TabActionSettings);

      function TabActionSettings() {
        _classCallCheck(this, TabActionSettings);

        return _super227.apply(this, arguments);
      }

      return TabActionSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideLeftIn')], TabActionSettings.prototype, "effect", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(600)], TabActionSettings.prototype, "duration", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('ease')], TabActionSettings.prototype, "easing", void 0);
    /**
     * Objects used for configuring the Tab animation properties.
     */


    var TabAnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_43) {
      _inherits(TabAnimationSettings, _syncfusion_ej2_base_43);

      var _super228 = _createSuper(TabAnimationSettings);

      function TabAnimationSettings() {
        _classCallCheck(this, TabAnimationSettings);

        return _super228.apply(this, arguments);
      }

      return TabAnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideLeftIn',
      duration: 600,
      easing: 'ease'
    }, TabActionSettings)], TabAnimationSettings.prototype, "previous", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideRightIn',
      duration: 600,
      easing: 'ease'
    }, TabActionSettings)], TabAnimationSettings.prototype, "next", void 0);
    /**
     * Objects used for configuring the Tab item header properties.
     */


    var Header = /*#__PURE__*/function (_syncfusion_ej2_base_44) {
      _inherits(Header, _syncfusion_ej2_base_44);

      var _super229 = _createSuper(Header);

      function Header() {
        _classCallCheck(this, Header);

        return _super229.apply(this, arguments);
      }

      return Header;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Header.prototype, "text", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Header.prototype, "iconCss", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('left')], Header.prototype, "iconPosition", void 0);
    /**
     * An array of object that is used to configure the Tab.
     */


    var TabItem = /*#__PURE__*/function (_syncfusion_ej2_base_45) {
      _inherits(TabItem, _syncfusion_ej2_base_45);

      var _super230 = _createSuper(TabItem);

      function TabItem() {
        _classCallCheck(this, TabItem);

        return _super230.apply(this, arguments);
      }

      return TabItem;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Header)], TabItem.prototype, "header", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TabItem.prototype, "headerTemplate", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], TabItem.prototype, "content", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], TabItem.prototype, "cssClass", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TabItem.prototype, "disabled", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], TabItem.prototype, "visible", void 0);
    /**
     * Tab is a content panel to show multiple contents in a single space, one at a time.
     * Each Tab item has an associated content, that will be displayed based on the active Tab header item.
     * ```html
     * <div id="tab"></div>
     * <script>
     *   var tabObj = new Tab();
     *   tab.appendTo("#tab");
     * </script>
     * ```
     */


    var Tab = /*#__PURE__*/function (_syncfusion_ej2_base_46) {
      _inherits(Tab, _syncfusion_ej2_base_46);

      var _super231 = _createSuper(Tab);

      /**
       * Initializes a new instance of the Tab class.
       * @param options  - Specifies Tab model properties as options.
       * @param element  - Specifies the element that is rendered as a Tab.
       */
      function Tab(options, element) {
        var _this615;

        _classCallCheck(this, Tab);

        _this615 = _super231.call(this, options, element);
        _this615.show = {};
        _this615.hide = {};
        _this615.maxHeight = 0;
        _this615.title = 'Close';
        _this615.lastIndex = 0;
        _this615.isAdd = false;
        _this615.isIconAlone = false;
        _this615.resizeContext = _this615.refreshActElePosition.bind(_assertThisInitialized(_this615));
        /**
         * Contains the keyboard configuration of the Tab.
         */

        _this615.keyConfigs = {
          tab: 'tab',
          home: 'home',
          end: 'end',
          enter: 'enter',
          space: 'space',
          "delete": 'delete',
          moveLeft: 'leftarrow',
          moveRight: 'rightarrow',
          moveUp: 'uparrow',
          moveDown: 'downarrow'
        };
        return _this615;
      }
      /**
       * Removes the component from the DOM and detaches all its related event handlers, attributes and classes.
       * @returns void
       */


      _createClass2(Tab, [{
        key: "destroy",
        value: function destroy() {
          var _this616 = this;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tbObj)) {
            this.tbObj.destroy();
          }

          this.unWireEvents();
          ['role', 'aria-disabled', 'aria-activedescendant', 'tabindex', 'aria-orientation'].forEach(function (val) {
            _this616.element.removeAttribute(val);
          });
          this.expTemplateContent();
          var subControls = this.element.querySelectorAll('.e-control');
          [].slice.call(subControls).forEach(function (node) {
            var instances = node.ej2_instances;

            if (instances.length > 0) {
              var instance = instances[0];

              if (instance) {
                instance.destroy();
              }
            }
          });

          if (!this.isTemplate) {
            while (this.element.firstElementChild) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.element.firstElementChild);
            }
          } else {
            var cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);
            this.element.classList.remove(CLS_TEMPLATE$1);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntEle)) {
              cntEle.innerHTML = this.cnt;
            }
          }

          _get(_getPrototypeOf(Tab.prototype), "destroy", this).call(this);

          this.trigger('destroyed');
        }
        /**
         * Refresh the tab component
         */

      }, {
        key: "refresh",
        value: function refresh() {
          if (!this.isServerRendered) {
            _get(_getPrototypeOf(Tab.prototype), "refresh", this).call(this);
          } else if (this.isServerRendered && this.loadOn !== 'Dynamic') {
            this.setActiveBorder();
          }
        }
        /**
         * Initialize component
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          var nested = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + CLS_CONTENT$1);
          this.prevIndex = 0;
          this.isNested = false;
          this.isPopup = false;
          this.initRender = true;
          this.isSwipeed = false;
          this.itemIndexArray = [];
          this.templateEle = [];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nested)) {
            nested.parentElement.classList.add(CLS_NEST$1);
            this.isNested = true;
          }

          var name = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name;
          var css = name === 'msie' ? 'e-ie' : name === 'edge' ? 'e-edge' : name === 'safari' ? 'e-safari' : '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
            'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width),
            'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height)
          });
          this.setCssClass(this.element, this.cssClass, true);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            role: 'tablist',
            'aria-disabled': 'false',
            'aria-activedescendant': ''
          });
          this.setCssClass(this.element, css, true);
          this.updatePopAnimationConfig();
        }
        /**
         * Initialize the component rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.btnCls = this.createElement('span', {
            className: CLS_ICONS + ' ' + CLS_ICON_CLOSE,
            attrs: {
              title: this.title
            }
          });
          this.tabId = this.element.id.length > 0 ? '-' + this.element.id : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getRandomId"])();
          this.renderContainer();
          this.wireEvents();
          this.initRender = false;
        }
      }, {
        key: "renderContainer",
        value: function renderContainer() {
          if (this.isServerRendered) {
            this.isTemplate = false;
            return;
          }

          var ele = this.element;

          if (this.items.length > 0 && ele.children.length === 0) {
            ele.appendChild(this.createElement('div', {
              className: CLS_CONTENT$1
            }));
            this.setOrientation(this.headerPlacement, this.createElement('div', {
              className: CLS_HEADER$1
            }));
            this.isTemplate = false;
          } else if (this.element.children.length > 0) {
            this.isTemplate = true;
            ele.classList.add(CLS_TEMPLATE$1);
            var header = ele.querySelector('.' + CLS_HEADER$1);

            if (header && this.headerPlacement === 'Bottom') {
              this.setOrientation(this.headerPlacement, header);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1, this.element)) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element))) {
            this.renderHeader();
            this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1 + ' .' + CLS_TB_ITEMS, this.element);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tbItems)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.tbItems, {
                selector: '.e-tab-wrap'
              });
            }

            this.renderContent();

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length > 0) {
              var scrCnt;
              this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1 + ' .' + CLS_TB_ITEMS, this.element);
              this.bdrLine = this.createElement('div', {
                className: CLS_INDICATOR + ' ' + CLS_HIDDEN$1 + ' ' + CLS_IGNORE
              });
              scrCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + this.scrCntClass, this.tbItems);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(scrCnt)) {
                scrCnt.insertBefore(this.bdrLine, scrCnt.firstChild);
              } else {
                this.tbItems.insertBefore(this.bdrLine, this.tbItems.firstChild);
              }

              this.setContentHeight(true);
              this.select(this.selectedItem);
            }

            this.setRTL(this.enableRtl);
          }
        }
      }, {
        key: "serverItemsChanged",
        value: function serverItemsChanged() {
          this.enableAnimation = false;
          this.setActive(this.selectedItem, true);

          if (this.loadOn !== 'Dynamic' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            var itemCollection = [].slice.call(this.cntEle.children);
            var content = CLS_CONTENT$1 + this.tabId + '_' + this.selectedItem;
            itemCollection.forEach(function (item) {
              if (item.classList.contains(CLS_ACTIVE$1) && item.id !== content) {
                item.classList.remove(CLS_ACTIVE$1);
              }

              if (item.id === content) {
                item.classList.add(CLS_ACTIVE$1);
              }
            });
            this.prevIndex = this.selectedItem;
            this.triggerAnimation(CLS_ITEM$2 + this.tabId + '_' + this.selectedItem, false);
          }

          this.enableAnimation = true;
        }
      }, {
        key: "headerReady",
        value: function headerReady() {
          this.initRender = true;
          this.hdrEle = this.getTabHeader();
          this.setOrientation(this.headerPlacement, this.hdrEle);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.hdrEle)) {
            this.tbObj = this.hdrEle && this.hdrEle.ej2_instances[0];
          }

          this.tbObj.clicked = this.clickHandler.bind(this);
          this.tbObj.on('onItemsChanged', this.serverItemsChanged.bind(this));
          this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1 + ' .' + CLS_TB_ITEMS, this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tbItems)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.tbItems, {
              selector: '.e-tab-wrap'
            });
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length > 0) {
            var scrollCnt;
            this.bdrLine = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_INDICATOR + '.' + CLS_IGNORE, this.element);
            scrollCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + this.scrCntClass, this.tbItems);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(scrollCnt)) {
              scrollCnt.insertBefore(this.bdrLine, scrollCnt.firstElementChild);
            } else {
              this.tbItems.insertBefore(this.bdrLine, this.tbItems.firstElementChild);
            }

            this.select(this.selectedItem);
          }

          this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.cntEle, {
              swipe: this.swipeHandler.bind(this)
            });
          }

          if (this.loadOn === 'Demand') {
            var id = this.setActiveContent();
            this.triggerAnimation(id, false);
          }

          this.initRender = false;
          this.renderComplete();
        }
      }, {
        key: "setActiveContent",
        value: function setActiveContent() {
          var id = CLS_ITEM$2 + this.tabId + '_' + this.selectedItem;
          var item = this.getTrgContent(this.cntEle, this.extIndex(id));

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            item.classList.add(CLS_ACTIVE$1);
          }

          return id;
        }
      }, {
        key: "renderHeader",
        value: function renderHeader() {
          var _this617 = this;

          var hdrPlace = this.headerPlacement;
          var tabItems = [];
          this.hdrEle = this.getTabHeader();
          this.addVerticalClass();

          if (!this.isTemplate) {
            tabItems = this.parseObject(this.items, 0);
          } else {
            if (this.element.children.length > 1 && this.element.children[1].classList.contains(CLS_HEADER$1)) {
              this.setProperties({
                headerPlacement: 'Bottom'
              }, true);
            }

            var count = this.hdrEle.children.length;
            var hdrItems = [];

            for (var i = 0; i < count; i++) {
              hdrItems.push(this.hdrEle.children.item(i).innerHTML);
            }

            if (count > 0) {
              while (this.hdrEle.firstElementChild) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.hdrEle.firstElementChild);
              }

              var _tabItems = this.createElement('div', {
                className: CLS_ITEMS$1
              });

              this.hdrEle.appendChild(_tabItems);
              hdrItems.forEach(function (item, index) {
                _this617.lastIndex = index;
                var attr = {
                  className: CLS_ITEM$2,
                  id: CLS_ITEM$2 + _this617.tabId + '_' + index,
                  attrs: {
                    role: 'tab',
                    'aria-controls': CLS_CONTENT$1 + _this617.tabId + '_' + index,
                    'aria-selected': 'false'
                  }
                };

                var txt = _this617.createElement('span', {
                  className: CLS_TEXT,
                  innerHTML: item,
                  attrs: {
                    'role': 'presentation'
                  }
                }).outerHTML;

                var cont = _this617.createElement('div', {
                  className: CLS_TEXT_WRAP,
                  innerHTML: txt + _this617.btnCls.outerHTML
                }).outerHTML;

                var wrap = _this617.createElement('div', {
                  className: CLS_WRAP,
                  innerHTML: cont,
                  attrs: {
                    tabIndex: '-1'
                  }
                });

                _tabItems.appendChild(_this617.createElement('div', attr));

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_ITEM$2, _tabItems)[index].appendChild(wrap);
              });
            }
          }

          this.tbObj = new Toolbar({
            width: hdrPlace === 'Left' || hdrPlace === 'Right' ? 'auto' : '100%',
            height: hdrPlace === 'Left' || hdrPlace === 'Right' ? '100%' : 'auto',
            overflowMode: this.overflowMode,
            items: tabItems.length !== 0 ? tabItems : [],
            clicked: this.clickHandler.bind(this),
            scrollStep: this.scrollStep,
            enableHtmlSanitizer: this.enableHtmlSanitizer
          });
          this.tbObj.isStringTemplate = true;
          this.tbObj.createElement = this.createElement;
          this.tbObj.appendTo(this.hdrEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.hdrEle, {
            'aria-label': 'tab-header'
          });
          this.updateOrientationAttribute();
          this.setCloseButton(this.showCloseButton);
        }
      }, {
        key: "renderContent",
        value: function renderContent() {
          this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element);
          var hdrItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element);

          if (this.isTemplate) {
            this.cnt = this.cntEle.children.length > 0 ? this.cntEle.innerHTML : '';
            var contents = this.cntEle.children;

            for (var i = 0; i < hdrItem.length; i++) {
              if (contents.length - 1 >= i) {
                contents.item(i).className += CLS_ITEM$2;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(contents.item(i), {
                  'role': 'tabpanel',
                  'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + i
                });
                contents.item(i).id = CLS_CONTENT$1 + this.tabId + '_' + i;
              }
            }
          }
        }
      }, {
        key: "reRenderItems",
        value: function reRenderItems() {
          this.renderContainer();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.cntEle, {
              swipe: this.swipeHandler.bind(this)
            });
          }
        }
      }, {
        key: "parseObject",
        value: function parseObject(items, index) {
          var _this618 = this;

          var tbCount = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length;
          var tItems = [];
          var txtWrapEle;
          var spliceArray = [];
          items.forEach(function (item, i) {
            var pos = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.iconPosition) ? '' : item.header.iconPosition;
            var css = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.iconCss) ? '' : item.header.iconCss;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.headerTemplate) && (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.text) || item.header.text.length === 0 && css === '')) {
              spliceArray.push(i);
              return;
            }

            var txt = item.headerTemplate || item.header.text;

            if (typeof txt === 'string' && _this618.enableHtmlSanitizer) {
              txt = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(txt);
            }

            _this618.lastIndex = tbCount === 0 ? i : _this618.isReplace ? index + i : _this618.lastIndex + 1;
            var disabled = item.disabled ? ' ' + CLS_DISABLE$4 + ' ' + CLS_OVERLAY$2 : '';
            var hidden = item.visible === false ? ' ' + CLS_HIDDEN$1 : '';
            txtWrapEle = _this618.createElement('div', {
              className: CLS_TEXT,
              attrs: {
                'role': 'presentation'
              }
            });
            var tHtml = txt instanceof Object ? txt.outerHTML : txt;
            var txtEmpty = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tHtml) && tHtml !== '';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(txt.tagName)) {
              txtWrapEle.appendChild(txt);
            } else {
              _this618.headerTextCompile(txtWrapEle, txt, i);
            }

            var tEle;

            var icon = _this618.createElement('span', {
              className: CLS_ICONS + ' ' + CLS_TAB_ICON + ' ' + CLS_ICON + '-' + pos + ' ' + css
            });

            var tCont = _this618.createElement('div', {
              className: CLS_TEXT_WRAP
            });

            tCont.appendChild(txtWrapEle);

            if (txt !== '' && txt !== undefined && css !== '') {
              if (pos === 'left' || pos === 'top') {
                tCont.insertBefore(icon, tCont.firstElementChild);
              } else {
                tCont.appendChild(icon);
              }

              tEle = txtWrapEle;
              _this618.isIconAlone = false;
            } else {
              tEle = css === '' ? txtWrapEle : icon;

              if (tEle === icon) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(txtWrapEle);
                tCont.appendChild(icon);
                _this618.isIconAlone = true;
              }
            }

            var wrapAttrs = item.disabled ? {} : {
              tabIndex: '-1'
            };
            tCont.appendChild(_this618.btnCls.cloneNode(true));

            var wrap = _this618.createElement('div', {
              className: CLS_WRAP,
              attrs: wrapAttrs
            });

            wrap.appendChild(tCont);

            if (_this618.itemIndexArray === []) {
              _this618.itemIndexArray.push(CLS_ITEM$2 + _this618.tabId + '_' + _this618.lastIndex);
            } else {
              _this618.itemIndexArray.splice(index + i, 0, CLS_ITEM$2 + _this618.tabId + '_' + _this618.lastIndex);
            }

            var attrObj = {
              id: CLS_ITEM$2 + _this618.tabId + '_' + _this618.lastIndex,
              role: 'tab',
              'aria-selected': 'false'
            };
            var tItem = {
              htmlAttributes: attrObj,
              template: wrap
            };
            tItem.cssClass = (item.cssClass !== undefined ? item.cssClass : ' ') + ' ' + disabled + ' ' + hidden + (css !== '' ? 'e-i' + pos : '') + ' ' + (!txtEmpty ? CLS_ICON : '');

            if (pos === 'top' || pos === 'bottom') {
              _this618.element.classList.add('e-vertical-icon');
            }

            tItems.push(tItem);
            i++;
          });

          if (!this.isAdd) {
            spliceArray.forEach(function (spliceItemIndex) {
              _this618.items.splice(spliceItemIndex, 1);
            });
          }

          this.isIconAlone ? this.element.classList.add(CLS_ICON_TAB) : this.element.classList.remove(CLS_ICON_TAB);
          return tItems;
        }
      }, {
        key: "removeActiveClass",
        value: function removeActiveClass() {
          var tabHeader = this.getTabHeader();

          if (tabHeader) {
            var tabItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, tabHeader);
            [].slice.call(tabItems).forEach(function (node) {
              return node.classList.remove(CLS_ACTIVE$1);
            });
          }
        }
      }, {
        key: "checkPopupOverflow",
        value: function checkPopupOverflow(ele) {
          this.tbPop = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_POP, this.element);
          var popIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-hor-nav', this.element);
          var tbrItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS, this.element);
          var lastChild = tbrItems.lastChild;
          var isOverflow = false;

          if (!this.isVertical() && (this.enableRtl && popIcon.offsetLeft + popIcon.offsetWidth > tbrItems.offsetLeft || !this.enableRtl && popIcon.offsetLeft < tbrItems.offsetWidth)) {
            isOverflow = true;
          } else if (this.isVertical() && popIcon.offsetTop < lastChild.offsetTop + lastChild.offsetHeight) {
            isOverflow = true;
          }

          if (isOverflow) {
            ele.classList.add(CLS_TB_POPUP);
            this.tbPop.insertBefore(ele, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_POPUP, this.tbPop)[0]);
          }

          return true;
        }
      }, {
        key: "popupHandler",
        value: function popupHandler(target) {
          var ripEle = target.querySelector('.e-ripple-element');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ripEle)) {
            ripEle.outerHTML = '';
            target.querySelector('.' + CLS_WRAP).classList.remove('e-ripple');
          }

          this.tbItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEMS + ' .' + CLS_TB_ITEM, this.hdrEle);
          var lastChild = this.tbItem[this.tbItem.length - 1];

          if (this.tbItem.length !== 0) {
            target.classList.remove(CLS_TB_POPUP);
            target.removeAttribute('style');
            this.tbItems.appendChild(target);
            this.actEleId = target.id;

            if (this.checkPopupOverflow(lastChild)) {
              var prevEle = this.tbItems.lastChild.previousElementSibling;
              this.checkPopupOverflow(prevEle);
            }

            this.isPopup = true;
          }

          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.tbItems).length - 1;
        }
      }, {
        key: "updateOrientationAttribute",
        value: function updateOrientationAttribute() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-orientation': this.isVertical() ? 'vertical' : 'horizontal'
          });
        }
      }, {
        key: "setCloseButton",
        value: function setCloseButton(val) {
          var trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1, this.element);
          val === true ? trg.classList.add(CLS_CLOSE_SHOW) : trg.classList.remove(CLS_CLOSE_SHOW);
          this.tbObj.refreshOverflow();
          this.refreshActElePosition();
        }
      }, {
        key: "prevCtnAnimation",
        value: function prevCtnAnimation(prev, current) {
          var animation;
          var checkRTL = this.enableRtl || this.element.classList.contains(CLS_RTL$4);

          if (this.isPopup || prev <= current) {
            if (this.animation.previous.effect === 'SlideLeftIn') {
              animation = {
                name: 'SlideLeftOut',
                duration: this.animation.previous.duration,
                timingFunction: this.animation.previous.easing
              };
            } else {
              animation = null;
            }
          } else {
            if (this.animation.next.effect === 'SlideRightIn') {
              animation = {
                name: 'SlideRightOut',
                duration: this.animation.next.duration,
                timingFunction: this.animation.next.easing
              };
            } else {
              animation = null;
            }
          }

          return animation;
        }
      }, {
        key: "triggerPrevAnimation",
        value: function triggerPrevAnimation(oldCnt, prevIndex) {
          var _this619 = this;

          var animateObj = this.prevCtnAnimation(prevIndex, this.selectedItem);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animateObj)) {
            animateObj.begin = function () {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(oldCnt, {
                'position': 'absolute'
              });
              oldCnt.classList.add(CLS_PROGRESS);
              oldCnt.classList.add('e-view');
            };

            animateObj.end = function () {
              oldCnt.style.display = 'none';
              oldCnt.classList.remove(CLS_ACTIVE$1);
              oldCnt.classList.remove(CLS_PROGRESS);
              oldCnt.classList.remove('e-view');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(oldCnt, {
                'display': '',
                'position': ''
              });

              if (oldCnt.childNodes.length === 0 && !_this619.isTemplate) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(oldCnt);
              }
            };

            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animateObj).animate(oldCnt);
          } else {
            oldCnt.classList.remove(CLS_ACTIVE$1);
          }
        }
      }, {
        key: "triggerAnimation",
        value: function triggerAnimation(id, value) {
          var _this620 = this;

          var prevIndex = this.prevIndex;
          var oldCnt;
          var newCnt;

          if (!this.isServerRendered || this.isServerRendered && this.loadOn !== 'Dynamic') {
            var itemCollection = [].slice.call(this.element.querySelector('.' + CLS_CONTENT$1).children);
            itemCollection.forEach(function (item) {
              if (item.id === _this620.prevActiveEle) {
                oldCnt = item;
              }
            });
            var prevEle = this.tbItem[prevIndex];
            newCnt = this.getTrgContent(this.cntEle, this.extIndex(id));

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldCnt) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(prevEle)) {
              var idNo = this.extIndex(prevEle.id);
              oldCnt = this.getTrgContent(this.cntEle, idNo);
            }
          } else {
            newCnt = this.cntEle.firstElementChild;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newCnt)) {
            this.prevActiveEle = newCnt.id;
          }

          if (this.initRender || value === false || this.animation === {} || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.animation)) {
            if (oldCnt && oldCnt !== newCnt) {
              oldCnt.classList.remove(CLS_ACTIVE$1);
            }

            return;
          }

          var cnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element);
          var animateObj;

          if (this.prevIndex > this.selectedItem && !this.isPopup) {
            var openEff = this.animation.previous.effect;
            animateObj = {
              name: openEff === 'None' ? '' : openEff !== 'SlideLeftIn' ? openEff : 'SlideLeftIn',
              duration: this.animation.previous.duration,
              timingFunction: this.animation.previous.easing
            };
          } else if (this.isPopup || this.prevIndex < this.selectedItem || this.prevIndex === this.selectedItem) {
            var clsEff = this.animation.next.effect;
            animateObj = {
              name: clsEff === 'None' ? '' : clsEff !== 'SlideRightIn' ? clsEff : 'SlideRightIn',
              duration: this.animation.next.duration,
              timingFunction: this.animation.next.easing
            };
          }

          animateObj.progress = function () {
            cnt.classList.add(CLS_PROGRESS);

            _this620.setActiveBorder();
          };

          animateObj.end = function () {
            cnt.classList.remove(CLS_PROGRESS);
            newCnt.classList.add(CLS_ACTIVE$1);
          };

          if (!this.initRender && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldCnt)) {
            this.triggerPrevAnimation(oldCnt, prevIndex);
          }

          this.isPopup = false;

          if (animateObj.name === '') {
            newCnt.classList.add(CLS_ACTIVE$1);
          } else {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animateObj).animate(newCnt);
          }
        }
      }, {
        key: "keyPressed",
        value: function keyPressed(trg) {
          var trgParent = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_HEADER$1 + ' .' + CLS_TB_ITEM);
          var trgIndex = this.getEleIndex(trgParent);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popEle) && trg.classList.contains('e-hor-nav')) {
            this.popEle.classList.contains(CLS_POPUP_OPEN) ? this.popObj.hide(this.hide) : this.popObj.show(this.show);
          } else if (trg.classList.contains('e-scroll-nav')) {
            trg.click();
          } else {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgParent) && trgParent.classList.contains(CLS_ACTIVE$1) === false) {
              this.select(trgIndex);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popEle)) {
                this.popObj.hide(this.hide);
              }
            }
          }
        }
      }, {
        key: "getTabHeader",
        value: function getTabHeader() {
          var headers = [].slice.call(this.element.children).filter(function (e) {
            return e.classList.contains(CLS_HEADER$1);
          });

          if (headers.length > 0) {
            return headers[0];
          } else {
            var wrap = [].slice.call(this.element.children).filter(function (e) {
              return !e.classList.contains(CLS_BLA_TEM);
            })[0];

            if (!wrap) {
              return undefined;
            }

            return [].slice.call(wrap.children).filter(function (e) {
              return e.classList.contains(CLS_HEADER$1);
            })[0];
          }
        }
      }, {
        key: "getEleIndex",
        value: function getEleIndex(item) {
          return Array.prototype.indexOf.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.getTabHeader()), item);
        }
      }, {
        key: "extIndex",
        value: function extIndex(id) {
          return id.replace(CLS_ITEM$2 + this.tabId + '_', '');
        }
      }, {
        key: "expTemplateContent",
        value: function expTemplateContent() {
          var _this621 = this;

          this.templateEle.forEach(function (eleStr) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this621.element.querySelector(eleStr))) {
              document.body.appendChild(_this621.element.querySelector(eleStr)).style.display = 'none';
            }
          });
        }
      }, {
        key: "templateCompile",
        value: function templateCompile(ele, cnt, index) {
          var tempEle = this.createElement('div');
          this.compileElement(tempEle, cnt, 'content', index);

          if (tempEle.childNodes.length !== 0) {
            ele.appendChild(tempEle);
          }
        }
      }, {
        key: "compileElement",
        value: function compileElement(ele, val, prop, index) {
          var templateFn;

          if (typeof val === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && val.indexOf('<div>Blazor') !== 0) {
            val = val.trim();
            ele.innerHTML = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(val);
          } else {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(val);
          }

          var templateFUN;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn)) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isStringTemplate && val.indexOf('<div>Blazor') === 0) {
              templateFUN = templateFn({}, this, prop, this.element.id + index + '_' + prop, this.isStringTemplate);
            } else {
              templateFUN = templateFn({}, this, prop);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn) && templateFUN.length > 0) {
            [].slice.call(templateFUN).forEach(function (el) {
              ele.appendChild(el);
            });
          }
        }
      }, {
        key: "headerTextCompile",
        value: function headerTextCompile(element, text, index) {
          this.compileElement(element, text, 'headerTemplate', index);
        }
      }, {
        key: "getContent",
        value: function getContent(ele, cnt, callType, index) {
          var eleStr;

          if (typeof cnt === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cnt.innerHTML)) {
            if (typeof cnt === 'string' && this.enableHtmlSanitizer) {
              cnt = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(cnt);
            }

            if (cnt[0] === '.' || cnt[0] === '#') {
              if (document.querySelectorAll(cnt).length) {
                var eleVal = document.querySelector(cnt);
                eleStr = eleVal.outerHTML.trim();

                if (callType === 'clone') {
                  ele.appendChild(eleVal.cloneNode(true));
                } else {
                  ele.appendChild(eleVal);
                  eleVal.style.display = '';
                }
              } else {
                this.templateCompile(ele, cnt, index);
              }
            } else {
              this.templateCompile(ele, cnt, index);
            }
          } else {
            ele.appendChild(cnt);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eleStr)) {
            if (this.templateEle.indexOf(cnt.toString()) === -1) {
              this.templateEle.push(cnt.toString());
            }
          }
        }
      }, {
        key: "getTrgContent",
        value: function getTrgContent(cntEle, no) {
          var ele;

          if (this.element.classList.contains(CLS_NEST$1)) {
            ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_NEST$1 + '> .' + CLS_CONTENT$1 + ' > #' + CLS_CONTENT$1 + this.tabId + '_' + no, this.element);
          } else {
            ele = this.findEle(cntEle.children, CLS_CONTENT$1 + this.tabId + '_' + no);
          }

          return ele;
        }
      }, {
        key: "findEle",
        value: function findEle(items, key) {
          var ele;

          for (var i = 0; i < items.length; i++) {
            if (items[i].id === key) {
              ele = items[i];
              break;
            }
          }

          return ele;
        }
      }, {
        key: "isVertical",
        value: function isVertical() {
          var isVertical = this.headerPlacement === 'Left' || this.headerPlacement === 'Right' ? true : false;
          this.scrCntClass = isVertical ? CLS_VSCRCNT : CLS_HSCRCNT;
          return isVertical;
        }
      }, {
        key: "addVerticalClass",
        value: function addVerticalClass() {
          if (this.isVertical()) {
            var tbPos = this.headerPlacement === 'Left' ? CLS_VLEFT : CLS_VRIGHT;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.hdrEle], [CLS_VERTICAL$1, tbPos]);

            if (!this.element.classList.contains(CLS_NEST$1)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [CLS_VTAB, tbPos]);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.hdrEle], [CLS_VTAB, tbPos]);
            }
          }

          if (this.headerPlacement === 'Bottom') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.hdrEle], [CLS_HBOTTOM]);
          }
        }
      }, {
        key: "updatePopAnimationConfig",
        value: function updatePopAnimationConfig() {
          this.show = {
            name: this.isVertical() ? 'FadeIn' : 'SlideDown',
            duration: 100
          };
          this.hide = {
            name: this.isVertical() ? 'FadeOut' : 'SlideUp',
            duration: 100
          };
        }
      }, {
        key: "changeOrientation",
        value: function changeOrientation(place) {
          this.setOrientation(place, this.hdrEle);
          var isVertical = this.hdrEle.classList.contains(CLS_VERTICAL$1) ? true : false;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [CLS_VTAB]);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.hdrEle], [CLS_VERTICAL$1, CLS_VLEFT, CLS_VRIGHT]);

          if (isVertical !== this.isVertical()) {
            this.changeToolbarOrientation();
          }

          this.addVerticalClass();
          this.updateOrientationAttribute();
          this.setActiveBorder();
          this.focusItem();
        }
      }, {
        key: "focusItem",
        value: function focusItem() {
          var curActItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(' #' + CLS_ITEM$2 + this.tabId + '_' + this.selectedItem, this.hdrEle);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(curActItem)) {
            curActItem.firstElementChild.focus();
          }
        }
      }, {
        key: "serverChangeOrientation",
        value: function serverChangeOrientation(newProp, oldProp) {
          this.setOrientation(newProp, this.hdrEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [CLS_VTAB]);
          var newValue = newProp === 'Left' || newProp === 'Right';
          var oldValue = oldProp === 'Left' || oldProp === 'Right';

          if (newValue !== oldValue) {
            this.changeToolbarOrientation();
          }

          if (this.isVertical()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [CLS_VTAB]);
          }

          this.updateOrientationAttribute();
          this.setActiveBorder();
          this.focusItem();
        }
      }, {
        key: "changeToolbarOrientation",
        value: function changeToolbarOrientation() {
          this.tbObj.setProperties({
            height: this.isVertical() ? '100%' : 'auto',
            width: this.isVertical() ? 'auto' : '100%'
          }, true);
          this.tbObj.changeOrientation();
          this.updatePopAnimationConfig();
        }
      }, {
        key: "setOrientation",
        value: function setOrientation(place, ele) {
          var headerPos = Array.prototype.indexOf.call(this.element.children, ele);
          var contentPos = Array.prototype.indexOf.call(this.element.children, this.element.querySelector('.' + CLS_CONTENT$1));

          if (place === 'Bottom' && contentPos > headerPos) {
            this.element.appendChild(ele);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ele], [CLS_HBOTTOM]);
            this.element.insertBefore(ele, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element));
          }
        }
      }, {
        key: "setCssClass",
        value: function setCssClass(ele, cls, val) {
          if (cls === '') {
            return;
          }

          var list = cls.split(' ');

          for (var i = 0; i < list.length; i++) {
            if (val) {
              ele.classList.add(list[i]);
            } else {
              ele.classList.remove(list[i]);
            }
          }
        }
      }, {
        key: "setContentHeight",
        value: function setContentHeight(val) {
          if (this.element.classList.contains(CLS_FILL)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [CLS_FILL]);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            return;
          }

          var hdrEle = this.getTabHeader();

          if (this.heightAdjustMode === 'None') {
            if (this.height === 'auto') {
              return;
            } else {
              if (!this.isVertical()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.cntEle, {
                  'height': this.element.offsetHeight - hdrEle.offsetHeight + 'px'
                });
              }
            }
          } else if (this.heightAdjustMode === 'Fill') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [CLS_FILL]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'height': '100%'
            });
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.cntEle, {
              'height': '100%'
            });
          } else if (this.heightAdjustMode === 'Auto') {
            if (this.isTemplate === true) {
              var cnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_CONTENT$1 + ' > .' + CLS_ITEM$2, this.element);

              for (var i = 0; i < cnt.length; i++) {
                cnt[i].setAttribute('style', 'display:block; visibility: visible');
                this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i]));
                cnt[i].style.removeProperty('display');
                cnt[i].style.removeProperty('visibility');
              }
            } else {
              this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element);

              if (val === true) {
                this.cntEle.appendChild(this.createElement('div', {
                  id: CLS_CONTENT$1 + this.tabId + '_' + 0,
                  className: CLS_ITEM$2 + ' ' + CLS_ACTIVE$1,
                  attrs: {
                    'role': 'tabpanel',
                    'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + 0
                  }
                }));
              }

              var ele = this.cntEle.children.item(0);

              for (var _i140 = 0; _i140 < this.items.length; _i140++) {
                this.getContent(ele, this.items[_i140].content, 'clone', _i140);
                this.maxHeight = Math.max(this.maxHeight, this.getHeight(ele));

                while (ele.firstChild) {
                  ele.removeChild(ele.firstChild);
                }
              }

              this.clearTemplate(['content']);
              this.templateEle = [];
              this.getContent(ele, this.items[0].content, 'render', 0);
              ele.classList.remove(CLS_ACTIVE$1);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.cntEle, {
              'height': this.maxHeight + 'px'
            });
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.cntEle, {
              'height': 'auto'
            });
          }
        }
      }, {
        key: "getHeight",
        value: function getHeight(ele) {
          var cs = window.getComputedStyle(ele);
          return ele.offsetHeight + parseFloat(cs.getPropertyValue('padding-top')) + parseFloat(cs.getPropertyValue('padding-bottom')) + parseFloat(cs.getPropertyValue('margin-top')) + parseFloat(cs.getPropertyValue('margin-bottom'));
        }
      }, {
        key: "setActiveBorder",
        value: function setActiveBorder() {
          var bar;
          var scrollCnt;
          var trgHdrEle = this.getTabHeader();
          var trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEM + '.' + CLS_ACTIVE$1, trgHdrEle);

          if (trg === null) {
            return;
          }

          if (this.isServerRendered && trg.classList.contains(CLS_TB_POPUP)) {
            this.popupHandler(trg);
          }

          var root = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_TAB);

          if (this.element !== root) {
            return;
          }

          this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS, trgHdrEle);
          bar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_INDICATOR, trgHdrEle);
          scrollCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS + ' .' + this.scrCntClass, trgHdrEle);

          if (this.isVertical()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
              'left': '',
              'right': ''
            });
            var tbHeight = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(scrollCnt) ? this.tbItems.offsetHeight : scrollCnt.offsetHeight;

            if (tbHeight !== 0) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
                'top': trg.offsetTop + 'px',
                'height': trg.offsetHeight + 'px'
              });
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
                'top': 0,
                'height': 0
              });
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
              'top': '',
              'height': ''
            });
            var tbWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(scrollCnt) ? this.tbItems.offsetWidth : scrollCnt.offsetWidth;

            if (tbWidth !== 0) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
                'left': trg.offsetLeft + 'px',
                'right': tbWidth - (trg.offsetLeft + trg.offsetWidth) + 'px'
              });
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(bar, {
                'left': 'auto',
                'right': 'auto'
              });
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.bdrLine)) {
            this.bdrLine.classList.remove(CLS_HIDDEN$1);
          }
        }
      }, {
        key: "setActive",
        value: function setActive(value) {
          var skipDataBind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
          this.tbItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.getTabHeader());
          var trg = this.tbItem[value];

          if (this.isServerRendered && trg) {
            value = parseInt(trg.getAttribute('data-index'), 10);
          }

          if (value < 0 || isNaN(value) || this.tbItem.length === 0) {
            return;
          }

          if (value >= 0 && !skipDataBind) {
            this.allowServerDataBinding = false;
            this.setProperties({
              selectedItem: value
            }, true);
            this.allowServerDataBinding = true;

            if (!this.initRender) {
              this.serverDataBind();
            }
          }

          if (trg.classList.contains(CLS_ACTIVE$1)) {
            this.setActiveBorder();
            return;
          }

          if (!this.isTemplate) {
            var prev = this.tbItem[this.prevIndex];

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(prev)) {
              prev.removeAttribute('aria-controls');
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(trg, {
              'aria-controls': CLS_CONTENT$1 + this.tabId + '_' + value
            });
          }

          var id = trg.id;
          this.removeActiveClass();
          trg.classList.add(CLS_ACTIVE$1);
          trg.setAttribute('aria-selected', 'true');
          var no = Number(this.extIndex(id));

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.prevActiveEle)) {
            this.prevActiveEle = CLS_CONTENT$1 + this.tabId + '_' + no;
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-activedescendant': id
          });

          if (this.isTemplate) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element).children.length > 0) {
              var _trg = this.findEle(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element).children, CLS_CONTENT$1 + this.tabId + '_' + no);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_trg)) {
                _trg.classList.add(CLS_ACTIVE$1);
              }

              this.triggerAnimation(id, this.enableAnimation);
            }
          } else if (!this.isServerRendered || this.isServerRendered && this.loadOn === 'Init') {
            this.cntEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);
            var item = this.getTrgContent(this.cntEle, this.extIndex(id));

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
              this.cntEle.appendChild(this.createElement('div', {
                id: CLS_CONTENT$1 + this.tabId + '_' + this.extIndex(id),
                className: CLS_ITEM$2 + ' ' + CLS_ACTIVE$1,
                attrs: {
                  role: 'tabpanel',
                  'aria-labelledby': CLS_ITEM$2 + this.tabId + '_' + this.extIndex(id)
                }
              }));
              var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
              var itemIndex = Array.prototype.indexOf.call(this.itemIndexArray, id);
              this.getContent(eleTrg, this.items[itemIndex].content, 'render', itemIndex);
            } else {
              item.classList.add(CLS_ACTIVE$1);
            }

            this.triggerAnimation(id, this.enableAnimation);
          }

          this.setActiveBorder();
          this.refreshItemVisibility(trg);

          if (!this.initRender && !skipDataBind) {
            trg.firstElementChild.focus();
            var eventArg = {
              previousItem: this.prevItem,
              previousIndex: this.prevIndex,
              selectedItem: trg,
              selectedIndex: value,
              selectedContent: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content),
              isSwiped: this.isSwipeed
            };
            this.trigger('selected', eventArg);
          }
        }
      }, {
        key: "contentReady",
        value: function contentReady() {
          var id = this.setActiveContent();
          this.triggerAnimation(id, this.enableAnimation);
        }
      }, {
        key: "setItems",
        value: function setItems(items) {
          this.isReplace = true;
          this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS, this.getTabHeader());
          this.tbObj.items = this.parseObject(items, 0);
          this.tbObj.dataBind();
          this.isReplace = false;
        }
      }, {
        key: "setRTL",
        value: function setRTL(value) {
          this.tbObj.enableRtl = value;
          this.tbObj.dataBind();
          this.setCssClass(this.element, CLS_RTL$4, value);
          this.refreshActiveBorder();
        }
      }, {
        key: "refreshActiveBorder",
        value: function refreshActiveBorder() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.bdrLine)) {
            this.bdrLine.classList.add(CLS_HIDDEN$1);
          }

          this.setActiveBorder();
        }
      }, {
        key: "showPopup",
        value: function showPopup(config) {
          var tbPop = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-popup.e-toolbar-pop', this.hdrEle);

          if (tbPop.classList.contains('e-popup-close')) {
            var tbPopObj = tbPop && tbPop.ej2_instances[0];
            tbPopObj.position.X = this.headerPlacement === 'Left' ? 'left' : 'right';
            tbPopObj.dataBind();
            tbPopObj.show(config);
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          window.addEventListener('resize', this.resizeContext);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseover', this.hoverHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.spaceKeyDown, this);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.cntEle, {
              swipe: this.swipeHandler.bind(this)
            });
          }

          this.keyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.keyHandler.bind(this),
            keyConfigs: this.keyConfigs
          });
          this.tabKeyModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.keyHandler.bind(this),
            keyConfigs: {
              openPopup: 'shift+f10',
              tab: 'tab',
              shiftTab: 'shift+tab'
            },
            eventName: 'keydown'
          });
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          this.keyModule.destroy();
          this.tabKeyModule.destroy();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cntEle)) {
            this.touchModule.destroy();
          }

          window.removeEventListener('resize', this.resizeContext);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.hoverHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.spaceKeyDown);

          this.element.classList.remove(CLS_RTL$4);
          this.element.classList.remove(CLS_FOCUS);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(args) {
          this.element.classList.remove(CLS_FOCUS);
          var trg = args.originalEvent.target;
          var trgParent = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_TB_ITEM);
          var trgIndex = this.getEleIndex(trgParent);

          if (trg.classList.contains(CLS_ICON_CLOSE)) {
            this.removeTab(trgIndex);
          } else if (this.isVertical() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_HOR_NAV)) {
            this.showPopup(this.show);
          } else {
            this.isPopup = false;

            if (this.isServerRendered && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgParent)) {
              if (parseInt(trgParent.getAttribute('data-index'), 10) !== this.selectedItem) {
                this.select(trgIndex);
              }
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgParent) && (trgIndex !== this.selectedItem || trgIndex !== this.prevIndex)) {
              this.select(trgIndex);
            }
          }
        }
      }, {
        key: "swipeHandler",
        value: function swipeHandler(e) {
          if (e.velocity < 3 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.originalEvent.changedTouches)) {
            return;
          }

          if (e.originalEvent) {
            e.originalEvent.stopPropagation();
          }

          this.isSwipeed = true;

          if (e.swipeDirection === 'Right' && this.selectedItem !== 0) {
            for (var k = this.selectedItem - 1; k >= 0; k--) {
              if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
                this.select(k);
                break;
              }
            }
          } else if (e.swipeDirection === 'Left' && this.selectedItem !== Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length - 1) {
            for (var i = this.selectedItem + 1; i < this.tbItem.length; i++) {
              if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
                this.select(i);
                break;
              }
            }
          }

          this.isSwipeed = false;
        }
      }, {
        key: "spaceKeyDown",
        value: function spaceKeyDown(e) {
          if (e.keyCode === 32 && e.which === 32 || e.keyCode === 35 && e.which === 35) {
            var clstHead = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CLS_HEADER$1);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(clstHead)) {
              e.preventDefault();
            }
          }
        }
      }, {
        key: "keyHandler",
        value: function keyHandler(e) {
          if (this.element.classList.contains(CLS_DISABLE$4)) {
            return;
          }

          this.element.classList.add(CLS_FOCUS);
          var trg = e.target;
          var tabHeader = this.getTabHeader();
          var actEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_ACTIVE$1, tabHeader);
          this.popEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_POP, tabHeader);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popEle)) {
            this.popObj = this.popEle.ej2_instances[0];
          }

          switch (e.action) {
            case 'space':
            case 'enter':
              if (trg.parentElement.classList.contains(CLS_DISABLE$4)) {
                return;
              }

              if (e.action === 'enter' && trg.classList.contains('e-hor-nav')) {
                this.showPopup(this.show);
                break;
              }

              this.keyPressed(trg);
              break;

            case 'tab':
            case 'shiftTab':
              if (trg.classList.contains(CLS_WRAP) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_TB_ITEM).classList.contains(CLS_ACTIVE$1) === false) {
                trg.setAttribute('tabindex', '-1');
              }

              if (this.popObj && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(this.popObj.element)) {
                this.popObj.hide(this.hide);
              }

              actEle.children.item(0).setAttribute('tabindex', '0');
              break;

            case 'moveLeft':
            case 'moveRight':
              var item = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(document.activeElement, '.' + CLS_TB_ITEM);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
                this.refreshItemVisibility(item);
              }

              break;

            case 'openPopup':
              e.preventDefault();

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.popEle) && this.popEle.classList.contains(CLS_POPUP_CLOSE)) {
                this.popObj.show(this.show);
              }

              break;

            case 'delete':
              var trgParent = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trg, '.' + CLS_TB_ITEM);

              if (this.showCloseButton === true && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trgParent)) {
                var nxtSib = trgParent.nextSibling;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nxtSib) && nxtSib.classList.contains(CLS_TB_ITEM)) {
                  nxtSib.firstElementChild.focus();
                }

                this.removeTab(this.getEleIndex(trgParent));
              }

              this.setActiveBorder();
              break;
          }
        }
      }, {
        key: "refreshActElePosition",
        value: function refreshActElePosition() {
          var activeEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeEle)) {
            this.select(this.getEleIndex(activeEle));
          }

          this.refreshActiveBorder();
        }
      }, {
        key: "refreshItemVisibility",
        value: function refreshItemVisibility(target) {
          var scrCnt = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + this.scrCntClass, this.tbItems);

          if (!this.isVertical() && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(scrCnt)) {
            var scrBar = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-hscroll-bar', this.tbItems);
            var scrStart = scrBar.scrollLeft;
            var scrEnd = scrStart + scrBar.offsetWidth;
            var eleStart = target.offsetLeft;
            var eleWidth = target.offsetWidth;
            var eleEnd = target.offsetLeft + target.offsetWidth;

            if (scrStart < eleStart && scrEnd < eleEnd) {
              var eleViewRange = scrEnd - eleStart;
              scrBar.scrollLeft = scrStart + (eleWidth - eleViewRange);
            } else {
              if (scrStart > eleStart && scrEnd > eleEnd) {
                var _eleViewRange = eleEnd - scrStart;

                scrBar.scrollLeft = scrStart - (eleWidth - _eleViewRange);
              }
            }
          } else {
            return;
          }
        }
      }, {
        key: "hoverHandler",
        value: function hoverHandler(e) {
          var trg = e.target;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trg.classList) && trg.classList.contains(CLS_ICON_CLOSE)) {
            trg.setAttribute('title', new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('tab', {
              closeButtonTitle: this.title
            }, this.locale).getConstant('closeButtonTitle'));
          }
        }
      }, {
        key: "evalOnPropertyChangeItems",
        value: function evalOnPropertyChangeItems(newProp, oldProp) {
          if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {
            var changedProp = Object.keys(newProp.items);

            for (var i = 0; i < changedProp.length; i++) {
              var index = parseInt(Object.keys(newProp.items)[i], 10);
              var property = Object.keys(newProp.items[index])[0];
              var oldVal = Object(oldProp.items[index])[property];
              var newVal = Object(newProp.items[index])[property];
              var hdrItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS + ' #' + CLS_ITEM$2 + this.tabId + '_' + index, this.element);
              var cntItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1 + ' #' + CLS_CONTENT$1 + this.tabId + '_' + index, this.element);

              if (property === 'header' || property === 'headerTemplate') {
                var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.items[index].header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.items[index].header.iconCss) ? '' : this.items[index].header.iconCss;
                var textVal = this.items[index].headerTemplate || this.items[index].header.text;

                if (textVal === '' && icon === '') {
                  this.removeTab(index);
                } else {
                  var arr = [];
                  arr.push(this.items[index]);
                  this.items.splice(index, 1);
                  this.itemIndexArray.splice(index, 1);
                  this.tbObj.items.splice(index, 1);
                  var isHiddenEle = hdrItem.classList.contains(CLS_HIDDEN$1);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(hdrItem);
                  this.isReplace = true;
                  this.addTab(arr, index);

                  if (isHiddenEle) {
                    this.hideTab(index);
                  }

                  this.isReplace = false;
                }
              }

              if (property === 'content' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntItem)) {
                var strVal = typeof newVal === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newVal.innerHTML);

                if (strVal && (newVal[0] === '.' || newVal[0] === '#') && newVal.length) {
                  var eleVal = document.querySelector(newVal);
                  cntItem.appendChild(eleVal);
                  eleVal.style.display = '';
                } else if (newVal === '' && oldVal[0] === '#') {
                  document.body.appendChild(this.element.querySelector(oldVal)).style.display = 'none';
                  cntItem.innerHTML = newVal;
                } else {
                  cntItem.innerHTML = newVal;
                }
              }

              if (property === 'cssClass') {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(hdrItem)) {
                  hdrItem.classList.remove(oldVal);
                  hdrItem.classList.add(newVal);
                }

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntItem)) {
                  cntItem.classList.remove(oldVal);
                  cntItem.classList.add(newVal);
                }
              }

              if (property === 'disabled') {
                this.enableTab(index, newVal === true ? false : true);
              }

              if (property === 'visible') {
                this.hideTab(index, newVal === true ? false : true);
              }
            }
          } else {
            this.lastIndex = 0;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tbObj)) {
              this.reRenderItems();
            } else {
              this.setItems(newProp.items);

              if (this.templateEle.length > 0) {
                this.expTemplateContent();
              }

              this.templateEle = [];
              var selectElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TAB + ' > .' + CLS_CONTENT$1, this.element);

              while (selectElement.firstElementChild && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(selectElement.firstElementChild);
              }

              this.select(this.selectedItem);
            }
          }
        }
        /**
         * Enables or disables the specified Tab item. On passing value as `false`, the item will be disabled.
         * @param  {number} index - Index value of target Tab item.
         * @param  {boolean} value - Boolean value that determines whether the command should be enabled or disabled.
         * By default, isEnable is true.
         * @returns void.
         */

      }, {
        key: "enableTab",
        value: function enableTab(index, value) {
          var tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element)[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tbItems)) {
            return;
          }

          if (value === true) {
            tbItems.classList.remove(CLS_DISABLE$4, CLS_OVERLAY$2);
            tbItems.firstElementChild.setAttribute('tabindex', '-1');
          } else {
            tbItems.classList.add(CLS_DISABLE$4, CLS_OVERLAY$2);
            tbItems.firstElementChild.removeAttribute('tabindex');

            if (tbItems.classList.contains(CLS_ACTIVE$1)) {
              this.select(index + 1);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.items[index])) {
            this.items[index].disabled = !value;
            this.dataBind();
          }

          tbItems.setAttribute('aria-disabled', value === true ? 'false' : 'true');
        }
        /**
         * Adds new items to the Tab that accepts an array as Tab items.
         * @param  {TabItemsModel[]} items - An array of item that is added to the Tab.
         * @param  {number} index - Number value that determines where the items to be added. By default, index is 0.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "addTab",
        value: function addTab(items, index) {
          var _this622 = this;

          var addArgs = {
            addedItems: items,
            cancel: false
          };

          if (!this.isReplace) {
            this.trigger('adding', addArgs, function (tabAddingArgs) {
              if (!tabAddingArgs.cancel) {
                _this622.addingTabContent(items, index);
              }
            });
          } else {
            this.addingTabContent(items, index);
          }
        }
      }, {
        key: "addingTabContent",
        value: function addingTabContent(items, index) {
          var _this623 = this;

          var lastEleIndex = 0;
          this.hdrEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_HEADER$1, this.element);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.hdrEle)) {
            this.items = items;
            this.reRenderItems();
          } else {
            var itemsCount = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element).length;

            if (itemsCount !== 0) {
              lastEleIndex = this.lastIndex + 1;
            }

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
              index = itemsCount - 1;
            }

            if (itemsCount < index || index < 0 || isNaN(index)) {
              return;
            }

            if (itemsCount === 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.hdrEle)) {
              this.hdrEle.style.display = '';
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.bdrLine)) {
              this.bdrLine.classList.add(CLS_HIDDEN$1);
            }

            this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS, this.getTabHeader());
            this.isAdd = true;
            var tabItems = this.parseObject(items, index);
            this.isAdd = false;
            var i = 0;
            var textValue;
            items.forEach(function (item, place) {
              textValue = item.headerTemplate || item.header.text;

              if (!(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.headerTemplate || item.header) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(textValue) || textValue.length === 0 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.iconCss))) {
                _this623.items.splice(index + i, 0, item);

                i++;
              }

              if (_this623.isTemplate && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item.header.text)) {
                var no = lastEleIndex + place;

                var ele = _this623.createElement('div', {
                  id: CLS_CONTENT$1 + _this623.tabId + '_' + no,
                  className: CLS_ITEM$2,
                  attrs: {
                    role: 'tabpanel',
                    'aria-labelledby': CLS_ITEM$2 + '_' + no
                  }
                });

                _this623.cntEle.insertBefore(ele, _this623.cntEle.children[index + place]);

                var eleTrg = _this623.getTrgContent(_this623.cntEle, no.toString());

                _this623.getContent(eleTrg, item.content, 'render', index);
              }
            });
            this.tbObj.addItems(tabItems, index);

            if (!this.isReplace) {
              this.trigger('added', {
                addedItems: items
              });
            }

            if (this.selectedItem === index) {
              this.select(index);
            } else {
              this.setActiveBorder();
            }
          }
        }
        /**
         * Removes the items in the Tab from the specified index.
         * @param  {number} index - Index of target item that is going to be removed.
         * @returns void.
         * @deprecated
         */

      }, {
        key: "removeTab",
        value: function removeTab(index) {
          var _this624 = this;

          var trg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element)[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trg)) {
            return;
          }

          var removeArgs = {
            removedItem: trg,
            removedIndex: index,
            cancel: false
          };
          this.trigger('removing', removeArgs, function (tabRemovingArgs) {
            if (!tabRemovingArgs.cancel) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && _this624.isServerRendered) {
                // tslint:disable-next-line:no-any
                _this624.interopAdaptor.invokeMethodAsync('OnRemoveItem', index);

                return;
              }

              _this624.tbObj.removeItems(index);

              _this624.items.splice(index, 1);

              _this624.itemIndexArray.splice(index, 1);

              _this624.refreshActiveBorder();

              var cntTrg = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + CLS_CONTENT$1 + _this624.tabId + '_' + _this624.extIndex(trg.id), Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, _this624.element));

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cntTrg)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(cntTrg);
              }

              _this624.trigger('removed', tabRemovingArgs);

              if (trg.classList.contains(CLS_ACTIVE$1)) {
                // tslint:disable-next-line:max-line-length
                index = index > Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_TB_POPUP + ')', _this624.element).length - 1 ? index - 1 : index;
                _this624.enableAnimation = false;
                _this624.selectedItem = index;

                _this624.select(index);
              }

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, _this624.element).length === 0) {
                _this624.hdrEle.style.display = 'none';
              }

              _this624.enableAnimation = true;
            }
          });
        }
        /**
         * Shows or hides the Tab that is in the specified index.
         * @param  {number} index - Index value of target item.
         * @param  {boolean} value - Based on this Boolean value, item will be hide (false) or show (true). By default, value is true.
         * @returns void.
         */

      }, {
        key: "hideTab",
        value: function hideTab(index, value) {
          var items;
          var item = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, this.element)[index];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(item)) {
            return;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value)) {
            value = true;
          }

          this.bdrLine.classList.add(CLS_HIDDEN$1);

          if (value === true) {
            item.classList.add(CLS_HIDDEN$1);
            items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN$1 + ')', this.tbItems);

            if (items.length !== 0 && item.classList.contains(CLS_ACTIVE$1)) {
              if (index !== 0) {
                for (var i = index - 1; i >= 0; i--) {
                  if (!this.tbItem[i].classList.contains(CLS_HIDDEN$1)) {
                    this.select(i);
                    break;
                  } else if (i === 0) {
                    for (var k = index + 1; k < this.tbItem.length; k++) {
                      if (!this.tbItem[k].classList.contains(CLS_HIDDEN$1)) {
                        this.select(k);
                        break;
                      }
                    }
                  }
                }
              } else {
                for (var _k3 = index + 1; _k3 < this.tbItem.length; _k3++) {
                  if (!this.tbItem[_k3].classList.contains(CLS_HIDDEN$1)) {
                    this.select(_k3);
                    break;
                  }
                }
              }
            } else if (items.length === 0) {
              this.element.classList.add(CLS_HIDDEN$1);
            }
          } else {
            this.element.classList.remove(CLS_HIDDEN$1);
            items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM + ':not(.' + CLS_HIDDEN$1 + ')', this.tbItems);
            item.classList.remove(CLS_HIDDEN$1);

            if (items.length === 0) {
              this.select(index);
            }
          }

          this.setActiveBorder();
          item.setAttribute('aria-hidden', '' + value);

          if (!this.isServerRendered && this.overflowMode === 'Popup' && this.tbObj) {
            this.tbObj.refreshOverflow();
          }
        }
        /**
         * Specifies the index or HTMLElement to select an item from the Tab.
         * @param  {number | HTMLElement} args - Index or DOM element is used for selecting an item from the Tab.
         * @returns void.
         */

      }, {
        key: "select",
        value: function select(args) {
          var _this625 = this;

          var tabHeader = this.getTabHeader();
          this.tbItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_TB_ITEMS, tabHeader);
          this.tbItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CLS_TB_ITEM, tabHeader);
          this.content = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CLS_CONTENT$1, this.element);
          this.prevItem = this.tbItem[this.prevIndex];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedItem) || this.selectedItem < 0 || this.tbItem.length <= this.selectedItem || isNaN(this.selectedItem)) {
            this.selectedItem = 0;
          } else {
            this.selectedID = this.extIndex(this.tbItem[this.selectedItem].id);
          }

          var trg = this.tbItem[args];

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(trg)) {
            this.selectedID = '0';
          } else {
            this.selectingID = this.extIndex(trg.id);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.prevItem) && !this.prevItem.classList.contains(CLS_DISABLE$4)) {
            this.prevItem.children.item(0).setAttribute('tabindex', '-1');
          }

          var eventArg = {
            previousItem: this.prevItem,
            previousIndex: this.prevIndex,
            selectedItem: this.tbItem[this.selectedItem],
            selectedIndex: this.selectedItem,
            selectedContent: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectedID, this.content) : null,
            selectingItem: trg,
            selectingIndex: args,
            selectingContent: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('#' + CLS_CONTENT$1 + this.tabId + '_' + this.selectingID, this.content) : null,
            isSwiped: this.isSwipeed,
            cancel: false
          };

          if (!this.initRender) {
            this.trigger('selecting', eventArg, function (selectArgs) {
              if (!selectArgs.cancel) {
                _this625.selectingContent(args);
              }
            });
          } else {
            this.selectingContent(args);
          }
        }
      }, {
        key: "selectingContent",
        value: function selectingContent(args) {
          if (typeof args === 'number') {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tbItem[args]) && (this.tbItem[args].classList.contains(CLS_DISABLE$4) || this.tbItem[args].classList.contains(CLS_HIDDEN$1))) {
              for (var i = args + 1; i < this.items.length; i++) {
                if (this.items[i].disabled === false && this.items[i].visible === true) {
                  args = i;
                  break;
                } else {
                  args = 0;
                }
              }
            }

            if (this.tbItem.length > args && args >= 0 && !isNaN(args)) {
              this.prevIndex = this.selectedItem;

              if (this.tbItem[args].classList.contains(CLS_TB_POPUP)) {
                this.setActive(this.popupHandler(this.tbItem[args]));
              } else {
                this.setActive(args);
              }
            } else {
              this.setActive(0);
            }
          } else if (args instanceof HTMLElement) {
            this.setActive(this.getEleIndex(args));
          }
        }
        /**
         * Specifies the value to disable/enable the Tab component.
         * When set to `true`, the component will be disabled.
         * @param  {boolean} value - Based on this Boolean value, Tab will be enabled (false) or disabled (true).
         * @returns void.
         */

      }, {
        key: "disable",
        value: function disable(value) {
          this.setCssClass(this.element, CLS_DISABLE$4, value);
          this.element.setAttribute('aria-disabled', '' + value);
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @returns string
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['selectedItem', 'actEleId']);
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'tab';
        }
        /**
         * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
         * @param  {TabModel} newProp
         * @param  {TabModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i141 = 0, _Object$keys57 = Object.keys(newProp); _i141 < _Object$keys57.length; _i141++) {
            var prop = _Object$keys57[_i141];

            switch (prop) {
              case 'width':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  width: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width)
                });
                break;

              case 'height':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  height: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height)
                });

                if (!this.isServerRendered) {
                  this.setContentHeight(false);
                }

                break;

              case 'cssClass':
                if (oldProp.cssClass !== '') {
                  this.setCssClass(this.element, oldProp.cssClass, false);
                  this.setCssClass(this.element, newProp.cssClass, true);
                } else {
                  this.setCssClass(this.element, newProp.cssClass, true);
                }

                break;

              case 'items':
                if (!this.isServerRendered) {
                  this.evalOnPropertyChangeItems(newProp, oldProp);
                }

                break;

              case 'showCloseButton':
                this.setCloseButton(newProp.showCloseButton);
                break;

              case 'selectedItem':
                if (!this.isServerRendered) {
                  this.selectedItem = oldProp.selectedItem;
                  this.select(newProp.selectedItem);
                }

                break;

              case 'headerPlacement':
                if (this.isServerRendered) {
                  this.serverChangeOrientation(newProp.headerPlacement, oldProp.headerPlacement);
                } else {
                  this.changeOrientation(newProp.headerPlacement);
                }

                break;

              case 'enableRtl':
                this.setRTL(newProp.enableRtl);
                break;

              case 'overflowMode':
                this.tbObj.overflowMode = newProp.overflowMode;
                this.tbObj.dataBind();
                this.refreshActElePosition();
                break;

              case 'heightAdjustMode':
                if (!this.isServerRendered) {
                  this.setContentHeight(false);
                  this.select(this.selectedItem);
                }

                break;

              case 'scrollStep':
                if (this.tbObj) {
                  this.tbObj.scrollStep = this.scrollStep;
                }

                break;
            }
          }
        }
      }]);

      return Tab;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], TabItem)], Tab.prototype, "items", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], Tab.prototype, "width", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Tab.prototype, "height", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Tab.prototype, "cssClass", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Tab.prototype, "selectedItem", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Top')], Tab.prototype, "headerPlacement", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Content')], Tab.prototype, "heightAdjustMode", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Scrollable')], Tab.prototype, "overflowMode", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Dynamic')], Tab.prototype, "loadOn", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tab.prototype, "enablePersistence", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tab.prototype, "enableHtmlSanitizer", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tab.prototype, "showCloseButton", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Tab.prototype, "scrollStep", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, TabAnimationSettings)], Tab.prototype, "animation", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "created", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "adding", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "added", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "selecting", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "selected", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "removing", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "removed", void 0);

    __decorate$7([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tab.prototype, "destroyed", void 0);

    Tab = __decorate$7([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Tab);
    /**
     * Tab modules
     */

    var __decorate$8 = undefined && undefined.__decorate || function (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;
    };

    var TreeView_1;
    var ROOT = 'e-treeview';
    var CONTROL = 'e-control';
    var COLLAPSIBLE = 'e-icon-collapsible';
    var EXPANDABLE = 'e-icon-expandable';
    var LISTITEM = 'e-list-item';
    var LISTTEXT = 'e-list-text';
    var PARENTITEM = 'e-list-parent';
    var HOVER = 'e-hover';
    var ACTIVE = 'e-active';
    var LOAD = 'e-icons-spinner';
    var PROCESS = 'e-process';
    var ICON = 'e-icons';
    var TEXTWRAP = 'e-text-content';
    var INPUT = 'e-input';
    var INPUTGROUP = 'e-input-group';
    var TREEINPUT = 'e-tree-input';
    var EDITING = 'e-editing';
    var RTL$1 = 'e-rtl';
    var DRAGITEM = 'e-drag-item';
    var DROPPABLE = 'e-droppable';
    var DRAGGING = 'e-dragging';
    var SIBLING = 'e-sibling';
    var DROPIN = 'e-drop-in';
    var DROPNEXT = 'e-drop-next';
    var DROPOUT = 'e-drop-out';
    var NODROP = 'e-no-drop';
    var FULLROWWRAP = 'e-fullrow-wrap';
    var FULLROW = 'e-fullrow';
    var SELECTED$1 = 'e-selected';
    var EXPANDED = 'e-expanded';
    var NODECOLLAPSED = 'e-node-collapsed';
    var DISABLE = 'e-disable';
    var DROPCOUNT = 'e-drop-count';
    var CHECK = 'e-check';
    var INDETERMINATE = 'e-stop';
    var CHECKBOXWRAP = 'e-checkbox-wrapper';
    var CHECKBOXFRAME = 'e-frame';
    var CHECKBOXRIPPLE = 'e-ripple-container';
    var RIPPLE = 'e-ripple';
    var RIPPLEELMENT = 'e-ripple-element';
    var FOCUS = 'e-node-focus';
    var IMAGE = 'e-list-img';
    var BIGGER = 'e-bigger';
    var SMALL = 'e-small';
    var CHILD = 'e-has-child';
    var ITEM_ANIMATION_ACTIVE = 'e-animation-active';
    var DISABLED$1 = 'e-disabled';
    var treeAriaAttr = {
      treeRole: 'tree',
      itemRole: 'treeitem',
      listRole: 'group',
      itemText: '',
      wrapperRole: ''
    };
    /**
     * Configures the fields to bind to the properties of node in the TreeView component.
     */

    var FieldsSettings = /*#__PURE__*/function (_syncfusion_ej2_base_47) {
      _inherits(FieldsSettings, _syncfusion_ej2_base_47);

      var _super232 = _createSuper(FieldsSettings);

      function FieldsSettings() {
        _classCallCheck(this, FieldsSettings);

        return _super232.apply(this, arguments);
      }

      return FieldsSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('child')], FieldsSettings.prototype, "child", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])([])], FieldsSettings.prototype, "dataSource", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('expanded')], FieldsSettings.prototype, "expanded", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('hasChildren')], FieldsSettings.prototype, "hasChildren", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('htmlAttributes')], FieldsSettings.prototype, "htmlAttributes", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('iconCss')], FieldsSettings.prototype, "iconCss", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('id')], FieldsSettings.prototype, "id", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('imageUrl')], FieldsSettings.prototype, "imageUrl", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('isChecked')], FieldsSettings.prototype, "isChecked", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('parentID')], FieldsSettings.prototype, "parentID", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], FieldsSettings.prototype, "query", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('selected')], FieldsSettings.prototype, "selected", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], FieldsSettings.prototype, "tableName", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('text')], FieldsSettings.prototype, "text", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('tooltip')], FieldsSettings.prototype, "tooltip", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('navigateUrl')], FieldsSettings.prototype, "navigateUrl", void 0);
    /**
     * Configures animation settings for the TreeView component.
     */


    var ActionSettings = /*#__PURE__*/function (_syncfusion_ej2_base_48) {
      _inherits(ActionSettings, _syncfusion_ej2_base_48);

      var _super233 = _createSuper(ActionSettings);

      function ActionSettings() {
        _classCallCheck(this, ActionSettings);

        return _super233.apply(this, arguments);
      }

      return ActionSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('SlideDown')], ActionSettings.prototype, "effect", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)], ActionSettings.prototype, "duration", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('linear')], ActionSettings.prototype, "easing", void 0);
    /**
     * Configures the animation settings for expanding and collapsing nodes in TreeView.
     */


    var NodeAnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_49) {
      _inherits(NodeAnimationSettings, _syncfusion_ej2_base_49);

      var _super234 = _createSuper(NodeAnimationSettings);

      function NodeAnimationSettings() {
        _classCallCheck(this, NodeAnimationSettings);

        return _super234.apply(this, arguments);
      }

      return NodeAnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideUp',
      duration: 400,
      easing: 'linear'
    }, ActionSettings)], NodeAnimationSettings.prototype, "collapse", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      effect: 'SlideDown',
      duration: 400,
      easing: 'linear'
    }, ActionSettings)], NodeAnimationSettings.prototype, "expand", void 0);
    /**
     * The TreeView component is used to represent hierarchical data in a tree like structure with advanced
     * functions to perform edit, drag and drop, selection with check-box, and more.
     * ```html
     *  <div id="tree"></div>
     * ```
     * ```typescript
     *  let treeObj: TreeView = new TreeView();
     *  treeObj.appendTo('#tree');
     * ```
     */


    var TreeView = TreeView_1 = /*#__PURE__*/function (_syncfusion_ej2_base_50) {
      _inherits(TreeView, _syncfusion_ej2_base_50);

      var _super235 = _createSuper(TreeView);

      function TreeView(options, element) {
        var _this626;

        _classCallCheck(this, TreeView);

        _this626 = _super235.call(this, options, element);
        _this626.isRefreshed = false;
        _this626.preventExpand = false;
        _this626.checkedElement = [];
        _this626.disableNode = [];
        _this626.validArr = [];
        _this626.expandChildren = [];
        _this626.isFieldChange = false;
        _this626.changeDataSource = false;
        _this626.isBlazorExpandedNodes = [];
        _this626.mouseDownStatus = false;
        return _this626;
      }
      /**
       * Get component name.
       * @returns string
       * @private
       */


      _createClass2(TreeView, [{
        key: "getModuleName",
        value: function getModuleName() {
          return 'treeview';
        }
        /**
         * Initialize the event handler
         */

      }, {
        key: "preRender",
        value: function preRender() {
          var _this627 = this;

          this.isBlazorPlatform = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered;
          this.checkActionNodes = [];
          this.parentNodeCheck = [];
          this.dragStartAction = false;
          this.isAnimate = false;
          this.keyConfigs = {
            escape: 'escape',
            end: 'end',
            enter: 'enter',
            f2: 'f2',
            home: 'home',
            moveDown: 'downarrow',
            moveLeft: 'leftarrow',
            moveRight: 'rightarrow',
            moveUp: 'uparrow',
            ctrlDown: 'ctrl+downarrow',
            ctrlUp: 'ctrl+uparrow',
            ctrlEnter: 'ctrl+enter',
            ctrlHome: 'ctrl+home',
            ctrlEnd: 'ctrl+end',
            ctrlA: 'ctrl+A',
            shiftDown: 'shift+downarrow',
            shiftUp: 'shift+uparrow',
            shiftEnter: 'shift+enter',
            shiftHome: 'shift+home',
            shiftEnd: 'shift+end',
            csDown: 'ctrl+shift+downarrow',
            csUp: 'ctrl+shift+uparrow',
            csEnter: 'ctrl+shift+enter',
            csHome: 'ctrl+shift+home',
            csEnd: 'ctrl+shift+end',
            space: 'space'
          };
          this.listBaseOption = {
            expandCollapse: true,
            showIcon: true,
            expandIconClass: EXPANDABLE,
            ariaAttributes: treeAriaAttr,
            expandIconPosition: 'Left',
            itemCreated: function itemCreated(e) {
              _this627.beforeNodeCreate(e);
            },
            enableHtmlSanitizer: this.enableHtmlSanitizer,
            itemNavigable: this.fullRowNavigable
          };
          this.updateListProp(this.fields);
          this.aniObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({});
          this.treeList = [];
          this.isLoaded = false;
          this.isInitalExpand = false;
          this.expandChildren = [];
          this.index = 0;
          this.setTouchClass();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.selectedNodes)) {
            this.setProperties({
              selectedNodes: []
            }, true);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkedNodes)) {
            this.setProperties({
              checkedNodes: []
            }, true);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.expandedNodes)) {
            this.setProperties({
              expandedNodes: []
            }, true);
          } else {
            this.isInitalExpand = true;
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @returns string
         * @hidden
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          var keyEntity = ['selectedNodes', 'checkedNodes', 'expandedNodes'];
          return this.addOnPersist(keyEntity);
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initialRender = true;
          this.blazorInitialRender = false;
          this.initialize();
          this.setDataBinding(false);
          this.setDisabledMode();
          this.setExpandOnType();

          if (!this.disabled) {
            this.setRipple();
          }

          this.wireEditingEvents(this.allowEditing);
          this.setDragAndDrop(this.allowDragAndDrop);

          if (!this.disabled) {
            this.wireEvents();
          }

          if (!this.isBlazorPlatform) {
            this.initialRender = false;
          }

          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          if (!this.isBlazorPlatform) {
            this.element.setAttribute('role', 'tree');
            this.element.setAttribute('tabindex', '0');
            this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
            this.setCssClass(null, this.cssClass);
            this.setEnableRtl();
            this.setFullRow(this.fullRowSelect);
          }

          this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
        }
      }, {
        key: "setDisabledMode",
        value: function setDisabledMode() {
          if (this.disabled) {
            this.element.classList.add(DISABLED$1);
          } else {
            this.element.classList.remove(DISABLED$1);
          }
        }
      }, {
        key: "setEnableRtl",
        value: function setEnableRtl() {
          this.enableRtl ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], RTL$1) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], RTL$1);
        }
      }, {
        key: "setRipple",
        value: function setRipple() {
          var tempStr = '.' + FULLROW + ',.' + TEXTWRAP;
          var rippleModel = {
            selector: tempStr,
            ignore: '.' + TEXTWRAP + ' > .' + ICON + ',.' + INPUTGROUP + ',.' + INPUT + ', .' + CHECKBOXWRAP
          };
          this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, rippleModel);
          var iconModel = {
            selector: '.' + TEXTWRAP + ' > .' + ICON,
            isCenterRipple: true
          };
          this.rippleIconFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(this.element, iconModel);
        }
      }, {
        key: "setFullRow",
        value: function setFullRow(isEnabled) {
          isEnabled ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], FULLROWWRAP) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], FULLROWWRAP);
        }
      }, {
        key: "setMultiSelect",
        value: function setMultiSelect(isEnabled) {
          var firstUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element);

          if (isEnabled) {
            firstUl.setAttribute('aria-multiselectable', 'true');
          } else {
            firstUl.removeAttribute('aria-multiselectable');
          }
        }
      }, {
        key: "templateComplier",
        value: function templateComplier(template) {
          if (template) {
            try {
              if (document.querySelectorAll(template).length) {
                return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(document.querySelector(template).innerHTML.trim());
              }
            } catch (e) {
              return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            }
          }

          return undefined;
        }
      }, {
        key: "setDataBinding",
        value: function setDataBinding(changeDataSource) {
          var _this628 = this;

          this.treeList.push('false');

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"]) {
            // tslint:disable
            this.isOffline = this.isBlazorPlatform ? this.fields.dataSource.offline : this.fields.dataSource.dataSource.offline;

            if (this.fields.dataSource.ready) {
              this.fields.dataSource.ready.then(function (e) {
                // tslint:disable
                _this628.isOffline = _this628.isBlazorPlatform ? _this628.fields.dataSource.offline : _this628.fields.dataSource.dataSource.offline;

                if (_this628.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && _this628.isOffline) {
                  _this628.treeList.pop();

                  _this628.treeData = e.result;
                  _this628.isNumberTypeId = _this628.getType();

                  _this628.setRootData();

                  _this628.renderItems(true);

                  if (_this628.treeList.length === 0 && !_this628.isLoaded) {
                    _this628.finalize();
                  }
                }
              })["catch"](function (e) {
                _this628.trigger('actionFailure', {
                  error: e
                });
              });
            } else {
              this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function (e) {
                _this628.treeList.pop();

                _this628.treeData = e.result;
                _this628.isNumberTypeId = _this628.getType();

                _this628.setRootData();

                if (changeDataSource) {
                  _this628.changeDataSource = true;
                }

                _this628.renderItems(true);

                _this628.changeDataSource = false;

                if (_this628.treeList.length === 0 && !_this628.isLoaded) {
                  _this628.finalize();
                }
              })["catch"](function (e) {
                _this628.trigger('actionFailure', {
                  error: e
                });
              });
            }
          } else {
            this.treeList.pop();

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.fields.dataSource)) {
              this.rootData = this.treeData = [];
            } else {
              this.treeData = JSON.parse(JSON.stringify(this.fields.dataSource));
              this.setRootData();
            }

            this.isNumberTypeId = this.getType();
            this.renderItems(false);
          }

          if (this.treeList.length === 0 && !this.isLoaded) {
            this.finalize();
          }
        }
      }, {
        key: "getQuery",
        value: function getQuery(mapper) {
          var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
          var columns = [];
          var query;

          if (!mapper.query) {
            query = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]();
            var prop = this.getActualProperties(mapper);

            for (var _i142 = 0, _Object$keys58 = Object.keys(prop); _i142 < _Object$keys58.length; _i142++) {
              var col = _Object$keys58[_i142];

              if (col !== 'dataSource' && col !== 'tableName' && col !== 'child' && !!mapper[col] && col !== 'url' && columns.indexOf(mapper[col]) === -1) {
                columns.push(mapper[col]);
              }
            }

            query.select(columns);

            if (prop.hasOwnProperty('tableName')) {
              query.from(mapper.tableName);
            }
          } else {
            query = mapper.query.clone();
          }

          _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].addSorting(this.sortOrder, mapper.text, query);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(value) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.parentID)) {
            query.where(mapper.parentID, 'equal', this.isNumberTypeId ? parseFloat(value) : value);
          }

          return query;
        }
      }, {
        key: "getType",
        value: function getType() {
          return this.treeData[0] ? typeof Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, this.treeData[0]) === 'number' ? true : false : false;
        }
      }, {
        key: "setRootData",
        value: function setRootData() {
          this.dataType = this.getDataType(this.treeData, this.fields);

          if (this.dataType === 1) {
            this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
            var rootItems = this.getChildNodes(this.treeData, undefined, true);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(rootItems)) {
              this.rootData = [];
            } else {
              this.rootData = rootItems;
            }
          } else {
            this.rootData = this.treeData;
          }
        }
      }, {
        key: "renderItems",
        value: function renderItems(isSorted) {
          // tslint:disable
          if (!this.isBlazorPlatform || this.isBlazorPlatform && this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor' || this.changeDataSource) {
            this.listBaseOption.ariaAttributes.level = 1;
            var sortedData = this.getSortedData(this.rootData);
            this.ulElement = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createList(this.createElement, isSorted ? this.rootData : sortedData, this.listBaseOption);
            this.element.appendChild(this.ulElement);
            var rootNodes = this.ulElement.querySelectorAll('.e-list-item');

            if (this.loadOnDemand === false) {
              var i = 0;

              while (i < rootNodes.length) {
                this.renderChildNodes(rootNodes[i], true, null, true);
                i++;
              }
            }

            var parentEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + PARENTITEM, this.element);

            if (parentEle.length === 1 && rootNodes && rootNodes.length !== 0 || this.loadOnDemand) {
              this.finalizeNode(this.element);
            }
          }

          this.updateTemplateForBlazor();
          this.parentNodeCheck = [];
          this.parentCheckData = [];
          this.updateCheckedStateFromDS();

          if (this.autoCheck && this.showCheckBox && !this.isLoaded) {
            this.updateParentCheckState();
          }
        }
      }, {
        key: "updateTemplateForBlazor",
        value: function updateTemplateForBlazor() {
          if (this.nodeTemplate && this.isBlazorPlatform && !this.isStringTemplate) {
            this.updateBlazorTemplate();
          }
        }
        /**
         * Update the checkedNodes from datasource at initial rendering
         */

      }, {
        key: "updateCheckedStateFromDS",
        value: function updateCheckedStateFromDS(id) {
          if (this.treeData && this.showCheckBox) {
            if (this.dataType === 1) {
              var mapper = this.fields;
              var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.isChecked, 'equal', true, false));

              for (var i = 0; i < resultData.length; i++) {
                var resultId = resultData[i][this.fields.id] ? resultData[i][this.fields.id].toString() : null;
                var resultPId = resultData[i][this.fields.parentID] ? resultData[i][this.fields.parentID].toString() : null;

                if (this.checkedNodes.indexOf(resultId) === -1 && !this.isLoaded) {
                  this.checkedNodes.push(resultId);
                }

                if (resultData[i][this.fields.hasChildren]) {
                  var _id = resultData[i][this.fields.id];
                  var childData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.parentID, 'equal', _id, false));

                  for (var child = 0; child < childData.length; child++) {
                    var childId = childData[child][this.fields.id] ? childData[child][this.fields.id].toString() : null;

                    if (this.checkedNodes.indexOf(childId) === -1 && this.autoCheck) {
                      this.checkedNodes.push(childId);
                    }
                  }
                }
              }

              for (var _i143 = 0; _i143 < this.checkedNodes.length; _i143++) {
                var _mapper2 = this.fields;
                var checkState = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(_mapper2.id, 'equal', this.checkedNodes[_i143], true));

                if (checkState[0] && this.autoCheck) {
                  this.getCheckedNodeDetails(_mapper2, checkState);
                  this.checkIndeterminateState(checkState[0]);
                }

                var checkedData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(_mapper2.parentID, 'equal', this.checkedNodes[_i143], true));

                for (var index = 0; index < checkedData.length; index++) {
                  var checkedId = checkedData[index][this.fields.id] ? checkedData[index][this.fields.id].toString() : null;

                  if (this.checkedNodes.indexOf(checkedId) === -1 && this.autoCheck) {
                    this.checkedNodes.push(checkedId);
                  }
                }
              }
            } else if (this.dataType === 2 || this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.isOffline) {
              for (var _index5 = 0; _index5 < this.treeData.length; _index5++) {
                var fieldId = this.treeData[_index5][this.fields.id] ? this.treeData[_index5][this.fields.id].toString() : '';

                if (this.treeData[_index5][this.fields.isChecked] && !this.isLoaded && this.checkedNodes.indexOf(fieldId) === -1) {
                  this.checkedNodes.push(fieldId);
                }

                var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), this.treeData[_index5]);

                if (childItems) {
                  this.updateChildCheckState(childItems, this.treeData[_index5]);
                }
              }
            }
          }
        }
        /**
         * To check whether the list data has sub child and to change the parent check state accordingly
         */

      }, {
        key: "getCheckedNodeDetails",
        value: function getCheckedNodeDetails(mapper, checkNodes) {
          var id = checkNodes[0][this.fields.parentID] ? checkNodes[0][this.fields.parentID].toString() : null;
          var count = 0;
          var element = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.id] + '"]');
          var parentEle = this.element.querySelector('[data-uid="' + checkNodes[0][this.fields.parentID] + '"]');

          if (!element && !parentEle) {
            var _len51 = this.parentNodeCheck.length;

            if (this.parentNodeCheck.indexOf(id) === -1) {
              this.parentNodeCheck.push(id);
            }

            var childNodes = this.getChildNodes(this.treeData, id);

            for (var i = 0; i < childNodes.length; i++) {
              var childId = childNodes[i][this.fields.id] ? childNodes[i][this.fields.id].toString() : null;

              if (this.checkedNodes.indexOf(childId) !== -1) {
                count++;
              }

              if (count === childNodes.length && this.checkedNodes.indexOf(id) === -1) {
                this.checkedNodes.push(id);
              }
            }

            var preElement = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.id, 'equal', id, true));
            this.getCheckedNodeDetails(mapper, preElement);
          } else if (parentEle) {
            var check = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, parentEle);

            if (!check) {
              this.changeState(parentEle, 'indeterminate', null, true, true);
            }
          }
        }
        /**
         * Update the checkedNodes and parent state when all the child Nodes are in checkedstate at initial rendering
         */

      }, {
        key: "updateParentCheckState",
        value: function updateParentCheckState() {
          var indeterminate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + INDETERMINATE, this.element);
          var childCheckedElement;

          for (var i = 0; i < indeterminate.length; i++) {
            var node = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(indeterminate[i], '.' + LISTITEM);
            var nodeId = node.getAttribute('data-uid').toString();

            if (this.dataType === 1) {
              childCheckedElement = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(this.fields.parentID, 'equal', nodeId, true));
            } else {
              childCheckedElement = this.getChildNodes(this.treeData, nodeId);
            }

            var count = 0;

            if (childCheckedElement) {
              for (var j = 0; j < childCheckedElement.length; j++) {
                var childId = childCheckedElement[j][this.fields.id].toString();

                if (this.checkedNodes.indexOf(childId) !== -1) {
                  count++;
                }
              }

              if (count === childCheckedElement.length) {
                var nodeCheck = node.getAttribute('data-uid');

                if (this.checkedNodes.indexOf(nodeCheck) === -1) {
                  this.checkedNodes.push(nodeCheck);
                }

                this.changeState(node, 'check', null, true, true);
              } else if (count === 0 && this.checkedNodes.length === 0) {
                this.changeState(node, 'uncheck', null, true, true);
              }
            }
          }
        }
        /**
         * Change the parent to indeterminate state whenever the child is in checked state which is not rendered in DOM
         */

      }, {
        key: "checkIndeterminateState",
        value: function checkIndeterminateState(data) {
          var element;

          if (this.dataType === 1) {
            element = this.element.querySelector('[data-uid="' + data[this.fields.parentID] + '"]');
          } else {
            element = this.element.querySelector('[data-uid="' + data[this.fields.id] + '"]');
          }

          if (element) {
            var ariaChecked = element.querySelector('.' + CHECKBOXWRAP).getAttribute('aria-checked');

            if (ariaChecked !== 'true') {
              this.changeState(element, 'indeterminate', null, true, true);
            }
          } else if (this.dataType === 2) {
            var _len52 = this.parentNodeCheck.length;

            if (this.parentNodeCheck.indexOf(data[this.fields.id].toString()) === -1) {
              this.parentNodeCheck.push(data[this.fields.id].toString());
            }
          }
        }
        /**
         * Update the checkedNodes for child and subchild from datasource (hierarchical datasource) at initial rendering
         */

      }, {
        key: "updateChildCheckState",
        value: function updateChildCheckState(childItems, treeData) {
          var count = 0;
          var checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : '';

          for (var index = 0; index < childItems.length; index++) {
            var checkedChild = childItems[index][this.fields.id] ? childItems[index][this.fields.id].toString() : '';

            if (childItems[index][this.fields.isChecked] && !this.isLoaded && this.checkedNodes.indexOf(checkedChild) === -1) {
              this.checkedNodes.push(checkedChild);
            }

            if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1 && this.autoCheck) {
              this.checkedNodes.push(checkedChild);
            }

            if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
              count++;
            }

            var subChildItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), childItems[index]);

            if (subChildItems) {
              this.parentCheckData.push(treeData);
              this.updateChildCheckState(subChildItems, childItems[index]);
            }

            if (count === childItems.length && this.autoCheck && this.checkedNodes.indexOf(checkedParent) === -1) {
              this.checkedNodes.push(checkedParent);
            }
          }

          if (count !== 0 && this.autoCheck) {
            this.checkIndeterminateState(treeData);

            for (var _len53 = 0; _len53 < this.parentCheckData.length; _len53++) {
              if (treeData !== this.parentCheckData[_len53] && this.parentCheckData[_len53]) {
                this.checkIndeterminateState(this.parentCheckData[_len53]);
              }
            }
          }

          this.parentCheckData = [];
        }
      }, {
        key: "beforeNodeCreate",
        value: function beforeNodeCreate(e) {
          if (this.showCheckBox) {
            var checkboxEle = Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["createCheckBox"])(this.createElement, true, {
              cssClass: this.touchClass
            });
            checkboxEle.setAttribute('role', 'checkbox');
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, e.item);
            var id = e.item.getAttribute('data-uid');
            e.item.childNodes[0].insertBefore(checkboxEle, e.item.childNodes[0].childNodes[Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon) ? 0 : 1]);
            var checkValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(e.fields.isChecked, e.curData);

            if (this.checkedNodes.indexOf(id) > -1) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME, checkboxEle).classList.add(CHECK);
              checkboxEle.setAttribute('aria-checked', 'true');
              this.addCheck(e.item);
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(checkValue) && checkValue.toString() === 'true') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME, checkboxEle).classList.add(CHECK);
              checkboxEle.setAttribute('aria-checked', 'true');
              this.addCheck(e.item);
            } else {
              checkboxEle.setAttribute('aria-checked', 'false');
            }

            var frame = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME, checkboxEle);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(frame, 'mousedown', this.frameMouseHandler, this);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(frame, 'mouseup', this.frameMouseHandler, this);
          }

          if (this.fullRowSelect) {
            this.createFullRow(e.item);
          }

          if (this.allowMultiSelection && !e.item.classList.contains(SELECTED$1)) {
            e.item.setAttribute('aria-selected', 'false');
          }

          var fields = e.fields;
          this.addActionClass(e, fields.selected, SELECTED$1);
          this.addActionClass(e, fields.expanded, EXPANDED);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.nodeTemplateFn)) {
            var textEle = e.item.querySelector('.' + LISTTEXT);
            textEle.innerHTML = '';
            var tempArr = this.nodeTemplateFn(e.curData, undefined, undefined, this.element.id + 'nodeTemplate', this.isStringTemplate);
            tempArr = Array.prototype.slice.call(tempArr);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(tempArr, textEle);
          }

          var eventArgs = {
            node: e.item,
            nodeData: e.curData,
            text: e.text
          };

          if (!this.isRefreshed) {
            this.trigger('drawNode', eventArgs);
          }
        }
      }, {
        key: "frameMouseHandler",
        value: function frameMouseHandler(e) {
          var rippleSpan = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXRIPPLE, e.target.parentElement);
          Object(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_3__["rippleMouseHandler"])(e, rippleSpan);
        }
      }, {
        key: "addActionClass",
        value: function addActionClass(e, action, cssClass) {
          var data = e.curData;
          var actionValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(action, data);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(actionValue) && actionValue.toString() !== 'false') {
            e.item.classList.add(cssClass);
          }
        }
      }, {
        key: "getDataType",
        value: function getDataType(ds, mapper) {
          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
            for (var i = 0; i < ds.length; i++) {
              if (this.isOffline) {
                if (typeof mapper.child === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, ds[i])) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.parentID, ds[i]))) {
                  return 1;
                }
              } else if (typeof mapper.child === 'string' && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, ds[i]))) {
                return 1;
              }
            }

            return 2;
          }

          for (var _i144 = 0, _len54 = ds.length; _i144 < _len54; _i144++) {
            if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, ds[_i144]))) {
              return 2;
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.parentID, ds[_i144])) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.hasChildren, ds[_i144]))) {
              return 1;
            }
          }

          return 1;
        }
      }, {
        key: "getGroupedData",
        value: function getGroupedData(dataSource, groupBy) {
          var cusQuery = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().group(groupBy);

          var ds = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].getDataSource(dataSource, cusQuery);

          var grpItem = [];

          for (var j = 0; j < ds.length; j++) {
            var itemObj = ds[j].items;
            grpItem.push(itemObj);
          }

          return grpItem;
        }
      }, {
        key: "getSortedData",
        value: function getSortedData(list) {
          if (list && this.sortOrder !== 'None') {
            list = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].getDataSource(list, _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].addSorting(this.sortOrder, this.fields.text));
          }

          return list;
        }
      }, {
        key: "finalizeNode",
        value: function finalizeNode(element) {
          var iNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + IMAGE, element);

          for (var k = 0; k < iNodes.length; k++) {
            iNodes[k].setAttribute('alt', IMAGE);
          }

          if (this.isLoaded) {
            var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + SELECTED$1, element);

            for (var i = 0; i < sNodes.length; i++) {
              this.selectNode(sNodes[i], null);
              break;
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(sNodes, SELECTED$1);
          }

          var cNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + ':not(.' + EXPANDED + ')', element);

          for (var j = 0; j < cNodes.length; j++) {
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, cNodes[j]);

            if (icon && icon.classList.contains(EXPANDABLE)) {
              this.disableExpandAttr(cNodes[j]);
            }
          }

          var eNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + EXPANDED, element);

          if (!this.isInitalExpand) {
            for (var _i145 = 0; _i145 < eNodes.length; _i145++) {
              this.renderChildNodes(eNodes[_i145]);
            }
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(eNodes, EXPANDED);
          this.updateList();

          if (this.isLoaded) {
            this.updateCheckedProp();
          }
        }
      }, {
        key: "updateCheckedProp",
        value: function updateCheckedProp() {
          if (this.showCheckBox) {
            var nodes = [].concat([], this.checkedNodes);
            this.setProperties({
              checkedNodes: nodes
            }, true);
          }
        }
      }, {
        key: "ensureIndeterminate",
        value: function ensureIndeterminate() {
          if (this.autoCheck) {
            var liElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('li', this.element);
            var ulElement;

            for (var i = 0; i < liElement.length; i++) {
              if (liElement[i].classList.contains(LISTITEM)) {
                ulElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, liElement[i]);

                if (ulElement) {
                  this.ensureParentCheckState(liElement[i]);
                } else {
                  this.ensureChildCheckState(liElement[i]);
                }
              }
            }
          } else {
            var indeterminate = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + INDETERMINATE, this.element);

            for (var _i146 = 0; _i146 < indeterminate.length; _i146++) {
              indeterminate[_i146].classList.remove(INDETERMINATE);
            }
          }
        }
      }, {
        key: "ensureParentCheckState",
        value: function ensureParentCheckState(element) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            if (element.classList.contains(ROOT)) {
              return;
            }

            var ulElement = element;

            if (element.classList.contains(LISTITEM)) {
              ulElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, element);
            }

            var checkedNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CHECK, ulElement);
            var indeterminateNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + INDETERMINATE, ulElement);
            var nodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM, ulElement);
            var checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP)[0];

            if (nodes.length === checkedNodes.length) {
              this.changeState(checkBoxEle, 'check', null, true, true);
            } else if (checkedNodes.length > 0 || indeterminateNodes.length > 0) {
              this.changeState(checkBoxEle, 'indeterminate', null, true, true);
            } else if (checkedNodes.length === 0) {
              this.changeState(checkBoxEle, 'uncheck', null, true, true);
            }

            var parentUL = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(element, '.' + PARENTITEM);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentUL)) {
              var currentParent = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(parentUL, '.' + LISTITEM);
              this.ensureParentCheckState(currentParent);
            }
          }
        }
      }, {
        key: "ensureChildCheckState",
        value: function ensureChildCheckState(element, e) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var childElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, element);
            var checkBoxes;

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(childElement)) {
              checkBoxes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CHECKBOXWRAP, childElement);
              var isChecked = element.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK);
              var parentCheck = element.getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(INDETERMINATE);
              var childCheck = childElement.querySelectorAll('li');
              var expandState = childElement.parentElement.getAttribute('aria-expanded');
              var checkedState;

              for (var index = 0; index < checkBoxes.length; index++) {
                var childId = childCheck[index].getAttribute('data-uid');

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.currentLoadData) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.isChecked, this.currentLoadData[index]))) {
                  checkedState = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.isChecked, this.currentLoadData[index]) ? 'check' : 'uncheck';

                  if (this.ele !== -1) {
                    checkedState = isChecked ? 'check' : 'uncheck';
                  }

                  if (checkedState === 'uncheck' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.parentNodeCheck) && this.autoCheck && this.parentNodeCheck.indexOf(childId) !== -1) {
                    this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
                    checkedState = 'indeterminate';
                  }
                } else {
                  var isNodeChecked = checkBoxes[index].getElementsByClassName(CHECKBOXFRAME)[0].classList.contains(CHECK);

                  if (isChecked) {
                    checkedState = 'check';
                  } else if (isNodeChecked && !this.isLoaded) {
                    checkedState = 'check';
                  } else if (this.checkedNodes.indexOf(childId) !== -1 && this.isLoaded && (parentCheck || isChecked)) {
                    checkedState = 'check';
                  } else if (childCheck[index].classList.contains(CHILD) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.parentNodeCheck) && this.autoCheck && (isChecked || parentCheck) && this.parentNodeCheck.indexOf(childId) !== -1) {
                    checkedState = 'indeterminate';
                    this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
                  } else if (this.dataType === 1 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(this.parentNodeCheck) && this.autoCheck && (isChecked || parentCheck) && this.parentNodeCheck.indexOf(childId) !== -1) {
                    checkedState = 'indeterminate';
                    this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(childId), 1);
                  } else {
                    checkedState = 'uncheck';
                  }
                }

                this.changeState(checkBoxes[index], checkedState, e, true, true);
              }
            }

            if (this.autoCheck && this.isLoaded) {
              this.updateParentCheckState();
            }
          }
        }
      }, {
        key: "doCheckBoxAction",
        value: function doCheckBoxAction(nodes, doCheck) {
          var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM, this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            for (var _len55 = nodes.length; _len55 >= 0; _len55--) {
              var liEle = void 0;

              if (nodes.length === 1) {
                liEle = this.getElement(nodes[_len55 - 1]);
              } else {
                liEle = this.getElement(nodes[_len55]);
              }

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
                var node = void 0;
                node = nodes[_len55 - nodes.length] ? nodes[_len55 - nodes.length].toString() : nodes[_len55] ? nodes[_len55].toString() : null;

                if (node !== '' && doCheck && node) {
                  this.setValidCheckedNode(node);
                  this.dynamicCheckState(node, doCheck);
                } else if (this.checkedNodes.indexOf(node) !== -1 && node !== '' && !doCheck) {
                  this.checkedNodes.splice(this.checkedNodes.indexOf(node), 1);
                  var childItems = this.getChildNodes(this.treeData, node);

                  if (childItems) {
                    for (var i = 0; i < childItems.length; i++) {
                      var id = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : null;

                      if (this.checkedNodes.indexOf(id) !== -1) {
                        this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
                      }
                    }

                    if (this.parentNodeCheck.indexOf(node) !== -1) {
                      this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(node), 1);
                    }
                  }

                  if (node) {
                    this.dynamicCheckState(node, doCheck);
                  }

                  this.updateField(this.treeData, this.fields, node, 'isChecked', null);
                }

                continue;
              }

              var checkBox = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM + ' .' + CHECKBOXWRAP, liEle);
              this.validateCheckNode(checkBox, !doCheck, liEle, null);
            }
          } else {
            var checkBoxes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + CHECKBOXWRAP, this.element);

            if (this.loadOnDemand) {
              for (var index = 0; index < checkBoxes.length; index++) {
                this.updateFieldChecked(checkBoxes[index], doCheck);
                this.changeState(checkBoxes[index], doCheck ? 'check' : 'uncheck', null, null, null, doCheck);
              }
            } else {
              for (var _index6 = 0; _index6 < checkBoxes.length; _index6++) {
                this.updateFieldChecked(checkBoxes[_index6], doCheck);
                this.changeState(checkBoxes[_index6], doCheck ? 'check' : 'uncheck');
              }
            }
          }

          if (nodes) {
            for (var j = 0; j < nodes.length; j++) {
              var _node2 = nodes[j] ? nodes[j].toString() : '';

              if (!doCheck) {
                this.updateField(this.treeData, this.fields, _node2, 'isChecked', null);
              }
            }
          }

          if (this.autoCheck) {
            this.updateParentCheckState();
          }
        }
      }, {
        key: "updateFieldChecked",
        value: function updateFieldChecked(checkbox, doCheck) {
          var currLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkbox, '.' + LISTITEM);
          var id = currLi.getAttribute('data-uid');
          var nodeDetails = this.getNodeData(currLi);

          if (nodeDetails.isChecked === 'true' && !doCheck) {
            this.updateField(this.treeData, this.fields, id, 'isChecked', null);
          }
        }
        /**
         * Changes the parent and child  check state while changing the checkedNodes via setmodel
         */

      }, {
        key: "dynamicCheckState",
        value: function dynamicCheckState(node, doCheck) {
          if (this.dataType === 1) {
            var count = 0;
            var resultId = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(this.fields.id, 'equal', node, true));

            if (resultId[0]) {
              var id = resultId[0][this.fields.id] ? resultId[0][this.fields.id].toString() : null;
              var parent = resultId[0][this.fields.parentID] ? resultId[0][this.fields.parentID].toString() : null;
              var parentElement = this.element.querySelector('[data-uid="' + parent + '"]');
              var indeterminate = parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INDETERMINATE, parentElement) : null;
              var check = parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, parentElement) : null;
              var element = this.element.querySelector('[data-uid="' + id + '"]');
              var childNodes = this.getChildNodes(this.treeData, parent);

              if (childNodes) {
                for (var i = 0; i < childNodes.length; i++) {
                  var childId = childNodes[i][this.fields.id] ? childNodes[i][this.fields.id].toString() : null;

                  if (this.checkedNodes.indexOf(childId) !== -1) {
                    count++;
                  }
                }
              }

              if (this.checkedNodes.indexOf(node) !== -1 && parentElement && id === node && this.autoCheck) {
                this.changeState(parentElement, 'indeterminate', null);
              } else if (this.checkedNodes.indexOf(node) === -1 && element && id === node && !doCheck) {
                this.changeState(element, 'uncheck', null);
              } else if (this.checkedNodes.indexOf(node) !== -1 && element && id === node && doCheck) {
                this.changeState(element, 'check', null);
              } else if (this.checkedNodes.indexOf(node) === -1 && !element && parentElement && id === node && this.autoCheck && count !== 0) {
                this.changeState(parentElement, 'indeterminate', null);
              } else if (this.checkedNodes.indexOf(node) === -1 && !element && parentElement && id === node && this.autoCheck && count === 0) {
                this.changeState(parentElement, 'uncheck', null);
              } else if (!element && !parentElement && id === node && this.autoCheck) {
                this.updateIndeterminate(node, doCheck);
              }
            }
          } else if (this.dataType === 2 || this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.isOffline) {
            var _id2;

            var _parentElement;

            var _check;

            for (var _i147 = 0; _i147 < this.treeData.length; _i147++) {
              _id2 = this.treeData[_i147][this.fields.id] ? this.treeData[_i147][this.fields.id].toString() : '';
              _parentElement = this.element.querySelector('[data-uid="' + _id2 + '"]');
              _check = _parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, _parentElement) : null;

              if (this.checkedNodes.indexOf(_id2) === -1 && _parentElement && _check && !doCheck) {
                this.changeState(_parentElement, 'uncheck', null);
              }

              var subChild = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), this.treeData[_i147]);

              if (subChild) {
                this.updateChildIndeterminate(subChild, _id2, node, doCheck, _id2);
              }
            }
          }
        }
        /**
         * updates the parent and child  check state while changing the checkedNodes via setmodel for listData
         */

      }, {
        key: "updateIndeterminate",
        value: function updateIndeterminate(node, doCheck) {
          var indeterminateData = this.getTreeData(node);
          var count = 0;
          var parent;

          if (this.dataType === 1) {
            parent = indeterminateData[0][this.fields.parentID] ? indeterminateData[0][this.fields.parentID].toString() : null;
          }

          var childNodes = this.getChildNodes(this.treeData, parent);

          if (childNodes) {
            for (var i = 0; i < childNodes.length; i++) {
              var childId = childNodes[i][this.fields.id] ? childNodes[i][this.fields.id].toString() : null;

              if (this.checkedNodes.indexOf(childId) !== -1) {
                count++;
              }
            }
          }

          var parentElement = this.element.querySelector('[data-uid="' + parent + '"]');

          if (parentElement && doCheck) {
            this.changeState(parentElement, 'indeterminate', null);
          } else if (!doCheck && parentElement && this.parentNodeCheck.indexOf(parent) === -1 && count !== 0) {
            this.changeState(parentElement, 'indeterminate', null);
          } else if (!doCheck && parentElement && this.parentNodeCheck.indexOf(parent) === -1 && count === 0) {
            this.changeState(parentElement, 'uncheck', null);
          } else if (!parentElement) {
            if (!doCheck && this.checkedNodes.indexOf(parent) === -1 && this.parentNodeCheck.indexOf(parent) !== -1) {
              this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(parent), 1);
            } else if (doCheck && this.checkedNodes.indexOf(parent) === -1 && this.parentNodeCheck.indexOf(parent) === -1) {
              this.parentNodeCheck.push(parent);
            } else if (!doCheck && this.checkedNodes.indexOf(parent) !== -1 && this.parentNodeCheck.indexOf(parent) === -1 && count !== 0) {
              this.parentNodeCheck.push(parent);
            }

            this.updateIndeterminate(parent, doCheck);

            if (this.checkedNodes.indexOf(parent) !== -1 && !doCheck) {
              this.checkedNodes.splice(this.checkedNodes.indexOf(parent), 1);
            }
          }
        }
        /**
         * updates the parent and child  check state while changing the checkedNodes via setmodel for hierarchical data
         */

      }, {
        key: "updateChildIndeterminate",
        value: function updateChildIndeterminate(subChild, parent, node, doCheck, child) {
          var count = 0;

          for (var j = 0; j < subChild.length; j++) {
            var subId = subChild[j][this.fields.id] ? subChild[j][this.fields.id].toString() : '';

            if (this.checkedNodes.indexOf(subId) !== -1) {
              count++;
            }

            var parentElement = this.element.querySelector('[data-uid="' + parent + '"]');
            var indeterminate = parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + INDETERMINATE, parentElement) : null;
            var check = parentElement ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, parentElement) : null;
            var element = this.element.querySelector('[data-uid="' + subId + '"]');
            var childElementCheck = element ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECK, element) : null;

            if (this.checkedNodes.indexOf(node) !== -1 && parentElement && subId === node && this.autoCheck) {
              this.changeState(parentElement, 'indeterminate', null);
            } else if (this.checkedNodes.indexOf(node) === -1 && parentElement && !element && subId === node && !doCheck) {
              if (this.autoCheck) {
                this.changeState(parentElement, 'uncheck', null);
              } else {
                if (count !== 0) {
                  this.changeState(parentElement, 'indeterminate', null);
                } else {
                  this.changeState(parentElement, 'uncheck', null);
                }
              }
            } else if (this.checkedNodes.indexOf(node) === -1 && element && subId === node && !doCheck) {
              this.changeState(element, 'uncheck', null);
            } else if (this.checkedNodes.indexOf(node) === -1 && indeterminate && subId === node && this.autoCheck && count === 0 && !doCheck) {
              indeterminate.classList.remove(INDETERMINATE);
            } else if (this.checkedNodes.indexOf(node) === -1 && !element && check && subId === node && count === 0) {
              this.changeState(parentElement, 'uncheck', null);
            } else if (this.checkedNodes.indexOf(subId) === -1 && element && childElementCheck && count === 0) {
              this.changeState(element, 'uncheck', null);
            } else if (!element && !parentElement && subId === node || this.parentNodeCheck.indexOf(parent) !== -1 && this.autoCheck) {
              var childElement = this.element.querySelector('[data-uid="' + child + '"]');

              if (doCheck && count !== 0) {
                this.changeState(childElement, 'indeterminate', null);
              } else if (doCheck && count === subChild.length && this.checkedNodes.indexOf(parent) === -1) {
                this.checkedNodes.push(parent);
              } else if (!doCheck && count === 0 && this.parentNodeCheck.indexOf(parent) !== -1) {
                this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(parent));
              }

              if (this.parentNodeCheck.indexOf(parent) === -1) {
                this.parentNodeCheck.push(parent);
              }
            }

            var innerChild = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), subChild[j]);

            if (innerChild) {
              this.updateChildIndeterminate(innerChild, subId, node, doCheck, child);
            }
          }
        }
      }, {
        key: "changeState",
        value: function changeState(wrapper, state, e, isPrevent, isAdd, doCheck) {
          var _this629 = this;

          var eventArgs;
          var currLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(wrapper, '.' + LISTITEM);

          if (!isPrevent) {
            this.checkActionNodes = [];
            eventArgs = this.getCheckEvent(currLi, state, e);
            this.trigger('nodeChecking', eventArgs, function (observedArgs) {
              if (!observedArgs.cancel) {
                _this629.nodeCheckAction(wrapper, state, currLi, observedArgs, e, isPrevent, isAdd, doCheck);
              }
            });
          } else {
            this.nodeCheckAction(wrapper, state, currLi, eventArgs, e, isPrevent, isAdd, doCheck);
          }
        }
      }, {
        key: "nodeCheckAction",
        value: function nodeCheckAction(wrapper, state, currLi, eventArgs, e, isPrevent, isAdd, doCheck) {
          var ariaState;
          var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME)[0];

          if (state === 'check' && !frameSpan.classList.contains(CHECK)) {
            frameSpan.classList.remove(INDETERMINATE);
            frameSpan.classList.add(CHECK);
            this.addCheck(currLi);
            ariaState = 'true';
          } else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK) || frameSpan.classList.contains(INDETERMINATE))) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([frameSpan], [CHECK, INDETERMINATE]);
            this.removeCheck(currLi);
            ariaState = 'false';
          } else if (state === 'indeterminate' && !frameSpan.classList.contains(INDETERMINATE) && this.autoCheck) {
            frameSpan.classList.remove(CHECK);
            frameSpan.classList.add(INDETERMINATE);
            this.removeCheck(currLi);
            ariaState = 'mixed';
          }

          ariaState = state === 'check' ? 'true' : state === 'uncheck' ? 'false' : ariaState;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
            wrapper.setAttribute('aria-checked', ariaState);
          }

          if (isAdd) {
            var data = [].concat([], this.checkActionNodes);
            eventArgs = this.getCheckEvent(currLi, state, e);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(isPrevent)) {
              eventArgs.data = data;
            }
          }

          if (doCheck !== undefined) {
            this.ensureStateChange(currLi, doCheck);
          }

          if (!isPrevent) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
              wrapper.setAttribute('aria-checked', ariaState);
              this.allowServerDataBinding = true;
              this.updateServerProperties("check");
              this.allowServerDataBinding = false;
              eventArgs.data[0].checked = ariaState;
              this.trigger('nodeChecked', eventArgs);
              this.checkActionNodes = [];
            }
          }
        }
      }, {
        key: "addCheck",
        value: function addCheck(liEle) {
          var id = liEle.getAttribute('data-uid');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id) && this.checkedNodes.indexOf(id) === -1) {
            this.checkedNodes.push(id);
          }
        }
      }, {
        key: "removeCheck",
        value: function removeCheck(liEle) {
          var index = this.checkedNodes.indexOf(liEle.getAttribute('data-uid'));

          if (index > -1) {
            this.checkedNodes.splice(index, 1);
          }
        }
      }, {
        key: "getCheckEvent",
        value: function getCheckEvent(currLi, action, e) {
          this.checkActionNodes.push(this.getNodeData(currLi));
          var nodeData = this.checkActionNodes;
          return {
            action: action,
            cancel: false,
            isInteracted: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? false : true,
            node: currLi,
            data: nodeData
          };
        }
      }, {
        key: "finalize",
        value: function finalize() {
          var firstUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(firstUl)) {
            firstUl.setAttribute('role', treeAriaAttr.treeRole);
            this.setMultiSelect(this.allowMultiSelection);
            var firstNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM, this.element);

            if (firstNode) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([firstNode], FOCUS);
              this.updateIdAttr(null, firstNode);
            }

            this.hasPid = this.rootData[0] ? this.rootData[0].hasOwnProperty(this.fields.parentID) : false;
            this.doExpandAction();
          }
        }
      }, {
        key: "doExpandAction",
        value: function doExpandAction() {
          var eUids = this.expandedNodes;

          if (this.isInitalExpand && eUids.length > 0) {
            this.setProperties({
              expandedNodes: []
            }, true);

            if (this.isBlazorPlatform && !this.initialRender) {
              return;
            } // tslint:disable


            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
              this.expandGivenNodes(eUids);
            } else {
              for (var i = 0; i < eUids.length; i++) {
                var eNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('[data-uid="' + eUids[i] + '"]', this.element);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eNode)) {
                  var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + EXPANDABLE, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, eNode));

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon)) {
                    this.expandAction(eNode, icon, null);
                  }
                } else {
                  if (eUids[i] && this.expandChildren.indexOf(eUids[i]) === -1) {
                    this.expandChildren.push(eUids[i].toString());
                  }

                  continue;
                }
              }

              this.afterFinalized();
            }
          } else {
            this.afterFinalized();
          }
        }
      }, {
        key: "expandGivenNodes",
        value: function expandGivenNodes(arr) {
          var proxy = this;
          this.expandCallback(arr[this.index], function () {
            proxy.index++;

            if (proxy.index < arr.length) {
              proxy.expandGivenNodes(arr);
            } else {
              proxy.afterFinalized();
            }
          });
        }
      }, {
        key: "expandCallback",
        value: function expandCallback(eUid, callback) {
          var eNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('[data-uid="' + eUid + '"]', this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eNode)) {
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + EXPANDABLE, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, eNode));

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon)) {
              this.expandAction(eNode, icon, null, false, callback);
            } else {
              callback();
            }
          } else {
            callback();
          }
        }
      }, {
        key: "afterFinalized",
        value: function afterFinalized() {
          if (!this.isBlazorPlatform || this.isBlazorPlatform && !this.initialRender) {
            this.doSelectionAction();
          }

          this.updateCheckedProp();

          if (this.isBlazorPlatform) {
            if (this.initialRender) {
              this.setCheckedNodes(this.checkedNodes);
            }

            this.updateInstance();
            this.initialRender = false;
          }

          this.isAnimate = true;
          this.isInitalExpand = false;

          if (!this.isLoaded || this.isFieldChange) {
            var eventArgs = {
              data: this.treeData
            };
            this.trigger('dataBound', eventArgs);
          }

          this.isLoaded = true;
        }
      }, {
        key: "doSelectionAction",
        value: function doSelectionAction() {
          var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + SELECTED$1, this.element);
          var sUids = this.selectedNodes;

          if (sUids.length > 0) {
            this.setProperties({
              selectedNodes: []
            }, true);

            for (var i = 0; i < sUids.length; i++) {
              var sNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('[data-uid="' + sUids[i] + '"]', this.element);

              if (sNode && !sNode.classList.contains('e-active')) {
                this.selectNode(sNode, null, true);
              } else {
                this.selectedNodes.push(sUids[i]);
              }

              if (!this.allowMultiSelection) {
                break;
              }
            }
          } else {
            this.selectGivenNodes(sNodes);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(sNodes, SELECTED$1);
        }
      }, {
        key: "selectGivenNodes",
        value: function selectGivenNodes(sNodes) {
          for (var i = 0; i < sNodes.length; i++) {
            if (!sNodes[i].classList.contains('e-disable')) {
              this.selectNode(sNodes[i], null, true);
            }

            if (!this.allowMultiSelection) {
              break;
            }
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(event) {
          var target = event.originalEvent.target;

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'contextmenu', this.preventContextMenu);

          if (!target || this.dragStartAction) {
            return;
          } else {
            var classList$$1 = target.classList;
            var li = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);

            if (!li) {
              return;
            } else if (event.originalEvent.which !== 3) {
              var rippleElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + RIPPLEELMENT, li);
              var rippleIcons = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + ICON, li);
              this.removeHover();
              this.setFocusElement(li);

              if (this.showCheckBox && !li.classList.contains('e-disable')) {
                var checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + CHECKBOXWRAP);

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(checkWrapper)) {
                  var checkElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXFRAME, checkWrapper);
                  this.validateCheckNode(checkWrapper, checkElement.classList.contains(CHECK), li, event.originalEvent);
                  this.triggerClickEvent(event.originalEvent, li);
                  return;
                }
              }

              if (classList$$1.contains(EXPANDABLE)) {
                this.expandAction(li, target, event);
              } else if (classList$$1.contains(COLLAPSIBLE)) {
                this.collapseNode(li, target, event);
              } else if (rippleElement && rippleIcons) {
                if (rippleIcons.classList.contains(RIPPLE) && rippleIcons.classList.contains(EXPANDABLE)) {
                  this.expandAction(li, rippleIcons, event);
                } else if (rippleIcons.classList.contains(RIPPLE) && rippleIcons.classList.contains(COLLAPSIBLE)) {
                  this.collapseNode(li, rippleIcons, event);
                } else if (!classList$$1.contains(PARENTITEM) && !classList$$1.contains(LISTITEM)) {
                  this.toggleSelect(li, event.originalEvent, false);
                }
              } else {
                if (!classList$$1.contains(PARENTITEM) && !classList$$1.contains(LISTITEM)) {
                  this.toggleSelect(li, event.originalEvent, false);
                }
              }
            }

            this.triggerClickEvent(event.originalEvent, li);
          }
        }
      }, {
        key: "nodeCheckedEvent",
        value: function nodeCheckedEvent(wrapper, isCheck, e) {
          var currLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(wrapper, '.' + LISTITEM);
          var eventArgs = this.getCheckEvent(wrapper, isCheck ? 'uncheck' : 'check', e);
          eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1);
          this.trigger('nodeChecked', eventArgs);
        }
      }, {
        key: "triggerClickEvent",
        value: function triggerClickEvent(e, li) {
          var eventArgs = {
            event: e,
            node: li
          };
          this.trigger('nodeClicked', eventArgs);
        }
      }, {
        key: "expandNode",
        value: function expandNode(currLi, icon, loaded) {
          var _this630 = this;

          if (icon.classList.contains(LOAD)) {
            this.hideSpinner(icon);
          }

          if (!this.initialRender) {
            icon.classList.add('interaction');
          }

          if (loaded !== true || loaded === true && currLi.classList.contains('e-expanded')) {
            if (this.preventExpand !== true) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], EXPANDABLE);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], COLLAPSIBLE);
              var start = 0;
              var end = 0;
              var proxy = this;
              var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);
              var liEle = currLi;
              this.setHeight(liEle, ul);
              var activeElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM + '.' + ACTIVE, currLi);

              if (this.isAnimate && !this.isRefreshed) {
                this.aniObj.animate(ul, {
                  name: this.animation.expand.effect,
                  duration: this.animation.expand.duration,
                  timingFunction: this.animation.expand.easing,
                  begin: function begin(args) {
                    liEle.style.overflow = 'hidden';

                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement) && activeElement instanceof HTMLElement) {
                      activeElement.classList.add(ITEM_ANIMATION_ACTIVE);
                    }

                    start = liEle.offsetHeight;
                    end = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, currLi).offsetHeight;
                  },
                  progress: function progress(args) {
                    args.element.style.display = 'block';
                    proxy.animateHeight(args, start, end);
                  },
                  end: function end(args) {
                    args.element.style.display = 'block';

                    if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement) && activeElement instanceof HTMLElement) {
                      activeElement.classList.remove(ITEM_ANIMATION_ACTIVE);
                    }

                    _this630.expandedNode(liEle, ul, icon);
                  }
                });
              } else {
                this.expandedNode(liEle, ul, icon);
              }
            }
          } else {
            var _ul3 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);

            _ul3.style.display = 'none';

            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] === true) {
              this.preventExpand = false;
            }
          }

          if (this.initialRender) {
            icon.classList.add('interaction');
          }
        }
      }, {
        key: "expandedNode",
        value: function expandedNode(currLi, ul, icon) {
          ul.style.display = 'block';
          currLi.style.display = 'block';
          currLi.style.overflow = '';
          currLi.style.height = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
          this.addExpand(currLi);
          this.allowServerDataBinding = true;
          this.updateServerProperties("expand");
          this.allowServerDataBinding = false;

          if (this.isLoaded && this.expandArgs && !this.isRefreshed) {
            this.expandArgs = this.getExpandEvent(currLi, null);
            this.trigger('nodeExpanded', this.expandArgs);
          }
        }
      }, {
        key: "addExpand",
        value: function addExpand(liEle) {
          liEle.setAttribute('aria-expanded', 'true');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], NODECOLLAPSED);
          var id = liEle.getAttribute('data-uid');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id) && this.expandedNodes.indexOf(id) === -1) {
            this.expandedNodes.push(id);
          }
        }
      }, {
        key: "collapseNode",
        value: function collapseNode(currLi, icon, e) {
          var _this631 = this;

          if (icon.classList.contains(PROCESS)) {
            return;
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], PROCESS);
          }

          var colArgs;

          if (this.isLoaded) {
            colArgs = this.getExpandEvent(currLi, e);
            this.trigger('nodeCollapsing', colArgs, function (observedArgs) {
              if (observedArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
              } else {
                _this631.nodeCollapseAction(currLi, icon, observedArgs);
              }
            });
          } else {
            this.nodeCollapseAction(currLi, icon, colArgs);
          }
        }
      }, {
        key: "nodeCollapseAction",
        value: function nodeCollapseAction(currLi, icon, colArgs) {
          var _this632 = this;

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], COLLAPSIBLE);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], EXPANDABLE);
          var start = 0;
          var end = 0;
          var proxy = this;
          var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);
          var liEle = currLi;
          var activeElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM + '.' + ACTIVE, currLi);

          if (this.isAnimate) {
            this.aniObj.animate(ul, {
              name: this.animation.collapse.effect,
              duration: this.animation.collapse.duration,
              timingFunction: this.animation.collapse.easing,
              begin: function begin(args) {
                liEle.style.overflow = 'hidden';

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement) && activeElement instanceof HTMLElement) {
                  activeElement.classList.add(ITEM_ANIMATION_ACTIVE);
                }

                start = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, currLi).offsetHeight;
                end = liEle.offsetHeight;
              },
              progress: function progress(args) {
                proxy.animateHeight(args, start, end);
              },
              end: function end(args) {
                args.element.style.display = 'none';

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeElement) && activeElement instanceof HTMLElement) {
                  activeElement.classList.remove(ITEM_ANIMATION_ACTIVE);
                }

                _this632.collapsedNode(liEle, ul, icon, colArgs);
              }
            });
          } else {
            this.collapsedNode(liEle, ul, icon, colArgs);
          }
        }
      }, {
        key: "collapsedNode",
        value: function collapsedNode(liEle, ul, icon, colArgs) {
          ul.style.display = 'none';
          liEle.style.overflow = '';
          liEle.style.height = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
          this.allowServerDataBinding = true;
          this.updateServerProperties("expand");
          this.allowServerDataBinding = false;
          this.removeExpand(liEle);

          if (this.isLoaded) {
            this.trigger('nodeCollapsed', colArgs);
          }
        }
      }, {
        key: "removeExpand",
        value: function removeExpand(liEle, toRemove) {
          if (toRemove) {
            liEle.removeAttribute('aria-expanded');
          } else {
            this.disableExpandAttr(liEle);
          }

          var index = this.expandedNodes.indexOf(liEle.getAttribute('data-uid'));

          if (index > -1) {
            this.expandedNodes.splice(index, 1);
          }
        }
      }, {
        key: "disableExpandAttr",
        value: function disableExpandAttr(liEle) {
          liEle.setAttribute('aria-expanded', 'false');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], NODECOLLAPSED);
        }
      }, {
        key: "setHeight",
        value: function setHeight(currLi, ul) {
          ul.style.display = 'block';
          ul.style.visibility = 'hidden';
          currLi.style.height = currLi.offsetHeight + 'px';
          ul.style.display = 'none';
          ul.style.visibility = '';
        }
      }, {
        key: "animateHeight",
        value: function animateHeight(args, start, end) {
          var remaining = (args.duration - args.timeStamp) / args.duration;
          var currentHeight = (end - start) * remaining + start;
          args.element.parentElement.style.height = currentHeight + 'px';
        }
      }, {
        key: "renderChildNodes",
        value: function renderChildNodes(parentLi, expandChild, callback, loaded) {
          var _this633 = this;

          var eicon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, parentLi);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eicon)) {
            return;
          }

          this.showSpinner(eicon);
          var childItems; // tslint:disable

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
            var level = this.parents(parentLi, '.' + PARENTITEM).length;
            var mapper = this.getChildFields(this.fields, level, 1);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.dataSource)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(eicon);
              this.removeExpand(parentLi, true);
              return;
            }

            this.treeList.push('false');

            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.isOffline) {
              this.treeList.pop();
              childItems = this.getChildNodes(this.treeData, parentLi.getAttribute('data-uid'));
              this.loadChild(childItems, mapper, eicon, parentLi, expandChild, callback, loaded);
              this.updateTemplateForBlazor();
            } else {
              mapper.dataSource.executeQuery(this.getQuery(mapper, parentLi.getAttribute('data-uid'))).then(function (e) {
                _this633.treeList.pop();

                childItems = e.result;

                if (_this633.dataType === 1) {
                  _this633.dataType = 2;
                }

                _this633.loadChild(childItems, mapper, eicon, parentLi, expandChild, callback, loaded);

                _this633.updateTemplateForBlazor();
              })["catch"](function (e) {
                _this633.trigger('actionFailure', {
                  error: e
                });
              });
            }
          } else {
            childItems = this.getChildNodes(this.treeData, parentLi.getAttribute('data-uid'));
            this.currentLoadData = childItems;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(childItems) || childItems.length === 0) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(eicon);
              this.removeExpand(parentLi, true);
              return;
            } else {
              if (!this.isBlazorPlatform || !this.initialRender) {
                this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute('aria-level')) + 1;
                parentLi.appendChild(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createList(this.createElement, this.getSortedData(childItems), this.listBaseOption));
              }

              this.expandNode(parentLi, eicon, loaded);
              this.setSelectionForChildNodes(childItems);
              this.ensureCheckNode(parentLi);
              this.finalizeNode(parentLi);

              if (this.loadOnDemand && this.nodeTemplate && this.isBlazorPlatform && !this.isStringTemplate) {
                this.updateBlazorTemplate();
              }

              this.disableTreeNodes(childItems);
              this.renderSubChild(parentLi, expandChild, loaded);
            }
          }
        }
      }, {
        key: "loadChild",
        value: function loadChild(childItems, mapper, eicon, parentLi, expandChild, callback, loaded) {
          this.currentLoadData = childItems;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(childItems) || childItems.length === 0) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(eicon);
            this.removeExpand(parentLi, true);
          } else {
            this.updateListProp(mapper);

            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !this.isOffline) {
              var id = parentLi.getAttribute('data-uid');
              var nodeData = this.getNodeObject(id);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('child', childItems, nodeData);
            }

            this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute('aria-level')) + 1;
            parentLi.appendChild(_syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createList(this.createElement, childItems, this.listBaseOption));
            this.expandNode(parentLi, eicon, loaded);
            this.setSelectionForChildNodes(childItems);
            this.ensureCheckNode(parentLi);
            this.finalizeNode(parentLi);
            this.disableTreeNodes(childItems);
            this.renderSubChild(parentLi, expandChild, loaded);
          }

          if (callback) {
            callback();
          }

          if (this.treeList.length === 0 && !this.isLoaded) {
            this.finalize();
          }
        }
      }, {
        key: "disableTreeNodes",
        value: function disableTreeNodes(childItems) {
          var i = 0;

          while (i < childItems.length) {
            var id = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : null;

            if (this.disableNode !== undefined && this.disableNode.indexOf(id) !== -1) {
              this.doDisableAction([id]);
            }

            i++;
          }
        }
        /**
         * Sets the child Item in selectedState while rendering the child node
         */

      }, {
        key: "setSelectionForChildNodes",
        value: function setSelectionForChildNodes(nodes) {
          var i;

          for (i = 0; i < nodes.length; i++) {
            var id = nodes[i][this.fields.id] ? nodes[i][this.fields.id].toString() : null;

            if (this.selectedNodes !== undefined && this.selectedNodes.indexOf(id) !== -1) {
              this.doSelectionAction();
            }
          }
        }
      }, {
        key: "ensureCheckNode",
        value: function ensureCheckNode(element) {
          if (this.showCheckBox) {
            this.ele = this.checkedElement ? this.checkedElement.indexOf(element.getAttribute('data-uid')) : null;

            if (this.autoCheck) {
              this.ensureChildCheckState(element);
              this.ensureParentCheckState(element);
            }
          }

          this.currentLoadData = null;
        }
      }, {
        key: "getFields",
        value: function getFields(mapper, nodeLevel, dataLevel) {
          if (nodeLevel === dataLevel) {
            return mapper;
          } else {
            return this.getFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
          }
        }
      }, {
        key: "getChildFields",
        value: function getChildFields(mapper, nodeLevel, dataLevel) {
          if (nodeLevel === dataLevel) {
            return this.getChildMapper(mapper);
          } else {
            return this.getChildFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
          }
        }
      }, {
        key: "getChildMapper",
        value: function getChildMapper(mapper) {
          return typeof mapper.child === 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.child) ? mapper : mapper.child;
        }
      }, {
        key: "getChildNodes",
        value: function getChildNodes(obj, parentId) {
          var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
          var childNodes;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj)) {
            return childNodes;
          } else if (this.dataType === 1) {
            return this.getChildGroup(this.groupedData, parentId, isRoot);
          } else {
            if (typeof this.fields.child === 'string') {
              for (var i = 0, objlen = obj.length; i < objlen; i++) {
                var dataId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, obj[i]);

                if (dataId && dataId.toString() === parentId) {
                  return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child, obj[i]);
                } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child, obj[i]))) {
                  childNodes = this.getChildNodes(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child, obj[i]), parentId);

                  if (childNodes !== undefined) {
                    break;
                  }
                }
              }
            }
          }

          return childNodes;
        }
      }, {
        key: "getChildGroup",
        value: function getChildGroup(data, parentId, isRoot) {
          var childNodes;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data)) {
            return childNodes;
          }

          for (var i = 0, objlen = data.length; i < objlen; i++) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data[i][0]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.parentID, data[i][0]))) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.parentID, data[i][0]).toString() === parentId) {
                return data[i];
              }
            } else if (isRoot) {
              return data[i];
            } else {
              return [];
            }
          }

          return childNodes;
        }
      }, {
        key: "renderSubChild",
        value: function renderSubChild(element, expandChild, loaded) {
          if (expandChild) {
            var cIcons = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + EXPANDABLE, element);

            for (var i = 0, _len56 = cIcons.length; i < _len56; i++) {
              var icon = cIcons[i];

              if (element.querySelector('.e-icons') !== cIcons[i]) {
                var curLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(icon, '.' + LISTITEM);
                this.expandArgs = this.getExpandEvent(curLi, null);

                if (loaded !== true) {
                  this.trigger('nodeExpanding', this.expandArgs);
                }

                this.renderChildNodes(curLi, expandChild, null, loaded);
              }
            }
          }
        }
      }, {
        key: "toggleSelect",
        value: function toggleSelect(li, e, multiSelect) {
          if (!li.classList.contains('e-disable')) {
            if (this.allowMultiSelection && (e && e.ctrlKey || multiSelect) && this.isActive(li)) {
              this.unselectNode(li, e);
            } else {
              this.selectNode(li, e, multiSelect);
            }
          }
        }
      }, {
        key: "isActive",
        value: function isActive(li) {
          return li.classList.contains(ACTIVE) ? true : false;
        }
      }, {
        key: "selectNode",
        value: function selectNode(li, e, multiSelect) {
          var _this634 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li) || !this.allowMultiSelection && this.isActive(li) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)) {
            this.setFocusElement(li);
            return;
          }

          var eventArgs;

          if (this.isLoaded) {
            eventArgs = this.getSelectEvent(li, 'select', e);
            this.trigger('nodeSelecting', eventArgs, function (observedArgs) {
              if (!observedArgs.cancel) {
                _this634.nodeSelectAction(li, e, observedArgs, multiSelect);
              }
            });
          } else {
            this.nodeSelectAction(li, e, eventArgs, multiSelect);
          }
        }
      }, {
        key: "nodeSelectAction",
        value: function nodeSelectAction(li, e, eventArgs, multiSelect) {
          if (!this.allowMultiSelection || !multiSelect && (!e || e && !e.ctrlKey)) {
            this.removeSelectAll();
          }

          if (this.allowMultiSelection && e && e.shiftKey) {
            if (!this.startNode) {
              this.startNode = li;
            }

            var startIndex = this.liList.indexOf(this.startNode);
            var endIndex = this.liList.indexOf(li);

            if (startIndex > endIndex) {
              var temp = startIndex;
              startIndex = endIndex;
              endIndex = temp;
            }

            for (var i = startIndex; i <= endIndex; i++) {
              var currNode = this.liList[i];

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(currNode) && !currNode.classList.contains('e-disable')) {
                this.addSelect(currNode);
              }
            }
          } else {
            this.startNode = li;
            this.addSelect(li);
          }

          this.setFocusElement(li);

          if (this.isLoaded) {
            this.allowServerDataBinding = true;
            this.updateServerProperties("select");
            this.allowServerDataBinding = false;
            eventArgs.nodeData = this.getNodeData(li);
            this.trigger('nodeSelected', eventArgs);
          }
        }
      }, {
        key: "unselectNode",
        value: function unselectNode(li, e) {
          var _this635 = this;

          var eventArgs;

          if (this.isLoaded) {
            eventArgs = this.getSelectEvent(li, 'un-select', e);
            this.trigger('nodeSelecting', eventArgs, function (observedArgs) {
              if (!observedArgs.cancel) {
                _this635.allowServerDataBinding = true;

                _this635.updateServerProperties("select");

                _this635.allowServerDataBinding = false;

                _this635.nodeUnselectAction(li, observedArgs);
              }
            });
          } else {
            this.nodeUnselectAction(li, eventArgs);
          }
        }
      }, {
        key: "nodeUnselectAction",
        value: function nodeUnselectAction(li, eventArgs) {
          this.removeSelect(li);
          this.setFocusElement(li);

          if (this.isLoaded) {
            this.allowServerDataBinding = true;
            this.updateServerProperties("select");
            this.allowServerDataBinding = false;
            eventArgs.nodeData = this.getNodeData(li);
            this.trigger('nodeSelected', eventArgs);
          }
        }
      }, {
        key: "setFocusElement",
        value: function setFocusElement(li) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(li)) {
            var focusedNode = this.getFocusedNode();

            if (focusedNode) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([focusedNode], FOCUS);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], FOCUS);
            this.updateIdAttr(focusedNode, li);
          }
        }
      }, {
        key: "addSelect",
        value: function addSelect(liEle) {
          liEle.setAttribute('aria-selected', 'true');
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], ACTIVE);
          var id = liEle.getAttribute('data-uid');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id) && this.selectedNodes.indexOf(id) === -1) {
            this.selectedNodes.push(id);
          }
        }
      }, {
        key: "removeSelect",
        value: function removeSelect(liEle) {
          if (this.allowMultiSelection) {
            liEle.setAttribute('aria-selected', 'false');
          } else {
            liEle.removeAttribute('aria-selected');
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], ACTIVE);
          var index = this.selectedNodes.indexOf(liEle.getAttribute('data-uid'));

          if (index > -1) {
            this.selectedNodes.splice(index, 1);
          }
        }
      }, {
        key: "removeSelectAll",
        value: function removeSelectAll() {
          var selectedLI = this.element.querySelectorAll('.' + ACTIVE);

          var _iterator145 = _createForOfIteratorHelper(selectedLI),
              _step145;

          try {
            for (_iterator145.s(); !(_step145 = _iterator145.n()).done;) {
              var ele = _step145.value;

              if (this.allowMultiSelection) {
                ele.setAttribute('aria-selected', 'false');
              } else {
                ele.removeAttribute('aria-selected');
              }
            }
          } catch (err) {
            _iterator145.e(err);
          } finally {
            _iterator145.f();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selectedLI, ACTIVE);
          this.setProperties({
            selectedNodes: []
          }, true);
        }
      }, {
        key: "getSelectEvent",
        value: function getSelectEvent(currLi, action, e) {
          var nodeData = this.getNodeData(currLi);
          return {
            action: action,
            cancel: false,
            isInteracted: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? false : true,
            node: currLi,
            nodeData: nodeData
          };
        }
      }, {
        key: "setExpandOnType",
        value: function setExpandOnType() {
          this.expandOnType = this.expandOn === 'Auto' ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 'Click' : 'DblClick' : this.expandOn;
        }
      }, {
        key: "expandHandler",
        value: function expandHandler(e) {
          var target = e.originalEvent.target;

          if (!target || target.classList.contains(INPUT) || target.classList.contains(ROOT) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON) || this.showCheckBox && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + CHECKBOXWRAP)) {
            return;
          } else {
            this.expandCollapseAction(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM), e);
          }
        }
      }, {
        key: "expandCollapseAction",
        value: function expandCollapseAction(currLi, e) {
          var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, currLi);

          if (!icon || icon.classList.contains(PROCESS)) {
            return;
          } else {
            var classList$$1 = icon.classList;

            if (classList$$1.contains(EXPANDABLE)) {
              this.expandAction(currLi, icon, e);
            } else if (classList$$1.contains(COLLAPSIBLE)) {
              this.collapseNode(currLi, icon, e);
            }
          }
        }
      }, {
        key: "expandAction",
        value: function expandAction(currLi, icon, e, expandChild, callback) {
          var _this636 = this;

          if (icon.classList.contains(PROCESS)) {
            return;
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], PROCESS);
          }

          if (this.isLoaded && !this.isRefreshed) {
            this.expandArgs = this.getExpandEvent(currLi, e);
            this.trigger('nodeExpanding', this.expandArgs, function (observedArgs) {
              if (observedArgs.cancel) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], PROCESS);
              } else {
                _this636.nodeExpandAction(currLi, icon, expandChild, callback);
              }
            });
          } else {
            this.nodeExpandAction(currLi, icon, expandChild, callback);
          }
        }
      }, {
        key: "nodeExpandAction",
        value: function nodeExpandAction(currLi, icon, expandChild, callback) {
          var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, currLi);

          if (ul && ul.nodeName === 'UL') {
            this.expandNode(currLi, icon);
          } else {
            this.renderChildNodes(currLi, expandChild, callback);
            var liEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM, currLi);

            for (var i = 0; i < liEles.length; i++) {
              var id = this.getId(liEles[i]);

              if (this.expandChildren.indexOf(id) !== -1 && this.expandChildren !== undefined) {
                var _icon2 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + EXPANDABLE, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, liEles[i]));

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_icon2)) {
                  this.expandAction(liEles[i], _icon2, null);
                }

                this.expandChildren.splice(this.expandChildren.indexOf(id), 1);
              }
            }
          }
        }
      }, {
        key: "keyActionHandler",
        value: function keyActionHandler(e) {
          var _this637 = this;

          var target = e.target;
          var focusedNode = this.getFocusedNode();

          if (target && target.classList.contains(INPUT)) {
            var inpEle = target;

            if (e.action === 'enter') {
              inpEle.blur();
              this.element.focus();
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([focusedNode], HOVER);
            } else if (e.action === 'escape') {
              inpEle.value = this.oldText;
              inpEle.blur();
              this.element.focus();
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([focusedNode], HOVER);
            }

            return;
          }

          e.preventDefault();
          var eventArgs = {
            cancel: false,
            event: e,
            node: focusedNode
          };
          this.trigger('keyPress', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              switch (e.action) {
                case 'space':
                  if (_this637.showCheckBox) {
                    _this637.checkNode(e);
                  }

                  break;

                case 'moveRight':
                  _this637.openNode(_this637.enableRtl ? false : true, e);

                  break;

                case 'moveLeft':
                  _this637.openNode(_this637.enableRtl ? true : false, e);

                  break;

                case 'shiftDown':
                  _this637.shiftKeySelect(true, e);

                  break;

                case 'moveDown':
                case 'ctrlDown':
                case 'csDown':
                  _this637.navigateNode(true);

                  break;

                case 'shiftUp':
                  _this637.shiftKeySelect(false, e);

                  break;

                case 'moveUp':
                case 'ctrlUp':
                case 'csUp':
                  _this637.navigateNode(false);

                  break;

                case 'home':
                case 'shiftHome':
                case 'ctrlHome':
                case 'csHome':
                  _this637.navigateRootNode(true);

                  break;

                case 'end':
                case 'shiftEnd':
                case 'ctrlEnd':
                case 'csEnd':
                  _this637.navigateRootNode(false);

                  break;

                case 'enter':
                case 'ctrlEnter':
                case 'shiftEnter':
                case 'csEnter':
                  _this637.toggleSelect(focusedNode, e);

                  break;

                case 'f2':
                  if (_this637.allowEditing && !focusedNode.classList.contains('e-disable')) {
                    _this637.createTextbox(focusedNode, e);
                  }

                  break;

                case 'ctrlA':
                  if (_this637.allowMultiSelection) {
                    var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + ':not(.' + ACTIVE + ')', _this637.element);

                    _this637.selectGivenNodes(sNodes);
                  }

                  break;
              }
            }
          });
        }
      }, {
        key: "navigateToFocus",
        value: function navigateToFocus(isUp) {
          var focusNode = this.getFocusedNode().querySelector('.' + TEXTWRAP);
          var pos = focusNode.getBoundingClientRect();
          var parent = this.getScrollParent(this.element);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parent)) {
            var parentPos = parent.getBoundingClientRect();

            if (pos.bottom > parentPos.bottom) {
              parent.scrollTop += pos.bottom - parentPos.bottom;
            } else if (pos.top < parentPos.top) {
              parent.scrollTop -= parentPos.top - pos.top;
            }
          }

          var isVisible$$1 = this.isVisibleInViewport(focusNode);

          if (!isVisible$$1) {
            focusNode.scrollIntoView(isUp);
          }
        }
      }, {
        key: "isVisibleInViewport",
        value: function isVisibleInViewport(txtWrap) {
          var pos = txtWrap.getBoundingClientRect();
          return pos.top >= 0 && pos.left >= 0 && pos.bottom <= (window.innerHeight || document.documentElement.clientHeight) && pos.right <= (window.innerWidth || document.documentElement.clientWidth);
        }
      }, {
        key: "getScrollParent",
        value: function getScrollParent(node) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(node)) {
            return null;
          }

          return node.scrollHeight > node.clientHeight ? node : this.getScrollParent(node.parentElement);
        }
      }, {
        key: "shiftKeySelect",
        value: function shiftKeySelect(isTowards, e) {
          if (this.allowMultiSelection) {
            var focusedNode = this.getFocusedNode();
            var nextNode = isTowards ? this.getNextNode(focusedNode) : this.getPrevNode(focusedNode);
            this.removeHover();
            this.setFocusElement(nextNode);
            this.toggleSelect(nextNode, e, false);
            this.navigateToFocus(!isTowards);
          } else {
            this.navigateNode(isTowards);
          }
        }
      }, {
        key: "checkNode",
        value: function checkNode(e) {
          var focusedNode = this.getFocusedNode();
          var checkWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXWRAP, focusedNode);
          var isChecked = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(' .' + CHECKBOXFRAME, checkWrap).classList.contains(CHECK);

          if (!focusedNode.classList.contains('e-disable')) {
            if (focusedNode.getElementsByClassName("e-checkbox-disabled").length == 0) {
              this.validateCheckNode(checkWrap, isChecked, focusedNode, e);
            }
          }
        }
      }, {
        key: "validateCheckNode",
        value: function validateCheckNode(checkWrap, isCheck, li, e) {
          var _this638 = this;

          var currLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(checkWrap, '.' + LISTITEM);
          this.checkActionNodes = [];
          var ariaState = !isCheck ? 'true' : 'false';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ariaState)) {
            checkWrap.setAttribute('aria-checked', ariaState);
          }

          var eventArgs = this.getCheckEvent(currLi, isCheck ? 'uncheck' : 'check', e);
          this.trigger('nodeChecking', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              _this638.nodeCheckingAction(checkWrap, isCheck, li, observedArgs, e);
            }
          });
        }
      }, {
        key: "nodeCheckingAction",
        value: function nodeCheckingAction(checkWrap, isCheck, li, eventArgs, e) {
          if (this.checkedElement.indexOf(li.getAttribute('data-uid')) === -1) {
            this.checkedElement.push(li.getAttribute('data-uid'));
            var child = this.getChildNodes(this.treeData, li.getAttribute('data-uid'));
            child !== null ? this.allCheckNode(child, this.checkedElement, null, null, false) : child = null;
          }

          this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true);

          if (this.autoCheck) {
            this.ensureChildCheckState(li);
            this.ensureParentCheckState(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(li, '.' + PARENTITEM), '.' + LISTITEM));
            var doCheck;

            if (eventArgs.action === 'check') {
              doCheck = true;
            } else if (eventArgs.action === 'uncheck') {
              doCheck = false;
            }

            this.ensureStateChange(li, doCheck);
          }

          this.allowServerDataBinding = true;
          this.updateServerProperties("check");
          this.allowServerDataBinding = false;
          this.nodeCheckedEvent(checkWrap, isCheck, e);
        }
        /**
         * Update checkedNodes when UI interaction happens before the child node renders in DOM
         */

      }, {
        key: "ensureStateChange",
        value: function ensureStateChange(li, doCheck) {
          var childElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, li);
          var parentIndex = li.getAttribute('data-uid');
          var mapper = this.fields;

          if (this.dataType === 1 && this.autoCheck) {
            var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.parentID, 'equal', parentIndex, true));

            for (var i = 0; i < resultData.length; i++) {
              var resultId = resultData[i][this.fields.id] ? resultData[i][this.fields.id].toString() : null;
              var isCheck = resultData[i][this.fields.isChecked] ? resultData[i][this.fields.isChecked].toString() : null;

              if (this.checkedNodes.indexOf(parentIndex) !== -1 && this.checkedNodes.indexOf(resultId) === -1) {
                this.checkedNodes.push(resultId);
                var childItems = this.getChildNodes(this.treeData, resultId);
                this.getChildItems(childItems, doCheck);

                if (this.parentNodeCheck.indexOf(resultId) !== -1) {
                  this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(resultId), 1);
                }
              } else if (this.checkedNodes.indexOf(parentIndex) === -1 && childElement === null && this.checkedNodes.indexOf(resultId) !== -1) {
                this.checkedNodes.splice(this.checkedNodes.indexOf(resultId), 1);

                if (isCheck === 'true') {
                  this.updateField(this.treeData, this.fields, resultId, 'isChecked', null);
                }

                if (this.checkedNodes.indexOf(parentIndex) === -1 && childElement === null || this.parentNodeCheck.indexOf(resultId) !== -1) {
                  var childNodes = this.getChildNodes(this.treeData, resultId);
                  this.getChildItems(childNodes, doCheck);

                  if (this.parentNodeCheck.indexOf(resultId) !== -1) {
                    this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(resultId), 1);
                  }
                }
              } else {
                var _childItems = this.getChildNodes(this.treeData, resultId);

                this.getChildItems(_childItems, doCheck);
              }
            }
          } else if (this.dataType === 1 && !this.autoCheck) {
            if (!doCheck) {
              var checkedData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.isChecked, 'equal', true, false));

              for (var _i148 = 0; _i148 < checkedData.length; _i148++) {
                var id = checkedData[_i148][this.fields.id] ? checkedData[_i148][this.fields.id].toString() : null;

                if (this.checkedNodes.indexOf(id) !== -1) {
                  this.checkedNodes.splice(this.checkedNodes.indexOf(id), 1);
                }

                this.updateField(this.treeData, this.fields, id, 'isChecked', null);
              }

              this.checkedNodes = [];
            } else {
              for (var _i149 = 0; _i149 < this.treeData.length; _i149++) {
                var checkedId = this.treeData[_i149][this.fields.id] ? this.treeData[_i149][this.fields.id].toString() : null;

                if (this.checkedNodes.indexOf(checkedId) === -1) {
                  this.checkedNodes.push(checkedId);
                }
              }
            }
          } else {
            var _childItems2 = this.getChildNodes(this.treeData, parentIndex);

            if (_childItems2) {
              this.childStateChange(_childItems2, parentIndex, childElement, doCheck);
            }
          }
        }
      }, {
        key: "getChildItems",
        value: function getChildItems(childItems, doCheck) {
          for (var i = 0; i < childItems.length; i++) {
            var childId = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : null;
            var childIsCheck = childItems[i][this.fields.isChecked] ? childItems[i][this.fields.isChecked].toString() : null;

            if (this.checkedNodes.indexOf(childId) !== -1 && !doCheck) {
              this.checkedNodes.splice(this.checkedNodes.indexOf(childId), 1);
            }

            if (this.checkedNodes.indexOf(childId) === -1 && doCheck) {
              this.checkedNodes.push(childId);
            }

            if (childIsCheck === 'true' && !doCheck) {
              this.updateField(this.treeData, this.fields, childId, 'isChecked', null);
            }

            var subChildItems = this.getChildNodes(this.treeData, childId);

            if (subChildItems.length > 0) {
              this.getChildItems(subChildItems, doCheck);
            }
          }
        }
        /**
         * Update checkedNodes when UI interaction happens before the child node renders in DOM for hierarchical DS
         */

      }, {
        key: "childStateChange",
        value: function childStateChange(childItems, parent, childElement, doCheck) {
          for (var i = 0; i < childItems.length; i++) {
            var checkedChild = childItems[i][this.fields.id] ? childItems[i][this.fields.id].toString() : '';
            var isCheck = childItems[i][this.fields.isChecked] ? childItems[i][this.fields.isChecked].toString() : null;

            if (this.autoCheck) {
              if (this.checkedNodes.indexOf(parent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1) {
                this.checkedNodes.push(checkedChild);

                if (this.parentNodeCheck.indexOf(checkedChild) !== -1) {
                  this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(checkedChild), 1);
                }
              } else if (this.checkedNodes.indexOf(parent) === -1 && this.checkedNodes.indexOf(checkedChild) !== -1 && !doCheck) {
                this.checkedNodes.splice(this.checkedNodes.indexOf(checkedChild), 1);

                if (isCheck === 'true') {
                  this.updateField(this.treeData, this.fields, checkedChild, 'isChecked', null);
                }
              }
            } else if (!this.autoCheck) {
              if (!doCheck) {
                if (this.checkedNodes.indexOf(checkedChild) !== -1) {
                  this.checkedNodes.splice(this.checkedNodes.indexOf(checkedChild), 1);
                }

                this.updateField(this.treeData, this.fields, checkedChild, 'isChecked', null);
                this.checkedNodes = [];
              } else {
                if (this.checkedNodes.indexOf(checkedChild) === -1) {
                  this.checkedNodes.push(checkedChild);
                }
              }
            }

            var subChild = this.getChildNodes([childItems[i]], checkedChild);

            if (subChild) {
              this.childStateChange(subChild, parent, childElement, doCheck);
            }
          }
        } //This method can be used to get all child nodes of a parent by passing the children of a parent along with 'validateCheck' set to false

      }, {
        key: "allCheckNode",
        value: function allCheckNode(child, newCheck, checked, childCheck, validateCheck) {
          if (child) {
            for (var length = 0; length < child.length; length++) {
              var childId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, child[length]);
              var check = this.element.querySelector('[data-uid="' + childId + '"]'); //Validates isChecked case while no UI interaction has been performed on the node or it's parent

              if (validateCheck !== false && this.checkedElement.indexOf(childId.toString()) === -1) {
                if (check === null && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(child[length][this.fields.isChecked]) && newCheck.indexOf(childId.toString()) === -1 || childCheck === 0 || checked === 2) {
                  child[length][this.fields.isChecked] !== false || checked === 2 ? newCheck.push(childId.toString()) : childCheck = null;
                  childCheck = child[length][this.fields.isChecked] !== false || checked === 2 ? 0 : null;
                }
              } //Pushes child checked node done thro' UI interaction


              if (newCheck.indexOf(childId.toString()) === -1 && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(checked)) {
                newCheck.push(childId.toString());
              } //Gets if any next level children are available for child nodes


              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.hasChildren, child[length]) === true || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), child[length])) {
                var id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, child[length]);

                var _childId = this.getChildNodes(this.treeData, id.toString());

                if (_childId) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(validateCheck) ? this.allCheckNode(_childId, newCheck, checked, childCheck) : this.allCheckNode(_childId, newCheck, checked, childCheck, validateCheck);
                  childCheck = null;
                }
              }

              childCheck = null;
            }
          }
        }
      }, {
        key: "openNode",
        value: function openNode(toBeOpened, e) {
          var focusedNode = this.getFocusedNode();
          var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, focusedNode);

          if (toBeOpened) {
            if (!icon) {
              return;
            } else if (icon.classList.contains(EXPANDABLE)) {
              this.expandAction(focusedNode, icon, e);
            } else {
              this.focusNextNode(focusedNode, true);
            }
          } else {
            if (icon && icon.classList.contains(COLLAPSIBLE)) {
              this.collapseNode(focusedNode, icon, e);
            } else {
              var parentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(focusedNode, '.' + PARENTITEM), '.' + LISTITEM);

              if (!parentLi) {
                return;
              } else {
                if (!parentLi.classList.contains('e-disable')) {
                  this.setFocus(focusedNode, parentLi);
                  this.navigateToFocus(true);
                }
              }
            }
          }
        }
      }, {
        key: "navigateNode",
        value: function navigateNode(isTowards) {
          var focusedNode = this.getFocusedNode();
          this.focusNextNode(focusedNode, isTowards);
        }
      }, {
        key: "navigateRootNode",
        value: function navigateRootNode(isBackwards) {
          var focusedNode = this.getFocusedNode();
          var rootNode = isBackwards ? this.getRootNode() : this.getEndNode();

          if (!rootNode.classList.contains('e-disable')) {
            this.setFocus(focusedNode, rootNode);
            this.navigateToFocus(isBackwards);
          }
        }
      }, {
        key: "getFocusedNode",
        value: function getFocusedNode() {
          var selectedItem;
          var fNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM + '.' + FOCUS, this.element);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fNode)) {
            selectedItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTITEM, this.element);
          }

          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(fNode) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedItem) ? this.element.firstElementChild : selectedItem : fNode;
        }
      }, {
        key: "focusNextNode",
        value: function focusNextNode(li, isTowards) {
          var nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
          this.setFocus(li, nextNode);
          this.navigateToFocus(!isTowards);

          if (nextNode.classList.contains('e-disable')) {
            var lastChild = nextNode.lastChild;

            if (nextNode.previousSibling == null && nextNode.classList.contains('e-level-1')) {
              this.focusNextNode(nextNode, true);
            } else if (nextNode.nextSibling == null && nextNode.classList.contains('e-node-collapsed')) {
              this.focusNextNode(nextNode, false);
            } else if (nextNode.nextSibling == null && lastChild.classList.contains('e-text-content')) {
              this.focusNextNode(nextNode, false);
            } else {
              this.focusNextNode(nextNode, isTowards);
            }
          }
        }
      }, {
        key: "getNextNode",
        value: function getNextNode(li) {
          var index = this.liList.indexOf(li);
          var nextNode;

          do {
            index++;
            nextNode = this.liList[index];

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nextNode)) {
              return li;
            }
          } while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(nextNode));

          return nextNode;
        }
      }, {
        key: "getPrevNode",
        value: function getPrevNode(li) {
          var index = this.liList.indexOf(li);
          var prevNode;

          do {
            index--;
            prevNode = this.liList[index];

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(prevNode)) {
              return li;
            }
          } while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(prevNode));

          return prevNode;
        }
      }, {
        key: "getRootNode",
        value: function getRootNode() {
          var index = 0;
          var rootNode;

          do {
            rootNode = this.liList[index];
            index++;
          } while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(rootNode));

          return rootNode;
        }
      }, {
        key: "getEndNode",
        value: function getEndNode() {
          var index = this.liList.length - 1;
          var endNode;

          do {
            endNode = this.liList[index];
            index--;
          } while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(endNode));

          return endNode;
        }
      }, {
        key: "setFocus",
        value: function setFocus(preNode, nextNode) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([preNode], [HOVER, FOCUS]);

          if (!nextNode.classList.contains('e-disable')) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([nextNode], [HOVER, FOCUS]);
            this.updateIdAttr(preNode, nextNode);
          }
        }
      }, {
        key: "updateIdAttr",
        value: function updateIdAttr(preNode, nextNode) {
          this.element.removeAttribute('aria-activedescendant');

          if (preNode) {
            preNode.removeAttribute('id');
          }

          nextNode.setAttribute('id', this.element.id + '_active');
          this.element.setAttribute('aria-activedescendant', this.element.id + '_active');
        }
      }, {
        key: "focusIn",
        value: function focusIn() {
          if (!this.mouseDownStatus) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.getFocusedNode()], HOVER);
          }

          this.mouseDownStatus = false;
        }
      }, {
        key: "focusOut",
        value: function focusOut() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.getFocusedNode()], HOVER);
        }
      }, {
        key: "onMouseOver",
        value: function onMouseOver(e) {
          var target = e.target;
          var classList$$1 = target.classList;
          var currentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);

          if (!currentLi || classList$$1.contains(PARENTITEM) || classList$$1.contains(LISTITEM)) {
            this.removeHover();
            return;
          } else {
            if (currentLi && !currentLi.classList.contains('e-disable')) {
              this.setHover(currentLi);
            }
          }
        }
      }, {
        key: "setHover",
        value: function setHover(li) {
          if (!li.classList.contains(HOVER)) {
            this.removeHover();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([li], HOVER);
          }
        }
      }, {
        key: "onMouseLeave",
        value: function onMouseLeave(e) {
          this.removeHover();
        }
      }, {
        key: "removeHover",
        value: function removeHover() {
          var hoveredNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + HOVER, this.element);

          if (hoveredNode && hoveredNode.length) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(hoveredNode, HOVER);
          }
        }
      }, {
        key: "getNodeData",
        value: function getNodeData(currLi, fromDS) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(currLi) && currLi.classList.contains(LISTITEM) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(currLi, '.' + CONTROL)) && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(currLi, '.' + CONTROL).classList.contains(ROOT)) {
            var id = currLi.getAttribute('data-uid');
            var text = this.getText(currLi, fromDS);
            var pNode = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(currLi.parentNode, '.' + LISTITEM);
            var pid = pNode ? pNode.getAttribute('data-uid') : null;
            var selected = currLi.classList.contains(ACTIVE);
            var expanded = currLi.getAttribute('aria-expanded') === 'true' ? true : false;
            var hasChildren = currLi.getAttribute('aria-expanded') === null ? false : true;

            if (this.isBlazorPlatform) {
              hasChildren = currLi.getAttribute('aria-expanded') === 'true' ? true : (currLi.querySelector('.e-icon-expandable') || currLi.querySelector('.e-icon-collapsible')) != null ? true : false;
            }

            var checked = null;

            if (this.showCheckBox) {
              checked = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + CHECKBOXWRAP, currLi).getAttribute('aria-checked');
            }

            return {
              id: id,
              text: text,
              parentID: pid,
              selected: selected,
              expanded: expanded,
              isChecked: checked,
              hasChildren: hasChildren
            };
          }

          return {
            id: '',
            text: '',
            parentID: '',
            selected: false,
            expanded: false,
            isChecked: '',
            hasChildren: false
          };
        }
      }, {
        key: "getText",
        value: function getText(currLi, fromDS) {
          if (fromDS) {
            var nodeData = this.getNodeObject(currLi.getAttribute('data-uid'));
            var level = parseFloat(currLi.getAttribute('aria-level'));
            var nodeFields = this.getFields(this.fields, level, 1);
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(nodeFields.text, nodeData);
          }

          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTTEXT, currLi).textContent;
        }
      }, {
        key: "getExpandEvent",
        value: function getExpandEvent(currLi, e) {
          var nodeData = this.getNodeData(currLi);
          return {
            cancel: false,
            isInteracted: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) ? false : true,
            node: currLi,
            nodeData: nodeData,
            event: e
          };
        }
      }, {
        key: "destroyTemplate",
        value: function destroyTemplate(nodeTemplate) {
          this.clearTemplate(['nodeTemplate']);
        }
      }, {
        key: "reRenderNodes",
        value: function reRenderNodes() {
          this.updateListProp(this.fields);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate');

          if (this.isBlazorPlatform) {
            this.ulElement = this.element.querySelector('.e-list-parent.e-ul');
            this.ulElement.parentElement.removeChild(this.ulElement);
          } else {
            this.element.innerHTML = '';
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.nodeTemplateFn)) {
            this.destroyTemplate(this.nodeTemplate);
          }

          this.setTouchClass();
          this.setProperties({
            selectedNodes: [],
            checkedNodes: [],
            expandedNodes: []
          }, true);
          this.checkedElement = [];
          this.isLoaded = false;
          this.setDataBinding(true);
        }
      }, {
        key: "setCssClass",
        value: function setCssClass(oldClass, newClass) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldClass) && oldClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldClass.split(' '));
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newClass) && newClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], newClass.split(' '));
          }
        }
      }, {
        key: "editingHandler",
        value: function editingHandler(e) {
          var target = e.target;

          if (!target || target.classList.contains(ROOT) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON) || target.classList.contains(INPUT) || target.classList.contains(INPUTGROUP)) {
            return;
          } else {
            var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);
            this.createTextbox(liEle, e);
          }
        }
      }, {
        key: "createTextbox",
        value: function createTextbox(liEle, e) {
          var _this639 = this;

          var oldInpEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TREEINPUT, this.element);

          if (oldInpEle) {
            oldInpEle.blur();
          }

          var textEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTTEXT, liEle);
          this.updateOldText(liEle);
          var innerEle = this.createElement('input', {
            className: TREEINPUT,
            attrs: {
              value: this.oldText
            }
          });
          var eventArgs = this.getEditEvent(liEle, null, innerEle.outerHTML);
          this.trigger('nodeEditing', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              var inpWidth = textEle.offsetWidth + 5;
              var style = 'width:' + inpWidth + 'px';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], EDITING);
              textEle.innerHTML = eventArgs.innerHtml;
              var inpEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TREEINPUT, textEle);
              _this639.inputObj = _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_5__["Input"].createInput({
                element: inpEle,
                properties: {
                  enableRtl: _this639.enableRtl
                }
              }, _this639.createElement);

              _this639.inputObj.container.setAttribute('style', style);

              inpEle.focus();
              var inputEle = inpEle;
              inputEle.setSelectionRange(0, inputEle.value.length);

              _this639.wireInputEvents(inpEle);
            }
          });
        }
      }, {
        key: "updateOldText",
        value: function updateOldText(liEle) {
          var id = liEle.getAttribute('data-uid');
          this.editData = this.getNodeObject(id);
          var level = parseFloat(liEle.getAttribute('aria-level'));
          this.editFields = this.getFields(this.fields, level, 1);
          this.oldText = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.editFields.text, this.editData);
        }
      }, {
        key: "inputFocusOut",
        value: function inputFocusOut(e) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TREEINPUT, this.element)) {
            return;
          }

          var target = e.target;
          var newText = target.value;
          var txtEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTTEXT);
          var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(target, '.' + LISTITEM);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.inputObj.container);

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !this.isOffline && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
            this.crudOperation('update', null, liEle, newText, null, null, true);
          } else {
            this.appendNewText(liEle, txtEle, newText, true);
          }
        }
      }, {
        key: "appendNewText",
        value: function appendNewText(liEle, txtEle, newText, isInput) {
          var _this640 = this;

          var eventArgs = this.getEditEvent(liEle, newText, null);
          this.trigger('nodeEdited', eventArgs, function (observedArgs) {
            newText = observedArgs.cancel ? observedArgs.oldText : observedArgs.newText;

            _this640.updateText(liEle, txtEle, newText, isInput);

            if (observedArgs.oldText !== newText) {
              _this640.triggerEvent();
            }
          });
        }
      }, {
        key: "updateText",
        value: function updateText(liEle, txtEle, newText, isInput) {
          var newData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.editFields.text, newText, this.editData);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.nodeTemplateFn)) {
            txtEle.innerText = '';
            var tempArr = this.nodeTemplateFn(newData, undefined, undefined, this.element.id + 'nodeTemplate', this.isStringTemplate);
            tempArr = Array.prototype.slice.call(tempArr);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(tempArr, txtEle);
            this.updateBlazorTemplate();
          } else {
            txtEle.innerText = newText;
          }

          if (isInput) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], EDITING);
            txtEle.focus();
          }
        }
      }, {
        key: "getElement",
        value: function getElement(ele) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return null;
          } else if (typeof ele === 'string') {
            return this.element.querySelector('[data-uid="' + ele + '"]');
          } else if (typeof ele === 'object') {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(ele);
          } else {
            return null;
          }
        }
      }, {
        key: "getId",
        value: function getId(ele) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele)) {
            return null;
          } else if (typeof ele === 'string') {
            return ele;
          } else if (typeof ele === 'object') {
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(ele).getAttribute('data-uid');
          } else {
            return null;
          }
        }
      }, {
        key: "getEditEvent",
        value: function getEditEvent(liEle, newText, inpEle) {
          var data = this.getNodeData(liEle);
          return {
            cancel: false,
            newText: newText,
            node: liEle,
            nodeData: data,
            oldText: this.oldText,
            innerHtml: inpEle
          };
        }
      }, {
        key: "getNodeObject",
        value: function getNodeObject(id) {
          var childNodes;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id)) {
            return childNodes;
          } else if (this.dataType === 1) {
            for (var i = 0, objlen = this.treeData.length; i < objlen; i++) {
              var dataId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, this.treeData[i]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.treeData[i]) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dataId) && dataId.toString() === id) {
                return this.treeData[i];
              }
            }
          } else {
            return this.getChildNodeObject(this.treeData, this.fields, id);
          }

          return childNodes;
        }
      }, {
        key: "getChildNodeObject",
        value: function getChildNodeObject(obj, mapper, id) {
          var newList;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj)) {
            return newList;
          }

          for (var i = 0, objlen = obj.length; i < objlen; i++) {
            var dataId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.id, obj[i]);

            if (obj[i] && dataId && dataId.toString() === id) {
              return obj[i];
            } else if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]))) {
              var childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]);
              newList = this.getChildNodeObject(childData, this.getChildMapper(mapper), id);

              if (newList !== undefined) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]))) {
              var child = 'child';
              newList = this.getChildNodeObject(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(child, obj[i]), this.getChildMapper(mapper), id);

              if (newList !== undefined) {
                break;
              }
            }
          }

          return newList;
        }
      }, {
        key: "setDragAndDrop",
        value: function setDragAndDrop(toBind) {
          if (toBind && !this.disabled) {
            this.initializeDrag();
          } else {
            this.destroyDrag();
          }
        } // tslint:disable-next-line:max-func-body-length

      }, {
        key: "initializeDrag",
        value: function initializeDrag() {
          var _this641 = this;

          var virtualEle;
          var proxy = this;
          this.dragObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            enableTailMode: true,
            enableAutoScroll: true,
            dragArea: this.dragArea,
            dragTarget: '.' + TEXTWRAP,
            helper: function helper(e) {
              _this641.dragTarget = e.sender.target;
              var dragRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this641.dragTarget, '.' + ROOT);
              var dragWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this641.dragTarget, '.' + TEXTWRAP);
              _this641.dragLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(_this641.dragTarget, '.' + LISTITEM);

              if (_this641.fullRowSelect && !dragWrap && _this641.dragTarget.classList.contains(FULLROW)) {
                dragWrap = _this641.dragTarget.nextElementSibling;
              }

              if (!_this641.dragTarget || !e.element.isSameNode(dragRoot) || !dragWrap || _this641.dragTarget.classList.contains(ROOT) || _this641.dragTarget.classList.contains(PARENTITEM) || _this641.dragTarget.classList.contains(LISTITEM) || _this641.dragLi.classList.contains('e-disable')) {
                return false;
              }

              var cloneEle = dragWrap.cloneNode(true);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, cloneEle))) {
                var icon = proxy.createElement('div', {
                  className: ICON + ' ' + EXPANDABLE
                });
                cloneEle.insertBefore(icon, cloneEle.children[0]);
              }

              var cssClass = DRAGITEM + ' ' + ROOT + ' ' + _this641.cssClass + ' ' + (_this641.enableRtl ? RTL$1 : '');
              virtualEle = proxy.createElement('div', {
                className: cssClass
              });
              virtualEle.appendChild(cloneEle);
              var nLen = _this641.selectedNodes.length;

              if (nLen > 1 && _this641.allowMultiSelection && _this641.dragLi.classList.contains(ACTIVE)) {
                var cNode = proxy.createElement('span', {
                  className: DROPCOUNT,
                  innerHTML: '' + nLen
                });
                virtualEle.appendChild(cNode);
              }

              document.body.appendChild(virtualEle);
              document.body.style.cursor = '';
              _this641.dragData = _this641.getNodeData(_this641.dragLi);
              return virtualEle;
            },
            dragStart: function dragStart(e) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this641.element], DRAGGING);
              var listItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-list-item');
              var level;

              if (listItem) {
                level = parseInt(listItem.getAttribute('aria-level'), 10);
              }

              var eventArgs = _this641.getDragEvent(e.event, _this641, null, e.target, null, virtualEle, level);

              if (eventArgs.draggedNode.classList.contains(EDITING)) {
                _this641.dragObj.intDestroy(e.event);

                _this641.dragCancelAction(virtualEle);
              } else {
                _this641.trigger('nodeDragStart', eventArgs, function (observedArgs) {
                  if (observedArgs.cancel) {
                    _this641.dragObj.intDestroy(e.event);

                    _this641.dragCancelAction(virtualEle);
                  } else {
                    _this641.dragStartAction = true;
                  }

                  if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                    e.bindEvents(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getElement"])(e.dragElement));
                  }
                });
              }
            },
            drag: function drag(e) {
              _this641.dragObj.setProperties({
                cursorAt: {
                  top: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e.event.targetTouches) || _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 60 : -20
                }
              });

              _this641.dragAction(e, virtualEle);
            },
            dragStop: function dragStop(e) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this641.element], DRAGGING);

              _this641.removeVirtualEle();

              var dropTarget = e.target;
              var preventTargetExpand = false;
              var dropRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.' + DROPPABLE);
              var isHelperElement = true;

              if (!dropTarget || !dropRoot) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.helper);
                document.body.style.cursor = '';
                isHelperElement = false;
              }

              var listItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.e-list-item');
              var level;

              if (listItem) {
                level = parseInt(listItem.getAttribute('aria-level'), 10);
              }

              var eventArgs = _this641.getDragEvent(e.event, _this641, dropTarget, dropTarget, null, e.helper, level);

              eventArgs.preventTargetExpand = preventTargetExpand;

              if (_this641.isBlazorPlatform && _this641.dragStartAction || !_this641.isBlazorPlatform) {
                _this641.trigger('nodeDragStop', eventArgs, function (observedArgs) {
                  _this641.dragParent = observedArgs.draggedParentNode;
                  _this641.preventExpand = observedArgs.preventTargetExpand;

                  if (observedArgs.cancel) {
                    if (e.helper.parentNode) {
                      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.helper);
                    }

                    document.body.style.cursor = '';
                    isHelperElement = false;
                  }

                  _this641.dragStartAction = false;

                  if (_this641.isBlazorPlatform && isHelperElement) {
                    _this641.dropAction(e, true);
                  }
                });
              }
            }
          });
          this.dropObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Droppable"](this.element, {
            out: function out(e) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && !e.target.classList.contains(SIBLING)) {
                document.body.style.cursor = 'not-allowed';
              }
            },
            over: function over(e) {
              document.body.style.cursor = '';
            },
            drop: function drop(e) {
              if (!_this641.isBlazorPlatform) {
                _this641.dropAction(e);
              }
            }
          });
        }
      }, {
        key: "dragCancelAction",
        value: function dragCancelAction(virtualEle) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(virtualEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], DRAGGING);
          this.dragStartAction = false;
        }
      }, {
        key: "dragAction",
        value: function dragAction(e, virtualEle) {
          var dropRoot = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + DROPPABLE);
          var dropWrap = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + TEXTWRAP);
          var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, virtualEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], [DROPIN, DROPNEXT, DROPOUT, NODROP]);
          this.removeVirtualEle();
          document.body.style.cursor = '';
          var classList$$1 = e.target.classList;

          if (this.fullRowSelect && !dropWrap && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(classList$$1) && classList$$1.contains(FULLROW)) {
            dropWrap = e.target.nextElementSibling;
          }

          if (dropRoot) {
            var dropLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + LISTITEM);
            var checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CHECKBOXWRAP);
            var collapse = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + COLLAPSIBLE);
            var expand = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + EXPANDABLE);

            if (!dropRoot.classList.contains(ROOT) || dropWrap && !dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)) {
              if (dropLi && e && !expand && !collapse && e.event.offsetY < 7 && !checkWrapper || expand && e.event.offsetY < 5 || collapse && e.event.offsetX < 3) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPNEXT);
                var virEle = this.createElement('div', {
                  className: SIBLING
                });
                var index = this.fullRowSelect ? 1 : 0;
                dropLi.insertBefore(virEle, dropLi.children[index]);
              } else if (dropLi && e && !expand && !collapse && e.target.offsetHeight > 0 && e.event.offsetY > e.target.offsetHeight - 10 && !checkWrapper || expand && e.event.offsetY > 19 || collapse && e.event.offsetX > 19) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPNEXT);

                var _virEle = this.createElement('div', {
                  className: SIBLING
                });

                var _index7 = this.fullRowSelect ? 2 : 1;

                dropLi.insertBefore(_virEle, dropLi.children[_index7]);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPIN);
              }
            } else if (e.target.nodeName === 'LI' && !dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPNEXT);
              this.renderVirtualEle(e);
            } else if (e.target.classList.contains(SIBLING)) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPNEXT);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], DROPOUT);
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], NODROP);
            document.body.style.cursor = 'not-allowed';
          }

          var listItem = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.e-list-item');
          var level;

          if (listItem) {
            level = parseInt(listItem.getAttribute('aria-level'), 10);
          }

          var eventArgs = this.getDragEvent(e.event, this, e.target, e.target, null, virtualEle, level);

          if (eventArgs.dropIndicator) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], eventArgs.dropIndicator);
          }

          this.trigger('nodeDragging', eventArgs);

          if (eventArgs.dropIndicator) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([icon], eventArgs.dropIndicator);
          }
        } // tslint:disable

      }, {
        key: "dropAction",
        value: function dropAction(e, isBlazorDrop) {
          var offsetY = e.event.offsetY;
          var dropTarget = e.target;
          var dragObj;
          var level;
          var drop = false;
          var dragInstance;

          if (!isBlazorDrop) {
            dragInstance = e.dragData.draggable;
          } else {
            dragInstance = e.element;
          }

          for (var i = 0; i < dragInstance.ej2_instances.length; i++) {
            if (dragInstance.ej2_instances[i] instanceof TreeView_1) {
              dragObj = dragInstance.ej2_instances[i];
              break;
            }
          }

          if (dragObj && dragObj.dragTarget) {
            var dragTarget = dragObj.dragTarget;
            var dragLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragTarget, '.' + LISTITEM);
            var dropLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.' + LISTITEM);

            if (dropLi == null && dropTarget.classList.contains(ROOT)) {
              dropLi = dropTarget.firstElementChild;
            }

            if (!isBlazorDrop) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.droppedElement);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(e.helper);
            }

            document.body.style.cursor = '';

            if (!dropLi || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
              if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] === false) {
                this.preventExpand = false;
              }

              return;
            }

            if (dragObj.allowMultiSelection && dragLi.classList.contains(ACTIVE)) {
              var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + ACTIVE, dragObj.element);

              if (e.target.offsetHeight <= 33 && offsetY > e.target.offsetHeight - 10 && offsetY > 6) {
                for (var _i150 = sNodes.length - 1; _i150 >= 0; _i150--) {
                  if (dropLi.isSameNode(sNodes[_i150]) || this.isDescendant(sNodes[_i150], dropLi)) {
                    continue;
                  }

                  this.appendNode(dropTarget, sNodes[_i150], dropLi, e, dragObj, offsetY);
                }
              } else {
                for (var _i151 = 0; _i151 < sNodes.length; _i151++) {
                  if (dropLi.isSameNode(sNodes[_i151]) || this.isDescendant(sNodes[_i151], dropLi)) {
                    continue;
                  }

                  this.appendNode(dropTarget, sNodes[_i151], dropLi, e, dragObj, offsetY);
                }
              }
            } else {
              this.appendNode(dropTarget, dragLi, dropLi, e, dragObj, offsetY);
            }

            level = parseInt(dragLi.getAttribute('aria-level'), 10);
            drop = true;
          }

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] === false) {
            this.preventExpand = false;
          }

          if (!isBlazorDrop) {
            this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.dragData.draggedElement, null, level, drop));
          } else {
            this.trigger('nodeDropped', this.getDragEvent(e.event, dragObj, dropTarget, e.target, e.element, null, level, drop));
          }

          this.triggerEvent();
        }
      }, {
        key: "appendNode",
        value: function appendNode(dropTarget, dragLi, dropLi, e, dragObj, offsetY) {
          var checkWrapper = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.' + CHECKBOXWRAP);
          var collapse = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + COLLAPSIBLE);
          var expand = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + EXPANDABLE);

          if (!dragLi.classList.contains('e-disable') && !checkWrapper && (expand && e.event.offsetY < 5 || collapse && e.event.offsetX < 3 || expand && e.event.offsetY > 19 || collapse && e.event.offsetX > 19 || !expand && !collapse)) {
            if (dropTarget.nodeName === 'LI') {
              this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
            } else if (dropTarget.firstElementChild && dropTarget.classList.contains(ROOT)) {
              if (dropTarget.firstElementChild.nodeName === 'UL') {
                this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
              }
            } else if (dropTarget.classList.contains('e-icon-collapsible') || dropTarget.classList.contains('e-icon-expandable')) {
              this.dropAsSiblingNode(dragLi, dropLi, e, dragObj);
            } else {
              this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY);
            }
          } else {
            this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY, true);
          }
        }
      }, {
        key: "dropAsSiblingNode",
        value: function dropAsSiblingNode(dragLi, dropLi, e, dragObj) {
          var dropUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropLi, '.' + PARENTITEM);
          var dragParentUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragLi, '.' + PARENTITEM);
          var dragParentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragParentUl, '.' + LISTITEM);
          var pre;

          if (e.target.offsetHeight > 0 && e.event.offsetY > e.target.offsetHeight - 2) {
            pre = false;
          } else if (e.event.offsetY < 2) {
            pre = true;
          } else if (e.target.classList.contains('e-icon-expandable') || e.target.classList.contains('e-icon-collapsible')) {
            if (e.event.offsetY < 5 || e.event.offsetX < 3) {
              pre = true;
            } else if (e.event.offsetY > 15 || e.event.offsetX > 17) {
              pre = false;
            }
          }

          if (e.target.classList.contains('e-icon-expandable') || e.target.classList.contains('e-icon-collapsible')) {
            var target = e.target.closest('li');
            dropUl.insertBefore(dragLi, pre ? target : target.nextElementSibling);
          } else {
            dropUl.insertBefore(dragLi, pre ? e.target : e.target.nextElementSibling);
          }

          this.moveData(dragLi, dropLi, dropUl, pre, dragObj);
          this.updateElement(dragParentUl, dragParentLi);
          this.updateAriaLevel(dragLi);

          if (dragObj.element.id === this.element.id) {
            this.updateList();
          } else {
            dragObj.updateInstance();
            this.updateInstance();
          }
        }
      }, {
        key: "dropAsChildNode",
        value: function dropAsChildNode(dragLi, dropLi, dragObj, index, e, pos, isCheck) {
          var dragParentUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragLi, '.' + PARENTITEM);
          var dragParentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragParentUl, '.' + LISTITEM);
          var dropParentUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropLi, '.' + PARENTITEM);

          if (e && pos < 7 && !isCheck) {
            dropParentUl.insertBefore(dragLi, dropLi);
            this.moveData(dragLi, dropLi, dropParentUl, true, dragObj);
          } else if (e && e.target.offsetHeight > 0 && pos > e.target.offsetHeight - 10 && !isCheck) {
            dropParentUl.insertBefore(dragLi, dropLi.nextElementSibling);
            this.moveData(dragLi, dropLi, dropParentUl, false, dragObj);
          } else {
            var dropUl = this.expandParent(dropLi);
            var childLi = dropUl.childNodes[index];
            dropUl.insertBefore(dragLi, childLi);
            this.moveData(dragLi, childLi, dropUl, true, dragObj);
          }

          this.updateElement(dragParentUl, dragParentLi);
          this.updateAriaLevel(dragLi);

          if (dragObj.element.id === this.element.id) {
            this.updateList();
          } else {
            dragObj.updateInstance();
            this.updateInstance();
          }
        }
      }, {
        key: "moveData",
        value: function moveData(dragLi, dropLi, dropUl, pre, dragObj) {
          var dropParentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropUl, '.' + LISTITEM);
          var id = this.getId(dragLi);
          var removedData = dragObj.updateChildField(dragObj.treeData, dragObj.fields, id, null, null, true);
          var refId = this.getId(dropLi);
          var index = this.getDataPos(this.treeData, this.fields, refId);
          var parentId = this.getId(dropParentLi);

          if (this.dataType === 1) {
            this.updateField(this.treeData, this.fields, parentId, 'hasChildren', true);
            var pos = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? this.treeData.length : pre ? index : index + 1;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(parentId) && !this.hasPid) {
              delete removedData[0][this.fields.parentID];
            } else {
              var currPid = this.isNumberTypeId ? parseFloat(parentId) : parentId;
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.fields.parentID, currPid, removedData[0]);
            }

            this.treeData.splice(pos, 0, removedData[0]);

            if (dragObj.element.id !== this.element.id) {
              var childData = dragObj.removeChildNodes(id);
              pos++;

              for (var i = 0, _len57 = childData.length; i < _len57; i++) {
                this.treeData.splice(pos, 0, childData[i]);
                pos++;
              }

              dragObj.groupedData = dragObj.getGroupedData(dragObj.treeData, dragObj.fields.parentID);
            }

            this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
          } else {
            this.addChildData(this.treeData, this.fields, parentId, removedData, pre ? index : index + 1);
          }
        }
      }, {
        key: "expandParent",
        value: function expandParent(dropLi) {
          var dropIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);

          if (dropIcon && dropIcon.classList.contains(EXPANDABLE) && this.preventExpand !== true) {
            this.expandAction(dropLi, dropIcon, null);
          }

          var dropUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, dropLi);

          if (this.preventExpand === true && !dropUl && dropIcon) {
            this.renderChildNodes(dropLi);
          }

          dropUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, dropLi);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropUl) && this.preventExpand === true) {
            dropUl.style.display = 'none';
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropUl) && this.preventExpand === false) {
            dropUl.style.display = 'block';
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropUl) && this.preventExpand === true) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropIcon)) {
              _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
            }

            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);

            if (icon) {
              icon.classList.add('e-icon-expandable');
            }

            dropUl = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateUL(this.createElement, [], null, this.listBaseOption);
            dropLi.appendChild(dropUl);

            if (icon) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([icon], COLLAPSIBLE);
            } else {
              _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateIcon(this.createElement, dropLi, EXPANDABLE, this.listBaseOption);
            }

            dropLi.setAttribute('aria-expanded', 'false');
            dropUl.style.display = 'none';
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropUl)) {
            this.trigger('nodeExpanding', this.getExpandEvent(dropLi, null));

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropIcon)) {
              _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);
            }

            var _icon3 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);

            if (_icon3) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_icon3], EXPANDABLE);
            } else {
              _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateIcon(this.createElement, dropLi, COLLAPSIBLE, this.listBaseOption);

              _icon3 = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dropLi);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_icon3], EXPANDABLE);
            }

            dropUl = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].generateUL(this.createElement, [], null, this.listBaseOption);
            dropLi.appendChild(dropUl);
            this.addExpand(dropLi);
            this.trigger('nodeExpanded', this.getExpandEvent(dropLi, null));
          }

          return dropUl;
        }
      }, {
        key: "updateElement",
        value: function updateElement(dragParentUl, dragParentLi) {
          if (dragParentLi && dragParentUl.childElementCount === 0) {
            var dragIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, dragParentLi);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(dragParentUl);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(dragIcon);
            var parentId = this.getId(dragParentLi);
            this.updateField(this.treeData, this.fields, parentId, 'hasChildren', false);
            this.removeExpand(dragParentLi, true);
          }
        }
      }, {
        key: "updateAriaLevel",
        value: function updateAriaLevel(dragLi) {
          var level = this.parents(dragLi, '.' + PARENTITEM).length;
          dragLi.setAttribute('aria-level', '' + level);
          this.updateChildAriaLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, dragLi), level + 1);
        }
      }, {
        key: "updateChildAriaLevel",
        value: function updateChildAriaLevel(element, level) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var cNodes = element.childNodes;

            for (var i = 0, _len58 = cNodes.length; i < _len58; i++) {
              var liEle = cNodes[i];
              liEle.setAttribute('aria-level', '' + level);
              this.updateChildAriaLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, liEle), level + 1);
            }
          }
        }
      }, {
        key: "renderVirtualEle",
        value: function renderVirtualEle(e) {
          var pre;

          if (e.event.offsetY > e.target.offsetHeight - 2) {
            pre = false;
          } else if (e.event.offsetY < 2) {
            pre = true;
          }

          var virEle = this.createElement('div', {
            className: SIBLING
          });
          var index = this.fullRowSelect ? pre ? 1 : 2 : pre ? 0 : 1;
          e.target.insertBefore(virEle, e.target.children[index]);
        }
      }, {
        key: "removeVirtualEle",
        value: function removeVirtualEle() {
          var sibEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + SIBLING);

          if (sibEle) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(sibEle);
          }
        }
      }, {
        key: "destroyDrag",
        value: function destroyDrag() {
          if (this.dragObj && this.dropObj) {
            this.dragObj.destroy();
            this.dropObj.destroy();
          }
        }
      }, {
        key: "getDragEvent",
        value: function getDragEvent(event, obj, dropTarget, target, dragNode, cloneEle, level, drop) {
          var dropLi = dropTarget ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dropTarget, '.' + LISTITEM) : null;
          var dropData = dropLi ? this.getNodeData(dropLi) : null;
          var draggedNode = obj ? obj.dragLi : dragNode;
          var draggedNodeData = obj ? obj.dragData : null;
          var newParent = dropTarget ? this.parents(dropTarget, '.' + LISTITEM) : null;
          var dragLiParent = obj.dragLi.parentElement;
          var dragParent = obj.dragLi ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragLiParent, '.' + LISTITEM) : null;
          var targetParent = null;
          var indexValue = null;
          var iconCss = [DROPNEXT, DROPIN, DROPOUT, NODROP];
          var iconClass = null;
          var node = drop === true ? draggedNode : dropLi;
          var index = node ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(node, '.e-list-parent') : null;
          var i = 0;
          dragParent = obj.dragLi && dragParent === null ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragLiParent, '.' + ROOT) : dragParent;
          dragParent = drop === true ? this.dragParent : dragParent;

          if (cloneEle) {
            while (i < 4) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + ICON, cloneEle).classList.contains(iconCss[i])) {
                iconClass = iconCss[i];
                break;
              }

              i++;
            }
          }

          if (index) {
            var dropTar = 0;

            for (i = 0; i < index.childElementCount; i++) {
              dropTar = drop !== true && index.children[i] === draggedNode && dropLi !== draggedNode ? ++dropTar : dropTar;

              if (drop !== true && index.children[i].classList.contains('e-hover')) {
                indexValue = event.offsetY >= 23 ? i + 1 : i;
                break;
              } else if (index.children[i] === node) {
                indexValue = event.offsetY >= 23 ? i : i;
                break;
              }
            }

            indexValue = dropTar !== 0 ? --indexValue : indexValue;
          }

          if (dropTarget) {
            if (newParent.length === 0) {
              targetParent = null;
            } else if (dropTarget.classList.contains(LISTITEM)) {
              targetParent = newParent[0];
            } else {
              targetParent = newParent[1];
            }
          }

          if (dropLi === draggedNode) {
            targetParent = dropLi;
          }

          if (dropTarget && target.offsetHeight <= 33 && event.offsetY < target.offsetHeight - 10 && event.offsetY > 6) {
            targetParent = dropLi;

            if (drop !== true) {
              level = ++level;
              var parent = targetParent ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.e-list-parent', targetParent) : null;
              indexValue = parent ? parent.children.length : 0;

              if (!(this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"]) && parent === null && targetParent) {
                var _parent2 = targetParent.hasAttribute('data-uid') ? this.getChildNodes(this.fields.dataSource, targetParent.getAttribute('data-uid').toString()) : null;

                indexValue = _parent2 ? _parent2.length : 0;
              }
            }
          }

          return {
            cancel: false,
            clonedNode: cloneEle,
            event: event,
            draggedNode: draggedNode,
            draggedNodeData: draggedNodeData,
            droppedNode: dropLi,
            droppedNodeData: dropData,
            dropIndex: indexValue,
            dropLevel: level,
            draggedParentNode: dragParent,
            dropTarget: targetParent,
            dropIndicator: iconClass,
            target: target
          };
        }
      }, {
        key: "addFullRow",
        value: function addFullRow(toAdd) {
          var len = this.liList.length;

          if (toAdd) {
            for (var i = 0; i < len; i++) {
              this.createFullRow(this.liList[i]);
            }
          } else {
            for (var _i152 = 0; _i152 < len; _i152++) {
              var rowDiv = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + FULLROW, this.liList[_i152]);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(rowDiv);
            }
          }
        }
      }, {
        key: "createFullRow",
        value: function createFullRow(item) {
          var rowDiv = this.createElement('div', {
            className: FULLROW
          });
          item.insertBefore(rowDiv, item.childNodes[0]);
        }
      }, {
        key: "addMultiSelect",
        value: function addMultiSelect(toAdd) {
          if (toAdd) {
            var liEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + ':not([aria-selected="true"])', this.element);

            var _iterator146 = _createForOfIteratorHelper(liEles),
                _step146;

            try {
              for (_iterator146.s(); !(_step146 = _iterator146.n()).done;) {
                var ele = _step146.value;
                ele.setAttribute('aria-selected', 'false');
              }
            } catch (err) {
              _iterator146.e(err);
            } finally {
              _iterator146.f();
            }
          } else {
            var _liEles = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM + '[aria-selected="false"]', this.element);

            var _iterator147 = _createForOfIteratorHelper(_liEles),
                _step147;

            try {
              for (_iterator147.s(); !(_step147 = _iterator147.n()).done;) {
                var _ele8 = _step147.value;

                _ele8.removeAttribute('aria-selected');
              }
            } catch (err) {
              _iterator147.e(err);
            } finally {
              _iterator147.f();
            }
          }
        }
      }, {
        key: "collapseByLevel",
        value: function collapseByLevel(element, level, excludeHiddenNodes) {
          if (level > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);

            for (var i = 0, _len59 = cNodes.length; i < _len59; i++) {
              var liEle = cNodes[i];
              var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + COLLAPSIBLE, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, liEle));

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon)) {
                this.collapseNode(liEle, icon, null);
              }

              this.collapseByLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
            }
          }
        }
      }, {
        key: "collapseAllNodes",
        value: function collapseAllNodes(excludeHiddenNodes) {
          var cIcons = this.getVisibleNodes(excludeHiddenNodes, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + COLLAPSIBLE, this.element));

          for (var i = 0, _len60 = cIcons.length; i < _len60; i++) {
            var icon = cIcons[i];
            var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(icon, '.' + LISTITEM);
            this.collapseNode(liEle, icon, null);
          }
        }
      }, {
        key: "expandByLevel",
        value: function expandByLevel(element, level, excludeHiddenNodes) {
          if (level > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            var eNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes);

            for (var i = 0, _len61 = eNodes.length; i < _len61; i++) {
              var liEle = eNodes[i];
              var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + EXPANDABLE, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, liEle));

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon)) {
                this.expandAction(liEle, icon, null);
              }

              this.expandByLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
            }
          }
        }
      }, {
        key: "expandAllNodes",
        value: function expandAllNodes(excludeHiddenNodes) {
          var eIcons = this.getVisibleNodes(excludeHiddenNodes, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + EXPANDABLE, this.element));

          for (var i = 0, _len62 = eIcons.length; i < _len62; i++) {
            var icon = eIcons[i];
            var liEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(icon, '.' + LISTITEM);
            this.expandAction(liEle, icon, null, true);
          }
        }
      }, {
        key: "getVisibleNodes",
        value: function getVisibleNodes(excludeHiddenNodes, nodes) {
          var vNodes = Array.prototype.slice.call(nodes);

          if (excludeHiddenNodes) {
            for (var i = 0; i < vNodes.length; i++) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isVisible"])(vNodes[i])) {
                vNodes.splice(i, 1);
                i--;
              }
            }
          }

          return vNodes;
        }
      }, {
        key: "removeNode",
        value: function removeNode(node) {
          var dragParentUl = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(node, '.' + PARENTITEM);
          var dragParentLi = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(dragParentUl, '.' + LISTITEM);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(node);
          this.updateElement(dragParentUl, dragParentLi);
          this.updateInstance();
          this.removeData(node);
        }
      }, {
        key: "updateInstance",
        value: function updateInstance() {
          this.updateList();
          this.updateSelectedNodes();
          this.updateExpandedNodes();
          this.allowServerDataBinding = false;
          this.updateServerProperties("expand");
          this.updateServerProperties("check");
          this.updateServerProperties("select");
          this.allowServerDataBinding = true;
        }
      }, {
        key: "updateServerProperties",
        value: function updateServerProperties(action) {
          if (this.isBlazorPlatform) {
            if (action == "expand") {
              this.isBlazorExpandedNodes = this.expandedNodes;
              this.setProperties({
                expandedNodes: []
              }, true);
            } else if (action == "check") {
              this.setProperties({
                checkedNodes: this.checkedNodes
              }, true);
            } else {
              this.setProperties({
                selectedNodes: this.selectedNodes
              }, true);
            }
          }
        }
      }, {
        key: "updateList",
        value: function updateList() {
          this.liList = Array.prototype.slice.call(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + LISTITEM, this.element));
        }
      }, {
        key: "updateSelectedNodes",
        value: function updateSelectedNodes() {
          if (!this.isBlazorPlatform || this.isBlazorPlatform && !this.initialRender) {
            this.setProperties({
              selectedNodes: []
            }, true);
            var sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + ACTIVE, this.element);
            this.selectGivenNodes(sNodes);
          } else if (this.isBlazorPlatform && this.initialRender) {
            var _sNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('.' + ACTIVE, this.element);

            for (var a = 0; a < _sNodes.length; a++) {
              var id = _sNodes[a].getAttribute("data-uid").toString();

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id) && this.selectedNodes.indexOf(id) === -1) {
                this.selectedNodes.push(id);
              }
            }
          }
        }
      }, {
        key: "updateExpandedNodes",
        value: function updateExpandedNodes() {
          if (!this.isBlazorPlatform || this.isBlazorPlatform && !this.initialRender) {
            this.setProperties({
              expandedNodes: []
            }, true);
            var eNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('[aria-expanded="true"]', this.element);

            for (var i = 0, _len63 = eNodes.length; i < _len63; i++) {
              this.addExpand(eNodes[i]);
            }
          } else if (this.isBlazorPlatform && this.initialRender) {
            var _eNodes = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["selectAll"])('[aria-expanded="true"]', this.element);

            for (var a = 0; a < _eNodes.length; a++) {
              var id = _eNodes[a].getAttribute("data-uid").toString();

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id) && this.expandedNodes.indexOf(id) === -1) {
                this.expandedNodes.push(id);
              }
            }
          }
        }
      }, {
        key: "removeData",
        value: function removeData(node) {
          if (this.dataType === 1) {
            var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData);
            var id = this.getId(node);
            var data = {};
            var newId = this.isNumberTypeId ? parseFloat(id) : id;
            data[this.fields.id] = newId;
            dm.remove(this.fields.id, data);
            this.removeChildNodes(id);
          } else {
            var _id3 = this.getId(node);

            this.updateChildField(this.treeData, this.fields, _id3, null, null, true);
          }
        }
      }, {
        key: "removeChildNodes",
        value: function removeChildNodes(parentId) {
          var cNodes = this.getChildGroup(this.groupedData, parentId, false);
          var childData = [];

          if (cNodes) {
            for (var i = 0, _len64 = cNodes.length; i < _len64; i++) {
              var dm = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData);
              var id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.id, cNodes[i]).toString();
              var data = {};
              var currId = this.isNumberTypeId ? parseFloat(id) : id;
              data[this.fields.id] = currId;
              var nodeData = dm.remove(this.fields.id, data);
              childData.push(nodeData[0]);
              this.removeChildNodes(id);
            }
          }

          return childData;
        }
      }, {
        key: "doGivenAction",
        value: function doGivenAction(nodes, selector, toExpand) {
          for (var i = 0, _len65 = nodes.length; i < _len65; i++) {
            var liEle = this.getElement(nodes[i]);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
              continue;
            }

            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + selector, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, liEle));

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(icon)) {
              toExpand ? this.expandAction(liEle, icon, null) : this.collapseNode(liEle, icon, null);
            }
          }
        }
      }, {
        key: "addGivenNodes",
        value: function addGivenNodes(nodes, dropLi, index, isRemote, dropEle) {
          if (nodes.length === 0) {
            return;
          }

          var sNodes = this.getSortedData(nodes);
          var level = dropLi ? parseFloat(dropLi.getAttribute('aria-level')) + 1 : 1;

          if (isRemote) {
            this.updateMapper(level);
          }

          var li = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createListItemFromJson(this.createElement, sNodes, this.listBaseOption, level);

          var dropUl;

          if (!dropEle) {
            dropUl = dropLi ? this.expandParent(dropLi) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element);
          } else {
            dropUl = dropEle;
          }

          var refNode = dropUl.childNodes[index];

          for (var i = 0; i < li.length; i++) {
            dropUl.insertBefore(li[i], refNode);
          }

          if (this.nodeTemplate && this.isBlazorPlatform && !this.isStringTemplate) {
            this.updateBlazorTemplate();
          }

          var id = this.getId(dropLi);

          if (this.dataType === 1) {
            this.updateField(this.treeData, this.fields, id, 'hasChildren', true);
            var refId = this.getId(refNode);
            var pos = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(refId) ? this.treeData.length : this.getDataPos(this.treeData, this.fields, refId);

            for (var j = 0; j < nodes.length; j++) {
              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id)) {
                var currId = this.isNumberTypeId ? parseFloat(id) : id;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.fields.parentID, currId, nodes[j]);
              }

              this.treeData.splice(pos, 0, nodes[j]);
              pos++;
            }
          } else {
            this.addChildData(this.treeData, this.fields, id, nodes, index);
          }

          this.finalizeNode(dropUl);
        }
      }, {
        key: "updateMapper",
        value: function updateMapper(level) {
          var mapper = level === 1 ? this.fields : this.getChildFields(this.fields, level - 1, 1);
          this.updateListProp(mapper);
        }
      }, {
        key: "updateListProp",
        value: function updateListProp(mapper) {
          var prop = this.getActualProperties(mapper);
          this.listBaseOption.fields = prop;
          this.listBaseOption.fields.url = prop.hasOwnProperty('navigateUrl') ? prop.navigateUrl : 'navigateUrl';
        }
      }, {
        key: "getDataPos",
        value: function getDataPos(obj, mapper, id) {
          var pos = null;

          for (var i = 0, objlen = obj.length; i < objlen; i++) {
            var nodeId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.id, obj[i]);

            if (obj[i] && nodeId && nodeId.toString() === id) {
              return i;
            } else if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]))) {
              var data = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]);
              pos = this.getDataPos(data, this.getChildMapper(mapper), id);

              if (pos !== null) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]))) {
              var items = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]);
              pos = this.getDataPos(items, this.getChildMapper(mapper), id);

              if (pos !== null) {
                break;
              }
            }
          }

          return pos;
        }
      }, {
        key: "addChildData",
        value: function addChildData(obj, mapper, id, data, index) {
          var updated;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id)) {
            index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? obj.length : index;

            for (var k = 0, _len66 = data.length; k < _len66; k++) {
              obj.splice(index, 0, data[k]);
              index++;
            }

            return updated;
          }

          for (var i = 0, objlen = obj.length; i < objlen; i++) {
            var nodeId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.id, obj[i]);

            if (obj[i] && nodeId && nodeId.toString() === id) {
              if (typeof mapper.child === 'string' && obj[i].hasOwnProperty(mapper.child) && obj[i][mapper.child] !== null || this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor' && obj[i].hasOwnProperty('child')) {
                var key = typeof mapper.child === 'string' ? mapper.child : 'child';
                var childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(key, obj[i]);

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(childData)) {
                  childData = [];
                }

                index = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index) ? childData.length : index;

                for (var _k4 = 0, _len67 = data.length; _k4 < _len67; _k4++) {
                  childData.splice(index, 0, data[_k4]);
                  index++;
                }
              } else {
                var _key26 = typeof mapper.child === 'string' ? mapper.child : 'child';

                obj[i][_key26] = data;
              }

              return true;
            } else if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]))) {
              var childObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]);
              updated = this.addChildData(childObj, this.getChildMapper(mapper), id, data, index);

              if (updated !== undefined) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]))) {
              var _childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]);

              updated = this.addChildData(_childData, this.getChildMapper(mapper), id, data, index);

              if (updated !== undefined) {
                break;
              }
            }
          }

          return updated;
        }
      }, {
        key: "doDisableAction",
        value: function doDisableAction(nodes) {
          var validNodes = this.nodeType(nodes);
          var validID = this.checkValidId(validNodes);
          this.validArr = [];

          for (var i = 0, _len68 = validID.length; i < _len68; i++) {
            var id = validID[i][this.fields.id].toString();

            if (id && this.disableNode.indexOf(id) === -1) {
              this.disableNode.push(id);
            }

            var liEle = this.getElement(id);

            if (liEle) {
              liEle.setAttribute('aria-disabled', 'true');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], DISABLE);
            }
          }
        }
      }, {
        key: "doEnableAction",
        value: function doEnableAction(nodes) {
          var strNodes = this.nodeType(nodes);

          for (var i = 0, _len69 = strNodes.length; i < _len69; i++) {
            var liEle = this.getElement(strNodes[i]);
            var id = strNodes[i];

            if (id && this.disableNode.indexOf(id) !== -1) {
              this.disableNode.splice(this.disableNode.indexOf(id), 1);
            }

            if (liEle) {
              liEle.removeAttribute('aria-disabled');
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([liEle], DISABLE);
            }
          }
        }
      }, {
        key: "nodeType",
        value: function nodeType(nodes) {
          var validID = [];

          for (var i = 0, _len70 = nodes.length; i < _len70; i++) {
            var id = void 0;

            if (typeof nodes[i] == "string") {
              id = nodes[i] ? nodes[i].toString() : null;
            } else if (typeof nodes[i] === "object") {
              id = nodes[i] ? nodes[i].getAttribute("data-uid").toString() : null;
            }

            if (validID.indexOf(id) == -1) {
              validID.push(id);
            }
          }

          return validID;
        }
      }, {
        key: "checkValidId",
        value: function checkValidId(node) {
          var _this642 = this;

          if (this.dataType === 1) {
            this.validArr = this.treeData.filter(function (data) {
              return node.indexOf(data[_this642.fields.id] ? data[_this642.fields.id].toString() : null) !== -1;
            });
          } else if (this.dataType === 2) {
            for (var k = 0; k < this.treeData.length; k++) {
              var id = this.treeData[k][this.fields.id] ? this.treeData[k][this.fields.id].toString() : null;

              if (node.indexOf(id) !== -1) {
                this.validArr.push(this.treeData[k]);
              }

              var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), this.treeData[k]);

              if (childItems) {
                this.filterNestedChild(childItems, node);
              }
            }
          }

          return this.validArr;
        }
      }, {
        key: "filterNestedChild",
        value: function filterNestedChild(treeData, nodes) {
          for (var k = 0; k < treeData.length; k++) {
            var id = treeData[k][this.fields.id] ? treeData[k][this.fields.id].toString() : null;

            if (nodes.indexOf(id) !== -1) {
              this.validArr.push(treeData[k]);
            }

            var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), treeData[k]);

            if (childItems) {
              this.filterNestedChild(childItems, nodes);
            }
          }
        }
      }, {
        key: "setTouchClass",
        value: function setTouchClass() {
          var ele = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(this.element, '.' + BIGGER);
          this.touchClass = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) ? '' : SMALL;
        }
      }, {
        key: "updatePersistProp",
        value: function updatePersistProp() {
          this.removeField(this.treeData, this.fields, ['selected', 'expanded']);
          var sleNodes = this.selectedNodes;

          for (var l = 0, slelen = sleNodes.length; l < slelen; l++) {
            this.updateField(this.treeData, this.fields, sleNodes[l], 'selected', true);
          }

          var enodes = this.expandedNodes;

          if (this.isBlazorPlatform) {
            enodes = this.isBlazorExpandedNodes;
          }

          for (var k = 0, nodelen = enodes.length; k < nodelen; k++) {
            this.updateField(this.treeData, this.fields, enodes[k], 'expanded', true);
          }

          if (this.showCheckBox) {
            this.removeField(this.treeData, this.fields, ['isChecked']);
            var cnodes = this.checkedNodes;

            for (var m = 0, _nodelen = cnodes.length; m < _nodelen; m++) {
              this.updateField(this.treeData, this.fields, cnodes[m], 'isChecked', true);
            }
          }
        }
      }, {
        key: "removeField",
        value: function removeField(obj, mapper, names) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper)) {
            return;
          }

          for (var i = 0, objlen = obj.length; i < objlen; i++) {
            for (var j = 0; j < names.length; j++) {
              var field = this.getMapperProp(mapper, names[j]);

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj[i][field])) {
                delete obj[i][field];
              }
            }

            if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]))) {
              this.removeField(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]), this.getChildMapper(mapper), names);
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]))) {
              this.removeField(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]), this.getChildMapper(mapper), names);
            }
          }
        }
      }, {
        key: "getMapperProp",
        value: function getMapperProp(mapper, fieldName) {
          switch (fieldName) {
            case 'selected':
              return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.selected) ? mapper.selected : 'selected';

            case 'expanded':
              return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.expanded) ? mapper.expanded : 'expanded';

            case 'isChecked':
              return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.isChecked) ? mapper.isChecked : 'isChecked';

            case 'hasChildren':
              return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(mapper.hasChildren) ? mapper.hasChildren : 'hasChildren';

            default:
              return fieldName;
          }
        }
      }, {
        key: "updateField",
        value: function updateField(obj, mapper, id, key, value) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id)) {
            return;
          } else if (this.dataType === 1) {
            var newId = this.isNumberTypeId ? parseFloat(id) : id;
            var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.id, 'equal', newId, false));
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.getMapperProp(mapper, key), value, resultData[0]);
          } else {
            this.updateChildField(obj, mapper, id, key, value);
          }
        }
      }, {
        key: "updateChildField",
        value: function updateChildField(obj, mapper, id, key, value, remove$$1) {
          var removedData;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(obj)) {
            return removedData;
          }

          for (var i = 0, objlen = obj.length; i < objlen; i++) {
            var nodeId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.id, obj[i]);

            if (obj[i] && nodeId && nodeId.toString() === id) {
              if (remove$$1) {
                removedData = obj.splice(i, 1);
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])(this.getMapperProp(mapper, key), value, obj[i]);
                removedData = [];
              }

              return removedData;
            } else if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]))) {
              var childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, obj[i]);
              removedData = this.updateChildField(childData, this.getChildMapper(mapper), id, key, value, remove$$1);

              if (removedData !== undefined) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]))) {
              var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', obj[i]);
              removedData = this.updateChildField(childItems, this.getChildMapper(mapper), id, key, value, remove$$1);

              if (removedData !== undefined) {
                break;
              }
            }
          }

          return removedData;
        }
      }, {
        key: "triggerEvent",
        value: function triggerEvent() {
          this.updateTemplateForBlazor();
          var eventArgs = {
            data: this.treeData
          };
          this.trigger('dataSourceChanged', eventArgs);
        }
      }, {
        key: "updateBlazorTemplate",
        value: function updateBlazorTemplate() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate', this, false);
        }
      }, {
        key: "clientUpdateInitial",
        value: function clientUpdateInitial() {
          this.blazorInitialRender = true;
        }
      }, {
        key: "wireInputEvents",
        value: function wireInputEvents(inpEle) {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(inpEle, 'blur', this.inputFocusOut, this);
        }
      }, {
        key: "wireEditingEvents",
        value: function wireEditingEvents(toBind) {
          if (toBind && !this.disabled) {
            var proxy = this;
            this.touchEditObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
              tap: function tap(e) {
                if (e.tapCount === 2) {
                  e.originalEvent.preventDefault();
                  proxy.editingHandler(e.originalEvent);
                }
              }
            });
          } else {
            if (this.touchEditObj) {
              this.touchEditObj.destroy();
            }
          }
        }
      }, {
        key: "wireClickEvent",
        value: function wireClickEvent(toBind) {
          if (toBind) {
            var proxy = this;
            this.touchClickObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
              tap: function tap(e) {
                proxy.clickHandler(e);
              }
            });
          } else {
            if (this.touchClickObj) {
              this.touchClickObj.destroy();
            }
          }
        }
      }, {
        key: "wireExpandOnEvent",
        value: function wireExpandOnEvent(toBind) {
          var _this643 = this;

          if (toBind) {
            var proxy = this;
            this.touchExpandObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
              tap: function tap(e) {
                if ((_this643.expandOnType === 'Click' || _this643.expandOnType === 'DblClick' && e.tapCount === 2) && e.originalEvent.which !== 3) {
                  proxy.expandHandler(e);
                }
              }
            });
          } else {
            if (this.touchExpandObj) {
              this.touchExpandObj.destroy();
            }
          }
        }
      }, {
        key: "mouseDownHandler",
        value: function mouseDownHandler(e) {
          this.mouseDownStatus = true;

          if (e.shiftKey || e.ctrlKey) {
            e.preventDefault();
          }

          if (e.ctrlKey && this.allowMultiSelection) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'contextmenu', this.preventContextMenu, this);
          }
        }
      }, {
        key: "preventContextMenu",
        value: function preventContextMenu(e) {
          e.preventDefault();
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mousedown', this.mouseDownHandler, this);

          this.wireClickEvent(true);

          if (this.expandOnType !== 'None') {
            this.wireExpandOnEvent(true);
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.focusIn, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'blur', this.focusOut, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseover', this.onMouseOver, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseout', this.onMouseLeave, this);

          this.keyboardModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.keyActionHandler.bind(this),
            keyConfigs: this.keyConfigs,
            eventName: 'keydown'
          });
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mousedown', this.mouseDownHandler);

          this.wireClickEvent(false);
          this.wireExpandOnEvent(false);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.focusIn);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'blur', this.focusOut);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.onMouseOver);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseout', this.onMouseLeave);

          if (!this.disabled) {
            this.keyboardModule.destroy();
          }
        }
      }, {
        key: "parents",
        value: function parents(element, selector) {
          var matched = [];
          var el = element.parentNode;

          while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(el)) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["matches"])(el, selector)) {
              matched.push(el);
            }

            el = el.parentNode;
          }

          return matched;
        }
      }, {
        key: "isDescendant",
        value: function isDescendant(parent, child) {
          var node = child.parentNode;

          while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(node)) {
            if (node === parent) {
              return true;
            }

            node = node.parentNode;
          }

          return false;
        }
      }, {
        key: "showSpinner",
        value: function showSpinner(element) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([element], LOAD);
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["createSpinner"])({
            target: element,
            width: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 16 : 14
          }, this.createElement);
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["showSpinner"])(element);
        }
      }, {
        key: "hideSpinner",
        value: function hideSpinner(element) {
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["hideSpinner"])(element);
          element.innerHTML = '';
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([element], LOAD);
        }
      }, {
        key: "setCheckedNodes",
        value: function setCheckedNodes(nodes) {
          nodes = JSON.parse(JSON.stringify(nodes));
          this.uncheckAll(this.checkedNodes);
          this.setIndeterminate(nodes);

          if (nodes.length > 0) {
            this.checkAll(nodes);
          }
        }
        /**
         * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel
         */

      }, {
        key: "setValidCheckedNode",
        value: function setValidCheckedNode(node) {
          if (this.dataType === 1) {
            var mapper = this.fields;
            var resultData = new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"](this.treeData).executeLocal(new _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["Query"]().where(mapper.id, 'equal', node, true));

            if (resultData[0]) {
              this.setChildCheckState(resultData, node, resultData[0]);

              if (this.autoCheck) {
                var parent = resultData[0][this.fields.parentID] ? resultData[0][this.fields.parentID].toString() : null;
                var childNodes = this.getChildNodes(this.treeData, parent);
                var count = 0;

                for (var _len71 = 0; _len71 < childNodes.length; _len71++) {
                  var childId = childNodes[_len71][this.fields.id].toString();

                  if (this.checkedNodes.indexOf(childId) !== -1) {
                    count++;
                  }
                }

                if (count === childNodes.length && this.checkedNodes.indexOf(parent) === -1 && parent) {
                  this.checkedNodes.push(parent);
                }
              }
            }
          } else if (this.dataType === 2) {
            for (var a = 0; a < this.treeData.length; a++) {
              var index = this.treeData[a][this.fields.id] ? this.treeData[a][this.fields.id].toString() : '';

              if (index === node && this.checkedNodes.indexOf(node) === -1) {
                this.checkedNodes.push(node);
                break;
              }

              var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), this.treeData[a]);

              if (childItems) {
                this.setChildCheckState(childItems, node, this.treeData[a]);
              }
            }
          }
        }
        /**
         * Checks whether the checkedNodes entered are valid and sets the valid checkedNodes while changing via setmodel(for hierarchical DS)
         */

      }, {
        key: "setChildCheckState",
        value: function setChildCheckState(childItems, node, treeData) {
          var checkedParent;
          var count = 0;

          if (this.dataType === 1) {
            if (treeData) {
              checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : null;
            }

            for (var index = 0; index < childItems.length; index++) {
              var checkNode = childItems[index][this.fields.id] ? childItems[index][this.fields.id].toString() : null;

              if (treeData && checkedParent && this.autoCheck) {
                if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkNode) === -1) {
                  this.checkedNodes.push(checkNode);
                }
              }

              if (checkNode === node && this.checkedNodes.indexOf(node) === -1) {
                this.checkedNodes.push(node);
              }

              var subChildItems = this.getChildNodes(this.treeData, checkNode);

              if (subChildItems) {
                this.setChildCheckState(subChildItems, node, treeData);
              }
            }
          } else {
            if (treeData) {
              checkedParent = treeData[this.fields.id] ? treeData[this.fields.id].toString() : '';
            }

            for (var _index8 = 0; _index8 < childItems.length; _index8++) {
              var checkedChild = childItems[_index8][this.fields.id] ? childItems[_index8][this.fields.id].toString() : '';

              if (treeData && checkedParent && this.autoCheck) {
                if (this.checkedNodes.indexOf(checkedParent) !== -1 && this.checkedNodes.indexOf(checkedChild) === -1) {
                  this.checkedNodes.push(checkedChild);
                }
              }

              if (checkedChild === node && this.checkedNodes.indexOf(node) === -1) {
                this.checkedNodes.push(node);
              }

              var _subChildItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), childItems[_index8]);

              if (_subChildItems) {
                this.setChildCheckState(_subChildItems, node, childItems[_index8]);
              }

              if (this.checkedNodes.indexOf(checkedChild) !== -1 && this.autoCheck) {
                count++;
              }

              if (count === childItems.length && this.checkedNodes.indexOf(checkedParent) === -1 && this.autoCheck) {
                this.checkedNodes.push(checkedParent);
              }
            }
          }
        }
      }, {
        key: "setIndeterminate",
        value: function setIndeterminate(nodes) {
          for (var i = 0; i < nodes.length; i++) {
            this.setValidCheckedNode(nodes[i]);
          }
        }
      }, {
        key: "updatePosition",
        value: function updatePosition(id, newData, isRefreshChild, childValue) {
          if (this.dataType === 1) {
            var pos = this.getDataPos(this.treeData, this.fields, id);
            this.treeData.splice(pos, 1, newData);

            if (isRefreshChild) {
              this.removeChildNodes(id);

              for (var j = 0; j < childValue.length; j++) {
                this.treeData.splice(pos, 0, childValue[j]);
                pos++;
              }
            }

            this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
          } else {
            this.updateChildPosition(this.treeData, this.fields, id, [newData], undefined);
          }
        }
      }, {
        key: "updateChildPosition",
        value: function updateChildPosition(treeData, mapper, currID, newData, index) {
          var found;

          for (var i = 0, objlen = treeData.length; i < objlen; i++) {
            var nodeId = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.id, treeData[i]);

            if (treeData[i] && nodeId && nodeId.toString() === currID) {
              treeData[i] = newData[0];
              return true;
            } else if (typeof mapper.child === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, treeData[i]))) {
              var childObj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(mapper.child, treeData[i]);
              found = this.updateChildPosition(childObj, this.getChildMapper(mapper), currID, newData, index);

              if (found !== undefined) {
                break;
              }
            } else if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', treeData[i]))) {
              var childData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('child', treeData[i]);
              found = this.updateChildPosition(childData, this.getChildMapper(mapper), currID, newData, index);

              if (found !== undefined) {
                break;
              }
            }
          }

          return found;
        }
      }, {
        key: "dynamicState",
        value: function dynamicState() {
          this.setDragAndDrop(this.allowDragAndDrop);
          this.wireEditingEvents(this.allowEditing);

          if (!this.disabled) {
            this.wireEvents();
            this.setRipple();
          } else {
            this.unWireEvents();
            this.rippleFn();
            this.rippleIconFn();
          }
        }
      }, {
        key: "crudOperation",
        value: function crudOperation(operation, nodes, target, newText, newNode, index, prevent) {
          var _this644 = this;

          var data = this.fields.dataSource;
          var matchedArr = [];
          var query = this.getQuery(this.fields);
          var key = this.fields.id;
          var crud;
          var changes = {
            addedRecords: [],
            deletedRecords: [],
            changedRecords: []
          };
          var nodesID = [];

          if (nodes) {
            nodesID = this.nodeType(nodes);
          } else if (target) {
            if (typeof target == "string") {
              nodesID[0] = target.toString();
            } else if (typeof target === "object") {
              nodesID[0] = target.getAttribute("data-uid").toString();
            }
          }

          for (var i = 0, _len72 = nodesID.length; i < _len72; i++) {
            var liEle = this.getElement(nodesID[i]);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
              continue;
            }

            var removedData = this.getNodeObject(nodesID[i]);
            matchedArr.push(removedData);
          }

          switch (operation) {
            case 'delete':
              if (nodes.length == 1) {
                crud = data.remove(key, matchedArr[0], query.fromTable, query);
              } else {
                changes.deletedRecords = matchedArr;
                crud = data.saveChanges(changes, key, query.fromTable, query);
              }

              crud.then(function (e) {
                return _this644.deleteSuccess(nodesID);
              })["catch"](function (e) {
                return _this644.dmFailure(e);
              });
              break;

            case 'update':
              matchedArr[0][this.fields.text] = newText;
              crud = data.update(key, matchedArr[0], query.fromTable, query);
              crud.then(function (e) {
                return _this644.editSucess(target, newText, prevent);
              })["catch"](function (e) {
                return _this644.dmFailure(e, target, prevent);
              });
              break;

            case 'insert':
              if (newNode.length == 1) {
                crud = data.insert(newNode[0], query.fromTable, query);
              } else {
                var arr = [];

                for (var _i153 = 0, _len73 = newNode.length; _i153 < _len73; _i153++) {
                  arr.push(newNode[_i153]);
                }

                changes.addedRecords = arr;
                crud = data.saveChanges(changes, key, query.fromTable, query);
              }

              crud.then(function (e) {
                var dropLi = _this644.getElement(target);

                _this644.addSuccess(newNode, dropLi, index);

                _this644.preventExpand = false;
              })["catch"](function (e) {
                return _this644.dmFailure(e);
              });
              break;
          }
        }
      }, {
        key: "deleteSuccess",
        value: function deleteSuccess(nodes) {
          for (var i = 0, _len74 = nodes.length; i < _len74; i++) {
            var liEle = this.getElement(nodes[i]);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
              continue;
            }

            this.removeNode(liEle);
          }

          if (this.dataType === 1) {
            this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
          }

          this.triggerEvent();
        }
      }, {
        key: "editSucess",
        value: function editSucess(target, newText, prevent) {
          var liEle = this.getElement(target);
          var txtEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTTEXT, liEle);
          this.appendNewText(liEle, txtEle, newText, prevent);
        }
      }, {
        key: "addSuccess",
        value: function addSuccess(nodes, dropLi, index) {
          var dropUl;
          var icon = dropLi ? dropLi.querySelector('.' + ICON) : null;
          var proxy = this;

          if (dropLi && icon && icon.classList.contains(EXPANDABLE) && dropLi.querySelector('.' + PARENTITEM) === null) {
            proxy.renderChildNodes(dropLi, null, function () {
              dropUl = dropLi.querySelector('.' + PARENTITEM);
              proxy.addGivenNodes(nodes, dropLi, index, true, dropUl);
              proxy.triggerEvent();
            });
          } else {
            this.addGivenNodes(nodes, dropLi, index, true);
            this.triggerEvent();
          }
        }
      }, {
        key: "dmFailure",
        value: function dmFailure(e, target, prevent) {
          if (target) {
            this.updatePreviousText(target, prevent);
          }

          this.trigger('actionFailure', {
            error: e
          });
        }
      }, {
        key: "updatePreviousText",
        value: function updatePreviousText(target, prevent) {
          var liEle = this.getElement(target);
          var txtEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTTEXT, liEle);
          this.updateText(liEle, txtEle, this.oldText, prevent);
        }
        /**
         * Called internally if any of the property value changed.
         * @param  {TreeView} newProp
         * @param  {TreeView} oldProp
         * @returns void
         * @private
         */
        // tslint:disable-next-line:max-func-body-length

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i154 = 0, _Object$keys59 = Object.keys(newProp); _i154 < _Object$keys59.length; _i154++) {
            var prop = _Object$keys59[_i154];

            switch (prop) {
              case 'allowDragAndDrop':
                this.setDragAndDrop(this.allowDragAndDrop);
                break;

              case 'dragArea':
                if (this.allowDragAndDrop) {
                  this.dragObj.dragArea = this.dragArea;
                }

                break;

              case 'allowEditing':
                this.wireEditingEvents(this.allowEditing);
                break;

              case 'allowMultiSelection':
                if (this.selectedNodes.length > 1) {
                  var sNode = this.getElement(this.selectedNodes[0]);
                  this.isLoaded = false;
                  this.removeSelectAll();
                  this.selectNode(sNode, null);
                  this.isLoaded = true;
                }

                this.setMultiSelect(this.allowMultiSelection);
                this.addMultiSelect(this.allowMultiSelection);
                break;

              case 'checkedNodes':
                if (this.showCheckBox) {
                  this.checkedNodes = oldProp.checkedNodes;
                  this.setCheckedNodes(newProp.checkedNodes);
                }

                break;

              case 'autoCheck':
                if (this.showCheckBox) {
                  this.autoCheck = newProp.autoCheck;
                  this.ensureIndeterminate();
                }

                break;

              case 'cssClass':
                this.setCssClass(oldProp.cssClass, newProp.cssClass);
                break;

              case 'enableRtl':
                this.setEnableRtl();
                break;

              case 'expandedNodes':
                this.isAnimate = false;

                if (!this.isBlazorPlatform) {
                  this.setProperties({
                    expandedNodes: []
                  }, true);
                }

                this.collapseAll();
                this.isInitalExpand = true;

                if (!this.isBlazorPlatform) {
                  this.setProperties({
                    expandedNodes: Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newProp.expandedNodes) ? [] : newProp.expandedNodes
                  }, true);
                }

                this.doExpandAction();
                this.isInitalExpand = false;
                this.isAnimate = true;
                break;

              case 'expandOn':
                this.wireExpandOnEvent(false);
                this.setExpandOnType();

                if (this.expandOnType !== 'None' && !this.disabled) {
                  this.wireExpandOnEvent(true);
                }

                break;

              case 'disabled':
                this.setDisabledMode();
                this.dynamicState();
                break;

              case 'fields':
                this.isAnimate = false;
                this.isFieldChange = true;
                this.initialRender = true;

                if (!this.blazorInitialRender) {
                  this.reRenderNodes();
                }

                this.blazorInitialRender = false;
                this.initialRender = false;
                this.isAnimate = true;
                this.isFieldChange = false;
                break;

              case 'fullRowSelect':
                this.setFullRow(this.fullRowSelect);
                this.addFullRow(this.fullRowSelect);
                break;

              case 'loadOnDemand':
                if (this.loadOnDemand === false && !this.onLoaded) {
                  var nodes = this.element.querySelectorAll('li');
                  var i = 0;

                  while (i < nodes.length) {
                    if (nodes[i].getAttribute('aria-expanded') !== 'true') {
                      this.renderChildNodes(nodes[i], true, null, true);
                    }

                    i++;
                  }

                  this.onLoaded = true;
                }

                break;

              case 'nodeTemplate':
                this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
                this.reRenderNodes();
                break;

              case 'selectedNodes':
                this.removeSelectAll();
                this.setProperties({
                  selectedNodes: newProp.selectedNodes
                }, true);
                this.doSelectionAction();
                break;

              case 'showCheckBox':
                this.reRenderNodes();
                break;

              case 'sortOrder':
                this.reRenderNodes();
                break;

              case 'fullRowNavigable':
                this.setProperties({
                  fullRowNavigable: newProp.fullRowNavigable
                }, true);
                this.listBaseOption.itemNavigable = newProp.fullRowNavigable;
                this.reRenderNodes();
                break;
            }
          }
        }
        /**
         * Removes the component from the DOM and detaches all its related event handlers. It also removes the attributes and classes.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'nodeTemplate', 'NodeTemplate');
          this.element.removeAttribute('aria-activedescendant');
          this.element.removeAttribute('tabindex');
          this.unWireEvents();
          this.wireEditingEvents(false);

          if (!this.disabled) {
            this.rippleFn();
            this.rippleIconFn();
          }

          this.setCssClass(this.cssClass, null);
          this.setDragAndDrop(false);
          this.setFullRow(false);

          if (this.isBlazorPlatform) {
            this.ulElement = this.element.querySelector('.e-list-parent.e-ul');
          }

          if (this.ulElement && this.ulElement.parentElement) {
            this.ulElement.parentElement.removeChild(this.ulElement);
          }

          if (!this.isBlazorPlatform) {
            _get(_getPrototypeOf(TreeView.prototype), "destroy", this).call(this);
          }
        }
        /**
         * Adds the collection of TreeView nodes based on target and index position. If target node is not specified,
         * then the nodes are added as children of the given parentID or in the root level of TreeView.
         * @param  { { [key: string]: Object }[] } nodes - Specifies the array of JSON data that has to be added.
         * @param  { string | Element } target - Specifies ID of TreeView node/TreeView node as target element.
         * @param  { number } index - Specifies the index to place the newly added nodes in the target element.
         * @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
         */

      }, {
        key: "addNodes",
        value: function addNodes(nodes, target, index, preventTargetExpand) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            return;
          }

          nodes = JSON.parse(JSON.stringify(nodes));
          var dropLi = this.getElement(target);
          this.preventExpand = preventTargetExpand;

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
            if (!this.isOffline) {
              this.crudOperation('insert', null, target, null, nodes, index, this.preventExpand);
            } else {
              this.addSuccess(nodes, dropLi, index);
            }
          } else if (this.dataType === 2) {
            this.addGivenNodes(nodes, dropLi, index);
          } else {
            if (dropLi) {
              this.addGivenNodes(nodes, dropLi, index);
            } else {
              nodes = this.getSortedData(nodes);

              for (var i = 0; i < nodes.length; i++) {
                var pid = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.parentID, nodes[i]);
                dropLi = pid ? this.getElement(pid.toString()) : pid;
                this.addGivenNodes([nodes[i]], dropLi, index);
              }
            }

            this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
          }

          if (this.showCheckBox && dropLi) {
            this.ensureParentCheckState(dropLi);
          }

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] === false || this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && this.fields.dataSource.adaptorName === 'BlazorAdaptor') {
            this.preventExpand = false;
            this.triggerEvent();
          }
        }
        /**
         * Instead of clicking on the TreeView node for editing, we can enable it by using
         * `beginEdit` property. On passing the node ID or element through this property, the edit textBox
         * will be created for the particular node thus allowing us to edit it.
         * @param  {string | Element} node - Specifies ID of TreeView node/TreeView node.
         */

      }, {
        key: "beginEdit",
        value: function beginEdit(node) {
          var ele = this.getElement(node);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(ele) || this.disabled) {
            return;
          }

          this.createTextbox(ele, null);
        }
        /**
         * Checks all the unchecked nodes. You can also check specific nodes by passing array of unchecked nodes
         * as argument to this method.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
         */

      }, {
        key: "checkAll",
        value: function checkAll(nodes) {
          if (this.showCheckBox) {
            this.doCheckBoxAction(nodes, true);
          }
        }
        /**
         * Collapses all the expanded TreeView nodes. You can collapse specific nodes by passing array of nodes as argument to this method.
         * You can also collapse all the nodes excluding the hidden nodes by setting **excludeHiddenNodes** to true. If you want to collapse
         * a specific level of nodes, set **level** as argument to collapseAll method.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/ array of TreeView node.
         * @param  {number} level - TreeView nodes will collapse up to the given level.
         * @param  {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes of TreeView when collapsing all nodes.
         */

      }, {
        key: "collapseAll",
        value: function collapseAll(nodes, level, excludeHiddenNodes) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            this.doGivenAction(nodes, COLLAPSIBLE, false);
          } else {
            if (level > 0) {
              this.collapseByLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element), level, excludeHiddenNodes);
            } else {
              this.collapseAllNodes(excludeHiddenNodes);
            }
          }
        }
        /**
         * Disables the collection of nodes by passing the ID of nodes or node elements in the array.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
         */

      }, {
        key: "disableNodes",
        value: function disableNodes(nodes) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            this.doDisableAction(nodes);
          }
        }
        /**
         * Enables the collection of disabled nodes by passing the ID of nodes or node elements in the array.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
         */

      }, {
        key: "enableNodes",
        value: function enableNodes(nodes) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            this.doEnableAction(nodes);
          }
        }
        /**
         * Ensures visibility of the TreeView node by using node ID or node element.
         * When many TreeView nodes are present and we need to find a particular node, `ensureVisible` property
         * helps bring the node to visibility by expanding the TreeView and scrolling to the specific node.
         * @param  {string | Element} node - Specifies ID of TreeView node/TreeView nodes.
         */

      }, {
        key: "ensureVisible",
        value: function ensureVisible(node) {
          var liEle = this.getElement(node);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
            return;
          }

          var parents = this.parents(liEle, '.' + LISTITEM);
          this.expandAll(parents);
          setTimeout(function () {
            liEle.scrollIntoView(true);
          }, 450);
        }
        /**
         * Expands all the collapsed TreeView nodes. You can expand the specific nodes by passing the array of collapsed nodes
         * as argument to this method. You can also expand all the collapsed nodes by excluding the hidden nodes by setting
         * **excludeHiddenNodes** to true to this method. To expand a specific level of nodes, set **level** as argument to expandAll method.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView nodes.
         * @param  {number} level - TreeView nodes will expand up to the given level.
         * @param  {boolean} excludeHiddenNodes - Whether or not to exclude hidden nodes when expanding all nodes.
         */

      }, {
        key: "expandAll",
        value: function expandAll(nodes, level, excludeHiddenNodes) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            this.doGivenAction(nodes, EXPANDABLE, true);
          } else {
            if (level > 0) {
              this.expandByLevel(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, this.element), level, excludeHiddenNodes);
            } else {
              this.expandAllNodes(excludeHiddenNodes);
            }
          }
        }
        /**
         * Gets all the checked nodes including child, whether it is loaded or not.
         */

      }, {
        key: "getAllCheckedNodes",
        value: function getAllCheckedNodes() {
          var checkNodes = this.checkedNodes;
          return checkNodes;
        }
        /**
        * Gets all the disabled nodes including child, whether it is loaded or not.
        */

      }, {
        key: "getDisabledNodes",
        value: function getDisabledNodes() {
          var disabledNodes = this.disableNode;
          return disabledNodes;
        }
        /**
         * Get the node's data such as id, text, parentID, selected, isChecked, and expanded by passing the node element or it's ID.
         * @param  {string | Element} node - Specifies ID of TreeView node/TreeView node.
         * @BlazorType NodeData
         */

      }, {
        key: "getNode",
        value: function getNode(node) {
          var ele = this.getElement(node);
          return this.getNodeData(ele, true);
        }
        /**
         * To get the updated data source of TreeView after performing some operation like drag and drop, node editing,
         * node selecting/unSelecting, node expanding/collapsing, node checking/unChecking, adding and removing node.
         * * If you pass the ID of TreeView node as arguments for this method then it will return the updated data source
         * of the corresponding node otherwise it will return the entire updated data source of TreeView.
         * * The updated data source also contains custom attributes if you specified in data source.
         * @param  {string | Element} node - Specifies ID of TreeView node/TreeView node.
         * @isGenericType true
         */

      }, {
        key: "getTreeData",
        value: function getTreeData(node) {
          var id = this.getId(node);
          this.updatePersistProp();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(id)) {
            return this.treeData;
          } else {
            var data = this.getNodeObject(id);
            return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(data) ? [] : [data];
          }
        }
        /**
         * Moves the collection of nodes within the same TreeView based on target or its index position.
         * @param  {string[] | Element[]} sourceNodes - Specifies the array of TreeView nodes ID/array of TreeView node.
         * @param  {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
         * @param  {number} index - Specifies the index to place the moved nodes in the target element.
         * @param { boolean } preventTargetExpand - If set to true, the target parent node will be prevented from auto expanding.
         */

      }, {
        key: "moveNodes",
        value: function moveNodes(sourceNodes, target, index, preventTargetExpand) {
          var dropLi = this.getElement(target);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dropLi)) {
            return;
          }

          for (var i = 0; i < sourceNodes.length; i++) {
            var dragLi = this.getElement(sourceNodes[i]);

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dragLi) || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi)) {
              continue;
            }

            this.preventExpand = preventTargetExpand;
            this.dropAsChildNode(dragLi, dropLi, this, index);
          }

          if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] === false) {
            this.preventExpand = false;
          }

          this.triggerEvent();
        }
        /**
         * Refreshes a particular node of the TreeView.
         * @param  {string | Element} target - Specifies the ID of TreeView node or TreeView node as target element.
         * @param  {{ [key: string]: Object }[]} newData - Specifies the new data of TreeView node.
         */

      }, {
        key: "refreshNode",
        value: function refreshNode(target, newData) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newData)) {
            return;
          }

          var id;
          var isRefreshChild = false;

          if (this.dataType == 1 && newData.length > 1) {
            isRefreshChild = true;
          } else if (this.dataType == 2 && newData.length === 1) {
            var updatedChildValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), newData[0]);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(updatedChildValue)) {
              isRefreshChild = true;
            }
          }

          var liEle = this.getElement(target);
          id = liEle ? liEle.getAttribute('data-uid') : target ? target.toString() : null;
          this.refreshData = this.getNodeObject(id);
          newData = JSON.parse(JSON.stringify(newData)); // tslint:disable

          var newNodeData;
          var parentData;

          if (this.dataType == 1 && isRefreshChild) {
            for (var k = 0; k < newData.length; k++) {
              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newData[k][this.fields.parentID])) {
                parentData = newData[k];
                newData.splice(k, 1);
                break;
              }
            }

            newNodeData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.refreshData, parentData);
          } else {
            newNodeData = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, this.refreshData, newData[0]);
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
            this.updatePosition(id, newNodeData, isRefreshChild, newData);
            return;
          }

          this.isRefreshed = true;
          var level = parseFloat(liEle.getAttribute('aria-level'));

          var newliEle = _syncfusion_ej2_lists__WEBPACK_IMPORTED_MODULE_1__["ListBase"].createListItemFromJson(this.createElement, [newNodeData], this.listBaseOption, level);

          var ul = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + PARENTITEM, liEle);
          var childItems = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])(this.fields.child.toString(), newNodeData);

          if (isRefreshChild && ul || isRefreshChild && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(childItems)) {
            liEle.innerHTML = newliEle[0].innerHTML;
            this.updatePosition(id, newNodeData, isRefreshChild, newData);

            if (isRefreshChild && ul) {
              this.expandAll([id]);
            }
          } else {
            var txtEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, liEle);
            var newTextEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + TEXTWRAP, newliEle[0]);
            var icon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, txtEle);
            var newIcon = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('div.' + ICON, newTextEle);

            if (icon && newIcon) {
              if (newIcon.classList.contains(EXPANDABLE) && icon.classList.contains(COLLAPSIBLE)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([newIcon], EXPANDABLE);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([newIcon], COLLAPSIBLE);
              } else if (newIcon.classList.contains(COLLAPSIBLE) && icon.classList.contains(EXPANDABLE)) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([newIcon], COLLAPSIBLE);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([newIcon], EXPANDABLE);
              } else if (icon.classList.contains('interaction')) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([newIcon], 'interaction');
              }
            }

            txtEle.innerHTML = newTextEle.innerHTML;
            this.updatePosition(id, newNodeData, isRefreshChild, newData);
          }

          if (newNodeData[this.fields.tooltip]) {
            liEle.setAttribute("title", newNodeData[this.fields.tooltip]);
          }

          if (newNodeData.hasOwnProperty(this.fields.htmlAttributes) && newNodeData[this.fields.htmlAttributes]) {
            var attr = {};
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["merge"])(attr, newNodeData[this.fields.htmlAttributes]);

            if (attr["class"]) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([liEle], attr["class"].split(' '));
              delete attr["class"];
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(liEle, attr);
            }
          }

          this.isRefreshed = false;
          this.triggerEvent();
        }
        /**
         * Removes the collection of TreeView nodes by passing the array of node details as argument to this method.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
         */

      }, {
        key: "removeNodes",
        value: function removeNodes(nodes) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(nodes)) {
            if (this.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !this.isOffline && this.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
              this.crudOperation('delete', nodes);
            } else {
              this.deleteSuccess(nodes);
            }
          }
        }
        /**
         * Replaces the text of the TreeView node with the given text.
         * @param  {string | Element} target - Specifies ID of TreeView node/TreeView node as target element.
         * @param  {string} newText - Specifies the new text of TreeView node.
         */

      }, {
        key: "updateNode",
        value: function updateNode(target, newText) {
          var _this645 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(newText) || !this.allowEditing) {
            return;
          }

          var liEle = this.getElement(target);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(liEle)) {
            return;
          }

          var txtEle = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])('.' + LISTTEXT, liEle);
          this.updateOldText(liEle);
          var eventArgs = this.getEditEvent(liEle, null, null);
          this.trigger('nodeEditing', eventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              if (_this645.fields.dataSource instanceof _syncfusion_ej2_data__WEBPACK_IMPORTED_MODULE_4__["DataManager"] && !_this645.isOffline && _this645.fields.dataSource.adaptorName !== 'BlazorAdaptor') {
                _this645.crudOperation('update', null, target, newText, null, null, false);
              } else {
                _this645.appendNewText(liEle, txtEle, newText, false);
              }
            }
          });
        }
        /**
         * Unchecks all the checked nodes. You can also uncheck the specific nodes by passing array of checked nodes
         * as argument to this method.
         * @param  {string[] | Element[]} nodes - Specifies the array of TreeView nodes ID/array of TreeView node.
         */

      }, {
        key: "uncheckAll",
        value: function uncheckAll(nodes) {
          if (this.showCheckBox) {
            this.doCheckBoxAction(nodes, false);
          }
        }
      }]);

      return TreeView;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "allowDragAndDrop", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "allowEditing", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "allowMultiSelection", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, NodeAnimationSettings)], TreeView.prototype, "animation", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], TreeView.prototype, "checkedNodes", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], TreeView.prototype, "cssClass", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "disabled", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], TreeView.prototype, "dragArea", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "enableHtmlSanitizer", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "enablePersistence", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], TreeView.prototype, "expandedNodes", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')], TreeView.prototype, "expandOn", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, FieldsSettings)], TreeView.prototype, "fields", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], TreeView.prototype, "fullRowSelect", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], TreeView.prototype, "loadOnDemand", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], TreeView.prototype, "locale", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], TreeView.prototype, "nodeTemplate", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], TreeView.prototype, "selectedNodes", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], TreeView.prototype, "sortOrder", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "showCheckBox", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], TreeView.prototype, "autoCheck", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], TreeView.prototype, "fullRowNavigable", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "actionFailure", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "created", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "dataBound", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "dataSourceChanged", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "drawNode", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "destroyed", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "keyPress", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeChecked", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeChecking", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeClicked", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeCollapsed", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeCollapsing", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeDragging", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeDragStart", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeDragStop", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeDropped", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeEdited", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeEditing", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeExpanded", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeExpanding", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeSelected", void 0);

    __decorate$8([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], TreeView.prototype, "nodeSelecting", void 0);

    TreeView = TreeView_1 = __decorate$8([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], TreeView);
    /**
     * TreeView modules
     */

    var __decorate$9 = undefined && undefined.__decorate || function (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;
    };

    var CONTROL$1 = 'e-control';
    var ROOT$1 = 'e-sidebar';
    var DOCKER = 'e-dock';
    var CLOSE = 'e-close';
    var OPEN = 'e-open';
    var TRASITION = 'e-transition';
    var DEFAULTBACKDROP = 'e-sidebar-overlay';
    var CONTEXTBACKDROP = 'e-backdrop';
    var RTL$2 = 'e-rtl';
    var RIGHT = 'e-right';
    var LEFT = 'e-left';
    var OVER = 'e-over';
    var PUSH = 'e-push';
    var SLIDE = 'e-slide';
    var VISIBILITY = 'e-visibility';
    var MAINCONTENTANIMATION = 'e-content-animation';
    var DISABLEANIMATION = 'e-disable-animation';
    var CONTEXT = 'e-sidebar-context';
    var SIDEBARABSOLUTE = 'e-sidebar-absolute';
    /**
     * Sidebar is an expandable or collapsible
     * component that typically act as a side container to place the primary or secondary content alongside of the main content.
     * ```html
     * <aside id="sidebar">
     * </aside>
     * ```
     * ```typescript
     * <script>
     *   let sidebarObject: Sidebar = new Sidebar();
     *   sidebarObject.appendTo("#sidebar");
     * </script>
     * ```
     */

    var Sidebar = /*#__PURE__*/function (_syncfusion_ej2_base_51) {
      _inherits(Sidebar, _syncfusion_ej2_base_51);

      var _super236 = _createSuper(Sidebar);

      function Sidebar(options, element) {
        var _this646;

        _classCallCheck(this, Sidebar);

        _this646 = _super236.call(this, options, element);
        _this646.isBlazor = false;
        return _this646;
      }

      _createClass2(Sidebar, [{
        key: "preRender",
        value: function preRender() {
          this.isBlazor = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered;

          if (!this.isBlazor) {
            this.setWidth();
          }
        }
      }, {
        key: "render",
        value: function render() {
          this.initialize();
          this.wireEvents();
          this.renderComplete();
        }
      }, {
        key: "initialize",
        value: function initialize() {
          this.setTarget();
          this.addClass();

          if (!this.isBlazor) {
            this.setZindex();
          }

          if (this.enableDock) {
            this.setDock();
          }

          if (this.isOpen) {
            this.show();
          } else {
            this.setMediaQuery();
          }

          this.checkType(true);
          this.setType(this.type);
          this.setCloseOnDocumentClick();

          if (!this.isBlazor) {
            this.setEnableRTL();
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.windowWidth = window.innerWidth;
          }
        }
      }, {
        key: "setEnableRTL",
        value: function setEnableRTL() {
          this.enableRtl ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], RTL$2) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], RTL$2);
        }
      }, {
        key: "setTarget",
        value: function setTarget() {
          this.targetEle = this.element.nextElementSibling;
          this.sidebarEleCopy = this.element.cloneNode(true);

          if (typeof this.target === 'string') {
            this.setProperties({
              target: document.querySelector(this.target)
            }, true);
          }

          if (this.target) {
            this.target.insertBefore(this.element, this.target.children[0]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], SIDEBARABSOLUTE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.target], CONTEXT);
            this.targetEle = this.getTargetElement();
          }
        }
      }, {
        key: "getTargetElement",
        value: function getTargetElement() {
          var siblingElement = this.element.nextElementSibling;

          while (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(siblingElement)) {
            if (!siblingElement.classList.contains(ROOT$1)) {
              break;
            }

            siblingElement = siblingElement.nextElementSibling;
          }

          return siblingElement;
        }
      }, {
        key: "setCloseOnDocumentClick",
        value: function setCloseOnDocumentClick() {
          if (this.closeOnDocumentClick) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', this.documentclickHandler, this);
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.documentclickHandler);
          }
        }
      }, {
        key: "setWidth",
        value: function setWidth() {
          if (this.enableDock && this.position === 'Left') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'width': this.setDimension(this.dockSize)
            });
          } else if (this.enableDock && this.position === 'Right') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'width': this.setDimension(this.dockSize)
            });
          } else if (!this.enableDock) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'width': this.setDimension(this.width)
            });
          }
        }
      }, {
        key: "setDimension",
        value: function setDimension(width) {
          if (typeof width === 'number') {
            width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
          } else if (typeof width === 'string') {
            width = width.match(/px|%|em/) ? width : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(width);
          } else {
            width = '100%';
          }

          return width;
        }
      }, {
        key: "setZindex",
        value: function setZindex() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
            'z-index': '' + this.zIndex
          });
        }
      }, {
        key: "addClass",
        value: function addClass() {
          var classELement = document.querySelector('.e-main-content');

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(classELement || this.targetEle)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([classELement || this.targetEle], [MAINCONTENTANIMATION]);
          }

          this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';

          if (!this.isBlazor) {
            if (!this.enableDock && this.type !== 'Auto') {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [VISIBILITY]);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [OPEN, CLOSE, RIGHT, LEFT, SLIDE, PUSH, OVER]);
            this.element.classList.add(ROOT$1);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.position === 'Right' ? RIGHT : LEFT);

            if (this.enableDock) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], DOCKER);
            }

            this.element.setAttribute('tabindex', this.tabIndex);
          }

          if (this.type === 'Auto' && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.show();
          } else if (!this.isOpen) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], CLOSE);
          }
        }
      }, {
        key: "checkType",
        value: function checkType(val) {
          if (!(this.type === 'Push' || this.type === 'Over' || this.type === 'Slide')) {
            this.type = 'Auto';
          } else {
            if (!this.element.classList.contains(CLOSE) && !val) {
              this.hide();
            }
          }
        }
      }, {
        key: "transitionEnd",
        value: function transitionEnd(e) {
          this.setDock();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e) && e.target === this.element) {
            this.triggerChange();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'transitionend', this.transitionEnd);
        }
      }, {
        key: "destroyBackDrop",
        value: function destroyBackDrop() {
          var sibling = document.querySelector('.e-main-content') || this.targetEle;

          if (this.target && this.showBackdrop && sibling) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([sibling], CONTEXTBACKDROP);
          } else if (this.showBackdrop && this.modal) {
            this.modal.style.display = 'none';
            this.modal.outerHTML = '';
            this.modal = null;
          }
        }
        /**
         * Hide the Sidebar component, if it is in an open state.
         * @returns void
         */

      }, {
        key: "hide",
        value: function hide(e) {
          var _this647 = this;

          var closeArguments = {
            model: this,
            element: this.element,
            cancel: false,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            event: e || null
          };

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            delete closeArguments.model;
          }

          this.trigger('close', closeArguments, function (observedcloseArgs) {
            if (!observedcloseArgs.cancel) {
              if (_this647.element.classList.contains(CLOSE)) {
                return;
              }

              if (_this647.element.classList.contains(OPEN) && !_this647.animate) {
                _this647.triggerChange();
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this647.element], CLOSE);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this647.element], OPEN);
              _this647.enableDock ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this647.element, {
                'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this647.dockSize)
              }) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this647.element, {
                'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this647.width)
              });

              _this647.setType(_this647.type);

              var sibling = document.querySelector('.e-main-content') || _this647.targetEle;

              if (!_this647.enableDock && sibling) {
                sibling.style.transform = 'translateX(' + 0 + 'px)';
                _this647.position === 'Left' ? sibling.style.marginLeft = '0px' : sibling.style.marginRight = '0px';
              }

              _this647.destroyBackDrop();

              _this647.setAnimation();

              if (_this647.type === 'Slide') {
                document.body.classList.remove('e-sidebar-overflow');
              }

              _this647.setProperties({
                isOpen: false
              }, true);

              if (_this647.enableDock) {
                setTimeout(function () {
                  return _this647.setTimeOut();
                }, 50);
              }

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this647.element, 'transitionend', _this647.transitionEnd, _this647);
            }
          });
        }
      }, {
        key: "setTimeOut",
        value: function setTimeOut() {
          var sibling = document.querySelector('.e-main-content') || this.targetEle;

          if (this.element.classList.contains(OPEN) && sibling) {
            if (this.position === 'Left') {
              this.width === 'auto' ? sibling.style.marginLeft = this.setDimension(this.element.getBoundingClientRect().width) : sibling.style.marginLeft = this.setDimension(this.width);
            } else {
              this.width === 'auto' ? sibling.style.marginRight = this.setDimension(this.element.getBoundingClientRect().width) : sibling.style.marginRight = this.setDimension(this.width);
            }
          } else if (this.element.classList.contains(CLOSE) && sibling) {
            if (this.position === 'Left') {
              this.dockSize === 'auto' ? sibling.style.marginLeft = this.setDimension(this.element.getBoundingClientRect().width) : sibling.style.marginLeft = this.setDimension(this.dockSize);
            } else {
              this.dockSize === 'auto' ? sibling.style.marginRight = this.setDimension(this.element.getBoundingClientRect().width) : sibling.style.marginRight = this.setDimension(this.dockSize);
            }
          }
        }
      }, {
        key: "show",

        /**
         * Shows the Sidebar component, if it is in closed state.
         * @returns void
         */
        value: function show(e) {
          var _this648 = this;

          var openArguments = {
            model: this,
            element: this.element,
            cancel: false,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e),
            event: e || null
          };

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            delete openArguments.model;
          }

          this.trigger('open', openArguments, function (observedopenArgs) {
            if (!observedopenArgs.cancel) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this648.element], VISIBILITY);

              if (_this648.element.classList.contains(OPEN)) {
                return;
              }

              if (_this648.element.classList.contains(CLOSE) && !_this648.animate) {
                _this648.triggerChange();
              }

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this648.element], [OPEN, TRASITION]);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this648.element, {
                'transform': ''
              });
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this648.element], CLOSE);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this648.element, {
                'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(_this648.width)
              });

              _this648.setType(_this648.type);

              _this648.createBackDrop();

              _this648.setAnimation();

              if (_this648.type === 'Slide') {
                document.body.classList.add('e-sidebar-overflow');
              }

              _this648.setProperties({
                isOpen: true
              }, true);

              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(_this648.element, 'transitionend', _this648.transitionEnd, _this648);
            }
          });
        }
      }, {
        key: "setAnimation",
        value: function setAnimation() {
          if (this.animate) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], DISABLEANIMATION);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], DISABLEANIMATION);
          }
        }
      }, {
        key: "triggerChange",
        value: function triggerChange() {
          var changeArguments = {
            name: 'change',
            element: this.element
          };
          this.trigger('change', changeArguments);
        }
      }, {
        key: "setDock",
        value: function setDock() {
          if (this.enableDock && this.position === 'Left' && !this.getState()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'transform': 'translateX(' + -100 + '%) translateX(' + this.setDimension(this.dockSize) + ')'
            });
          } else if (this.enableDock && this.position === 'Right' && !this.getState()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'transform': 'translateX(' + 100 + '%) translateX(' + '-' + this.setDimension(this.dockSize) + ')'
            });
          }

          if (this.element.classList.contains(CLOSE) && this.enableDock) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'width': this.setDimension(this.dockSize)
            });
          }
        }
      }, {
        key: "createBackDrop",
        value: function createBackDrop() {
          if (this.target && this.showBackdrop && this.getState()) {
            var sibling = document.querySelector('.e-main-content') || this.targetEle;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([sibling], CONTEXTBACKDROP);
          } else if (this.showBackdrop && !this.modal && this.getState()) {
            this.modal = this.createElement('div');
            this.modal.className = DEFAULTBACKDROP;
            this.modal.style.display = 'block';
            document.body.appendChild(this.modal);
          }
        }
      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist(['type', 'position', 'isOpen']);
        }
        /**
         * Returns the current module name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'sidebar';
        }
        /**
         * Shows or hides the Sidebar based on the current state.
         * @returns void
         */

      }, {
        key: "toggle",
        value: function toggle(e) {
          this.element.classList.contains(OPEN) ? this.hide() : this.show();
        }
      }, {
        key: "getState",
        value: function getState() {
          return this.element.classList.contains(OPEN) ? true : false;
        }
      }, {
        key: "setMediaQuery",
        value: function setMediaQuery() {
          if (this.mediaQuery) {
            var media = false;

            if (typeof this.mediaQuery === 'string') {
              media = window.matchMedia(this.mediaQuery).matches;
            } else {
              media = this.mediaQuery.matches;
            }

            if (media && this.windowWidth !== window.innerWidth) {
              this.show();
            } else if (this.getState() && this.windowWidth !== window.innerWidth) {
              this.hide();
            }
          }
        }
      }, {
        key: "resize",
        value: function resize(e) {
          if (this.type === 'Auto') {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], OVER);
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], PUSH);
            }
          }

          this.setMediaQuery();

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            this.windowWidth = window.innerWidth;
          }
        }
      }, {
        key: "documentclickHandler",
        value: function documentclickHandler(e) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + CONTROL$1 + '' + '.' + ROOT$1)) {
            return;
          }

          this.hide(e);
        }
      }, {
        key: "enableGestureHandler",
        value: function enableGestureHandler(args) {
          if (!this.isOpen && this.position === 'Left' && args.swipeDirection === 'Right' && args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5) {
            this.show();
          } else if (this.isOpen && this.position === 'Left' && args.swipeDirection === 'Left') {
            this.hide();
          } else if (this.isOpen && this.position === 'Right' && args.swipeDirection === 'Right') {
            this.hide();
          } else if (!this.isOpen && this.position === 'Right' && args.swipeDirection === 'Left' && window.innerWidth - args.startX <= 20 && args.distanceX >= 50 && args.velocity >= 0.5) {
            this.show();
          }
        }
      }, {
        key: "setEnableGestures",
        value: function setEnableGestures() {
          if (this.enableGestures) {
            this.mainContentEle = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](document.body, {
              swipe: this.enableGestureHandler.bind(this)
            });
            this.sidebarEle = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
              swipe: this.enableGestureHandler.bind(this)
            });
          } else {
            if (this.mainContentEle && this.sidebarEle) {
              this.mainContentEle.destroy();
              this.sidebarEle.destroy();
            }
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          this.setEnableGestures();
          window.addEventListener('resize', this.resize.bind(this));
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          window.removeEventListener('resize', this.resize.bind(this));

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.documentclickHandler);

          if (this.mainContentEle) {
            this.mainContentEle.destroy();
          }

          if (this.sidebarEle) {
            this.sidebarEle.destroy();
          }
        }
        /**
         * Called internally if any of the property value changed.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var sibling = document.querySelector('.e-main-content') || this.targetEle;

          for (var _i155 = 0, _Object$keys60 = Object.keys(newProp); _i155 < _Object$keys60.length; _i155++) {
            var prop = _Object$keys60[_i155];

            switch (prop) {
              case 'isOpen':
                this.isOpen ? this.show() : this.hide();
                break;

              case 'width':
                this.setWidth();

                if (!this.getState()) {
                  this.setDock();
                }

                break;

              case 'animate':
                this.setAnimation();
                break;

              case 'type':
                this.checkType(false);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [VISIBILITY]);
                this.addClass();
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.type === 'Auto' ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? ['e-over'] : ['e-push'] : ['e-' + this.type.toLowerCase()]);
                break;

              case 'position':
                this.element.style.transform = '';
                this.setDock();

                if (sibling) {
                  this.position === 'Left' ? sibling.style.marginRight = '0px' : sibling.style.marginLeft = '0px';
                }

                if (this.position === 'Right') {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], LEFT);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], RIGHT);
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], RIGHT);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], LEFT);
                }

                this.setType(this.type);
                break;

              case 'showBackdrop':
                if (this.showBackdrop) {
                  this.createBackDrop();
                } else {
                  if (this.modal) {
                    this.modal.style.display = 'none';
                    this.modal.outerHTML = '';
                    this.modal = null;
                  }
                }

                break;

              case 'target':
                if (typeof this.target === 'string') {
                  this.setProperties({
                    target: document.querySelector(this.target)
                  }, true);
                }

                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], SIDEBARABSOLUTE);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([oldProp.target], CONTEXT);
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(sibling, {
                    'margin-left': 0,
                    'margin-right': 0
                  });
                  document.body.insertAdjacentElement('afterbegin', this.element);
                }

                var isRendered = this.isServerRendered;
                this.isServerRendered = false;

                _get(_getPrototypeOf(Sidebar.prototype), "refresh", this).call(this);

                this.isServerRendered = isRendered;
                break;

              case 'closeOnDocumentClick':
                this.setCloseOnDocumentClick();
                break;

              case 'enableDock':
                if (!this.getState()) {
                  this.setDock();
                }

                break;

              case 'zIndex':
                this.setZindex();
                break;

              case 'mediaQuery':
                this.setMediaQuery();
                break;

              case 'enableGestures':
                this.setEnableGestures();
                break;

              case 'enableRtl':
                this.setEnableRTL();
                break;
            }
          }
        }
      }, {
        key: "setType",
        value: function setType(type) {
          var elementWidth = this.element.getBoundingClientRect().width;
          this.setZindex();
          var sibling = document.querySelector('.e-main-content') || this.targetEle;

          if (sibling) {
            sibling.style.transform = 'translateX(' + 0 + 'px)';

            if (!_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice && this.type !== 'Auto') {
              this.position === 'Left' ? sibling.style.marginLeft = '0px' : sibling.style.marginRight = '0px';
            }
          }

          var margin = this.position === 'Left' ? elementWidth + 'px' : elementWidth + 'px';
          var eleWidth = this.position === 'Left' ? elementWidth : -elementWidth;
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [PUSH, OVER, SLIDE]);

          switch (type) {
            case 'Push':
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [PUSH]);

              if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
                this.position === 'Left' ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin;
              }

              break;

            case 'Slide':
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [SLIDE]);

              if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
                sibling.style.transform = 'translateX(' + eleWidth + 'px)';
              }

              break;

            case 'Over':
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [OVER]);

              if (this.enableDock && this.element.classList.contains(CLOSE)) {
                if (sibling) {
                  this.position === 'Left' ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin;
                }
              }

              break;

            case 'Auto':
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], [TRASITION]);

              if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                if (sibling && this.enableDock && !this.getState()) {
                  this.position === 'Left' ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin;
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], PUSH);
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], OVER);
                }
              } else {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], PUSH);

                if (sibling && (this.enableDock || this.element.classList.contains(OPEN))) {
                  this.position === 'Left' ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin;
                }
              }

              this.createBackDrop();
          }
        }
        /**
         * Removes the control from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          _get(_getPrototypeOf(Sidebar.prototype), "destroy", this).call(this);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], [OPEN, CLOSE, PUSH, SLIDE, OVER, LEFT, RIGHT, TRASITION]);

          if (this.target) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], SIDEBARABSOLUTE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.target], CONTEXT);
          }

          this.destroyBackDrop();
          this.element.style.width = '';
          this.element.style.zIndex = '';
          this.element.style.transform = '';
          this.windowWidth = null;
          !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.sidebarEleCopy.getAttribute('tabindex')) ? this.element.setAttribute('tabindex', this.tabIndex) : this.element.removeAttribute('tabindex');
          var sibling = document.querySelector('.e-main-content') || this.targetEle;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(sibling)) {
            sibling.style.margin = '';
            sibling.style.transform = '';
          }

          this.unWireEvents();
        }
      }]);

      return Sidebar;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Sidebar.prototype, "dockSize", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Sidebar.prototype, "mediaQuery", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "enableDock", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('en-US')], Sidebar.prototype, "locale", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "enablePersistence", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Sidebar.prototype, "enableGestures", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "isOpen", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "enableRtl", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Sidebar.prototype, "animate", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Sidebar.prototype, "height", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "closeOnDocumentClick", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], Sidebar.prototype, "position", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Sidebar.prototype, "target", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Sidebar.prototype, "showBackdrop", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')], Sidebar.prototype, "type", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Sidebar.prototype, "width", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], Sidebar.prototype, "zIndex", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sidebar.prototype, "created", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sidebar.prototype, "close", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sidebar.prototype, "open", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sidebar.prototype, "change", void 0);

    __decorate$9([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Sidebar.prototype, "destroyed", void 0);

    Sidebar = __decorate$9([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Sidebar);
    /**
     * Sidebar modules
     */

    /**
     * Navigation all modules
     */
    //# sourceMappingURL=ej2-navigations.es2015.js.map

    /***/
  },

  /***/
  "./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js":
  /*!***************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js ***!
    \***************************************************************************/

  /*! exports provided: PositionData, Popup, getScrollableParent, getZindexPartial, getMaxZindex, calculateRelativeBasedPosition, calculatePosition, fit, isCollide, flip, ButtonProps, AnimationSettings, Dialog, DialogUtility, Animation, Tooltip, Spinner, createSpinner, showSpinner, hideSpinner, setSpinner */

  /***/
  function node_modulesSyncfusionEj2PopupsDistEs6Ej2PopupsEs2015Js(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "PositionData", function () {
      return PositionData;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Popup", function () {
      return Popup;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getScrollableParent", function () {
      return _getScrollableParent;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getZindexPartial", function () {
      return getZindexPartial;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getMaxZindex", function () {
      return getMaxZindex;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "calculateRelativeBasedPosition", function () {
      return calculateRelativeBasedPosition;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "calculatePosition", function () {
      return calculatePosition;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "fit", function () {
      return fit;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "isCollide", function () {
      return isCollide;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "flip", function () {
      return flip;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ButtonProps", function () {
      return ButtonProps;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "AnimationSettings", function () {
      return AnimationSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Dialog", function () {
      return Dialog;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "DialogUtility", function () {
      return DialogUtility;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Animation", function () {
      return Animation$1;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Tooltip", function () {
      return Tooltip;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Spinner", function () {
      return Spinner;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "createSpinner", function () {
      return createSpinner;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "showSpinner", function () {
      return showSpinner;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "hideSpinner", function () {
      return hideSpinner;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "setSpinner", function () {
      return setSpinner;
    });
    /* harmony import */


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-buttons */
    "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js");
    /**
     * Position library
     */


    var elementRect;
    var popupRect;
    var element;
    var parentDocument;
    var fixedParent = false;

    function calculateRelativeBasedPosition(anchor, element) {
      var fixedElement = false;
      var anchorPos = {
        left: 0,
        top: 0
      };
      var tempAnchor = anchor;

      if (!anchor || !element) {
        return anchorPos;
      }

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.offsetParent) && element.style.position === 'fixed') {
        fixedElement = true;
      }

      while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {
        anchorPos.left += anchor.offsetLeft;
        anchorPos.top += anchor.offsetTop;
        anchor = anchor.offsetParent;
      }

      anchor = tempAnchor;

      while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {
        anchorPos.left -= anchor.scrollLeft;
        anchorPos.top -= anchor.scrollTop;
        anchor = anchor.parentElement;
      }

      return anchorPos;
    }

    function calculatePosition(currentElement, positionX, positionY, parentElement, targetValues) {
      positionY + positionX === 'topright' ? popupRect = undefined : popupRect = targetValues;
      popupRect = targetValues;
      fixedParent = parentElement ? true : false;

      if (!currentElement) {
        return {
          left: 0,
          top: 0
        };
      }

      if (!positionX) {
        positionX = 'left';
      }

      if (!positionY) {
        positionY = 'top';
      }

      parentDocument = currentElement.ownerDocument;
      element = currentElement;
      var pos = {
        left: 0,
        top: 0
      };
      return updatePosition(positionX.toLowerCase(), positionY.toLowerCase(), pos);
    }

    function setPosx(value, pos) {
      pos.left = value;
    }

    function setPosy(value, pos) {
      pos.top = value;
    }

    function updatePosition(posX, posY, pos) {
      elementRect = element.getBoundingClientRect();

      switch (posY + posX) {
        case 'topcenter':
          setPosx(getElementHCenter(), pos);
          setPosy(getElementTop(), pos);
          break;

        case 'topright':
          setPosx(getElementRight(), pos);
          setPosy(getElementTop(), pos);
          break;

        case 'centercenter':
          setPosx(getElementHCenter(), pos);
          setPosy(getElementVCenter(), pos);
          break;

        case 'centerright':
          setPosx(getElementRight(), pos);
          setPosy(getElementVCenter(), pos);
          break;

        case 'centerleft':
          setPosx(getElementLeft(), pos);
          setPosy(getElementVCenter(), pos);
          break;

        case 'bottomcenter':
          setPosx(getElementHCenter(), pos);
          setPosy(getElementBottom(), pos);
          break;

        case 'bottomright':
          setPosx(getElementRight(), pos);
          setPosy(getElementBottom(), pos);
          break;

        case 'bottomleft':
          setPosx(getElementLeft(), pos);
          setPosy(getElementBottom(), pos);
          break;

        default:
        case 'topleft':
          setPosx(getElementLeft(), pos);
          setPosy(getElementTop(), pos);
          break;
      }

      return pos;
    }

    function getBodyScrollTop() {
      return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;
    }

    function getBodyScrollLeft() {
      return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;
    }

    function getElementBottom() {
      return fixedParent ? elementRect.bottom : elementRect.bottom + getBodyScrollTop();
    }

    function getElementVCenter() {
      return getElementTop() + elementRect.height / 2;
    }

    function getElementTop() {
      return fixedParent ? elementRect.top : elementRect.top + getBodyScrollTop();
    }

    function getElementLeft() {
      return elementRect.left + getBodyScrollLeft();
    }

    function getElementRight() {
      return elementRect.right + getBodyScrollLeft() - (popupRect ? popupRect.width : 0);
    }

    function getElementHCenter() {
      return getElementLeft() + elementRect.width / 2;
    }
    /**
     * Collision module.
     */


    var parentDocument$1;
    var targetContainer;

    function fit(element) {
      var viewPortElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var axis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
        X: false,
        Y: false
      };
      var position = arguments.length > 3 ? arguments[3] : undefined;

      if (!axis.Y && !axis.X) {
        return {
          left: 0,
          top: 0
        };
      }

      var elemData = element.getBoundingClientRect();
      targetContainer = viewPortElement;
      parentDocument$1 = element.ownerDocument;

      if (!position) {
        position = calculatePosition(element, 'left', 'top');
      }

      if (axis.X) {
        var containerWidth = targetContainer ? getTargetContainerWidth() : getViewPortWidth();
        var containerLeft = ContainerLeft();
        var containerRight = ContainerRight();
        var overLeft = containerLeft - position.left;
        var overRight = position.left + elemData.width - containerRight;

        if (elemData.width > containerWidth) {
          if (overLeft > 0 && overRight <= 0) {
            position.left = containerRight - elemData.width;
          } else if (overRight > 0 && overLeft <= 0) {
            position.left = containerLeft;
          } else {
            position.left = overLeft > overRight ? containerRight - elemData.width : containerLeft;
          }
        } else if (overLeft > 0) {
          position.left += overLeft;
        } else if (overRight > 0) {
          position.left -= overRight;
        }
      }

      if (axis.Y) {
        var containerHeight = targetContainer ? getTargetContainerHeight() : getViewPortHeight();
        var containerTop = ContainerTop();
        var containerBottom = ContainerBottom();
        var overTop = containerTop - position.top;
        var overBottom = position.top + elemData.height - containerBottom;

        if (elemData.height > containerHeight) {
          if (overTop > 0 && overBottom <= 0) {
            position.top = containerBottom - elemData.height;
          } else if (overBottom > 0 && overTop <= 0) {
            position.top = containerTop;
          } else {
            position.top = overTop > overBottom ? containerBottom - elemData.height : containerTop;
          }
        } else if (overTop > 0) {
          position.top += overTop;
        } else if (overBottom > 0) {
          position.top -= overBottom;
        }
      }

      return position;
    }

    function isCollide(element) {
      var viewPortElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
      var x = arguments.length > 2 ? arguments[2] : undefined;
      var y = arguments.length > 3 ? arguments[3] : undefined;
      var elemOffset = calculatePosition(element, 'left', 'top');

      if (x) {
        elemOffset.left = x;
      }

      if (y) {
        elemOffset.top = y;
      }

      var data = [];
      targetContainer = viewPortElement;
      parentDocument$1 = element.ownerDocument;
      var elementRect = element.getBoundingClientRect();
      var top = elemOffset.top;
      var left = elemOffset.left;
      var right = elemOffset.left + elementRect.width;
      var bottom = elemOffset.top + elementRect.height;
      var yAxis = topCollideCheck(top, bottom);
      var xAxis = leftCollideCheck(left, right);

      if (yAxis.topSide) {
        data.push('top');
      }

      if (xAxis.rightSide) {
        data.push('right');
      }

      if (xAxis.leftSide) {
        data.push('left');
      }

      if (yAxis.bottomSide) {
        data.push('bottom');
      }

      return data;
    }

    function flip(element, target, offsetX, offsetY, positionX, positionY) {
      var viewPortElement = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
      var axis = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {
        X: true,
        Y: true
      };
      var fixedParent = arguments.length > 8 ? arguments[8] : undefined;

      if (!target || !element || !positionX || !positionY || !axis.X && !axis.Y) {
        return;
      }

      var tEdge = {
        TL: null,
        TR: null,
        BL: null,
        BR: null
      };
      var eEdge = {
        TL: null,
        TR: null,
        BL: null,
        BR: null
      };
      var elementRect = element.getBoundingClientRect();
      var pos = {
        posX: positionX,
        posY: positionY,
        offsetX: offsetX,
        offsetY: offsetY,
        position: {
          left: 0,
          top: 0
        }
      };
      targetContainer = viewPortElement;
      parentDocument$1 = target.ownerDocument;
      updateElementData(target, tEdge, pos, fixedParent, elementRect);
      setPosition(eEdge, pos, elementRect);

      if (axis.X) {
        leftFlip(target, eEdge, tEdge, pos, elementRect, true);
      }

      if (axis.Y && tEdge.TL.top > -1) {
        topFlip(target, eEdge, tEdge, pos, elementRect, true);
      }

      setPopup(element, pos, elementRect);
    }

    function setPopup(element, pos, elementRect) {
      var left = 0;
      var top = 0;

      if (element.offsetParent != null && (getComputedStyle(element.offsetParent).position === 'absolute' || getComputedStyle(element.offsetParent).position === 'relative')) {
        var data = calculatePosition(element.offsetParent, 'left', 'top', false, elementRect);
        left = data.left;
        top = data.top;
      }

      element.style.top = pos.position.top + pos.offsetY - top + 'px';
      element.style.left = pos.position.left + pos.offsetX - left + 'px';
    }

    function updateElementData(target, edge, pos, fixedParent, elementRect) {
      pos.position = calculatePosition(target, pos.posX, pos.posY, fixedParent, elementRect);
      edge.TL = calculatePosition(target, 'left', 'top', fixedParent, elementRect);
      edge.TR = calculatePosition(target, 'right', 'top', fixedParent, elementRect);
      edge.BR = calculatePosition(target, 'left', 'bottom', fixedParent, elementRect);
      edge.BL = calculatePosition(target, 'right', 'bottom', fixedParent, elementRect);
    }

    function setPosition(eStatus, pos, elementRect) {
      eStatus.TL = {
        top: pos.position.top + pos.offsetY,
        left: pos.position.left + pos.offsetX
      };
      eStatus.TR = {
        top: eStatus.TL.top,
        left: eStatus.TL.left + elementRect.width
      };
      eStatus.BL = {
        top: eStatus.TL.top + elementRect.height,
        left: eStatus.TL.left
      };
      eStatus.BR = {
        top: eStatus.TL.top + elementRect.height,
        left: eStatus.TL.left + elementRect.width
      };
    }

    function leftCollideCheck(left, right) {
      var leftSide = false;
      var rightSide = false;

      if (left - getBodyScrollLeft$1() < ContainerLeft()) {
        leftSide = true;
      }

      if (right > ContainerRight()) {
        rightSide = true;
      }

      return {
        leftSide: leftSide,
        rightSide: rightSide
      };
    }

    function leftFlip(target, edge, tEdge, pos, elementRect, deepCheck) {
      var collideSide = leftCollideCheck(edge.TL.left, edge.TR.left);

      if (tEdge.TL.left - getBodyScrollLeft$1() <= ContainerLeft()) {
        collideSide.leftSide = false;
      }

      if (tEdge.TR.left >= ContainerRight()) {
        collideSide.rightSide = false;
      }

      if (collideSide.leftSide && !collideSide.rightSide || !collideSide.leftSide && collideSide.rightSide) {
        if (pos.posX === 'right') {
          pos.posX = 'left';
        } else {
          pos.posX = 'right';
        }

        pos.offsetX = pos.offsetX + elementRect.width;
        pos.offsetX = -1 * pos.offsetX;
        pos.position = calculatePosition(target, pos.posX, pos.posY, false);
        setPosition(edge, pos, elementRect);

        if (deepCheck) {
          leftFlip(target, edge, tEdge, pos, elementRect, false);
        }
      }
    }

    function topFlip(target, edge, tEdge, pos, elementRect, deepCheck) {
      var collideSide = topCollideCheck(edge.TL.top, edge.BL.top);

      if (tEdge.TL.top - getBodyScrollTop$1() <= ContainerTop()) {
        collideSide.topSide = false;
      }

      if (tEdge.BL.top >= ContainerBottom()) {
        collideSide.bottomSide = false;
      }

      if (collideSide.topSide && !collideSide.bottomSide || !collideSide.topSide && collideSide.bottomSide) {
        if (pos.posY === 'top') {
          pos.posY = 'bottom';
        } else {
          pos.posY = 'top';
        }

        pos.offsetY = pos.offsetY + elementRect.height;
        pos.offsetY = -1 * pos.offsetY;
        pos.position = calculatePosition(target, pos.posX, pos.posY, false, elementRect);
        setPosition(edge, pos, elementRect);

        if (deepCheck) {
          topFlip(target, edge, tEdge, pos, elementRect, false);
        }
      }
    }

    function topCollideCheck(top, bottom) {
      var topSide = false;
      var bottomSide = false;

      if (top - getBodyScrollTop$1() < ContainerTop()) {
        topSide = true;
      }

      if (bottom > ContainerBottom()) {
        bottomSide = true;
      }

      return {
        topSide: topSide,
        bottomSide: bottomSide
      };
    }

    function getTargetContainerWidth() {
      return targetContainer.getBoundingClientRect().width;
    }

    function getTargetContainerHeight() {
      return targetContainer.getBoundingClientRect().height;
    }

    function getTargetContainerLeft() {
      return targetContainer.getBoundingClientRect().left;
    }

    function getTargetContainerTop() {
      return targetContainer.getBoundingClientRect().top;
    }

    function ContainerTop() {
      if (targetContainer) {
        return getTargetContainerTop();
      }

      return 0;
    }

    function ContainerLeft() {
      if (targetContainer) {
        return getTargetContainerLeft();
      }

      return 0;
    }

    function ContainerRight() {
      if (targetContainer) {
        return getBodyScrollLeft$1() + getTargetContainerLeft() + getTargetContainerWidth();
      }

      return getBodyScrollLeft$1() + getViewPortWidth();
    }

    function ContainerBottom() {
      if (targetContainer) {
        return getBodyScrollTop$1() + getTargetContainerTop() + getTargetContainerHeight();
      }

      return getBodyScrollTop$1() + getViewPortHeight();
    }

    function getBodyScrollTop$1() {
      // if(targetContainer)
      //     return targetContainer.scrollTop;
      return parentDocument$1.documentElement.scrollTop || parentDocument$1.body.scrollTop;
    }

    function getBodyScrollLeft$1() {
      // if(targetContainer)
      //     return targetContainer.scrollLeft;
      return parentDocument$1.documentElement.scrollLeft || parentDocument$1.body.scrollLeft;
    }

    function getViewPortHeight() {
      return window.innerHeight;
    }

    function getViewPortWidth() {
      var windowWidth = window.innerWidth;
      var offsetWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.documentElement) ? 0 : document.documentElement.offsetWidth;
      return windowWidth - (windowWidth - offsetWidth);
    }

    var __decorate = undefined && undefined.__decorate || function (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;
    };
    /**
     * Specifies the offset position values.
     */


    var PositionData = /*#__PURE__*/function (_syncfusion_ej2_base_52) {
      _inherits(PositionData, _syncfusion_ej2_base_52);

      var _super237 = _createSuper(PositionData);

      function PositionData() {
        _classCallCheck(this, PositionData);

        return _super237.apply(this, arguments);
      }

      return PositionData;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('left')], PositionData.prototype, "X", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('top')], PositionData.prototype, "Y", void 0); // don't use space in classNames


    var CLASSNAMES = {
      ROOT: 'e-popup',
      RTL: 'e-rtl',
      OPEN: 'e-popup-open',
      CLOSE: 'e-popup-close'
    };
    /**
     * Represents the Popup Component
     * ```html
     * <div id="popup" style="position:absolute;height:100px;width:100px;">
     * <div style="margin:35px 25px;">Popup Content</div></div>
     * ```
     * ```typescript
     * <script>
     *   var popupObj = new Popup();
     *   popupObj.appendTo("#popup");
     * </script>
     * ```
     */

    var Popup = /*#__PURE__*/function (_syncfusion_ej2_base_53) {
      _inherits(Popup, _syncfusion_ej2_base_53);

      var _super238 = _createSuper(Popup);

      function Popup(element, options) {
        _classCallCheck(this, Popup);

        return _super238.call(this, options, element);
      }
      /**
       * Called internally if any of the property value changed.
       * @private
       */


      _createClass2(Popup, [{
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          for (var _i156 = 0, _Object$keys61 = Object.keys(newProp); _i156 < _Object$keys61.length; _i156++) {
            var prop = _Object$keys61[_i156];

            switch (prop) {
              case 'width':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width)
                });
                break;

              case 'height':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height)
                });
                break;

              case 'zIndex':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'zIndex': newProp.zIndex
                });
                break;

              case 'enableRtl':
                this.setEnableRtl();
                break;

              case 'position':
              case 'relateTo':
                this.refreshPosition();
                break;

              case 'offsetX':
                var x = newProp.offsetX - oldProp.offsetX;
                this.element.style.left = (parseInt(this.element.style.left, 10) + x).toString() + 'px';
                break;

              case 'offsetY':
                var y = newProp.offsetY - oldProp.offsetY;
                this.element.style.top = (parseInt(this.element.style.top, 10) + y).toString() + 'px';
                break;

              case 'content':
                this.setContent();
                break;

              case 'actionOnScroll':
                if (newProp.actionOnScroll !== 'none') {
                  this.wireScrollEvents();
                } else {
                  this.unwireScrollEvents();
                }

                break;
            }
          }
        }
        /**
         * gets the Component module name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'popup';
        }
        /**
         * To resolve if any collision occurs.
         */

      }, {
        key: "resolveCollision",
        value: function resolveCollision() {
          this.checkCollision();
        }
        /**
         * gets the persisted state properties of the Component.
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * To destroy the control.
         */

      }, {
        key: "destroy",
        value: function destroy() {
          this.element.classList.remove(CLASSNAMES.ROOT, CLASSNAMES.RTL, CLASSNAMES.OPEN, CLASSNAMES.CLOSE);
          this.unwireEvents();

          _get(_getPrototypeOf(Popup.prototype), "destroy", this).call(this);
        }
        /**
         * To Initialize the control rendering
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.element.classList.add(CLASSNAMES.ROOT);
          var styles = {};

          if (this.zIndex !== 1000) {
            styles.zIndex = this.zIndex;
          }

          if (this.width !== 'auto') {
            styles.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
          }

          if (this.height !== 'auto') {
            styles.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, styles);
          this.fixedParent = false;
          this.setEnableRtl();
          this.setContent();
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(window, 'orientationchange', this.orientationOnChange, this);
          }

          if (this.actionOnScroll !== 'none') {
            this.wireScrollEvents();
          }
        }
      }, {
        key: "wireScrollEvents",
        value: function wireScrollEvents() {
          if (this.getRelateToElement()) {
            var _iterator148 = _createForOfIteratorHelper(this.getScrollableParent(this.getRelateToElement())),
                _step148;

            try {
              for (_iterator148.s(); !(_step148 = _iterator148.n()).done;) {
                var parent = _step148.value;

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(parent, 'scroll', this.scrollRefresh, this);
              }
            } catch (err) {
              _iterator148.e(err);
            } finally {
              _iterator148.f();
            }
          }
        }
      }, {
        key: "unwireEvents",
        value: function unwireEvents() {
          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(window, 'orientationchange', this.orientationOnChange);
          }

          if (this.actionOnScroll !== 'none') {
            this.unwireScrollEvents();
          }
        }
      }, {
        key: "unwireScrollEvents",
        value: function unwireScrollEvents() {
          if (this.getRelateToElement()) {
            var _iterator149 = _createForOfIteratorHelper(this.getScrollableParent(this.getRelateToElement())),
                _step149;

            try {
              for (_iterator149.s(); !(_step149 = _iterator149.n()).done;) {
                var parent = _step149.value;

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(parent, 'scroll', this.scrollRefresh);
              }
            } catch (err) {
              _iterator149.e(err);
            } finally {
              _iterator149.f();
            }
          }
        }
      }, {
        key: "getRelateToElement",
        value: function getRelateToElement() {
          var relateToElement = this.relateTo === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.relateTo) ? document.body : this.relateTo;
          this.setProperties({
            relateTo: relateToElement
          }, true);
          return typeof this.relateTo === 'string' ? document.querySelector(this.relateTo) : this.relateTo;
        }
      }, {
        key: "scrollRefresh",
        value: function scrollRefresh(e) {
          if (this.actionOnScroll === 'reposition') {
            if (!(this.element.offsetParent === e.target || this.element.offsetParent && this.element.offsetParent.tagName === 'BODY' && e.target.parentElement == null)) {
              this.refreshPosition();
            }
          } else if (this.actionOnScroll === 'hide') {
            this.hide();
          }

          if (this.actionOnScroll !== 'none') {
            if (this.getRelateToElement()) {
              var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);

              if (!targetVisible && !this.targetInvisibleStatus) {
                this.trigger('targetExitViewport');
                this.targetInvisibleStatus = true;
              } else if (targetVisible) {
                this.targetInvisibleStatus = false;
              }
            }
          }
        }
        /**
         * This method is to get the element visibility on viewport when scroll
         * the page. This method will returns true even though 1 px of element
         * part is in visible.
         */

      }, {
        key: "isElementOnViewport",
        value: function isElementOnViewport(relateToElement, scrollElement) {
          var scrollParents = this.getScrollableParent(relateToElement);

          for (var parent = 0; parent < scrollParents.length; parent++) {
            if (this.isElementVisible(relateToElement, scrollParents[parent])) {
              continue;
            } else {
              return false;
            }
          }

          return true;
        }
      }, {
        key: "isElementVisible",
        value: function isElementVisible(relateToElement, scrollElement) {
          var rect = this.checkGetBoundingClientRect(relateToElement);

          if (!rect.height || !rect.width) {
            return false;
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.checkGetBoundingClientRect(scrollElement))) {
            var parent = scrollElement.getBoundingClientRect();
            return !(rect.bottom < parent.top) && !(rect.bottom > parent.bottom) && !(rect.right > parent.right) && !(rect.left < parent.left);
          } else {
            var win = window;
            var windowView = {
              top: win.scrollY,
              left: win.scrollX,
              right: win.scrollX + win.outerWidth,
              bottom: win.scrollY + win.outerHeight
            };
            var off = calculatePosition(relateToElement);
            var ele = {
              top: off.top,
              left: off.left,
              right: off.left + rect.width,
              bottom: off.top + rect.height
            };
            var elementView = {
              top: windowView.bottom - ele.top,
              left: windowView.right - ele.left,
              bottom: ele.bottom - windowView.top,
              right: ele.right - windowView.left
            };
            return elementView.top > 0 && elementView.left > 0 && elementView.right > 0 && elementView.bottom > 0;
          }
        }
        /**
         * Initialize the event handler
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {//There is no event handler
        }
      }, {
        key: "setEnableRtl",
        value: function setEnableRtl() {
          this.reposition();
          this.enableRtl ? this.element.classList.add(CLASSNAMES.RTL) : this.element.classList.remove(CLASSNAMES.RTL);
        }
      }, {
        key: "setContent",
        value: function setContent() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content)) {
            this.element.innerHTML = '';

            if (typeof this.content === 'string') {
              this.element.textContent = this.content;
            } else {
              this.element.appendChild(this.content);
            }
          }
        }
      }, {
        key: "orientationOnChange",
        value: function orientationOnChange() {
          var _this649 = this;

          setTimeout(function () {
            _this649.refreshPosition();
          }, 200);
        }
        /**
         * Based on the `relative` element and `offset` values, `Popup` element position will refreshed.
         */

      }, {
        key: "refreshPosition",
        value: function refreshPosition(target, collision) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target)) {
            this.checkFixedParent(target);
          }

          this.reposition();

          if (!collision) {
            this.checkCollision();
          }
        }
      }, {
        key: "reposition",
        value: function reposition() {
          var pos;
          var position;
          var relateToElement = this.getRelateToElement();

          if (typeof this.position.X === 'number' && typeof this.position.Y === 'number') {
            pos = {
              left: this.position.X,
              top: this.position.Y
            };
          } else if (typeof this.position.X === 'string' && typeof this.position.Y === 'number' || typeof this.position.X === 'number' && typeof this.position.Y === 'string') {
            var display = this.element.style.display;
            var parentDisplay;
            this.element.style.display = 'block';

            if (this.element.classList.contains('e-dlg-modal')) {
              parentDisplay = this.element.parentElement.style.display;
              this.element.parentElement.style.display = 'block';
            }

            position = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY);

            if (typeof this.position.X === 'string') {
              pos = {
                left: position.left,
                top: this.position.Y
              };
            } else {
              pos = {
                left: this.position.X,
                top: position.top
              };
            }

            this.element.style.display = display;

            if (this.element.classList.contains('e-dlg-modal')) {
              this.element.parentElement.style.display = parentDisplay;
            }
          } else if (relateToElement) {
            var _display = this.element.style.display;
            this.element.style.display = 'block';
            pos = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY);
            this.element.style.display = _display;
          } else {
            pos = {
              left: 0,
              top: 0
            };
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(pos)) {
            this.element.style.left = pos.left + 'px';
            this.element.style.top = pos.top + 'px';
          }
        }
      }, {
        key: "checkGetBoundingClientRect",
        value: function checkGetBoundingClientRect(ele) {
          var eleRect;

          try {
            eleRect = ele.getBoundingClientRect();
            return eleRect;
          } catch (error) {
            return null;
          }
        }
      }, {
        key: "getAnchorPosition",
        value: function getAnchorPosition(anchorEle, ele, position, offsetX, offsetY) {
          var eleRect = this.checkGetBoundingClientRect(ele);
          var anchorRect = this.checkGetBoundingClientRect(anchorEle);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(eleRect) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(anchorRect)) {
            return null;
          }

          var anchor = anchorEle;
          var anchorPos = {
            left: 0,
            top: 0
          };

          if (ele.offsetParent && ele.offsetParent.tagName === 'BODY' && anchorEle.tagName === 'BODY') {
            anchorPos = calculatePosition(anchorEle);
          } else {
            if (ele.classList.contains('e-dlg-modal') && anchor.tagName !== 'BODY') {
              ele = ele.parentElement;
            }

            anchorPos = calculateRelativeBasedPosition(anchor, ele);
          }

          switch (position.X) {
            default:
            case 'left':
              break;

            case 'center':
              if (ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container') {
                anchorPos.left += window.innerWidth / 2 - eleRect.width / 2;
              } else if (this.targetType === 'container') {
                anchorPos.left += anchorRect.width / 2 - eleRect.width / 2;
              } else {
                anchorPos.left += anchorRect.width / 2;
              }

              break;

            case 'right':
              if (ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container') {
                anchorPos.left += window.innerWidth - eleRect.width;
              } else if (this.targetType === 'container') {
                anchorPos.left += anchorRect.width - eleRect.width;
              } else {
                anchorPos.left += anchorRect.width;
              }

              break;
          }

          switch (position.Y) {
            default:
            case 'top':
              break;

            case 'center':
              if (ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container') {
                anchorPos.top += window.innerHeight / 2 - eleRect.height / 2;
              } else if (this.targetType === 'container') {
                anchorPos.top += anchorRect.height / 2 - eleRect.height / 2;
              } else {
                anchorPos.top += anchorRect.height / 2;
              }

              break;

            case 'bottom':
              if (ele.classList.contains('e-dlg-modal') && anchor.tagName === 'BODY' && this.targetType === 'container') {
                anchorPos.top += window.innerHeight - eleRect.height;
              } else if (this.targetType === 'container') {
                anchorPos.top += anchorRect.height - eleRect.height;
              } else {
                anchorPos.top += anchorRect.height;
              }

              break;
          }

          anchorPos.left += offsetX;
          anchorPos.top += offsetY;
          return anchorPos;
        }
      }, {
        key: "callFlip",
        value: function callFlip(param) {
          var relateToElement = this.getRelateToElement();
          flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
        }
      }, {
        key: "callFit",
        value: function callFit(param) {
          if (isCollide(this.element, this.viewPortElement).length !== 0) {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.viewPortElement)) {
              var data = fit(this.element, this.viewPortElement, param);

              if (param.X) {
                this.element.style.left = data.left + 'px';
              }

              if (param.Y) {
                this.element.style.top = data.top + 'px';
              }
            } else {
              var _elementRect = this.checkGetBoundingClientRect(this.element);

              var viewPortRect = this.checkGetBoundingClientRect(this.viewPortElement);

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_elementRect) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(viewPortRect)) {
                return null;
              }

              if (param && param.Y === true) {
                if (viewPortRect.top > _elementRect.top) {
                  this.element.style.top = '0px';
                } else if (viewPortRect.bottom < _elementRect.bottom) {
                  this.element.style.top = parseInt(this.element.style.top, 10) - (_elementRect.bottom - viewPortRect.bottom) + 'px';
                }
              }

              if (param && param.X === true) {
                if (viewPortRect.right < _elementRect.right) {
                  this.element.style.left = parseInt(this.element.style.left, 10) - (_elementRect.right - viewPortRect.right) + 'px';
                } else if (viewPortRect.left > _elementRect.left) {
                  this.element.style.left = parseInt(this.element.style.left, 10) + (viewPortRect.left - _elementRect.left) + 'px';
                }
              }
            }
          }
        }
      }, {
        key: "checkCollision",
        value: function checkCollision() {
          var horz = this.collision.X;
          var vert = this.collision.Y;

          if (horz === 'none' && vert === 'none') {
            return;
          }

          if (horz === 'flip' && vert === 'flip') {
            this.callFlip({
              X: true,
              Y: true
            });
          } else if (horz === 'fit' && vert === 'fit') {
            this.callFit({
              X: true,
              Y: true
            });
          } else {
            if (horz === 'flip') {
              this.callFlip({
                X: true,
                Y: false
              });
            } else if (vert === 'flip') {
              this.callFlip({
                Y: true,
                X: false
              });
            }

            if (horz === 'fit') {
              this.callFit({
                X: true,
                Y: false
              });
            } else if (vert === 'fit') {
              this.callFit({
                X: false,
                Y: true
              });
            }
          }
        }
        /**
         * Shows the popup element from screen.
         * @param { AnimationModel | Function } collisionOrAnimationOptions? - To pass animation options or collision function.
         * @param { Function } collision? - To pass the collision function.
         * @param { HTMLElement } relativeElement? - To calculate the zIndex value dynamically.
         */

      }, {
        key: "show",
        value: function show(animationOptions, relativeElement) {
          var _this650 = this;

          this.wireEvents();

          if (this.zIndex === 1000 || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(relativeElement)) {
            var zIndexElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(relativeElement) ? this.element : relativeElement;
            this.zIndex = getZindexPartial(zIndexElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
              'zIndex': this.zIndex
            });
          }

          animationOptions = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animationOptions) && typeof animationOptions === 'object' ? animationOptions : this.showAnimation;

          if (this.collision.X !== 'none' || this.collision.Y !== 'none') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], CLASSNAMES.CLOSE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], CLASSNAMES.OPEN);
            this.checkCollision();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], CLASSNAMES.OPEN);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], CLASSNAMES.CLOSE);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animationOptions)) {
            animationOptions.begin = function () {
              if (!_this650.isDestroyed) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this650.element], CLASSNAMES.CLOSE);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this650.element], CLASSNAMES.OPEN);
              }
            };

            animationOptions.end = function () {
              if (!_this650.isDestroyed) {
                _this650.trigger('open');
              }
            };

            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animationOptions).animate(this.element);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], CLASSNAMES.CLOSE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], CLASSNAMES.OPEN);
            this.trigger('open');
          }
        }
        /**
         * Hides the popup element from screen.
         * @param { AnimationModel } animationOptions? - To give the animation options.
         */

      }, {
        key: "hide",
        value: function hide(animationOptions) {
          var _this651 = this;

          animationOptions = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animationOptions) && typeof animationOptions === 'object' ? animationOptions : this.hideAnimation;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animationOptions)) {
            animationOptions.end = function () {
              if (!_this651.isDestroyed) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this651.element], CLASSNAMES.OPEN);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this651.element], CLASSNAMES.CLOSE);

                _this651.trigger('close');
              }
            };

            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"](animationOptions).animate(this.element);
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], CLASSNAMES.OPEN);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], CLASSNAMES.CLOSE);
            this.trigger('close');
          }

          this.unwireEvents();
        }
        /**
         * Gets scrollable parent elements for the given element.
         * @param { HTMLElement } element - Specify the element to get the scrollable parents of it.
         */

      }, {
        key: "getScrollableParent",
        value: function getScrollableParent(element) {
          this.checkFixedParent(element);
          return _getScrollableParent(element, this.fixedParent);
        }
      }, {
        key: "checkFixedParent",
        value: function checkFixedParent(element) {
          var parent = element.parentElement;

          while (parent && parent.tagName !== 'HTML') {
            var parentStyle = getComputedStyle(parent);

            if (parentStyle.position === 'fixed' && this.element.offsetParent && this.element.offsetParent.tagName === 'BODY') {
              this.element.style.position = 'fixed';
              this.fixedParent = true;
            }

            parent = parent.parentElement;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.offsetParent) && parentStyle.position === 'fixed' && this.element.style.position === 'fixed') {
              this.fixedParent = true;
            }
          }
        }
      }]);

      return Popup;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Popup.prototype, "height", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Popup.prototype, "width", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Popup.prototype, "content", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('container')], Popup.prototype, "targetType", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Popup.prototype, "viewPortElement", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({
      X: 'none',
      Y: 'none'
    })], Popup.prototype, "collision", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Popup.prototype, "relateTo", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, PositionData)], Popup.prototype, "position", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Popup.prototype, "offsetX", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Popup.prototype, "offsetY", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], Popup.prototype, "zIndex", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Popup.prototype, "enableRtl", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('reposition')], Popup.prototype, "actionOnScroll", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Popup.prototype, "showAnimation", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Popup.prototype, "hideAnimation", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Popup.prototype, "open", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Popup.prototype, "close", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Popup.prototype, "targetExitViewport", void 0);

    Popup = __decorate([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Popup);
    /**
     * Gets scrollable parent elements for the given element.
     * @param { HTMLElement } element - Specify the element to get the scrollable parents of it.
     * @private
     */

    function _getScrollableParent(element, fixedParent) {
      var eleStyle = getComputedStyle(element);
      var scrollParents = [];
      var overflowRegex = /(auto|scroll)/;
      var parent = element.parentElement;

      while (parent && parent.tagName !== 'HTML') {
        var parentStyle = getComputedStyle(parent);

        if (!(eleStyle.position === 'absolute' && parentStyle.position === 'static') && overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX)) {
          scrollParents.push(parent);
        }

        parent = parent.parentElement;
      }

      if (!fixedParent) {
        scrollParents.push(document);
      }

      return scrollParents;
    }
    /**
     * Gets the maximum z-index of the given element.
     * @param { HTMLElement } element - Specify the element to get the maximum z-index of it.
     * @private
     */


    function getZindexPartial(element) {
      // upto body traversal
      var parent = element.parentElement;
      var parentZindex = [];

      while (parent) {
        if (parent.tagName !== 'BODY') {
          var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue('z-index');
          var position = document.defaultView.getComputedStyle(parent, null).getPropertyValue('position');

          if (index !== 'auto' && position !== 'static') {
            parentZindex.push(index);
          }

          parent = parent.parentElement;
        } else {
          break;
        }
      } //Body direct children element traversal


      var childrenZindex = [];

      for (var i = 0; i < document.body.children.length; i++) {
        if (!element.isEqualNode(document.body.children[i])) {
          var _index9 = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('z-index');

          var _position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('position');

          if (_index9 !== 'auto' && _position !== 'static') {
            childrenZindex.push(_index9);
          }
        }
      }

      childrenZindex.push('999');
      var siblingsZindex = [];

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element.parentElement) && element.parentElement.tagName !== 'BODY') {
        var childNodes = [].slice.call(element.parentElement.children);

        for (var _i157 = 0; _i157 < childNodes.length; _i157++) {
          var _index10 = document.defaultView.getComputedStyle(childNodes[_i157], null).getPropertyValue('z-index');

          var _position2 = document.defaultView.getComputedStyle(childNodes[_i157], null).getPropertyValue('position');

          if (_index10 !== 'auto' && _position2 !== 'static') {
            siblingsZindex.push(_index10);
          }
        }
      }

      var finalValue = parentZindex.concat(childrenZindex, siblingsZindex);
      var currentZindexValue = Math.max.apply(Math, finalValue) + 1; // Checking the max-zindex value

      return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;
    }
    /**
     * Gets the maximum z-index of the page.
     * @param { HTMLElement } tagName - Specify the tagName to get the maximum z-index of it.
     * @private
     */


    function getMaxZindex() {
      var tagName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['*'];
      var maxZindex = [];

      for (var i = 0; i < tagName.length; i++) {
        var elements = document.getElementsByTagName(tagName[i]);

        for (var _i158 = 0; _i158 < elements.length; _i158++) {
          var index = document.defaultView.getComputedStyle(elements[_i158], null).getPropertyValue('z-index');
          var position = document.defaultView.getComputedStyle(elements[_i158], null).getPropertyValue('position');

          if (index !== 'auto' && position !== 'static') {
            maxZindex.push(index);
          }
        }
      }

      var currentZindexValue = Math.max.apply(Math, maxZindex) + 1;
      return currentZindexValue > 2147483647 ? 2147483647 : currentZindexValue;
    }
    /**
     * Popup Components
     */

    /**
     * Popup Components
     */

    /**
     * Resize library
     */


    var elementClass = ['north-west', 'north', 'north-east', 'west', 'east', 'south-west', 'south', 'south-east'];
    var targetElement;
    var selectedHandler;
    var originalWidth = 0;
    var originalHeight = 0;
    var originalX = 0;
    var originalY = 0;
    var originalMouseX = 0;
    var originalMouseY = 0;
    var RESIZE_HANDLER = 'e-resize-handle';
    var FOCUSED_HANDLER = 'e-focused-handle';
    var RESTRICT_LEFT = ['e-restrict-left'];
    var RESIZE_WITHIN_VIEWPORT = 'e-resize-viewport';
    var minHeight;
    var maxHeight;
    var minWidth;
    var maxWidth;
    var containerElement;
    var resizeStart = null;
    var resize = null;
    var resizeEnd = null;
    var resizeWestWidth;
    var setLeft = true;
    var previousWidth = 0;
    var setWidth = true; // tslint:disable-next-line

    var proxy;

    function createResize(args) {
      resizeStart = args.resizeBegin;
      resize = args.resizing;
      resizeEnd = args.resizeComplete;
      targetElement = getDOMElement(args.element);
      containerElement = getDOMElement(args.boundary);
      var directions = args.direction.split(' ');

      for (var i = 0; i < directions.length; i++) {
        var resizeHandler = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
          className: 'e-icons ' + RESIZE_HANDLER + ' ' + 'e-' + directions[i]
        });
        targetElement.appendChild(resizeHandler);
      }

      minHeight = args.minHeight;
      minWidth = args.minWidth;
      maxWidth = args.maxWidth;
      maxHeight = args.maxHeight;

      if (args.proxy && args.proxy.element && args.proxy.element.classList.contains('e-dialog')) {
        wireEvents(args.proxy);
      } else {
        wireEvents();
      }
    }

    function getDOMElement(element) {
      var domElement;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
        if (typeof element === 'string') {
          domElement = document.querySelector(element);
        } else {
          domElement = element;
        }
      }

      return domElement;
    } // tslint:disable-next-line


    function wireEvents(args) {
      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args)) {
        args = this;
      }

      var resizers = targetElement.querySelectorAll('.' + RESIZE_HANDLER);

      for (var i = 0; i < resizers.length; i++) {
        selectedHandler = resizers[i];

        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(selectedHandler, 'mousedown', onMouseDown, args);

        var eventName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointerdown' : 'touchstart';

        _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(selectedHandler, eventName, onTouchStart, args);
      }
    }
    /* istanbul ignore next */


    function getEventType(e) {
      return e.indexOf('mouse') > -1 ? 'mouse' : 'touch';
    }
    /* istanbul ignore next */


    function onMouseDown(e) {
      e.preventDefault();
      targetElement = e.target.parentElement;
      calculateValues();
      originalMouseX = e.pageX;
      originalMouseY = e.pageY;
      e.target.classList.add(FOCUSED_HANDLER);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeStart)) {
        proxy = this;

        if (resizeStart(e, proxy) === true) {
          return;
        }
      }

      var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? document : containerElement;

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'mousemove', onMouseMove, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mouseup', onMouseUp, this);

      for (var i = 0; i < RESTRICT_LEFT.length; i++) {
        if (targetElement.classList.contains(RESTRICT_LEFT[i])) {
          setLeft = false;
        } else {
          setLeft = true;
        }
      }
    }
    /* istanbul ignore next */


    function onMouseUp(e) {
      var touchMoveEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointermove' : 'touchmove';
      var touchEndEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointerup' : 'touchend';
      var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? document : containerElement;

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mousemove', onMouseMove);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, touchMoveEvent, onMouseMove);

      var eventName = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointerdown' : 'touchstart';

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, eventName, onMouseMove);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.body.querySelector('.' + FOCUSED_HANDLER))) {
        document.body.querySelector('.' + FOCUSED_HANDLER).classList.remove(FOCUSED_HANDLER);
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeEnd)) {
        proxy = this;
        resizeEnd(e, proxy);
      }

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mouseup', onMouseUp);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, touchEndEvent, onMouseUp);
    }
    /* istanbul ignore next */


    function calculateValues() {
      originalWidth = parseFloat(getComputedStyle(targetElement, null).getPropertyValue('width').replace('px', ''));
      originalHeight = parseFloat(getComputedStyle(targetElement, null).getPropertyValue('height').replace('px', ''));
      originalX = targetElement.getBoundingClientRect().left;
      originalY = targetElement.getBoundingClientRect().top;
    }
    /* istanbul ignore next */


    function onTouchStart(e) {
      targetElement = e.target.parentElement;
      calculateValues();
      var coordinates = e.touches ? e.changedTouches[0] : e;
      originalMouseX = coordinates.pageX;
      originalMouseY = coordinates.pageY;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeStart)) {
        proxy = this;

        if (resizeStart(e, proxy) === true) {
          return;
        }
      }

      var touchMoveEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointermove' : 'touchmove';
      var touchEndEvent = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].info.name === 'msie' ? 'pointerup' : 'touchend';
      var target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? document : containerElement;

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, touchMoveEvent, onMouseMove, this);

      _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, touchEndEvent, onMouseUp);
    }
    /* istanbul ignore next */


    function onMouseMove(e) {
      if (e.target.classList.contains(RESIZE_HANDLER) && e.target.classList.contains(FOCUSED_HANDLER)) {
        selectedHandler = e.target;
      } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(document.body.querySelector('.' + FOCUSED_HANDLER))) {
        selectedHandler = document.body.querySelector('.' + FOCUSED_HANDLER);
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(selectedHandler)) {
        var resizeTowards = '';

        for (var i = 0; i < elementClass.length; i++) {
          if (selectedHandler.classList.contains('e-' + elementClass[i])) {
            resizeTowards = elementClass[i];
          }
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resize)) {
          proxy = this;
          resize(e, proxy);
        }

        switch (resizeTowards) {
          case 'south':
            resizeSouth(e);
            break;

          case 'north':
            resizeNorth(e);
            break;

          case 'west':
            resizeWest(e);
            break;

          case 'east':
            resizeEast(e);
            break;

          case 'south-east':
            resizeSouth(e);
            resizeEast(e);
            break;

          case 'south-west':
            resizeSouth(e);
            resizeWest(e);
            break;

          case 'north-east':
            resizeNorth(e);
            resizeEast(e);
            break;

          case 'north-west':
            resizeNorth(e);
            resizeWest(e);
            break;

          default:
            break;
        }
      }
    }
    /* istanbul ignore next */


    function getClientRectValues(element) {
      return element.getBoundingClientRect();
    }
    /* istanbul ignore next */
    // tslint:disable-next-line


    function resizeSouth(e) {
      var documentHeight = document.documentElement.clientHeight;
      var calculateValue = false;
      var containerRectValues;
      var coordinates = e.touches ? e.changedTouches[0] : e;
      var currentpageY = coordinates.pageY;
      var targetRectValues = getClientRectValues(targetElement);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        containerRectValues = getClientRectValues(containerElement);
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        calculateValue = true;
      } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && (documentHeight - currentpageY >= 0 || targetRectValues.top < 0)) {
        calculateValue = true;
      }

      var calculatedHeight = originalHeight + (currentpageY - originalMouseY);
      calculatedHeight = calculatedHeight > minHeight ? calculatedHeight : minHeight;
      var containerTop = 0;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        containerTop = containerRectValues.top;
      }

      var borderValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? 0 : containerElement.offsetHeight - containerElement.clientHeight;
      var topWithoutborder = targetRectValues.top - containerTop - borderValue / 2;
      topWithoutborder = topWithoutborder < 0 ? 0 : topWithoutborder;

      if (targetRectValues.top > 0 && topWithoutborder + calculatedHeight > maxHeight) {
        calculateValue = false;

        if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {
          return;
        }

        targetElement.style.height = maxHeight - parseInt(topWithoutborder.toString(), 10) + 'px';
        return;
      }

      var targetTop = 0;

      if (calculateValue) {
        if (targetRectValues.top < 0 && documentHeight + (targetRectValues.height + targetRectValues.top) > 0) {
          targetTop = targetRectValues.top;

          if (calculatedHeight + targetTop <= 30) {
            calculatedHeight = targetRectValues.height - (targetRectValues.height + targetRectValues.top) + 30;
          }
        }

        if (calculatedHeight + targetRectValues.top >= maxHeight) {
          targetElement.style.height = targetRectValues.height + (documentHeight - (targetRectValues.height + targetRectValues.top)) + 'px';
        }

        var calculatedTop = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? targetTop : topWithoutborder;

        if (calculatedHeight >= minHeight && calculatedHeight + calculatedTop <= maxHeight) {
          targetElement.style.height = calculatedHeight + 'px';
        }
      }
    }
    /* istanbul ignore next */
    // tslint:disable-next-line


    function resizeNorth(e) {
      var calculateValue = false;
      var boundaryRectValues;
      var pageY = getEventType(e.type) === 'mouse' ? e.pageY : e.touches[0].pageY;
      var targetRectValues = getClientRectValues(targetElement);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        boundaryRectValues = getClientRectValues(containerElement);
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && targetRectValues.top - boundaryRectValues.top > 0) {
        calculateValue = true;
      } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && pageY > 0) {
        calculateValue = true;
      }

      var currentHeight = originalHeight - (pageY - originalMouseY);

      if (getClientRectValues(targetElement).bottom + currentHeight > maxHeight) {
        calculateValue = false;
        targetElement.style.height = maxHeight - getClientRectValues(targetElement).bottom + 'px';
      }

      if (calculateValue) {
        if (currentHeight >= minHeight && currentHeight <= maxHeight) {
          var containerTop = 0;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
            containerTop = boundaryRectValues.top;
          }

          var top = originalY - containerTop + (pageY - originalMouseY);
          top = top > 0 ? top : 1;
          targetElement.style.height = currentHeight + 'px';
          targetElement.style.top = top + 'px';
        }
      }
    }
    /* istanbul ignore next */
    // tslint:disable-next-line


    function resizeWest(e) {
      var documentWidth = document.documentElement.clientWidth;
      var calculateValue = false;
      var rectValues;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        rectValues = getClientRectValues(containerElement);
      }

      var pageX = getEventType(e.type) === 'mouse' ? e.pageX : e.touches[0].pageX;
      var targetRectValues = getClientRectValues(targetElement);
      var borderValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? 0 : containerElement.offsetWidth - containerElement.clientWidth;
      var left = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? 0 : rectValues.left;
      var containerWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) ? 0 : rectValues.width;

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeWestWidth)) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
          resizeWestWidth = targetRectValues.left - left - borderValue / 2 + targetRectValues.width;
          resizeWestWidth = resizeWestWidth + (containerWidth - borderValue - resizeWestWidth);
        } else {
          resizeWestWidth = documentWidth;
        }
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && targetRectValues.left - rectValues.left + targetRectValues.width + (rectValues.right - targetRectValues.right) - borderValue <= maxWidth) {
        calculateValue = true;
      } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && pageX >= 0) {
        calculateValue = true;
      }

      var calculatedWidth = originalWidth - (pageX - originalMouseX);

      if (setLeft) {
        calculatedWidth = calculatedWidth > resizeWestWidth ? resizeWestWidth : calculatedWidth;
      }

      if (calculateValue) {
        if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {
          var containerLeft = 0;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
            containerLeft = rectValues.left;
          }

          var _left = originalX - containerLeft + (pageX - originalMouseX);

          _left = _left > 0 ? _left : 1;

          if (calculatedWidth !== previousWidth && setWidth) {
            targetElement.style.width = calculatedWidth + 'px';
          }

          if (setLeft) {
            targetElement.style.left = _left + 'px';

            if (_left === 1) {
              setWidth = false;
            } else {
              setWidth = true;
            }
          }
        }
      }

      previousWidth = calculatedWidth;
    }
    /* istanbul ignore next */
    // tslint:disable-next-line


    function resizeEast(e) {
      var documentWidth = document.documentElement.clientWidth;
      var calculateValue = false;
      var containerRectValues;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        containerRectValues = getClientRectValues(containerElement);
      }

      var coordinates = e.touches ? e.changedTouches[0] : e;
      var pageX = coordinates.pageX;
      var targetRectValues = getClientRectValues(targetElement);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && (targetRectValues.left - containerRectValues.left + targetRectValues.width < maxWidth || targetRectValues.right - containerRectValues.left > targetRectValues.width)) {
        calculateValue = true;
      } else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement) && documentWidth - pageX > 0) {
        calculateValue = true;
      }

      var calculatedWidth = originalWidth + (pageX - originalMouseX);
      var containerLeft = 0;

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(containerElement)) {
        containerLeft = containerRectValues.left;
      }

      if (targetRectValues.left - containerLeft + calculatedWidth > maxWidth) {
        calculateValue = false;

        if (targetElement.classList.contains(RESIZE_WITHIN_VIEWPORT)) {
          return;
        }

        targetElement.style.width = maxWidth - (targetRectValues.left - containerLeft) + 'px';
      }

      if (calculateValue) {
        if (calculatedWidth >= minWidth && calculatedWidth <= maxWidth) {
          targetElement.style.width = calculatedWidth + 'px';
        }
      }
    }
    /* istanbul ignore next */


    function setMinHeight(minimumHeight) {
      minHeight = minimumHeight;
    }

    function removeResize() {
      var handlers = targetElement.querySelectorAll('.' + RESIZE_HANDLER);

      for (var i = 0; i < handlers.length; i++) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(handlers[i]);
      }
    }

    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var ButtonProps = /*#__PURE__*/function (_syncfusion_ej2_base_54) {
      _inherits(ButtonProps, _syncfusion_ej2_base_54);

      var _super239 = _createSuper(ButtonProps);

      function ButtonProps() {
        _classCallCheck(this, ButtonProps);

        return _super239.apply(this, arguments);
      }

      return ButtonProps;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], ButtonProps.prototype, "buttonModel", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Button')], ButtonProps.prototype, "type", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ButtonProps.prototype, "click", void 0);
    /**
     * Configures the animation properties for both open and close the dialog.
     */


    var AnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_55) {
      _inherits(AnimationSettings, _syncfusion_ej2_base_55);

      var _super240 = _createSuper(AnimationSettings);

      function AnimationSettings() {
        _classCallCheck(this, AnimationSettings);

        return _super240.apply(this, arguments);
      }

      return AnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Fade')], AnimationSettings.prototype, "effect", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)], AnimationSettings.prototype, "duration", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], AnimationSettings.prototype, "delay", void 0);

    var ROOT = 'e-dialog';
    var RTL = 'e-rtl';
    var DLG_HEADER_CONTENT = 'e-dlg-header-content';
    var DLG_HEADER = 'e-dlg-header';
    var DLG_FOOTER_CONTENT = 'e-footer-content';
    var MODAL_DLG = 'e-dlg-modal';
    var DLG_CONTENT = 'e-dlg-content';
    var DLG_CLOSE_ICON = 'e-icon-dlg-close';
    var DLG_OVERLAY = 'e-dlg-overlay';
    var DLG_TARGET = 'e-dlg-target';
    var DLG_CONTAINER = 'e-dlg-container';
    var SCROLL_DISABLED = 'e-scroll-disabled';
    var DLG_PRIMARY_BUTTON = 'e-primary';
    var ICON = 'e-icons';
    var POPUP_ROOT = 'e-popup';
    var DEVICE = 'e-device';
    var FULLSCREEN = 'e-dlg-fullscreen';
    var DLG_CLOSE_ICON_BTN = 'e-dlg-closeicon-btn';
    var DLG_HIDE = 'e-popup-close';
    var DLG_SHOW = 'e-popup-open';
    var DLG_UTIL_DEFAULT_TITLE = 'Information';
    var DLG_UTIL_ROOT = 'e-scroll-disabled';
    var DLG_UTIL_ALERT = 'e-alert-dialog';
    var DLG_UTIL_CONFIRM = 'e-confirm-dialog';
    var DLG_RESIZABLE = 'e-dlg-resizable';
    var DLG_RESTRICT_LEFT_VALUE = 'e-restrict-left';
    var DLG_RESTRICT_WIDTH_VALUE = 'e-resize-viewport';
    var DLG_REF_ELEMENT = 'e-dlg-ref-element';
    /**
     * Represents the dialog component that displays the information and get input from the user.
     * Two types of dialog components are `Modal and Modeless (non-modal)` depending on its interaction with parent application.
     * ```html
     * <div id="dialog"></div>
     * ```
     * ```typescript
     * <script>
     *   var dialogObj = new Dialog({ header: 'Dialog' });
     *   dialogObj.appendTo("#dialog");
     * </script>
     * ```
     */

    var Dialog = /*#__PURE__*/function (_syncfusion_ej2_base_56) {
      _inherits(Dialog, _syncfusion_ej2_base_56);

      var _super241 = _createSuper(Dialog);

      /**
       * Constructor for creating the widget
       * @hidden
       */
      function Dialog(options, element) {
        _classCallCheck(this, Dialog);

        return _super241.call(this, options, element);
      }
      /**
       * Initialize the control rendering
       * @private
       */


      _createClass2(Dialog, [{
        key: "render",
        value: function render() {
          this.initialize();
          this.initRender();
          this.wireEvents();

          if (this.width === '100%') {
            this.element.style.width = '';
          }

          if (this.minHeight !== '') {
            this.element.style.minHeight = this.minHeight.toString();
          }

          if (this.enableResize) {
            this.setResize();

            if (this.animationSettings.effect === 'None') {
              this.getMinHeight();
            }
          }

          this.renderComplete();
        }
        /**
         * Initialize the event handler
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          var _this652 = this;

          this.headerContent = null;
          this.allowMaxHeight = true;
          this.preventVisibility = true;
          this.clonedEle = this.element.cloneNode(true);

          this.closeIconClickEventHandler = function (event) {
            _this652.hide(event);
          };

          this.dlgOverlayClickEventHandler = function (event) {
            _this652.trigger('overlayClick', event);

            _this652.focusContent();
          };

          var localeText = {
            close: 'Close'
          };
          this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["L10n"]('dialog', localeText, this.locale);
          this.checkPositionData();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            var prevOnChange = this.isProtectedOnChange;
            this.isProtectedOnChange = true;
            this.target = document.body;
            this.isProtectedOnChange = prevOnChange;
          }
        }
      }, {
        key: "isNumberValue",
        value: function isNumberValue(value) {
          var isNumber = /^[-+]?\d*\.?\d+$/.test(value);
          return isNumber;
        }
      }, {
        key: "checkPositionData",
        value: function checkPositionData() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.position)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.position.X) && typeof this.position.X !== 'number') {
              var isNumber = this.isNumberValue(this.position.X);

              if (isNumber) {
                var prevOnChange = this.isProtectedOnChange;
                this.isProtectedOnChange = true;
                this.position.X = parseFloat(this.position.X);
                this.isProtectedOnChange = prevOnChange;
              }
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.position.Y) && typeof this.position.Y !== 'number') {
              var _isNumber = this.isNumberValue(this.position.Y);

              if (_isNumber) {
                var _prevOnChange = this.isProtectedOnChange;
                this.isProtectedOnChange = true;
                this.position.Y = parseFloat(this.position.Y);
                this.isProtectedOnChange = _prevOnChange;
              }
            }
          }
        }
      }, {
        key: "getEle",
        value: function getEle(list, selector) {
          var element = undefined;

          for (var i = 0; i < list.length; i++) {
            if (list[i].classList.contains(selector)) {
              element = list[i];
              break;
            }
          }

          return element;
        }
        /* istanbul ignore next */

      }, {
        key: "getMinHeight",
        value: function getMinHeight() {
          var computedHeaderHeight = '0px';
          var computedFooterHeight = '0px';

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.' + DLG_HEADER_CONTENT))) {
            computedHeaderHeight = getComputedStyle(this.headerContent).height;
          }

          var footerEle = this.getEle(this.element.children, DLG_FOOTER_CONTENT);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(footerEle)) {
            computedFooterHeight = getComputedStyle(footerEle).height;
          }

          var headerHeight = parseInt(computedHeaderHeight.slice(0, computedHeaderHeight.indexOf('p')), 10);
          var footerHeight = parseInt(computedFooterHeight.slice(0, computedFooterHeight.indexOf('p')), 10);
          setMinHeight(headerHeight + 30 + footerHeight);
          return headerHeight + 30 + footerHeight;
        }
      }, {
        key: "onResizeStart",
        value: function onResizeStart(args, dialogObj) {
          dialogObj.trigger('resizeStart', args);
          return args.cancel;
        }
      }, {
        key: "onResizing",
        value: function onResizing(args, dialogObj) {
          dialogObj.trigger('resizing', args);
        }
      }, {
        key: "onResizeComplete",
        value: function onResizeComplete(args, dialogObj) {
          dialogObj.trigger('resizeStop', args);
        }
      }, {
        key: "setResize",
        value: function setResize() {
          if (this.enableResize) {
            if (this.isBlazorServerRender() && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.e-icons.e-resize-handle'))) {
              return;
            }

            this.element.classList.add(DLG_RESIZABLE);
            var computedHeight = getComputedStyle(this.element).minHeight;
            var computedWidth = getComputedStyle(this.element).minWidth;
            var direction = this.enableRtl ? 'south-west' : 'south-east';

            if (this.isModal && this.enableRtl) {
              this.element.classList.add(DLG_RESTRICT_LEFT_VALUE);
            } else if (this.isModal && this.target === document.body) {
              this.element.classList.add(DLG_RESTRICT_WIDTH_VALUE);
            }

            createResize({
              element: this.element,
              direction: direction,
              minHeight: parseInt(computedHeight.slice(0, computedWidth.indexOf('p')), 10),
              maxHeight: this.targetEle.clientHeight,
              minWidth: parseInt(computedWidth.slice(0, computedWidth.indexOf('p')), 10),
              maxWidth: this.targetEle.clientWidth,
              boundary: this.target === document.body ? null : this.targetEle,
              resizeBegin: this.onResizeStart.bind(this),
              resizeComplete: this.onResizeComplete.bind(this),
              resizing: this.onResizing.bind(this),
              proxy: this
            });
          } else {
            removeResize();

            if (this.isModal) {
              this.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
            } else {
              this.element.classList.remove(DLG_RESTRICT_WIDTH_VALUE);
            }

            this.element.classList.remove(DLG_RESIZABLE);
          }
        }
        /* istanbul ignore next */

      }, {
        key: "keyDown",
        value: function keyDown(event) {
          var _this653 = this;

          if (event.keyCode === 9) {
            if (this.isModal) {
              var buttonObj;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.btnObj)) {
                buttonObj = this.btnObj[this.btnObj.length - 1];
              }

              if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.btnObj) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ftrTemplateContent)) {
                var value = 'input,select,textarea,button,a,[contenteditable="true"],[tabindex]';
                var items = this.ftrTemplateContent.querySelectorAll(value);
                buttonObj = {
                  element: items[items.length - 1]
                };
              }

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(buttonObj) && document.activeElement === buttonObj.element && !event.shiftKey) {
                event.preventDefault();
                this.focusableElements(this.element).focus();
              }

              if (document.activeElement === this.focusableElements(this.element) && event.shiftKey) {
                event.preventDefault();

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(buttonObj)) {
                  buttonObj.element.focus();
                }
              }
            }
          }

          var element = document.activeElement;
          var isTagName = ['input', 'textarea'].indexOf(element.tagName.toLowerCase()) > -1;
          var isContentEdit = false;

          if (!isTagName) {
            isContentEdit = element.hasAttribute('contenteditable') && element.getAttribute('contenteditable') === 'true';
          }

          if (event.keyCode === 27 && this.closeOnEscape) {
            this.hide(event);
          }

          if (event.keyCode === 13 && !event.ctrlKey && element.tagName.toLowerCase() !== 'textarea' && isTagName && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.primaryButtonEle) || event.keyCode === 13 && event.ctrlKey && (element.tagName.toLowerCase() === 'textarea' || isContentEdit) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.primaryButtonEle)) {
            var buttonIndex;
            var firstPrimary = this.buttons.some(function (data, index) {
              buttonIndex = index;
              var buttonModel = data.buttonModel;
              return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(buttonModel) && buttonModel.isPrimary === true;
            });

            if (firstPrimary && typeof this.buttons[buttonIndex].click === 'function') {
              setTimeout(function () {
                _this653.buttons[buttonIndex].click.call(_this653, event);
              });
            }
          }
        }
        /**
         * Initialize the control rendering
         * @private
         */

      }, {
        key: "initialize",
        value: function initialize() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            this.targetEle = typeof this.target === 'string' ? document.querySelector(this.target) : this.target;
          }

          if (!this.isBlazorServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], ROOT);
          }

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], DEVICE);
          }

          if (!this.isBlazorServerRender()) {
            this.setCSSClass();
          }

          this.setMaxHeight();
        }
        /**
         * Initialize the rendering
         * @private
         */

      }, {
        key: "initRender",
        value: function initRender() {
          var _this654 = this;

          this.initialRender = true;

          if (!this.isBlazorServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              role: 'dialog'
            });
          }

          if (this.zIndex === 1000) {
            this.setzIndex(this.element, false);
            this.calculatezIndex = true;
          } else {
            this.calculatezIndex = false;
          }

          if (this.isBlazorServerRender() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            this.headerContent = this.element.getElementsByClassName('e-dlg-header-content')[0];
          }

          if (this.isBlazorServerRender() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentEle)) {
            this.contentEle = this.element.querySelector('#' + this.element.id + '_dialog-content');
          }

          if (!this.isBlazorServerRender()) {
            this.setTargetContent();

            if (this.header !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.header)) {
              this.setHeader();
            }

            if (this.showCloseIcon) {
              this.renderCloseIcon();
            }

            this.setContent();

            if (this.footerTemplate !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerTemplate)) {
              this.setFooterTemplate();
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[0].buttonModel)) {
              this.setButton();
            }
          }

          if (this.isBlazorServerRender()) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[0].buttonModel) && this.footerTemplate === '') {
              this.setButton();
            }
          }

          if (this.allowDragging && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            this.setAllowDragging();
          }

          if (!this.isBlazorServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
              'aria-modal': this.isModal ? 'true' : 'false'
            });

            if (this.isModal) {
              this.setIsModal();
            }
          }

          if (this.isBlazorServerRender() && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dlgContainer)) {
            this.dlgContainer = this.element.parentElement;

            for (var i = 0, childNodes = this.dlgContainer.children; i < childNodes.length; i++) {
              if (childNodes[i].classList.contains('e-dlg-overlay')) {
                this.dlgOverlay = childNodes[i];
              }
            }
          }

          if (this.element.classList.contains(DLG_UTIL_ALERT) !== true && this.element.classList.contains(DLG_UTIL_CONFIRM) !== true && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.parentElement)) {
            var parentEle = this.isModal ? this.dlgContainer.parentElement : this.element.parentElement;
            this.refElement = this.createElement('div', {
              className: DLG_REF_ELEMENT
            });
            parentEle.insertBefore(this.refElement, this.isModal ? this.dlgContainer : this.element);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetEle)) {
            this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element);
          }

          this.popupObj = new Popup(this.element, {
            height: this.height,
            width: this.width,
            zIndex: this.zIndex,
            relateTo: this.target,
            actionOnScroll: 'none',
            enableRtl: this.enableRtl,
            open: function open(event) {
              var eventArgs = {
                container: _this654.isModal ? _this654.dlgContainer : _this654.element,
                element: _this654.element,
                target: _this654.target,
                preventFocus: false
              };

              if (_this654.enableResize) {
                _this654.resetResizeIcon();
              }

              _this654.trigger('open', eventArgs, function (openEventArgs) {
                if (!openEventArgs.preventFocus) {
                  _this654.focusContent();
                }
              });
            },
            close: function close(event) {
              if (_this654.isModal) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this654.dlgOverlay], 'e-fade');
              }

              _this654.unBindEvent(_this654.element);

              if (_this654.isModal) {
                _this654.dlgContainer.style.display = 'none';
              }

              _this654.trigger('close', _this654.closeArgs);

              var activeEle = document.activeElement;

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeEle) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(activeEle.blur)) {
                activeEle.blur();
              }

              if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this654.storeActiveElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this654.storeActiveElement.focus)) {
                _this654.storeActiveElement.focus();
              }
            }
          });
          this.positionChange();
          this.setEnableRTL();

          if (!this.isBlazorServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], DLG_HIDE);

            if (this.isModal) {
              this.setOverlayZindex();
            }
          }

          if (this.visible) {
            this.show();
          } else {
            if (this.isModal) {
              this.dlgOverlay.style.display = 'none';
            }
          }

          this.initialRender = false;
        }
      }, {
        key: "resetResizeIcon",
        value: function resetResizeIcon() {
          var dialogConHeight = this.getMinHeight();

          if (this.targetEle.offsetHeight < dialogConHeight) {
            var className = this.enableRtl ? 'e-south-west' : 'e-south-east';
            var resizeIcon = this.element.querySelector('.' + className);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(resizeIcon)) {
              resizeIcon.style.bottom = '-' + dialogConHeight.toString() + 'px';
            }
          }
        }
      }, {
        key: "setOverlayZindex",
        value: function setOverlayZindex(zIndexValue) {
          var zIndex;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(zIndexValue)) {
            zIndex = parseInt(this.element.style.zIndex, 10) ? parseInt(this.element.style.zIndex, 10) : this.zIndex;
          } else {
            zIndex = zIndexValue;
          }

          this.dlgOverlay.style.zIndex = (zIndex - 1).toString();
          this.dlgContainer.style.zIndex = zIndex.toString();
        }
      }, {
        key: "positionChange",
        value: function positionChange() {
          if (this.isModal) {
            if (!isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y))) {
              this.setPopupPosition();
            } else if (!isNaN(parseFloat(this.position.X)) && isNaN(parseFloat(this.position.Y)) || isNaN(parseFloat(this.position.X)) && !isNaN(parseFloat(this.position.Y))) {
              this.setPopupPosition();
            } else {
              this.element.style.top = '0px';
              this.element.style.left = '0px';
              this.dlgContainer.classList.add('e-dlg-' + this.position.X + '-' + this.position.Y);
            }
          } else {
            this.setPopupPosition();
          }
        }
      }, {
        key: "setPopupPosition",
        value: function setPopupPosition() {
          this.popupObj.setProperties({
            position: {
              X: this.position.X,
              Y: this.position.Y
            }
          });
        }
      }, {
        key: "setAllowDragging",
        value: function setAllowDragging() {
          var _this655 = this;

          var handleContent = '.' + DLG_HEADER_CONTENT;
          this.dragObj = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Draggable"](this.element, {
            clone: false,
            abort: '.e-dlg-closeicon-btn',
            handle: handleContent,
            dragStart: function dragStart(event) {
              _this655.trigger('dragStart', event, function (dragEventArgs) {
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  dragEventArgs.bindEvents(event.dragElement);
                }
              });
            },
            dragStop: function dragStop(event) {
              if (_this655.isModal) {
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this655.position)) {
                  _this655.dlgContainer.classList.remove('e-dlg-' + _this655.position.X + '-' + _this655.position.Y);
                } // Reset the dialog position after drag completion.


                _this655.element.style.position = 'relative';
              }

              _this655.trigger('dragStop', event);

              _this655.element.classList.remove(DLG_RESTRICT_LEFT_VALUE);
            },
            drag: function drag(event) {
              _this655.trigger('drag', event);
            }
          });

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetEle)) {
            this.dragObj.dragArea = this.targetEle;
          }
        }
      }, {
        key: "setButton",
        value: function setButton() {
          if (!this.isBlazorServerRender()) {
            this.buttonContent = [];
            this.btnObj = [];

            for (var i = 0; i < this.buttons.length; i++) {
              var buttonType = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[i].type) ? this.buttons[i].type.toLowerCase() : 'button';
              var btn = this.createElement('button', {
                attrs: {
                  type: buttonType
                }
              });
              this.buttonContent.push(btn.outerHTML);
            }

            this.setFooterTemplate();
          }

          var footerBtn;

          for (var _i159 = 0, childNodes = this.element.children; _i159 < childNodes.length; _i159++) {
            if (childNodes[_i159].classList.contains(DLG_FOOTER_CONTENT)) {
              footerBtn = childNodes[_i159].querySelectorAll('button');
            }
          }

          for (var _i160 = 0; _i160 < this.buttons.length; _i160++) {
            if (!this.isBlazorServerRender()) {
              this.btnObj[_i160] = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"](this.buttons[_i160].buttonModel);
            }

            if (this.isBlazorServerRender()) {
              this.ftrTemplateContent = this.element.querySelector('.' + DLG_FOOTER_CONTENT);
            }

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ftrTemplateContent) && typeof this.buttons[_i160].click === 'function' && footerBtn.length > 0) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(footerBtn[_i160], 'click', this.buttons[_i160].click, this);
            }

            if (!this.isBlazorServerRender() && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ftrTemplateContent)) {
              this.btnObj[_i160].appendTo(this.ftrTemplateContent.children[_i160]);

              this.btnObj[_i160].element.classList.add('e-flat');

              this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];
            }
          }
        }
      }, {
        key: "setContent",
        value: function setContent() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-describedby': this.element.id + '_dialog-content'
          });
          this.contentEle = this.createElement('div', {
            className: DLG_CONTENT,
            id: this.element.id + '_dialog-content'
          });

          if (this.innerContentElement) {
            this.contentEle.appendChild(this.innerContentElement);
          } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) && this.content !== '' || !this.initialRender) {
            if (typeof this.content === 'string' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
              this.contentEle.innerHTML = this.sanitizeHelper(this.content);
            } else if (this.content instanceof HTMLElement) {
              this.contentEle.appendChild(this.content);
            } else {
              this.setTemplate(this.content, this.contentEle);
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            this.element.insertBefore(this.contentEle, this.element.children[1]);
          } else {
            this.element.insertBefore(this.contentEle, this.element.children[0]);
          }

          if (this.height === 'auto') {
            if (!this.isBlazorServerRender() && _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE && this.element.style.width === '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.width)) {
              this.element.style.width = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width);
            }

            this.setMaxHeight();
          }
        }
      }, {
        key: "setTemplate",
        value: function setTemplate(template, toElement) {
          var templateFn;
          var templateProps;

          if (toElement.classList.contains(DLG_HEADER)) {
            templateProps = this.element.id + 'header';
          } else if (toElement.classList.contains(DLG_FOOTER_CONTENT)) {
            templateProps = this.element.id + 'footerTemplate';
          } else {
            templateProps = this.element.id + 'content';
          }

          var templateValue;

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(template.outerHTML)) {
            toElement.appendChild(template);
          } else if (typeof template !== 'string' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isStringTemplate) {
            templateFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(template);
            templateValue = template;
          } else {
            toElement.innerHTML = this.sanitizeHelper(template);
          }

          var fromElements = [];

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(templateFn)) {
            var isString = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && !this.isStringTemplate && templateValue.indexOf('<div>Blazor') === 0 ? this.isStringTemplate : true;

            var _iterator150 = _createForOfIteratorHelper(templateFn({}, null, null, templateProps, isString)),
                _step150;

            try {
              for (_iterator150.s(); !(_step150 = _iterator150.n()).done;) {
                var item = _step150.value;
                fromElements.push(item);
              }
            } catch (err) {
              _iterator150.e(err);
            } finally {
              _iterator150.f();
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])([].slice.call(fromElements), toElement);
          }
        }
        /**
         * @hidden
         */

      }, {
        key: "sanitizeHelper",
        value: function sanitizeHelper(value) {
          if (this.enableHtmlSanitizer) {
            var dialogItem = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].beforeSanitize();

            var beforeEvent = {
              cancel: false,
              helper: null
            };
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])(dialogItem, dialogItem, beforeEvent);
            this.trigger('beforeSanitizeHtml', dialogItem);

            if (dialogItem.cancel && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(dialogItem.helper)) {
              value = dialogItem.helper(value);
            } else if (!dialogItem.cancel) {
              value = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].serializeValue(dialogItem, value);
            }
          }

          return value;
        }
      }, {
        key: "setMaxHeight",
        value: function setMaxHeight() {
          if (!this.allowMaxHeight) {
            return;
          }

          var display = this.element.style.display;
          this.element.style.display = 'none';
          this.element.style.maxHeight = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target) && this.targetEle.offsetHeight < window.innerHeight ? this.targetEle.offsetHeight - 20 + 'px' : window.innerHeight - 20 + 'px';
          this.element.style.display = display;

          if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isIE && this.height === 'auto' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentEle) && this.element.offsetHeight < this.contentEle.offsetHeight) {
            this.element.style.height = 'inherit';
          }
        }
      }, {
        key: "setEnableRTL",
        value: function setEnableRTL() {
          if (!this.isBlazorServerRender()) {
            this.enableRtl ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], RTL) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], RTL);
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.e-resize-handle'))) {
            removeResize();
            this.setResize();
          }
        }
      }, {
        key: "setTargetContent",
        value: function setTargetContent() {
          var _this656 = this;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) || this.content === '') {
            var isContent = this.element.innerHTML.replace(/\s|<(\/?|\!?)(!--!--)>/g, '') !== '';

            if (this.element.children.length > 0 || isContent) {
              this.innerContentElement = document.createDocumentFragment();
              [].slice.call(this.element.childNodes).forEach(function (el) {
                if (el.nodeType !== 8) {
                  _this656.innerContentElement.appendChild(el);
                }
              });
            }
          }
        }
      }, {
        key: "setHeader",
        value: function setHeader() {
          if (this.headerEle) {
            this.headerEle.innerHTML = '';
          } else {
            this.headerEle = this.createElement('div', {
              id: this.element.id + '_title',
              className: DLG_HEADER
            });
          }

          this.createHeaderContent();
          this.headerContent.appendChild(this.headerEle);
          this.setTemplate(this.header, this.headerEle);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-labelledby': this.element.id + '_title'
          });
          this.element.insertBefore(this.headerContent, this.element.children[0]);
        }
      }, {
        key: "setFooterTemplate",
        value: function setFooterTemplate() {
          if (this.ftrTemplateContent) {
            this.ftrTemplateContent.innerHTML = '';
          } else {
            this.ftrTemplateContent = this.createElement('div', {
              className: DLG_FOOTER_CONTENT
            });
          }

          if (this.footerTemplate !== '' && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerTemplate)) {
            this.setTemplate(this.footerTemplate, this.ftrTemplateContent);
          } else {
            this.ftrTemplateContent.innerHTML = this.buttonContent.join('');
          }

          this.element.appendChild(this.ftrTemplateContent);
        }
      }, {
        key: "createHeaderContent",
        value: function createHeaderContent() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            this.headerContent = this.createElement('div', {
              id: this.element.id + '_dialog-header',
              className: DLG_HEADER_CONTENT
            });
          }
        }
      }, {
        key: "renderCloseIcon",
        value: function renderCloseIcon() {
          this.closeIcon = this.createElement('button', {
            className: DLG_CLOSE_ICON_BTN,
            attrs: {
              type: 'button'
            }
          });
          this.closeIconBtnObj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"]({
            cssClass: 'e-flat',
            iconCss: DLG_CLOSE_ICON + ' ' + ICON
          });
          this.closeIconTitle();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.closeIcon], this.headerContent);
          } else {
            this.createHeaderContent();
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["prepend"])([this.closeIcon], this.headerContent);
            this.element.insertBefore(this.headerContent, this.element.children[0]);
          }

          this.closeIconBtnObj.appendTo(this.closeIcon);
        }
      }, {
        key: "closeIconTitle",
        value: function closeIconTitle() {
          this.l10n.setLocale(this.locale);
          var closeIconTitle = this.l10n.getConstant('close');
          this.closeIcon.setAttribute('title', closeIconTitle);
          this.closeIcon.setAttribute('aria-label', closeIconTitle);
        }
      }, {
        key: "setCSSClass",
        value: function setCSSClass(oldCSSClass) {
          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], this.cssClass.split(' '));
          }

          if (oldCSSClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], oldCSSClass.split(' '));
          }
        }
      }, {
        key: "setIsModal",
        value: function setIsModal() {
          this.dlgContainer = this.createElement('div', {
            className: DLG_CONTAINER
          });
          this.element.classList.remove(DLG_SHOW);
          this.element.parentNode.insertBefore(this.dlgContainer, this.element);
          this.dlgContainer.appendChild(this.element);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], MODAL_DLG);
          this.dlgOverlay = this.createElement('div', {
            className: DLG_OVERLAY
          });
          this.dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
          this.dlgContainer.appendChild(this.dlgOverlay);
        }
      }, {
        key: "getValidFocusNode",
        value: function getValidFocusNode(items) {
          var node;

          for (var u = 0; u < items.length; u++) {
            node = items[u];

            if ((node.clientHeight > 0 || node.tagName.toLowerCase() === 'a' && node.hasAttribute('href')) && node.tabIndex > -1 && !node.disabled && !this.disableElement(node, '[disabled],[aria-disabled="true"],[type="hidden"]')) {
              return node;
            }
          }

          return node;
        }
      }, {
        key: "focusableElements",
        value: function focusableElements(content) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(content)) {
            var value = 'input,select,textarea,button,a,[contenteditable="true"],[tabindex]';
            var items = content.querySelectorAll(value);
            return this.getValidFocusNode(items);
          }

          return null;
        }
      }, {
        key: "getAutoFocusNode",
        value: function getAutoFocusNode(container) {
          var node = container.querySelector('.' + DLG_CLOSE_ICON_BTN);
          var value = '[autofocus]';
          var items = container.querySelectorAll(value);
          var validNode = this.getValidFocusNode(items);

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(validNode)) {
            node = validNode;
          } else {
            validNode = this.focusableElements(this.contentEle);

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(validNode)) {
              return node = validNode;
            } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.primaryButtonEle)) {
              return this.element.querySelector('.' + DLG_PRIMARY_BUTTON);
            }
          }

          return node;
        }
      }, {
        key: "disableElement",
        value: function disableElement(element, t) {
          var elementMatch = element ? element.matches || element.webkitMatchesSelector || element.msMatchesSelector : null;

          if (elementMatch) {
            for (; element; element = element.parentNode) {
              if (element instanceof Element && elementMatch.call(element, t)) {
                /* istanbul ignore next */
                return element;
              }
            }
          }

          return null;
        }
      }, {
        key: "focusContent",
        value: function focusContent() {
          var element = this.getAutoFocusNode(this.element);
          var node = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element) ? element : this.element;
          node.focus();
          this.bindEvent(this.element);
        }
      }, {
        key: "bindEvent",
        value: function bindEvent(element) {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(element, 'keydown', this.keyDown, this);
        }
      }, {
        key: "unBindEvent",
        value: function unBindEvent(element) {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(element, 'keydown', this.keyDown);
        }
      }, {
        key: "updateSanitizeContent",
        value: function updateSanitizeContent() {
          if (!this.isBlazorServerRender()) {
            this.contentEle.innerHTML = this.sanitizeHelper(this.content);
          }
        }
      }, {
        key: "isBlazorServerRender",
        value: function isBlazorServerRender() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered;
        }
        /**
         * Module required function
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'dialog';
        }
        /**
         * Called internally if any of the property value changed
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          if (!this.element.classList.contains(ROOT)) {
            return;
          }

          for (var _i161 = 0, _Object$keys62 = Object.keys(newProp); _i161 < _Object$keys62.length; _i161++) {
            var prop = _Object$keys62[_i161];

            switch (prop) {
              case 'content':
                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content) && this.content !== '') {
                  if (this.isBlazorServerRender()) {
                    this.contentEle = this.element.querySelector('.e-dlg-content');
                  }

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentEle) && this.contentEle.getAttribute('role') !== 'dialog') {
                    if (!this.isBlazorServerRender()) {
                      this.contentEle.innerHTML = '';
                    }

                    typeof this.content === 'string' ? this.isBlazorServerRender() && this.contentEle.innerText === '' ? this.contentEle.insertAdjacentHTML('beforeend', this.sanitizeHelper(this.content)) : this.updateSanitizeContent() : this.contentEle.appendChild(this.content);
                    this.setMaxHeight();
                  } else {
                    if (!this.isBlazorServerRender() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.e-dlg-content'))) {
                      this.setContent();
                    }
                  }
                } else if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.contentEle)) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.contentEle);
                  this.contentEle = null;
                }

                break;

              case 'header':
                if (this.header === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.header)) {
                  if (this.headerEle) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.headerEle);
                    this.headerEle = null;
                  }
                } else {
                  if (!this.isBlazorServerRender() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.e-dlg-header-content'))) {
                    this.setHeader();
                  }
                }

                break;

              case 'footerTemplate':
                if (this.footerTemplate === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.footerTemplate)) {
                  if (!this.ftrTemplateContent) {
                    return;
                  }

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.ftrTemplateContent);
                  this.ftrTemplateContent = null;
                  this.buttons = [{}];
                } else {
                  if (!this.isBlazorServerRender() || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.querySelector('.e-footer-content'))) {
                    this.setFooterTemplate();
                  }

                  this.buttons = [{}];
                }

                break;

              case 'showCloseIcon':
                if (this.element.getElementsByClassName(DLG_CLOSE_ICON).length > 0) {
                  if (!this.showCloseIcon && (this.header === '' || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.header))) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.headerContent);
                    this.headerContent = null;
                  } else if (!this.showCloseIcon) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.closeIcon);
                  } else {
                    if (this.isBlazorServerRender()) {
                      this.wireEvents();
                    }
                  }
                } else {
                  if (!this.isBlazorServerRender()) {
                    this.renderCloseIcon();
                  }

                  this.wireEvents();
                }

                break;

              case 'locale':
                if (this.showCloseIcon) {
                  this.closeIconTitle();
                }

                break;

              case 'visible':
                this.visible ? this.show() : this.hide();
                break;

              case 'isModal':
                this.updateIsModal();
                break;

              case 'height':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height)
                });
                break;

              case 'width':
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(this.element, {
                  'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width)
                });
                break;

              case 'zIndex':
                this.popupObj.zIndex = this.zIndex;

                if (this.isModal) {
                  this.setOverlayZindex(this.zIndex);
                }

                if (this.element.style.zIndex !== this.zIndex.toString()) {
                  this.calculatezIndex = false;
                }

                break;

              case 'cssClass':
                this.setCSSClass(oldProp.cssClass);
                break;

              case 'buttons':
                var buttonCount = this.buttons.length;

                if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.ftrTemplateContent) && !this.isBlazorServerRender()) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.ftrTemplateContent);
                  this.ftrTemplateContent = null;
                }

                for (var i = 0; i < buttonCount; i++) {
                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[i].buttonModel)) {
                    this.footerTemplate = '';
                    this.setButton();
                  }
                }

                break;

              case 'allowDragging':
                if (this.allowDragging && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
                  this.setAllowDragging();
                } else {
                  this.dragObj.destroy();
                }

                break;

              case 'target':
                this.setTarget(newProp.target);
                break;

              case 'position':
                this.checkPositionData();

                if (this.isModal) {
                  var positionX = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.position.X) ? this.position.X : oldProp.position.X;
                  var positionY = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(oldProp.position.Y) ? this.position.Y : oldProp.position.Y;

                  if (this.dlgContainer.classList.contains('e-dlg-' + positionX + '-' + positionY)) {
                    this.dlgContainer.classList.remove('e-dlg-' + positionX + '-' + positionY);
                  }
                }

                this.positionChange();
                break;

              case 'enableRtl':
                this.setEnableRTL();
                break;

              case 'enableResize':
                this.setResize();
                break;
            }
          }
        }
      }, {
        key: "setTarget",
        value: function setTarget(target) {
          this.popupObj.relateTo = target;
          this.target = target;
          this.targetEle = typeof this.target === 'string' ? document.querySelector(this.target) : this.target;

          if (this.dragObj) {
            this.dragObj.dragArea = this.targetEle;
          }

          this.setMaxHeight();

          if (this.isModal) {
            this.updateIsModal();
          }

          if (this.enableResize) {
            this.setResize();
          }
        }
      }, {
        key: "updateIsModal",
        value: function updateIsModal() {
          this.element.setAttribute('aria-modal', this.isModal ? 'true' : 'false');

          if (this.isModal) {
            this.setIsModal();
            this.element.style.top = '0px';
            this.element.style.left = '0px';

            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetEle)) {
              this.targetEle.appendChild(this.dlgContainer);
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], MODAL_DLG);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.dlgOverlay);

            while (this.dlgContainer.firstChild) {
              this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild, this.dlgContainer);
            }

            this.dlgContainer.parentElement.removeChild(this.dlgContainer);
          }

          if (this.visible) {
            this.show();
          }

          this.positionChange();

          if (this.isModal && this.dlgOverlay) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler, this);
          }
        }
      }, {
        key: "setzIndex",
        value: function setzIndex(zIndexElement, setPopupZindex) {
          var prevOnChange = this.isProtectedOnChange;
          this.isProtectedOnChange = true;
          this.zIndex = getZindexPartial(zIndexElement);
          this.isProtectedOnChange = prevOnChange;

          if (setPopupZindex) {
            this.popupObj.zIndex = this.zIndex;
          }
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * To destroy the widget
         * @method destroy
         * @return {void}
         * @memberof dialog
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (this.isDestroyed) {
            return;
          }

          var classArray = [RTL, MODAL_DLG, DLG_RESIZABLE, DLG_RESTRICT_LEFT_VALUE, FULLSCREEN, DEVICE];
          var attrs = ['role', 'aria-modal', 'aria-labelledby', 'aria-describedby', 'aria-grabbed', 'tabindex', 'style'];
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.targetEle], [DLG_TARGET, SCROLL_DISABLED]);

          if (this.element.classList.contains(FULLSCREEN)) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);
          }

          if (this.isModal) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.targetEle) ? this.targetEle : document.body], SCROLL_DISABLED);
          }

          this.unWireEvents();

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.btnObj)) {
            for (var i = 0; i < this.btnObj.length; i++) {
              this.btnObj[i].destroy();
            }
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dragObj)) {
            this.dragObj.destroy();
          }

          if (this.popupObj.element.classList.contains(POPUP_ROOT)) {
            this.popupObj.destroy();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classArray);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.cssClass) && this.cssClass !== '') {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], this.cssClass.split(' '));
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.refElement) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.refElement.parentElement)) {
            this.refElement.parentElement.insertBefore(this.isModal ? this.dlgContainer : this.element, this.refElement);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.refElement);
            this.refElement = undefined;
          }

          if (this.isModal && !this.isBlazorServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.dlgOverlay);
            this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.dlgContainer);
          }

          if (!this.isBlazorServerRender()) {
            this.element.innerHTML = this.clonedEle.innerHTML;
          }

          if (this.isBlazorServerRender()) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.element.children)) {
              for (var _i162 = 0; _i162 <= this.element.children.length; _i162++) {
                _i162 = _i162 - _i162;
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.children[_i162]);
              }
            }
          }

          for (var _i163 = 0; _i163 < attrs.length; _i163++) {
            this.element.removeAttribute(attrs[_i163]);
          }

          if (!this.isBlazorServerRender()) {
            _get(_getPrototypeOf(Dialog.prototype), "destroy", this).call(this);
          } else {
            this.isDestroyed = true;
          }
        }
        /**
         * Binding event to the element while widget creation
         * @hidden
         */

      }, {
        key: "wireEvents",
        value: function wireEvents() {
          if (this.isBlazorServerRender() && this.showCloseIcon) {
            this.closeIcon = this.element.getElementsByClassName('e-dlg-closeicon-btn')[0];
          }

          if (this.showCloseIcon) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.closeIcon, 'click', this.closeIconClickEventHandler, this);
          }

          if (this.isModal && this.dlgOverlay) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler, this);
          }
        }
        /**
         * Unbinding event to the element while widget destroy
         * @hidden
         */

      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          if (this.showCloseIcon) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.closeIcon, 'click', this.closeIconClickEventHandler);
          }

          if (this.isModal) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.dlgOverlay, 'click', this.dlgOverlayClickEventHandler);
          }

          if (this.buttons.length > 0 && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.buttons[0].buttonModel) && this.footerTemplate === '') {
            for (var i = 0; i < this.buttons.length; i++) {
              if (typeof this.buttons[i].click === 'function') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.ftrTemplateContent.children[i], 'click', this.buttons[i].click);
              }
            }
          }
        }
        /**
         * Refreshes the dialog's position when the user changes its header and footer height/width dynamically.
         * @return {void}
         */

      }, {
        key: "refreshPosition",
        value: function refreshPosition() {
          this.popupObj.refreshPosition();
        }
        /**
         * Opens the dialog if it is in hidden state.
         * To open the dialog with full screen width, set the parameter to true.
         * @param { boolean } isFullScreen - Enable the fullScreen Dialog.
         * @return {void}
         */

      }, {
        key: "show",
        value: function show(isFullScreen) {
          var _this657 = this;

          if (!this.element.classList.contains(ROOT)) {
            return;
          }

          if (!this.element.classList.contains(DLG_SHOW) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isFullScreen)) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(isFullScreen)) {
              this.fullScreen(isFullScreen);
            }

            var eventArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? {
              cancel: false,
              element: this.element,
              container: this.isModal ? this.dlgContainer : this.element,
              maxHeight: this.element.style.maxHeight
            } : {
              cancel: false,
              element: this.element,
              container: this.isModal ? this.dlgContainer : this.element,
              target: this.target,
              maxHeight: this.element.style.maxHeight
            };
            this.trigger('beforeOpen', eventArgs, function (beforeOpenArgs) {
              if (!beforeOpenArgs.cancel) {
                if (_this657.element.style.maxHeight !== eventArgs.maxHeight) {
                  _this657.allowMaxHeight = false;
                  _this657.element.style.maxHeight = eventArgs.maxHeight;
                }

                _this657.storeActiveElement = document.activeElement;
                _this657.element.tabIndex = -1;

                if (_this657.isModal && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this657.dlgOverlay)) {
                  _this657.dlgOverlay.style.display = 'block';
                  _this657.dlgContainer.style.display = 'flex';
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this657.dlgOverlay], 'e-fade');

                  if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this657.targetEle)) {
                    if (_this657.targetEle === document.body) {
                      _this657.dlgContainer.style.position = 'fixed';
                    } else {
                      _this657.dlgContainer.style.position = 'absolute';
                    }

                    _this657.dlgOverlay.style.position = 'absolute';
                    _this657.element.style.position = 'relative';
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this657.targetEle], [DLG_TARGET, SCROLL_DISABLED]);
                  } else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);
                  }
                }

                var openAnimation = {
                  name: _this657.animationSettings.effect + 'In',
                  duration: _this657.animationSettings.duration,
                  delay: _this657.animationSettings.delay
                };
                var zIndexElement = _this657.isModal ? _this657.element.parentElement : _this657.element;

                if (_this657.calculatezIndex) {
                  _this657.setzIndex(zIndexElement, true);

                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setStyleAttribute"])(_this657.element, {
                    'zIndex': _this657.zIndex
                  });

                  if (_this657.isModal) {
                    _this657.setOverlayZindex(_this657.zIndex);
                  }
                }

                _this657.animationSettings.effect === 'None' ? _this657.popupObj.show() : _this657.popupObj.show(openAnimation);
                _this657.dialogOpen = true;
                var prevOnChange = _this657.isProtectedOnChange;
                _this657.isProtectedOnChange = true;
                _this657.visible = true;
                _this657.preventVisibility = true;
                _this657.isProtectedOnChange = prevOnChange;
              }
            });
          }
        }
        /**
         * Closes the dialog if it is in visible state.
         * @return {void}
         */

      }, {
        key: "hide",
        value: function hide(event) {
          var _this658 = this;

          if (!this.element.classList.contains(ROOT)) {
            return;
          }

          if (this.preventVisibility) {
            var eventArgs = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() ? {
              cancel: false,
              isInteracted: event ? true : false,
              element: this.element,
              container: this.isModal ? this.dlgContainer : this.element,
              event: event
            } : {
              cancel: false,
              isInteracted: event ? true : false,
              element: this.element,
              target: this.target,
              container: this.isModal ? this.dlgContainer : this.element,
              event: event
            };
            this.closeArgs = eventArgs;
            this.trigger('beforeClose', eventArgs, function (beforeCloseArgs) {
              if (!beforeCloseArgs.cancel) {
                if (_this658.isModal) {
                  !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(_this658.targetEle) ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([_this658.targetEle], [DLG_TARGET, SCROLL_DISABLED]) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);
                }

                var closeAnimation = {
                  name: _this658.animationSettings.effect + 'Out',
                  duration: _this658.animationSettings.duration,
                  delay: _this658.animationSettings.delay
                };
                _this658.animationSettings.effect === 'None' ? _this658.popupObj.hide() : _this658.popupObj.hide(closeAnimation);
                _this658.dialogOpen = false;
                var prevOnChange = _this658.isProtectedOnChange;
                _this658.isProtectedOnChange = true;
                _this658.visible = false;
                _this658.preventVisibility = false;
                _this658.isProtectedOnChange = prevOnChange;
              }
            });
          }
        }
        /**
         * Specifies to view the Full screen Dialog.
         * @private
         */

      }, {
        key: "fullScreen",
        value: function fullScreen(args) {
          var top = this.element.offsetTop;
          var left = this.element.offsetLeft;

          if (args) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], FULLSCREEN);
            var display = this.element.style.display;
            this.element.style.display = 'none';
            this.element.style.maxHeight = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target) ? this.targetEle.offsetHeight + 'px' : window.innerHeight + 'px';
            this.element.style.display = display;
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);

            if (this.allowDragging && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.dragObj)) {
              this.dragObj.destroy();
            }
          } else {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], FULLSCREEN);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([document.body], [DLG_TARGET, SCROLL_DISABLED]);

            if (this.allowDragging && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.headerContent)) {
              this.setAllowDragging();
            }
          }

          return args;
        }
        /**
         * Returns the dialog button instances.
         * Based on that, you can dynamically change the button states.
         * @param { number } index - Index of the button.
         * @return {Button}
         */

      }, {
        key: "getButtons",
        value: function getButtons(index) {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(index)) {
            return this.btnObj[index];
          }

          return this.btnObj;
        }
      }]);

      return Dialog;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Dialog.prototype, "content", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Dialog.prototype, "enableHtmlSanitizer", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Dialog.prototype, "showCloseIcon", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Dialog.prototype, "isModal", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Dialog.prototype, "header", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Dialog.prototype, "visible", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Dialog.prototype, "enableResize", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Dialog.prototype, "height", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Dialog.prototype, "minHeight", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('100%')], Dialog.prototype, "width", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Dialog.prototype, "cssClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(1000)], Dialog.prototype, "zIndex", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], Dialog.prototype, "target", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Dialog.prototype, "footerTemplate", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Dialog.prototype, "allowDragging", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([{}], ButtonProps)], Dialog.prototype, "buttons", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Dialog.prototype, "closeOnEscape", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AnimationSettings)], Dialog.prototype, "animationSettings", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({
      X: 'center',
      Y: 'center'
    }, PositionData)], Dialog.prototype, "position", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "created", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "open", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "beforeSanitizeHtml", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "beforeOpen", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "close", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "beforeClose", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "dragStart", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "dragStop", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "drag", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "overlayClick", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "resizeStart", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "resizing", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "resizeStop", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Dialog.prototype, "destroyed", void 0);

    Dialog = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Dialog);
    /**
     * Base for creating Alert and Confirmation Dialog through util method.
     */

    var DialogUtility;

    (function (DialogUtility) {
      /**
       * An alert dialog box is used to display warning like messages to the users.
       * ```
       * Eg : DialogUtility.alert('Alert message');
       *
       * ```
       */

      /* istanbul ignore next */
      function alert(args) {
        var dialogElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
          'className': DLG_UTIL_ALERT
        });
        document.body.appendChild(dialogElement);
        var alertDialogObj;
        var okButtonModel = [{
          buttonModel: {
            isPrimary: true,
            content: 'OK'
          },
          click: function click() {
            this.hide();
          }
        }];

        if (typeof args === 'string') {
          alertDialogObj = createDialog({
            content: args,
            position: {
              X: 'center',
              Y: 'top'
            },
            isModal: true,
            header: DLG_UTIL_DEFAULT_TITLE,
            buttons: okButtonModel
          }, dialogElement);
        } else {
          alertDialogObj = createDialog(alertOptions(args), dialogElement);
        }

        alertDialogObj.close = function () {
          if (args && args.close) {
            args.close.apply(alertDialogObj);
          }

          alertDialogObj.destroy();

          if (alertDialogObj.element.classList.contains('e-dlg-modal')) {
            alertDialogObj.element.parentElement.remove();
            alertDialogObj.target.classList.remove(DLG_UTIL_ROOT);
          } else {
            alertDialogObj.element.remove();
          }
        };

        return alertDialogObj;
      }

      DialogUtility.alert = alert;
      /**
       * A confirm dialog displays a specified message along with ‘OK’ and ‘Cancel’ button.
       * ```
       * Eg : DialogUtility.confirm('Confirm dialog message');
       *
       * ```
       */

      /* istanbul ignore next */

      function confirm(args) {
        var dialogElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"])('div', {
          'className': DLG_UTIL_CONFIRM
        });
        document.body.appendChild(dialogElement);
        var confirmDialogObj;
        var okCancelButtonModel = [{
          buttonModel: {
            isPrimary: true,
            content: 'OK'
          },
          click: function click() {
            this.hide();
          }
        }, {
          buttonModel: {
            content: 'Cancel'
          },
          click: function click() {
            this.hide();
          }
        }];

        if (typeof args === 'string') {
          confirmDialogObj = createDialog({
            position: {
              X: 'center',
              Y: 'top'
            },
            content: args,
            isModal: true,
            header: DLG_UTIL_DEFAULT_TITLE,
            buttons: okCancelButtonModel
          }, dialogElement);
        } else {
          confirmDialogObj = createDialog(confirmOptions(args), dialogElement);
        }

        confirmDialogObj.close = function () {
          if (args && args.close) {
            args.close.apply(confirmDialogObj);
          }

          confirmDialogObj.destroy();

          if (confirmDialogObj.element.classList.contains('e-dlg-modal')) {
            confirmDialogObj.element.parentElement.remove();
            confirmDialogObj.target.classList.remove(DLG_UTIL_ROOT);
          } else {
            confirmDialogObj.element.remove();
          }
        };

        return confirmDialogObj;
      }

      DialogUtility.confirm = confirm;

      function createDialog(options, element) {
        var dialogObject = new Dialog(options);
        dialogObject.appendTo(element);
        return dialogObject;
      }

      function alertOptions(option) {
        var options = {};
        options.buttons = [];
        options = formOptions(options, option);
        options = setAlertButtonModel(options, option);
        return options;
      }

      function confirmOptions(option) {
        var options = {};
        options.buttons = [];
        options = formOptions(options, option);
        options = setConfirmButtonModel(options, option);
        return options;
      }

      function formOptions(options, option) {
        options.header = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.title) ? option.title : DLG_UTIL_DEFAULT_TITLE;
        options.content = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.content) ? option.content : '';
        options.isModal = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.isModal) ? option.isModal : true;
        options.showCloseIcon = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.showCloseIcon) ? option.showCloseIcon : false;
        options.allowDragging = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.isDraggable) ? option.isDraggable : false;
        options.closeOnEscape = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.closeOnEscape) ? option.closeOnEscape : false;
        options.position = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.position) ? option.position : {
          X: 'center',
          Y: 'top'
        };
        options.animationSettings = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.animationSettings) ? option.animationSettings : {
          effect: 'Fade',
          duration: 400,
          delay: 0
        };
        options.cssClass = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.cssClass) ? option.cssClass : '';
        options.zIndex = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.zIndex) ? option.zIndex : 1000;
        options.open = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.open) ? option.open : null;
        return options;
      }

      function setAlertButtonModel(options, option) {
        var alertButtonModel = [{
          buttonModel: {
            isPrimary: true,
            content: 'OK'
          },
          click: function click() {
            this.hide();
          }
        }];

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.okButton)) {
          options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, alertButtonModel[0]);
        } else {
          options.buttons = alertButtonModel;
        }

        return options;
      }

      function setConfirmButtonModel(options, option) {
        var okButtonModel = {
          buttonModel: {
            isPrimary: true,
            content: 'OK'
          },
          click: function click() {
            this.hide();
          }
        };
        var cancelButtonModel = {
          buttonModel: {
            content: 'Cancel'
          },
          click: function click() {
            this.hide();
          }
        };

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.okButton)) {
          options.buttons[0] = formButtonModel(options.buttons[0], option.okButton, okButtonModel);
        } else {
          options.buttons[0] = okButtonModel;
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.cancelButton)) {
          options.buttons[1] = formButtonModel(options.buttons[1], option.cancelButton, cancelButtonModel);
        } else {
          options.buttons[1] = cancelButtonModel;
        }

        return options;
      }

      function formButtonModel(buttonModel, option, buttonPropModel) {
        var buttonProps = buttonPropModel;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.text)) {
          buttonProps.buttonModel.content = option.text;
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.icon)) {
          buttonProps.buttonModel.iconCss = option.icon;
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.cssClass)) {
          buttonProps.buttonModel.cssClass = option.cssClass;
        }

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(option.click)) {
          buttonProps.click = option.click;
        }

        return buttonProps;
      }
    })(DialogUtility || (DialogUtility = {}));
    /**
     * Dialog Component
     */


    var __decorate$2 = undefined && undefined.__decorate || function (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;
    };

    var TOUCHEND_HIDE_DELAY = 1500;
    var TAPHOLD_THRESHOLD = 500;
    var SHOW_POINTER_TIP_GAP = 0;
    var HIDE_POINTER_TIP_GAP = 8;
    var MOUSE_TRAIL_GAP = 2;
    var POINTER_ADJUST = 2;
    var ROOT$1 = 'e-tooltip';
    var RTL$1 = 'e-rtl';
    var DEVICE$1 = 'e-bigger';
    var ICON$1 = 'e-icons';
    var CLOSE = 'e-tooltip-close';
    var TOOLTIP_WRAP = 'e-tooltip-wrap';
    var CONTENT = 'e-tip-content';
    var ARROW_TIP = 'e-arrow-tip';
    var ARROW_TIP_OUTER = 'e-arrow-tip-outer';
    var ARROW_TIP_INNER = 'e-arrow-tip-inner';
    var TIP_BOTTOM = 'e-tip-bottom';
    var TIP_TOP = 'e-tip-top';
    var TIP_LEFT = 'e-tip-left';
    var TIP_RIGHT = 'e-tip-right';
    var POPUP_ROOT$1 = 'e-popup';
    var POPUP_OPEN = 'e-popup-open';
    var POPUP_CLOSE = 'e-popup-close';
    var POPUP_LIB = 'e-lib';
    var HIDE_POPUP = 'e-hidden';

    var Animation$1 = /*#__PURE__*/function (_syncfusion_ej2_base_57) {
      _inherits(Animation$1, _syncfusion_ej2_base_57);

      var _super242 = _createSuper(Animation$1);

      function Animation$1() {
        _classCallCheck(this, Animation$1);

        return _super242.apply(this, arguments);
      }

      return Animation$1;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({
      effect: 'FadeIn',
      duration: 150,
      delay: 0
    })], Animation$1.prototype, "open", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])({
      effect: 'FadeOut',
      duration: 150,
      delay: 0
    })], Animation$1.prototype, "close", void 0);
    /**
     * Represents the Tooltip component that displays a piece of information about the target element on mouse hover.
     * ```html
     * <div id="tooltip">Show Tooltip</div>
     * ```
     * ```typescript
     * <script>
     *   var tooltipObj = new Tooltip({ content: 'Tooltip text' });
     *   tooltipObj.appendTo("#tooltip");
     * </script>
     * ```
     */


    var Tooltip = /*#__PURE__*/function (_syncfusion_ej2_base_58) {
      _inherits(Tooltip, _syncfusion_ej2_base_58);

      var _super243 = _createSuper(Tooltip);

      /**
       * Constructor for creating the Tooltip Component
       */
      function Tooltip(options, element) {
        var _this659;

        _classCallCheck(this, Tooltip);

        _this659 = _super243.call(this, options, element);
        _this659.isBlazorTooltip = false;
        _this659.contentTargetValue = null;
        _this659.contentEvent = null;
        _this659.contentAnimation = null;
        return _this659;
      }

      _createClass2(Tooltip, [{
        key: "initialize",
        value: function initialize() {
          this.formatPosition();

          if (!this.isServerRender()) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.element], ROOT$1);
          }
        }
      }, {
        key: "isServerRender",
        value: function isServerRender() {
          return Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])() && this.isServerRendered;
        }
      }, {
        key: "formatPosition",
        value: function formatPosition() {
          if (this.position.indexOf('Top') === 0 || this.position.indexOf('Bottom') === 0) {
            var _this$position$split = this.position.split(/(?=[A-Z])/);

            var _this$position$split2 = _slicedToArray(_this$position$split, 2);

            this.tooltipPositionY = _this$position$split2[0];
            this.tooltipPositionX = _this$position$split2[1];
          } else {
            var _this$position$split3 = this.position.split(/(?=[A-Z])/);

            var _this$position$split4 = _slicedToArray(_this$position$split3, 2);

            this.tooltipPositionX = _this$position$split4[0];
            this.tooltipPositionY = _this$position$split4[1];
          }
        }
      }, {
        key: "renderArrow",
        value: function renderArrow() {
          this.setTipClass(this.position);

          if (!this.isServerRender()) {
            var tip = this.createElement('div', {
              className: ARROW_TIP + ' ' + this.tipClass
            });
            tip.appendChild(this.createElement('div', {
              className: ARROW_TIP_OUTER + ' ' + this.tipClass
            }));
            tip.appendChild(this.createElement('div', {
              className: ARROW_TIP_INNER + ' ' + this.tipClass
            }));
            this.tooltipEle.appendChild(tip);
          } else {
            var _tip = this.tooltipEle.querySelector('.' + ARROW_TIP);

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_tip.querySelector('.' + ARROW_TIP_OUTER)], this.tipClass);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_tip.querySelector('.' + ARROW_TIP_INNER)], this.tipClass);
            this.tooltipEle.appendChild(_tip);
          }
        }
      }, {
        key: "setTipClass",
        value: function setTipClass(position) {
          if (position.indexOf('Right') === 0) {
            this.tipClass = TIP_LEFT;
          } else if (position.indexOf('Bottom') === 0) {
            this.tipClass = TIP_TOP;
          } else if (position.indexOf('Left') === 0) {
            this.tipClass = TIP_RIGHT;
          } else {
            this.tipClass = TIP_BOTTOM;
          }
        }
      }, {
        key: "renderPopup",
        value: function renderPopup(target) {
          var elePos = this.mouseTrail ? {
            top: 0,
            left: 0
          } : this.getTooltipPosition(target);
          this.tooltipEle.classList.remove(POPUP_LIB);
          this.popupObj = new Popup(this.tooltipEle, {
            height: this.height,
            width: this.width,
            position: {
              X: elePos.left,
              Y: elePos.top
            },
            enableRtl: this.enableRtl,
            open: this.openPopupHandler.bind(this),
            close: this.closePopupHandler.bind(this)
          });
        }
      }, {
        key: "getTooltipPosition",
        value: function getTooltipPosition(target) {
          this.tooltipEle.style.display = 'block';
          var pos = calculatePosition(target, this.tooltipPositionX, this.tooltipPositionY);
          var offsetPos = this.calculateTooltipOffset(this.position);
          var elePos = this.collisionFlipFit(target, pos.left + offsetPos.left, pos.top + offsetPos.top);
          this.tooltipEle.style.display = '';
          return elePos;
        }
      }, {
        key: "reposition",
        value: function reposition(target) {
          var elePos = this.getTooltipPosition(target);
          this.popupObj.position = {
            X: elePos.left,
            Y: elePos.top
          };
          this.popupObj.dataBind();
        }
      }, {
        key: "openPopupHandler",
        value: function openPopupHandler() {
          if (!this.mouseTrail && this.needTemplateReposition()) {
            this.reposition(this.findTarget());
          }

          this.trigger('afterOpen', this.tooltipEventArgs);
        }
      }, {
        key: "closePopupHandler",
        value: function closePopupHandler() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["resetBlazorTemplate"])(this.element.id + 'content', 'Content');
          this.clear();
          this.trigger('afterClose', this.tooltipEventArgs);
        }
      }, {
        key: "calculateTooltipOffset",
        value: function calculateTooltipOffset(position) {
          var pos = {
            top: 0,
            left: 0
          };
          var tooltipEleWidth = this.tooltipEle.offsetWidth;
          var tooltipEleHeight = this.tooltipEle.offsetHeight;
          var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);
          var tipWidth = arrowEle ? arrowEle.offsetWidth : 0;
          var tipHeight = arrowEle ? arrowEle.offsetHeight : 0;
          var tipAdjust = this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP;
          var tipHeightAdjust = tipHeight / 2 + POINTER_ADJUST + (this.tooltipEle.offsetHeight - this.tooltipEle.clientHeight);
          var tipWidthAdjust = tipWidth / 2 + POINTER_ADJUST + (this.tooltipEle.offsetWidth - this.tooltipEle.clientWidth);

          if (this.mouseTrail) {
            tipAdjust += MOUSE_TRAIL_GAP;
          }

          switch (position) {
            case 'RightTop':
              pos.left += tipWidth + tipAdjust;
              pos.top -= tooltipEleHeight - tipHeightAdjust;
              break;

            case 'RightCenter':
              pos.left += tipWidth + tipAdjust;
              pos.top -= tooltipEleHeight / 2;
              break;

            case 'RightBottom':
              pos.left += tipWidth + tipAdjust;
              pos.top -= tipHeightAdjust;
              break;

            case 'BottomRight':
              pos.top += tipHeight + tipAdjust;
              pos.left -= tipWidthAdjust;
              break;

            case 'BottomCenter':
              pos.top += tipHeight + tipAdjust;
              pos.left -= tooltipEleWidth / 2;
              break;

            case 'BottomLeft':
              pos.top += tipHeight + tipAdjust;
              pos.left -= tooltipEleWidth - tipWidthAdjust;
              break;

            case 'LeftBottom':
              pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
              pos.top -= tipHeightAdjust;
              break;

            case 'LeftCenter':
              pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
              pos.top -= tooltipEleHeight / 2;
              break;

            case 'LeftTop':
              pos.left -= tipWidth + tooltipEleWidth + tipAdjust;
              pos.top -= tooltipEleHeight - tipHeightAdjust;
              break;

            case 'TopLeft':
              pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
              pos.left -= tooltipEleWidth - tipWidthAdjust;
              break;

            case 'TopRight':
              pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
              pos.left -= tipWidthAdjust;
              break;

            default:
              pos.top -= tooltipEleHeight + tipHeight + tipAdjust;
              pos.left -= tooltipEleWidth / 2;
              break;
          }

          pos.left += this.offsetX;
          pos.top += this.offsetY;
          return pos;
        }
      }, {
        key: "updateTipPosition",
        value: function updateTipPosition(position) {
          var selEle = this.tooltipEle.querySelectorAll('.' + ARROW_TIP + ',.' + ARROW_TIP_OUTER + ',.' + ARROW_TIP_INNER);
          var removeList = [TIP_BOTTOM, TIP_TOP, TIP_LEFT, TIP_RIGHT];
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(selEle, removeList);
          this.setTipClass(position);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])(selEle, this.tipClass);
        }
      }, {
        key: "adjustArrow",
        value: function adjustArrow(target, position, tooltipPositionX, tooltipPositionY) {
          if (this.showTipPointer === false) {
            return;
          }

          this.updateTipPosition(position);
          var leftValue;
          var topValue;
          this.tooltipEle.style.display = 'block';
          var tooltipWidth = this.tooltipEle.clientWidth;
          var tooltipHeight = this.tooltipEle.clientHeight;
          var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);
          var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);
          var tipWidth = arrowEle.offsetWidth;
          var tipHeight = arrowEle.offsetHeight;
          this.tooltipEle.style.display = '';

          if (this.tipClass === TIP_BOTTOM || this.tipClass === TIP_TOP) {
            if (this.tipClass === TIP_BOTTOM) {
              topValue = '99.9%'; // Arrow icon aligned -2px height from ArrowOuterTip div

              arrowInnerELe.style.top = '-' + (tipHeight - 2) + 'px';
            } else {
              topValue = -(tipHeight - 1) + 'px'; // Arrow icon aligned -6px height from ArrowOuterTip div

              arrowInnerELe.style.top = '-' + (tipHeight - 6) + 'px';
            }

            if (target) {
              var tipPosExclude = tooltipPositionX !== 'Center' || tooltipWidth > target.offsetWidth || this.mouseTrail;

              if (tipPosExclude && tooltipPositionX === 'Left' || !tipPosExclude && this.tipPointerPosition === 'End') {
                leftValue = tooltipWidth - tipWidth - POINTER_ADJUST + 'px';
              } else if (tipPosExclude && tooltipPositionX === 'Right' || !tipPosExclude && this.tipPointerPosition === 'Start') {
                leftValue = POINTER_ADJUST + 'px';
              } else {
                leftValue = tooltipWidth / 2 - tipWidth / 2 + 'px';
              }
            }
          } else {
            if (this.tipClass === TIP_RIGHT) {
              leftValue = '99.9%'; // Arrow icon aligned -2px left from ArrowOuterTip div

              arrowInnerELe.style.left = '-' + (tipWidth - 2) + 'px';
            } else {
              leftValue = -(tipWidth - 1) + 'px'; // Arrow icon aligned -2px from ArrowOuterTip width

              arrowInnerELe.style.left = -tipWidth + (tipWidth - 2) + 'px';
            }

            var _tipPosExclude = tooltipPositionY !== 'Center' || tooltipHeight > target.offsetHeight || this.mouseTrail;

            if (_tipPosExclude && tooltipPositionY === 'Top' || !_tipPosExclude && this.tipPointerPosition === 'End') {
              topValue = tooltipHeight - tipHeight - POINTER_ADJUST + 'px';
            } else if (_tipPosExclude && tooltipPositionY === 'Bottom' || !_tipPosExclude && this.tipPointerPosition === 'Start') {
              topValue = POINTER_ADJUST + 'px';
            } else {
              topValue = tooltipHeight / 2 - tipHeight / 2 + 'px';
            }
          }

          arrowEle.style.top = topValue;
          arrowEle.style.left = leftValue;
        }
      }, {
        key: "renderContent",
        value: function renderContent(target) {
          var tooltipContent = this.tooltipEle.querySelector('.' + CONTENT);

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], this.cssClass.split(' '));
          }

          if (target && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute('title'))) {
            target.setAttribute('data-content', target.getAttribute('title'));
            target.removeAttribute('title');
          }

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.content)) {
            if (this.isBlazorTooltip || !this.isServerRender()) {
              tooltipContent.innerHTML = '';

              if (this.content instanceof HTMLElement) {
                tooltipContent.appendChild(this.content);
              } else if (typeof this.content === 'string' && this.content.indexOf('<div>Blazor') < 0) {
                if (this.enableHtmlSanitizer) {
                  this.setProperties({
                    content: _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.content)
                  }, true);
                }

                tooltipContent.innerHTML = this.content;
              } else {
                var templateFunction = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["compile"])(this.content);
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["append"])(templateFunction({}, null, null, this.element.id + 'content'), tooltipContent);

                if (typeof this.content === 'string' && this.content.indexOf('<div>Blazor') >= 0) {
                  this.isBlazorTemplate = true;
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["updateBlazorTemplate"])(this.element.id + 'content', 'Content', this);
                }
              }
            }
          } else {
            if (target && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute('data-content'))) {
              tooltipContent.innerHTML = target.getAttribute('data-content');
            }
          }
        }
      }, {
        key: "renderCloseIcon",
        value: function renderCloseIcon() {
          if (!this.isSticky) {
            return;
          }

          var tipClose = this.createElement('div', {
            className: ICON$1 + ' ' + CLOSE
          });
          this.tooltipEle.appendChild(tipClose);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(tipClose, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.onStickyClose, this);
        }
      }, {
        key: "addDescribedBy",
        value: function addDescribedBy(target, id) {
          var describedby = (target.getAttribute('aria-describedby') || '').split(/\s+/);

          if (describedby.indexOf(id) < 0) {
            describedby.push(id);
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(target, {
            'aria-describedby': describedby.join(' ').trim(),
            'data-tooltip-id': id
          });
        }
      }, {
        key: "removeDescribedBy",
        value: function removeDescribedBy(target) {
          var id = target.getAttribute('data-tooltip-id');
          var describedby = (target.getAttribute('aria-describedby') || '').split(/\s+/);
          var index = describedby.indexOf(id);

          if (index !== -1) {
            describedby.splice(index, 1);
          }

          target.removeAttribute('data-tooltip-id');
          var orgdescribedby = describedby.join(' ').trim();

          if (orgdescribedby) {
            target.setAttribute('aria-describedby', orgdescribedby);
          } else {
            target.removeAttribute('aria-describedby');
          }
        }
      }, {
        key: "tapHoldHandler",
        value: function tapHoldHandler(evt) {
          clearTimeout(this.autoCloseTimer);
          this.targetHover(evt.originalEvent);
        }
      }, {
        key: "touchEndHandler",
        value: function touchEndHandler(e) {
          var _this660 = this;

          if (this.isSticky) {
            return;
          }

          var close = function close() {
            _this660.close();
          };

          this.autoCloseTimer = setTimeout(close, TOUCHEND_HIDE_DELAY);
        }
      }, {
        key: "targetClick",
        value: function targetClick(e) {
          var target;

          if (this.target) {
            target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, this.target);
          } else {
            target = this.element;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target)) {
            return;
          }

          if (target.getAttribute('data-tooltip-id') === null) {
            this.targetHover(e);
          } else if (!this.isSticky) {
            this.hideTooltip(this.animation.close, e, target);
          }
        }
      }, {
        key: "targetHover",
        value: function targetHover(e) {
          var target;

          if (this.target) {
            target = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, this.target);
          } else {
            target = this.element;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target) || target.getAttribute('data-tooltip-id') !== null) {
            return;
          }

          var targetList = [].slice.call(document.querySelectorAll('[data-tooltip-id= ' + this.ctrlId + '_content]'));

          var _iterator151 = _createForOfIteratorHelper(targetList),
              _step151;

          try {
            for (_iterator151.s(); !(_step151 = _iterator151.n()).done;) {
              var _target2 = _step151.value;
              this.restoreElement(_target2);
            }
          } catch (err) {
            _iterator151.e(err);
          } finally {
            _iterator151.f();
          }

          this.showTooltip(target, this.animation.open, e);
        }
      }, {
        key: "showTooltip",
        value: function showTooltip(target, showAnimation, e) {
          var _this661 = this;

          clearTimeout(this.showTimer);
          clearTimeout(this.hideTimer);
          this.tooltipEventArgs = {
            type: e ? e.type : null,
            cancel: false,
            target: target,
            event: e ? e : null,
            element: this.tooltipEle,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)
          };

          var observeCallback = function observeCallback(beforeRenderArgs) {
            _this661.beforeRenderCallback(beforeRenderArgs, target, e, showAnimation);
          };

          this.trigger('beforeRender', this.tooltipEventArgs, observeCallback.bind(this));
        }
      }, {
        key: "beforeRenderCallback",
        value: function beforeRenderCallback(beforeRenderArgs, target, e, showAnimation) {
          var isBlazorTooltipRendered = false;

          if (beforeRenderArgs.cancel) {
            this.isHidden = true;
            this.clear();
          } else {
            this.isHidden = false;

            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltipEle)) {
              if (this.isServerRender()) {
                this.contentTargetValue = target;
                this.contentEvent = e;
                this.contentAnimation = showAnimation;
                var args = {
                  'enableTooltip': 'true'
                }; // tslint:disable

                this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args); // tslint:enable

                isBlazorTooltipRendered = true;
              } else {
                this.ctrlId = this.element.getAttribute('id') ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])(this.element.getAttribute('id')) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('tooltip');
                this.tooltipEle = this.createElement('div', {
                  className: TOOLTIP_WRAP + ' ' + POPUP_ROOT$1 + ' ' + POPUP_LIB,
                  attrs: {
                    role: 'tooltip',
                    'aria-hidden': 'false',
                    'id': this.ctrlId + '_content'
                  },
                  styles: 'width:' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width) + ';height:' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height) + ';position:absolute;'
                });
                this.beforeRenderBlazor(target, this);
              }

              if (!isBlazorTooltipRendered) {
                this.afterRenderBlazor(target, e, showAnimation, this);
              }
            } else {
              if (this.isServerRender()) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], POPUP_OPEN);
                document.body.appendChild(this.tooltipEle);
                this.renderCloseIcon();
                this.renderPopup(target);
              }

              if (target) {
                this.adjustArrow(target, this.position, this.tooltipPositionX, this.tooltipPositionY);
                this.addDescribedBy(target, this.ctrlId + '_content');
                this.renderContent(target);

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"].stop(this.tooltipEle);

                this.reposition(target);
                this.afterRenderBlazor(target, e, showAnimation, this);
              }
            }
          }
        }
      }, {
        key: "contentUpdated",
        value: function contentUpdated(args) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.tooltipEle)) {
            if (this.isServerRender()) {
              this.ctrlId = this.element.id;
              this.tooltipEle = document.querySelector('#' + this.ctrlId + '_content');

              if (this.tooltipEle) {
                this.tooltipEle.setAttribute('style', 'width:' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.width) + ';height:' + Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(this.height) + ';position:absolute;');
                this.beforeRenderBlazor(this.contentTargetValue, this);
                this.afterRenderBlazor(this.contentTargetValue, this.contentEvent, this.contentAnimation, this);
                this.contentTargetValue = this.contentEvent = this.contentAnimation = null;
              }
            }
          }
        }
      }, {
        key: "beforeRenderBlazor",
        value: function beforeRenderBlazor(target, ctrlObj) {
          if (target) {
            if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ctrlObj.tooltipEle], DEVICE$1);
            }

            if (ctrlObj.width !== 'auto') {
              ctrlObj.tooltipEle.style.maxWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(ctrlObj.width);
            }

            if (!this.isServerRender()) {
              ctrlObj.tooltipEle.appendChild(ctrlObj.createElement('div', {
                className: CONTENT
              }));
            }

            document.body.appendChild(ctrlObj.tooltipEle);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ctrlObj.tooltipEle], HIDE_POPUP);
            ctrlObj.addDescribedBy(target, ctrlObj.ctrlId + '_content');
            ctrlObj.renderContent(target);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ctrlObj.tooltipEle], POPUP_OPEN);

            if (ctrlObj.showTipPointer) {
              ctrlObj.renderArrow();
            }

            ctrlObj.renderCloseIcon();
            ctrlObj.renderPopup(target);
            ctrlObj.adjustArrow(target, ctrlObj.position, ctrlObj.tooltipPositionX, ctrlObj.tooltipPositionY);

            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"].stop(ctrlObj.tooltipEle);

            ctrlObj.reposition(target);
          }
        }
      }, {
        key: "afterRenderBlazor",
        value: function afterRenderBlazor(target, e, showAnimation, ctrlObj) {
          if (target) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([ctrlObj.tooltipEle], POPUP_OPEN);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ctrlObj.tooltipEle], POPUP_CLOSE);
            ctrlObj.tooltipEventArgs = {
              type: e ? e.type : null,
              cancel: false,
              target: target,
              event: e ? e : null,
              element: ctrlObj.tooltipEle,
              isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)
            };

            if (ctrlObj.needTemplateReposition() && !ctrlObj.mouseTrail) {
              ctrlObj.tooltipEle.style.display = 'none';
            }

            var observeCallback = function observeCallback(observedArgs) {
              ctrlObj.beforeOpenCallback(observedArgs, target, showAnimation, e);
            };

            ctrlObj.trigger('beforeOpen', ctrlObj.tooltipEventArgs, observeCallback.bind(ctrlObj));
          }
        }
      }, {
        key: "beforeOpenCallback",
        value: function beforeOpenCallback(observedArgs, target, showAnimation, e) {
          var _this662 = this;

          if (observedArgs.cancel) {
            this.isHidden = true;
            this.clear();
            this.restoreElement(target);
          } else {
            var openAnimation = {
              name: showAnimation.effect,
              duration: showAnimation.duration,
              delay: showAnimation.delay,
              timingFunction: 'easeOut'
            };

            if (showAnimation.effect === 'None') {
              openAnimation = undefined;
            }

            if (this.openDelay > 0) {
              var show = function show() {
                if (_this662.popupObj) {
                  _this662.popupObj.show(openAnimation, target);
                }
              };

              this.showTimer = setTimeout(show, this.openDelay);
            } else {
              if (this.popupObj) {
                this.popupObj.show(openAnimation, target);
              }
            }
          }

          if (e) {
            this.wireMouseEvents(e, target);
          }
        }
      }, {
        key: "needTemplateReposition",
        value: function needTemplateReposition() {
          // tslint:disable-next-line:no-any
          var tooltip = this;
          return !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(tooltip.viewContainerRef) && typeof tooltip.viewContainerRef !== 'string' || this.isServerRender() && this.isBlazorTemplate;
        }
      }, {
        key: "checkCollision",
        value: function checkCollision(target, x, y) {
          var elePos = {
            left: x,
            top: y,
            position: this.position,
            horizontal: this.tooltipPositionX,
            vertical: this.tooltipPositionY
          };
          var affectedPos = isCollide(this.tooltipEle, this.target ? this.element : null, x, y);

          if (affectedPos.length > 0) {
            elePos.horizontal = affectedPos.indexOf('left') >= 0 ? 'Right' : affectedPos.indexOf('right') >= 0 ? 'Left' : this.tooltipPositionX;
            elePos.vertical = affectedPos.indexOf('top') >= 0 ? 'Bottom' : affectedPos.indexOf('bottom') >= 0 ? 'Top' : this.tooltipPositionY;
          }

          return elePos;
        }
      }, {
        key: "collisionFlipFit",
        value: function collisionFlipFit(target, x, y) {
          var elePos = this.checkCollision(target, x, y);
          var newpos = elePos.position;

          if (this.tooltipPositionY !== elePos.vertical) {
            newpos = this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0 ? elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical;
          }

          if (this.tooltipPositionX !== elePos.horizontal) {
            if (newpos.indexOf('Left') === 0) {
              elePos.vertical = newpos === 'LeftTop' || newpos === 'LeftCenter' ? 'Top' : 'Bottom';
              newpos = elePos.vertical + 'Left';
            }

            if (newpos.indexOf('Right') === 0) {
              elePos.vertical = newpos === 'RightTop' || newpos === 'RightCenter' ? 'Top' : 'Bottom';
              newpos = elePos.vertical + 'Right';
            }

            elePos.horizontal = this.tooltipPositionX;
          }

          this.tooltipEventArgs = {
            type: null,
            cancel: false,
            target: target,
            event: null,
            element: this.tooltipEle,
            collidedPosition: newpos
          };
          this.trigger('beforeCollision', this.tooltipEventArgs);

          if (elePos.position !== newpos) {
            var pos = calculatePosition(target, elePos.horizontal, elePos.vertical);
            this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);
            var offsetPos = this.calculateTooltipOffset(newpos);
            offsetPos.top -= 'TopBottom'.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1 && 'TopBottom'.indexOf(newpos.split(/(?=[A-Z])/)[0]) !== -1 ? 2 * this.offsetY : 0;
            offsetPos.left -= 'RightLeft'.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1 && 'RightLeft'.indexOf(newpos.split(/(?=[A-Z])/)[0]) !== -1 ? 2 * this.offsetX : 0;
            elePos.position = newpos;
            elePos.left = pos.left + offsetPos.left;
            elePos.top = pos.top + offsetPos.top;
          } else {
            this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);
          }

          var eleOffset = {
            left: elePos.left,
            top: elePos.top
          };
          var left = fit(this.tooltipEle, this.target ? this.element : null, {
            X: true,
            Y: false
          }, eleOffset).left;
          this.tooltipEle.style.display = 'block';

          if (this.showTipPointer && (newpos.indexOf('Bottom') === 0 || newpos.indexOf('Top') === 0)) {
            var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);
            var arrowleft = parseInt(arrowEle.style.left, 10) - (left - elePos.left);

            if (arrowleft < 0) {
              arrowleft = 0;
            } else if (arrowleft + arrowEle.offsetWidth > this.tooltipEle.clientWidth) {
              arrowleft = this.tooltipEle.clientWidth - arrowEle.offsetWidth;
            }

            arrowEle.style.left = arrowleft.toString() + 'px';
          }

          this.tooltipEle.style.display = '';
          eleOffset.left = left;
          return eleOffset;
        }
      }, {
        key: "hideTooltip",
        value: function hideTooltip(hideAnimation, e, targetElement) {
          var _this663 = this;

          var target;

          if (e) {
            target = this.target ? targetElement || e.target : this.element;
          } else {
            target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
          }

          this.tooltipEventArgs = {
            type: e ? e.type : null,
            cancel: false,
            target: target,
            event: e ? e : null,
            element: this.tooltipEle,
            isInteracted: !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(e)
          }; // this line commented for close the tooltip popup element even the target element destroyed in a page.
          //if (isNullOrUndefined(target)) { return; }

          this.trigger('beforeClose', this.tooltipEventArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              if (_this663.isServerRender()) {
                _this663.blazorHide(hideAnimation, target);
              } else {
                _this663.popupHide(hideAnimation, target);
              }
            } else {
              _this663.isHidden = false;
            }
          });
        }
        /* istanbul ignore next */

      }, {
        key: "blazorHide",
        value: function blazorHide(hideAnimation, target) {
          var proxy = this;

          var hide = function hide() {
            proxy.popupHide(hideAnimation, target);
          };

          if (this.popupObj) {
            this.popupHide(hideAnimation, target);
          } else {
            setTimeout(hide, 200);
          }
        }
      }, {
        key: "popupHide",
        value: function popupHide(hideAnimation, target) {
          var _this664 = this;

          this.clearTemplate();

          if (target) {
            this.restoreElement(target);
          }

          this.isHidden = true;
          var closeAnimation = {
            name: hideAnimation.effect,
            duration: hideAnimation.duration,
            delay: hideAnimation.delay,
            timingFunction: 'easeIn'
          };

          if (hideAnimation.effect === 'None') {
            closeAnimation = undefined;
          }

          if (this.closeDelay > 0) {
            var hide = function hide() {
              if (_this664.popupObj) {
                _this664.popupObj.hide(closeAnimation);
              }
            };

            this.hideTimer = setTimeout(hide, this.closeDelay);
          } else {
            if (this.popupObj) {
              this.popupObj.hide(closeAnimation);
            }
          }
        }
      }, {
        key: "restoreElement",
        value: function restoreElement(target) {
          this.unwireMouseEvents(target);

          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(target.getAttribute('data-content'))) {
            target.setAttribute('title', target.getAttribute('data-content'));
            target.removeAttribute('data-content');
          }

          this.removeDescribedBy(target);
        }
      }, {
        key: "clear",
        value: function clear() {
          if (this.tooltipEle) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.tooltipEle], POPUP_CLOSE);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], POPUP_OPEN);
          }

          if (this.isHidden) {
            if (this.popupObj) {
              this.popupObj.destroy();
            }

            if (this.isServerRender() && this.tooltipEle) {
              this.tooltipEle.style.display = 'none';
              var args = {
                'enableTooltip': 'false'
              }; // tslint:disable

              this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args); // tslint:enable

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tooltipEle);
            } else if (this.tooltipEle) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tooltipEle);
            }

            this.tooltipEle = null;
            this.popupObj = null;
          }
        }
      }, {
        key: "onMouseOut",
        value: function onMouseOut(e) {
          var enteredElement = e.relatedTarget; // don't close the tooltip only if it is tooltip content element

          if (enteredElement && !this.mouseTrail) {
            var checkForTooltipElement = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(enteredElement, ".".concat(TOOLTIP_WRAP, ".").concat(POPUP_LIB, ".").concat(POPUP_ROOT$1));

            if (checkForTooltipElement) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(checkForTooltipElement, 'mouseleave', this.tooltipElementMouseOut, this);

              this.unwireMouseEvents(e.target);
            } else {
              this.hideTooltip(this.animation.close, e, this.findTarget());

              if (this.closeDelay === 0) {
                this.clear();
              }
            }
          } else {
            this.hideTooltip(this.animation.close, e, this.findTarget());
            this.clear();
          }
        }
      }, {
        key: "tooltipElementMouseOut",
        value: function tooltipElementMouseOut(e) {
          this.hideTooltip(this.animation.close, e, this.findTarget());

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseleave', this.tooltipElementMouseOut);

          this.clear();
        }
      }, {
        key: "onStickyClose",
        value: function onStickyClose(e) {
          this.close();
        }
      }, {
        key: "onMouseMove",
        value: function onMouseMove(event) {
          var eventPageX = 0;
          var eventPageY = 0;

          if (event.type.indexOf('touch') > -1) {
            event.preventDefault();
            eventPageX = event.touches[0].pageX;
            eventPageY = event.touches[0].pageY;
          } else {
            eventPageX = event.pageX;
            eventPageY = event.pageY;
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"].stop(this.tooltipEle);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.tooltipEle], POPUP_CLOSE);
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], POPUP_OPEN);
          this.adjustArrow(event.target, this.position, this.tooltipPositionX, this.tooltipPositionY);
          var pos = this.calculateTooltipOffset(this.position);
          var x = eventPageX + pos.left + this.offsetX;
          var y = eventPageY + pos.top + this.offsetY;
          var elePos = this.checkCollision(event.target, x, y);

          if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {
            var newpos = this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0 ? elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;
            elePos.position = newpos;
            this.adjustArrow(event.target, elePos.position, elePos.horizontal, elePos.vertical);
            var colpos = this.calculateTooltipOffset(elePos.position);
            elePos.left = eventPageX + colpos.left - this.offsetX;
            elePos.top = eventPageY + colpos.top - this.offsetY;
          }

          this.tooltipEle.style.left = elePos.left + 'px';
          this.tooltipEle.style.top = elePos.top + 'px';
        }
      }, {
        key: "keyDown",
        value: function keyDown(event) {
          if (this.tooltipEle && event.keyCode === 27) {
            this.close();
          }
        }
      }, {
        key: "touchEnd",
        value: function touchEnd(e) {
          if (this.tooltipEle && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, '.' + ROOT$1) === null) {
            this.close();
          }
        }
      }, {
        key: "scrollHandler",
        value: function scrollHandler(e) {
          if (this.tooltipEle) {
            if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(e.target, ".".concat(TOOLTIP_WRAP, ".").concat(POPUP_LIB, ".").concat(POPUP_ROOT$1))) {
              this.close();
            }
          }
        }
        /**
         * Core method that initializes the control rendering.
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initialize();
          this.wireEvents(this.opensOn);
          this.renderComplete();
        }
        /**
         * Initializes the values of private members.
         * @private
         */

      }, {
        key: "preRender",
        value: function preRender() {
          this.tipClass = TIP_BOTTOM;
          this.tooltipPositionX = 'Center';
          this.tooltipPositionY = 'Top';
          this.isHidden = true;
        }
        /**
         * Binding events to the Tooltip element.
         * @hidden
         */

      }, {
        key: "wireEvents",
        value: function wireEvents(trigger) {
          var triggerList = this.getTriggerList(trigger);

          var _iterator152 = _createForOfIteratorHelper(triggerList),
              _step152;

          try {
            for (_iterator152.s(); !(_step152 = _iterator152.n()).done;) {
              var opensOn = _step152.value;

              if (opensOn === 'Custom') {
                return;
              }

              if (opensOn === 'Focus') {
                this.wireFocusEvents();
              }

              if (opensOn === 'Click') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.targetClick, this);
              }

              if (opensOn === 'Hover') {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                  this.touchModule = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Touch"](this.element, {
                    tapHoldThreshold: TAPHOLD_THRESHOLD,
                    tapHold: this.tapHoldHandler.bind(this)
                  });

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.touchEndHandler, this);
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseover', this.targetHover, this);

                  if (this.isServerRender() && !this.isSticky) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'mouseleave', this.onMouseOut, this);
                  }
                }
              }
            }
          } catch (err) {
            _iterator152.e(err);
          } finally {
            _iterator152.f();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'touchend', this.touchEnd, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'scroll wheel', this.scrollHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'keydown', this.keyDown, this);
        }
      }, {
        key: "getTriggerList",
        value: function getTriggerList(trigger) {
          if (trigger === 'Auto') {
            trigger = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice ? 'Hover' : 'Hover Focus';
          }

          return trigger.split(' ');
        }
      }, {
        key: "wireFocusEvents",
        value: function wireFocusEvents() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            var targetList = [].slice.call(this.element.querySelectorAll(this.target));

            var _iterator153 = _createForOfIteratorHelper(targetList),
                _step153;

            try {
              for (_iterator153.s(); !(_step153 = _iterator153.n()).done;) {
                var target = _step153.value;

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'focus', this.targetHover, this);
              }
            } catch (err) {
              _iterator153.e(err);
            } finally {
              _iterator153.f();
            }
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'focus', this.targetHover, this);
          }
        }
      }, {
        key: "wireMouseEvents",
        value: function wireMouseEvents(e, target) {
          if (this.tooltipEle) {
            if (!this.isSticky) {
              if (e.type === 'focus') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'blur', this.onMouseOut, this);
              }

              if (e.type === 'mouseover') {
                if (!this.isServerRender()) {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'mouseleave', this.onMouseOut, this);
                }
              }
            }

            if (this.mouseTrail) {
              _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(target, 'mousemove touchstart mouseenter', this.onMouseMove, this);
            }
          }
        }
        /**
         * Unbinding events from the element on widget destroy.
         * @hidden
         */

      }, {
        key: "unwireEvents",
        value: function unwireEvents(trigger) {
          var triggerList = this.getTriggerList(trigger);

          var _iterator154 = _createForOfIteratorHelper(triggerList),
              _step154;

          try {
            for (_iterator154.s(); !(_step154 = _iterator154.n()).done;) {
              var opensOn = _step154.value;

              if (opensOn === 'Custom') {
                return;
              }

              if (opensOn === 'Focus') {
                this.unwireFocusEvents();
              }

              if (opensOn === 'Click') {
                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchStartEvent, this.targetClick);
              }

              if (opensOn === 'Hover') {
                if (_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                  if (this.touchModule) {
                    this.touchModule.destroy();
                  }

                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].touchEndEvent, this.touchEndHandler);
                } else {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseover', this.targetHover);

                  if (this.isServerRender() && !this.isSticky) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'mouseleave', this.onMouseOut);
                  }
                }
              }
            }
          } catch (err) {
            _iterator154.e(err);
          } finally {
            _iterator154.f();
          }

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'touchend', this.touchEnd);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'scroll wheel', this.scrollHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'keydown', this.keyDown);
        }
      }, {
        key: "unwireFocusEvents",
        value: function unwireFocusEvents() {
          if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(this.target)) {
            var targetList = [].slice.call(this.element.querySelectorAll(this.target));

            var _iterator155 = _createForOfIteratorHelper(targetList),
                _step155;

            try {
              for (_iterator155.s(); !(_step155 = _iterator155.n()).done;) {
                var target = _step155.value;

                _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'focus', this.targetHover);
              }
            } catch (err) {
              _iterator155.e(err);
            } finally {
              _iterator155.f();
            }
          } else {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'focus', this.targetHover);
          }
        }
      }, {
        key: "unwireMouseEvents",
        value: function unwireMouseEvents(target) {
          if (!this.isSticky) {
            var triggerList = this.getTriggerList(this.opensOn);

            var _iterator156 = _createForOfIteratorHelper(triggerList),
                _step156;

            try {
              for (_iterator156.s(); !(_step156 = _iterator156.n()).done;) {
                var opensOn = _step156.value;

                if (opensOn === 'Focus') {
                  _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'blur', this.onMouseOut);
                }

                if (opensOn === 'Hover' && !_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Browser"].isDevice) {
                  if (!this.isServerRender()) {
                    _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mouseleave', this.onMouseOut);
                  }
                }
              }
            } catch (err) {
              _iterator156.e(err);
            } finally {
              _iterator156.f();
            }
          }

          if (this.mouseTrail) {
            _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(target, 'mousemove touchstart mouseenter', this.onMouseMove);
          }
        }
      }, {
        key: "findTarget",
        value: function findTarget() {
          var target = document.querySelector('[data-tooltip-id= ' + this.ctrlId + '_content]');
          return target;
        }
        /**
         * Core method to return the component name.
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'tooltip';
        }
        /**
         * Returns the properties to be maintained in the persisted state.
         * @private
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * Called internally, if any of the property value changed.
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var targetElement = this.findTarget();

          for (var _i164 = 0, _Object$keys63 = Object.keys(newProp); _i164 < _Object$keys63.length; _i164++) {
            var prop = _Object$keys63[_i164];

            switch (prop) {
              case 'width':
                if (this.tooltipEle && targetElement) {
                  this.tooltipEle.style.width = this.tooltipEle.style.maxWidth = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.width);
                  this.reposition(targetElement);
                }

                break;

              case 'height':
                if (this.tooltipEle && targetElement) {
                  this.tooltipEle.style.height = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["formatUnit"])(newProp.height);
                  this.reposition(targetElement);
                }

                break;

              case 'content':
                if (this.tooltipEle) {
                  if (this.isServerRender()) {
                    this.isBlazorTooltip = true;
                  }

                  this.renderContent();
                } else if (this.isServerRender()) {
                  var args = {
                    'content': newProp.content
                  }; // tslint:disable

                  this.interopAdaptor.invokeMethodAsync('OnTooltipServerCall', args); // tslint:enable
                }

                break;

              case 'opensOn':
                this.unwireEvents(oldProp.opensOn);
                this.wireEvents(newProp.opensOn);
                break;

              case 'position':
                this.formatPosition();

                if (this.tooltipEle && targetElement) {
                  var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);
                  arrowInnerELe.style.top = arrowInnerELe.style.left = null;
                  this.reposition(targetElement);
                }

                break;

              case 'tipPointerPosition':
                if (this.tooltipEle && targetElement) {
                  this.reposition(targetElement);
                }

                break;

              case 'offsetX':
                if (this.tooltipEle) {
                  var x = newProp.offsetX - oldProp.offsetX;
                  this.tooltipEle.style.left = (parseInt(this.tooltipEle.style.left, 10) + x).toString() + 'px';
                }

                break;

              case 'offsetY':
                if (this.tooltipEle) {
                  var y = newProp.offsetY - oldProp.offsetY;
                  this.tooltipEle.style.top = (parseInt(this.tooltipEle.style.top, 10) + y).toString() + 'px';
                }

                break;

              case 'cssClass':
                if (this.tooltipEle) {
                  if (oldProp.cssClass) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.tooltipEle], oldProp.cssClass.split(' '));
                  }

                  if (newProp.cssClass) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], newProp.cssClass.split(' '));
                  }
                }

                break;

              case 'enableRtl':
                if (this.tooltipEle) {
                  if (this.enableRtl) {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.tooltipEle], RTL$1);
                  } else {
                    Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.tooltipEle], RTL$1);
                  }
                }

                break;
            }
          }
        }
        /**
         * It is used to show the Tooltip on the specified target with specific animation settings.
         * @param element Target element where the Tooltip is to be displayed. (It is an optional parameter)
         * @param animation Sets the specific animation, while showing the Tooltip on the screen. (It is an optional parameter)
         * @return {void}
         */

      }, {
        key: "open",
        value: function open(element, animation) {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(animation)) {
            animation = this.animation.open;
          }

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(element)) {
            element = this.element;
          }

          if (element.style.display === 'none') {
            return;
          }

          this.showTooltip(element, animation);
        }
        /**
         * It is used to hide the Tooltip with specific animation effect.
         * @param animation Sets the specific animation when hiding Tooltip from the screen. (It is an optional parameter)
         * @return {void}
         */

      }, {
        key: "close",
        value: function close(animation) {
          if (!animation) {
            animation = this.animation.close;
          }

          this.hideTooltip(animation);
        }
        /**
         * It is used to refresh the Tooltip content and its position.
         * @param target Target element where the Tooltip content or position needs to be refreshed.
         * @return {void}
         */

      }, {
        key: "refresh",
        value: function refresh(target) {
          if (this.tooltipEle) {
            this.renderContent(target);
          }

          if (this.popupObj && target) {
            this.reposition(target);
          }
        }
        /**
         * It is used to destroy the Tooltip component.
         * @method destroy
         * @return {void}
         * @memberof Tooltip
         */

      }, {
        key: "destroy",
        value: function destroy() {
          if (!this.isServerRender()) {
            _get(_getPrototypeOf(Tooltip.prototype), "destroy", this).call(this);

            if (this.tooltipEle) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.tooltipEle);
            }
          }

          if (this.isServerRender() && this.tooltipEle) {
            var placeholder = document.querySelector('#' + this.ctrlId + '_content_placeholder');

            if (placeholder) {
              placeholder.appendChild(this.tooltipEle);
            }
          }

          if (this.popupObj) {
            this.popupObj.destroy();
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], ROOT$1);
          this.unwireEvents(this.opensOn);
          this.unwireMouseEvents(this.element);
          this.tooltipEle = null;
          this.popupObj = null;
        }
      }]);

      return Tooltip;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Tooltip.prototype, "width", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('auto')], Tooltip.prototype, "height", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Tooltip.prototype, "content", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Tooltip.prototype, "target", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('TopCenter')], Tooltip.prototype, "position", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Tooltip.prototype, "offsetX", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Tooltip.prototype, "offsetY", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(true)], Tooltip.prototype, "showTipPointer", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')], Tooltip.prototype, "tipPointerPosition", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Auto')], Tooltip.prototype, "opensOn", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tooltip.prototype, "mouseTrail", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tooltip.prototype, "isSticky", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, Animation$1)], Tooltip.prototype, "animation", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Tooltip.prototype, "openDelay", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(0)], Tooltip.prototype, "closeDelay", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])()], Tooltip.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Tooltip.prototype, "enableHtmlSanitizer", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "beforeRender", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "beforeOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "afterOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "beforeClose", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "afterClose", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "beforeCollision", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "created", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], Tooltip.prototype, "destroyed", void 0);

    Tooltip = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], Tooltip);
    /**
     * Tooltip modules
     */

    var globalTimeOut = {};
    var spinTemplate = null;
    var spinCSSClass = null;
    var DEFT_MAT_WIDTH = 30;
    var DEFT_FAB_WIDTH = 30;
    var DEFT_BOOT_WIDTH = 30;
    var DEFT_BOOT4_WIDTH = 36;
    var CLS_SHOWSPIN = 'e-spin-show';
    var CLS_HIDESPIN = 'e-spin-hide';
    var CLS_MATERIALSPIN = 'e-spin-material';
    var CLS_FABRICSPIN = 'e-spin-fabric';
    var CLS_BOOTSPIN = 'e-spin-bootstrap';
    var CLS_BOOT4SPIN = 'e-spin-bootstrap4';
    var CLS_HIGHCONTRASTSPIN = 'e-spin-high-contrast';
    var CLS_SPINWRAP = 'e-spinner-pane';
    var CLS_SPININWRAP = 'e-spinner-inner';
    var CLS_SPINCIRCLE = 'e-path-circle';
    var CLS_SPINARC = 'e-path-arc';
    var CLS_SPINLABEL = 'e-spin-label';
    var CLS_SPINTEMPLATE = 'e-spin-template';
    /**
     * Function to change the Spinners in a page globally from application end.
     * ```
     * E.g : blazorSpinner({ action: "Create", options: {target: targetElement}, type: "" });
     * ```
     * @param args
     * @private
     */

    function Spinner(action, options, target, type) {
      switch (action) {
        case 'Create':
          var _element5 = document.querySelector(options.target);

          var args = {
            type: type,
            target: _element5,
            cssClass: options.cssClass,
            label: options.label,
            width: options.width
          };
          createSpinner(args);
          break;

        case 'Show':
          showSpinner(document.querySelector(target));
          break;

        case 'Hide':
          hideSpinner(document.querySelector(target));
          break;

        case 'Set':
          var setArgs = {
            cssClass: options.cssClass,
            type: type
          };
          setSpinner(setArgs);
          break;
      }
    }
    /**
     * Create a spinner for the specified target element.
     * ```
     * E.g : createSpinner({ target: targetElement, width: '34px', label: 'Loading..' });
     * ```
     * @param args
     * @private
     */


    function createSpinner(args, internalCreateElement) {
      if (!args.target) {
        return;
      }

      var radius;
      var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
      var container = create_spinner_container(args.target, makeElement);

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.cssClass)) {
        container.wrap.classList.add(args.cssClass);
      }

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.template) || !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(spinTemplate)) {
        var template = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.template) ? args.template : spinTemplate;
        container.wrap.classList.add(CLS_SPINTEMPLATE);
        replaceContent(container.wrap, template, spinCSSClass);
      } else {
        var theme = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.type) ? args.type : getTheme(container.wrap);
        var width = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.width) ? args.width : undefined;
        radius = calculateRadius(width, theme);
        setTheme(theme, container.wrap, radius, makeElement);

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(args.label)) {
          createLabel(container.inner_wrap, args.label, makeElement);
        }
      }

      container.wrap.classList.add(CLS_HIDESPIN);
      container = null;
    }

    function createLabel(container, label, makeElement) {
      var labelEle = makeElement('div', {});
      labelEle.classList.add(CLS_SPINLABEL);
      labelEle.textContent = label;
      container.appendChild(labelEle);
      return labelEle;
    }

    function createMaterialSpinner(container, radius, makeElement) {
      var uniqueID = random_generator();
      globalTimeOut[uniqueID] = {
        timeOut: 0,
        type: 'Material',
        radius: radius
      };
      create_material_element(container, uniqueID, makeElement, CLS_MATERIALSPIN);
      mat_calculate_attributes(radius, container, 'Material', CLS_MATERIALSPIN);
    }

    function createBootstrap4Spinner(container, radius, makeElement) {
      var uniqueID = random_generator();
      globalTimeOut[uniqueID] = {
        timeOut: 0,
        type: 'Bootstrap4',
        radius: radius
      };
      create_material_element(container, uniqueID, makeElement, CLS_BOOT4SPIN);
      mat_calculate_attributes(radius, container, 'Bootstrap4', CLS_BOOT4SPIN);
    }

    function startMatAnimate(container, uniqueID, radius) {
      var globalObject = {};
      var timeOutVar = 0;
      globalTimeOut[uniqueID].timeOut = 0;
      globalObject[uniqueID] = globalVariables(uniqueID, radius, 0, 0);
      var spinnerInfo = {
        uniqueID: uniqueID,
        container: container,
        globalInfo: globalObject,
        timeOutVar: timeOutVar
      };
      animateMaterial(spinnerInfo);
    }

    function createFabricSpinner(container, radius, makeElement) {
      var uniqueID = random_generator();
      globalTimeOut[uniqueID] = {
        timeOut: 0,
        type: 'Fabric',
        radius: radius
      };
      create_fabric_element(container, uniqueID, CLS_FABRICSPIN, makeElement);
      fb_calculate_attributes(radius, container, CLS_FABRICSPIN);
    }

    function createHighContrastSpinner(container, radius, makeElement) {
      var uniqueID = random_generator();
      globalTimeOut[uniqueID] = {
        timeOut: 0,
        type: 'HighContrast',
        radius: radius
      };
      create_fabric_element(container, uniqueID, CLS_HIGHCONTRASTSPIN, makeElement);
      fb_calculate_attributes(radius, container, CLS_HIGHCONTRASTSPIN);
    }

    function getTheme(container) {
      var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');
      return theme.replace(/['"]+/g, '');
    }

    function setTheme(theme, container, radius, makeElement) {
      var innerContainer = container.querySelector('.' + CLS_SPININWRAP);
      var svg = innerContainer.querySelector('svg');

      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(svg)) {
        innerContainer.removeChild(svg);
      }

      switch (theme) {
        case 'Material':
          createMaterialSpinner(innerContainer, radius, makeElement);
          break;

        case 'Fabric':
          createFabricSpinner(innerContainer, radius, makeElement);
          break;

        case 'Bootstrap':
          createBootstrapSpinner(innerContainer, radius, makeElement);
          break;

        case 'HighContrast':
          createHighContrastSpinner(innerContainer, radius, makeElement);
          break;

        case 'Bootstrap4':
          createBootstrap4Spinner(innerContainer, radius, makeElement);
          break;
      }
    }

    function createBootstrapSpinner(innerContainer, radius, makeElement) {
      var uniqueID = random_generator();
      globalTimeOut[uniqueID] = {
        timeOut: 0,
        type: 'Bootstrap',
        radius: radius
      };
      create_bootstrap_element(innerContainer, uniqueID, makeElement);
      boot_calculate_attributes(innerContainer, radius);
    }

    function create_bootstrap_element(innerContainer, uniqueID, makeElement) {
      var svgBoot = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
      var viewBoxValue = 64;
      var trans = 32;
      var defaultRadius = 2;
      svgBoot.setAttribute('id', uniqueID);
      svgBoot.setAttribute('class', CLS_BOOTSPIN);
      svgBoot.setAttribute('viewBox', '0 0 ' + viewBoxValue + ' ' + viewBoxValue);
      innerContainer.insertBefore(svgBoot, innerContainer.firstChild);

      for (var item = 0; item <= 7; item++) {
        var bootCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
        bootCircle.setAttribute('class', CLS_SPINCIRCLE + '_' + item);
        bootCircle.setAttribute('r', defaultRadius + '');
        bootCircle.setAttribute('transform', 'translate(' + trans + ',' + trans + ')');
        svgBoot.appendChild(bootCircle);
      }
    }

    function boot_calculate_attributes(innerContainer, radius) {
      var svg = innerContainer.querySelector('svg.e-spin-bootstrap');
      svg.style.width = svg.style.height = radius + 'px';
      var x = 0;
      var y = 0;
      var rad = 24;
      var startArc = 90;

      for (var item = 0; item <= 7; item++) {
        var start = defineArcPoints(x, y, rad, startArc);
        var circleEle = svg.querySelector('.' + CLS_SPINCIRCLE + '_' + item);
        circleEle.setAttribute('cx', start.x + '');
        circleEle.setAttribute('cy', start.y + '');
        startArc = startArc >= 360 ? 0 : startArc;
        startArc = startArc + 45;
      }
    }

    function generateSeries(begin, stop) {
      var series = [];
      var start = begin;
      var end = stop;
      var increment = false;
      var count = 1;
      formSeries(start);

      function formSeries(i) {
        series.push(i);

        if (i !== end || count === 1) {
          if (i <= start && i > 1 && !increment) {
            i = parseFloat((i - 0.2).toFixed(2));
          } else if (i === 1) {
            i = 7;
            i = parseFloat((i + 0.2).toFixed(2));
            increment = true;
          } else if (i < 8 && increment) {
            i = parseFloat((i + 0.2).toFixed(2));

            if (i === 8) {
              increment = false;
            }
          } else if (i <= 8 && !increment) {
            i = parseFloat((i - 0.2).toFixed(2));
          }

          ++count;
          formSeries(i);
        }
      }

      return series;
    }

    function animateBootstrap(innerContainer) {
      var svg = innerContainer.querySelector('svg.e-spin-bootstrap');
      var id = svg.getAttribute('id');

      for (var i = 1; i <= 8; i++) {
        var circleEle = innerContainer.getElementsByClassName('e-path-circle_' + (i === 8 ? 0 : i))[0];
        rotation(circleEle, i, i, generateSeries(i, i), id);
      }

      function rotation(circle, start, end, series, id) {
        var count = 0;
        boot_animate(start);

        function boot_animate(radius) {
          if (globalTimeOut[id].isAnimate) {
            ++count;
            circle.setAttribute('r', radius + '');

            if (count >= series.length) {
              count = 0;
            }

            globalTimeOut[id].timeOut = setTimeout(boot_animate.bind(null, series[count]), 18);
          }
        }
      }
    }

    function replaceContent(container, template, cssClass) {
      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cssClass)) {
        container.classList.add(cssClass);
      }

      var inner = container.querySelector('.e-spinner-inner');
      inner.innerHTML = template;
    }

    function calculateRadius(width, theme) {
      var defaultSize;

      switch (theme) {
        case 'Material':
          defaultSize = DEFT_MAT_WIDTH;
          break;

        case 'Fabric':
          defaultSize = DEFT_FAB_WIDTH;
          break;

        case 'Bootstrap4':
          defaultSize = DEFT_BOOT4_WIDTH;
          break;

        default:
          defaultSize = DEFT_BOOT_WIDTH;
      }

      width = width ? parseFloat(width + '') : defaultSize;
      return theme === 'Bootstrap' ? width : width / 2;
    }

    function globalVariables(id, radius, count, previousId) {
      return {
        radius: radius,
        count: count,
        previousId: previousId
      };
    }

    function random_generator() {
      var random = '';
      var combine = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

      for (var i = 0; i < 5; i++) {
        random += combine.charAt(Math.floor(Math.random() * combine.length));
      }

      return random;
    }

    function create_fabric_element(innerCon, uniqueID, themeClass, makeElement) {
      var svgFabric = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
      svgFabric.setAttribute('id', uniqueID);
      svgFabric.setAttribute('class', themeClass);
      var fabricCirclePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
      fabricCirclePath.setAttribute('class', CLS_SPINCIRCLE);
      var fabricCircleArc = document.createElementNS('http://www.w3.org/2000/svg', 'path');
      fabricCircleArc.setAttribute('class', CLS_SPINARC);
      innerCon.insertBefore(svgFabric, innerCon.firstChild);
      svgFabric.appendChild(fabricCirclePath);
      svgFabric.appendChild(fabricCircleArc);
    }

    function create_material_element(innerContainer, uniqueID, makeElement, cls) {
      var svgMaterial = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
      svgMaterial.setAttribute('class', cls);
      svgMaterial.setAttribute('id', uniqueID);
      var matCirclePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
      matCirclePath.setAttribute('class', CLS_SPINCIRCLE);
      innerContainer.insertBefore(svgMaterial, innerContainer.firstChild);
      svgMaterial.appendChild(matCirclePath);
    }

    function create_spinner_container(target, makeElement) {
      var spinnerContainer = makeElement('div', {});
      spinnerContainer.classList.add(CLS_SPINWRAP);
      var spinnerInnerContainer = makeElement('div', {});
      spinnerInnerContainer.classList.add(CLS_SPININWRAP);
      target.appendChild(spinnerContainer);
      spinnerContainer.appendChild(spinnerInnerContainer);
      return {
        wrap: spinnerContainer,
        inner_wrap: spinnerInnerContainer
      };
    }

    function animateMaterial(spinnerInfo) {
      var start = 1;
      var end = 149;
      var duration = 1333;
      var max = 75;
      createCircle(start, end, easeAnimation, duration, spinnerInfo.globalInfo[spinnerInfo.uniqueID].count, max, spinnerInfo);
      spinnerInfo.globalInfo[spinnerInfo.uniqueID].count = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].count % 4;
    }

    function createCircle(start, end, easing, duration, count, max, spinnerInfo) {
      var id = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId;
      var startTime = new Date().getTime();
      var change = end - start;
      var diameter = getSize(spinnerInfo.globalInfo[spinnerInfo.uniqueID].radius * 2 + '');
      var strokeSize = getStrokeSize(diameter);
      var rotate = -90 * (spinnerInfo.globalInfo[spinnerInfo.uniqueID].count || 0);
      mat_animation(spinnerInfo);

      function mat_animation(spinnerInfo) {
        var currentTime = Math.max(0, Math.min(new Date().getTime() - startTime, duration));
        updatePath(easing(currentTime, start, change, duration), spinnerInfo.container);

        if (id === spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId && currentTime < duration) {
          globalTimeOut[spinnerInfo.uniqueID].timeOut = setTimeout(mat_animation.bind(null, spinnerInfo), 1);
        } else {
          animateMaterial(spinnerInfo);
        }
      }

      function updatePath(value, container) {
        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(container.querySelector('svg.e-spin-material')) && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(container.querySelector('svg.e-spin-material').querySelector('path.e-path-circle'))) {
          var svg = container.querySelector('svg.e-spin-material');
          var path = svg.querySelector('path.e-path-circle');
          path.setAttribute('stroke-dashoffset', getDashOffset(diameter, strokeSize, value, max) + '');
          path.setAttribute('transform', 'rotate(' + rotate + ' ' + diameter / 2 + ' ' + diameter / 2 + ')');
        }
      }
    }

    function mat_calculate_attributes(radius, container, type, cls) {
      var diameter = radius * 2;
      var svg = container.querySelector('svg.' + cls);
      var path = svg.querySelector('path.e-path-circle');
      var strokeSize = getStrokeSize(diameter);
      var transformOrigin = diameter / 2 + 'px';
      svg.setAttribute('viewBox', '0 0 ' + diameter + ' ' + diameter);
      svg.style.width = svg.style.height = diameter + 'px';
      svg.style.transformOrigin = transformOrigin + ' ' + transformOrigin + ' ' + transformOrigin;
      path.setAttribute('d', drawArc(diameter, strokeSize));

      if (type === 'Material') {
        path.setAttribute('stroke-width', strokeSize + '');
        path.setAttribute('stroke-dasharray', (diameter - strokeSize) * Math.PI * 0.75 + '');
        path.setAttribute('stroke-dashoffset', getDashOffset(diameter, strokeSize, 1, 75) + '');
      }
    }

    function getSize(value) {
      var parsed = parseFloat(value);
      return parsed;
    }

    function drawArc(diameter, strokeSize) {
      var radius = diameter / 2;
      var offset = strokeSize / 2;
      return 'M' + radius + ',' + offset + 'A' + (radius - offset) + ',' + (radius - offset) + ' 0 1 1 ' + offset + ',' + radius;
    }

    function getStrokeSize(diameter) {
      return 10 / 100 * diameter;
    }

    function getDashOffset(diameter, strokeSize, value, max) {
      return (diameter - strokeSize) * Math.PI * (3 * max / 100 - value / 100);
    }

    function easeAnimation(current, start, change, duration) {
      var timestamp = (current /= duration) * current;
      var timecount = timestamp * current;
      return start + change * (6 * timecount * timestamp + -15 * timestamp * timestamp + 10 * timecount);
    }

    function fb_calculate_attributes(radius, innerConainer, trgClass) {
      var centerX = radius;
      var centerY = radius;
      var diameter = radius * 2;
      var startArc = 315;
      var endArc = 45;
      var svg = innerConainer.querySelector('.' + trgClass);
      var circle = svg.querySelector('.e-path-circle');
      var path = svg.querySelector('.e-path-arc');
      var transformOrigin = diameter / 2 + 'px';
      circle.setAttribute('d', defineCircle(centerX, centerY, radius));
      path.setAttribute('d', defineArc(centerX, centerY, radius, startArc, endArc));
      svg.setAttribute('viewBox', '0 0 ' + diameter + ' ' + diameter);
      svg.style.transformOrigin = transformOrigin + ' ' + transformOrigin + ' ' + transformOrigin;
      svg.style.width = svg.style.height = diameter + 'px';
    }

    function defineArcPoints(centerX, centerY, radius, angle) {
      var radians = (angle - 90) * Math.PI / 180.0;
      return {
        x: centerX + radius * Math.cos(radians),
        y: centerY + radius * Math.sin(radians)
      };
    }

    function defineArc(x, y, radius, startArc, endArc) {
      var start = defineArcPoints(x, y, radius, endArc);
      var end = defineArcPoints(x, y, radius, startArc);
      var d = ['M', start.x, start.y, 'A', radius, radius, 0, 0, 0, end.x, end.y].join(' ');
      return d;
    }

    function defineCircle(x, y, radius) {
      var d = ['M', x, y, 'm', -radius, 0, 'a', radius, radius, 0, 1, 0, radius * 2, 0, 'a', radius, radius, 0, 1, 0, -radius * 2, 0].join(' ');
      return d;
    }
    /**
     * Function to show the Spinner.
     * @param container - Specify the target of the Spinner.
     * @private
     */


    function showSpinner(container) {
      showHideSpinner(container, false);
      container = null;
    }

    function showHideSpinner(container, isHide) {
      var spinnerWrap;

      if (container) {
        spinnerWrap = container.classList.contains(CLS_SPINWRAP) ? container : container.querySelector('.' + CLS_SPINWRAP);
      }

      if (container && spinnerWrap) {
        var inner = spinnerWrap.querySelector('.' + CLS_SPININWRAP);
        var spinCheck;
        spinCheck = isHide ? !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_HIDESPIN) : !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_SHOWSPIN);

        if (spinCheck) {
          var svgEle = spinnerWrap.querySelector('svg');

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(svgEle)) {
            return;
          }

          var id = svgEle.getAttribute('id');
          globalTimeOut[id].isAnimate = !isHide;

          switch (globalTimeOut[id].type) {
            case 'Material':
              isHide ? clearTimeout(globalTimeOut[id].timeOut) : startMatAnimate(inner, id, globalTimeOut[id].radius);
              break;

            case 'Bootstrap':
              isHide ? clearTimeout(globalTimeOut[id].timeOut) : animateBootstrap(inner);
              break;
          }
        }

        isHide ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(spinnerWrap, [CLS_HIDESPIN], [CLS_SHOWSPIN]) : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(spinnerWrap, [CLS_SHOWSPIN], [CLS_HIDESPIN]);
        container = null;
      }
    }
    /**
     * Function to hide the Spinner.
     * @param container - Specify the target of the Spinner.
     * @private
     */


    function hideSpinner(container) {
      showHideSpinner(container, true);
      container = null;
    }
    /**
     * Function to change the Spinners in a page globally from application end.
     * ```
     * E.g : setSpinner({ cssClass: 'custom-css'; type: 'Material' });
     * ```
     * @param args
     * @private
     */


    function setSpinner(args, internalCreateElement) {
      var makeElement = !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(internalCreateElement) ? internalCreateElement : _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];

      if (args.template !== undefined) {
        spinTemplate = args.template;

        if (args.template !== undefined) {
          spinCSSClass = args.cssClass;
        }
      }

      var container = document.querySelectorAll('.' + CLS_SPINWRAP);

      for (var index = 0; index < container.length; index++) {
        ensureTemplate(args.template, container[index], args.type, args.cssClass, makeElement);
      }
    }

    function ensureTemplate(template, container, theme, cssClass, makeEle) {
      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(template) && !container.classList.contains(CLS_SPINTEMPLATE)) {
        replaceTheme(container, theme, cssClass, makeEle);

        if (container.classList.contains(CLS_SHOWSPIN)) {
          container.classList.remove(CLS_SHOWSPIN);
          showSpinner(container);
        } else {
          container.classList.remove(CLS_HIDESPIN);
          hideSpinner(container);
        }
      } else {
        spinTemplate = template;

        if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cssClass)) {
          spinCSSClass = cssClass;
        }
      }
    }

    function replaceTheme(container, theme, cssClass, makeEle) {
      if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(cssClass)) {
        container.classList.add(cssClass);
      }

      var svgElement = container.querySelector('svg');
      var radius = theme === 'Bootstrap' ? parseFloat(svgElement.style.height) : parseFloat(svgElement.style.height) / 2;
      var classNames = svgElement.getAttribute('class');
      var svgClassList = classNames.split(/\s/);

      if (svgClassList.indexOf('e-spin-material') >= 0) {
        var id = svgElement.getAttribute('id');
        clearTimeout(globalTimeOut[id].timeOut);
      }

      setTheme(theme, container, radius, makeEle);
    }
    /**
     * spinner modules
     */

    /**
     * Popup Components
     */
    //# sourceMappingURL=ej2-popups.es2015.js.map

    /***/

  },

  /***/
  "./node_modules/@syncfusion/ej2-splitbuttons/dist/es6/ej2-splitbuttons.es2015.js":
  /*!***************************************************************************************!*\
    !*** ./node_modules/@syncfusion/ej2-splitbuttons/dist/es6/ej2-splitbuttons.es2015.js ***!
    \***************************************************************************************/

  /*! exports provided: getModel, upDownKeyHandler, setBlankIconStyle, Item, DropDownButton, SplitButton, Deferred, createButtonGroup, SpinSettings, AnimationSettings, ProgressButton */

  /***/
  function node_modulesSyncfusionEj2SplitbuttonsDistEs6Ej2SplitbuttonsEs2015Js(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "getModel", function () {
      return getModel;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "upDownKeyHandler", function () {
      return _upDownKeyHandler;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "setBlankIconStyle", function () {
      return setBlankIconStyle;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Item", function () {
      return Item;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "DropDownButton", function () {
      return DropDownButton;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "SplitButton", function () {
      return SplitButton;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Deferred", function () {
      return Deferred;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "createButtonGroup", function () {
      return createButtonGroup;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "SpinSettings", function () {
      return SpinSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "AnimationSettings", function () {
      return AnimationSettings;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ProgressButton", function () {
      return ProgressButton;
    });
    /* harmony import */


    var _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! @syncfusion/ej2-base */
    "./node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @syncfusion/ej2-buttons */
    "./node_modules/@syncfusion/ej2-buttons/dist/es6/ej2-buttons.es2015.js");
    /* harmony import */


    var _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @syncfusion/ej2-popups */
    "./node_modules/@syncfusion/ej2-popups/dist/es6/ej2-popups.es2015.js");

    var __decorate = undefined && undefined.__decorate || function (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;
    };
    /**
     * @param props
     * @param model
     */


    function getModel(props, model) {
      var obj = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["extend"])({}, props);

      for (var _i165 = 0, _Object$keys64 = Object.keys(obj); _i165 < _Object$keys64.length; _i165++) {
        var prop = _Object$keys64[_i165];

        if (model.indexOf(prop) < 0) {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["deleteObject"])(obj, prop);
        }
      }

      return obj;
    }
    /** @hidden */


    function _upDownKeyHandler(ul, keyCode) {
      var defaultIdx = keyCode === 40 ? 0 : ul.childElementCount - 1;
      var liIdx = defaultIdx;
      var li;
      var selectedLi = ul.querySelector('.e-selected');

      if (selectedLi) {
        selectedLi.classList.remove('e-selected');
      }

      for (var i = 0, _len75 = ul.children.length; i < _len75; i++) {
        if (ul.children[i].classList.contains('e-focused')) {
          li = ul.children[i];
          liIdx = i;
          li.classList.remove('e-focused');
          keyCode === 40 ? liIdx++ : liIdx--;

          if (liIdx === (keyCode === 40 ? ul.childElementCount : -1)) {
            liIdx = defaultIdx;
          }
        }
      }

      li = ul.children[liIdx];
      liIdx = isValidLI(ul, li, liIdx, keyCode);

      if (liIdx !== -1) {
        Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([ul.children[liIdx]], 'e-focused');
        ul.children[liIdx].focus();
      }
    }

    function isValidLI(ul, li, index, keyCode) {
      var count = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;

      if (li.classList.contains('e-separator') || li.classList.contains('e-disabled')) {
        if (index === (keyCode === 40 ? ul.childElementCount - 1 : 0)) {
          index = keyCode === 40 ? 0 : ul.childElementCount - 1;
        } else {
          keyCode === 40 ? index++ : index--;
        }
      }

      li = ul.children[index];

      if (li.classList.contains('e-separator') || li.classList.contains('e-disabled')) {
        count++;

        if (count === ul.childElementCount) {
          return index = -1;
        }

        index = isValidLI(ul, li, index, keyCode, count);
      }

      return index;
    }
    /** @hidden */


    function setBlankIconStyle(popup) {
      var blankIconList = [].slice.call(popup.getElementsByClassName('e-blank-icon'));

      if (!blankIconList.length) {
        return;
      }

      var iconLi = popup.querySelector('.e-item:not(.e-blank-icon):not(.e-separator)');

      if (iconLi.classList.contains('e-url')) {
        iconLi = iconLi.querySelector('.e-menu-url');
      }

      var icon = iconLi.querySelector('.e-menu-icon');
      var cssProp;
      var enableRtl = popup.classList.contains('e-rtl');

      if (enableRtl) {
        cssProp = {
          padding: 'paddingRight',
          margin: 'marginLeft'
        };
      } else {
        cssProp = {
          padding: 'paddingLeft',
          margin: 'marginRight'
        };
      } // tslint:disable


      var size = "".concat(parseInt(getComputedStyle(icon).fontSize, 10) + parseInt(enableRtl ? getComputedStyle(icon)[cssProp.margin] : getComputedStyle(icon)[cssProp.margin], 10) + parseInt(getComputedStyle(iconLi).paddingLeft, 10), "px");
      blankIconList.forEach(function (li) {
        if (li.classList.contains('e-url')) {
          li.querySelector('.e-menu-url').style[cssProp.padding] = size;
        } else {
          li.style[cssProp.padding] = size;
        }
      }); // tslint:enable
    }
    /**
     * Defines the items of Split Button/DropDownButton.
     */


    var Item = /*#__PURE__*/function (_syncfusion_ej2_base_59) {
      _inherits(Item, _syncfusion_ej2_base_59);

      var _super244 = _createSuper(Item);

      function Item() {
        _classCallCheck(this, Item);

        return _super244.apply(this, arguments);
      }

      return Item;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "iconCss", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "id", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], Item.prototype, "separator", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "text", void 0);

    __decorate([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], Item.prototype, "url", void 0);
    /**
     * Common modules
     */


    var __decorate$1 = undefined && undefined.__decorate || function (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;
    };

    var classNames = {
      DISABLED: 'e-disabled',
      FOCUS: 'e-focused',
      ICON: 'e-menu-icon',
      ITEM: 'e-item',
      POPUP: 'e-dropdown-popup',
      RTL: 'e-rtl',
      SEPARATOR: 'e-separator',
      VERTICAL: 'e-vertical'
    };
    /**
     * DropDownButton component is used to toggle contextual overlays for displaying list of action items.
     * It can contain both text and images.
     * ```html
     * <button id="element">DropDownButton</button>
     * ```
     * ```typescript
     * <script>
     * var dropDownButtonObj = new DropDownButton({items: [{ text: 'Action1' }, { text: 'Action2' },{ text: 'Action3' }]);
     * dropDownButtonObj.appendTo("#element");
     * </script>
     * ```
     */

    var DropDownButton = /*#__PURE__*/function (_syncfusion_ej2_base_60) {
      _inherits(DropDownButton, _syncfusion_ej2_base_60);

      var _super245 = _createSuper(DropDownButton);

      /**
       * Constructor for creating the widget
       * @param  {DropDownButtonModel} options?
       * @param  {string|HTMLButtonElement} element?
       */
      function DropDownButton(options, element) {
        _classCallCheck(this, DropDownButton);

        return _super245.call(this, options, element);
      }

      _createClass2(DropDownButton, [{
        key: "preRender",
        value: function preRender() {
          /** */
        }
        /**
         * Get the properties to be maintained in the persisted state.
         * @returns string
         */

      }, {
        key: "getPersistData",
        value: function getPersistData() {
          return this.addOnPersist([]);
        }
        /**
         * To open/close DropDownButton popup based on current state of the DropDownButton.
         * @returns void
         */

      }, {
        key: "toggle",
        value: function toggle() {
          this.canOpen() ? this.openPopUp() : this.closePopup();
        }
        /**
         * Initialize the Component rendering
         * @returns void
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initialize();

          if (!this.disabled) {
            this.wireEvents();
          }

          this.renderComplete();
        }
        /**
         * Adds a new item to the menu. By default, new item appends to the list as the last item,
         * but you can insert based on the text parameter.
         * @param  { ItemModel[] } items - Specifies an array of JSON data.
         * @param { string } text - Specifies the text to insert the newly added item in the menu.
         * @returns {void}.
         */

      }, {
        key: "addItems",
        value: function addItems(items, text) {
          var newItem;
          var idx = this.items.length;

          for (var j = 0, _len76 = this.items.length; j < _len76; j++) {
            if (text === this.items[j].text) {
              idx = j;
              break;
            }
          }

          for (var i = items.length - 1; i >= 0; i--) {
            // tslint:disable-next-line
            newItem = new Item(this, 'items', items[i], true);
            this.items.splice(idx, 0, newItem);
          }

          if (!this.canOpen()) {
            this.createItems();
          }
        }
        /**
         * Removes the items from the menu.
         * @param  { string[] } items - Specifies an array of string to remove the items.
         * @returns {void}.
         */

      }, {
        key: "removeItems",
        value: function removeItems(items) {
          for (var i = 0, _len77 = items.length; i < _len77; i++) {
            for (var j = 0, _len78 = this.items.length; j < _len78; j++) {
              if (items[i] === this.items[j].text) {
                this.items.splice(j, 1);
                break;
              }
            }
          }

          if (!this.canOpen()) {
            this.createItems();
          }
        }
      }, {
        key: "createPopup",
        value: function createPopup() {
          var _Object;

          var div = this.createElement('div', {
            className: classNames.POPUP,
            id: this.element.id + '-popup'
          });
          document.body.appendChild(div);
          this.dropDown = new _syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["Popup"](div, {
            relateTo: this.element,
            collision: {
              X: 'fit',
              Y: 'flip'
            },
            position: {
              X: 'left',
              Y: 'bottom'
            },
            targetType: 'relative',
            content: this.target ? this.getTargetElement() : '',
            enableRtl: this.enableRtl
          });

          if (this.dropDown.element.style.position === 'fixed') {
            this.dropDown.refreshPosition(this.element);
          }

          this.dropDown.hide();
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, (_Object = {}, _defineProperty(_Object, 'aria-haspopup', this.items.length || this.target ? 'true' : 'false'), _defineProperty(_Object, 'aria-expanded', 'false'), _defineProperty(_Object, 'aria-owns', this.getPopUpElement().id), _defineProperty(_Object, 'type', 'button'), _defineProperty(_Object, 'aria-label', this.element.textContent + ' dropdownbutton'), _Object));

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([div], this.cssClass.split(' '));
          }
        }
      }, {
        key: "getTargetElement",
        value: function getTargetElement() {
          return typeof this.target === 'string' ? Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["select"])(this.target) : this.target;
        }
      }, {
        key: "createItems",
        value: function createItems(appendItems) {
          var items = this.items;
          var showIcon = this.hasIcon(this.items, 'iconCss');
          var span;
          var item;
          var li;
          var eventArgs;
          var ul = this.getULElement();

          if (ul) {
            ul.innerHTML = '';
          } else {
            ul = this.createElement('ul', {
              attrs: {
                'role': 'menu',
                'tabindex': '0'
              }
            });
          }

          for (var i = 0; i < items.length; i++) {
            item = items[i];
            var tempItem = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(item.text) : item.text;
            li = this.createElement('li', {
              innerHTML: item.url ? '' : tempItem,
              className: item.separator ? classNames.ITEM + ' ' + classNames.SEPARATOR : classNames.ITEM,
              attrs: {
                'role': 'menuItem',
                'tabindex': '-1'
              },
              id: item.id ? item.id : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName() + '-item')
            });

            if (item.url) {
              li.appendChild(this.createAnchor(item));
              li.classList.add('e-url');
            }

            if (item.iconCss) {
              span = this.createElement('span', {
                className: classNames.ICON + ' ' + item.iconCss
              });
              item.url ? li.childNodes[0].appendChild(span) : li.insertBefore(span, li.childNodes[0]);
            } else {
              if (showIcon && !item.separator) {
                li.classList.add('e-blank-icon');
              }
            }

            eventArgs = {
              item: item,
              element: li
            };
            this.trigger('beforeItemRender', eventArgs);
            ul.appendChild(li);
          }

          if (appendItems) {
            this.getPopUpElement().appendChild(ul);
          }

          if (showIcon) {
            setBlankIconStyle(this.getPopUpElement());
          }
        }
      }, {
        key: "hasIcon",
        value: function hasIcon(items, field) {
          for (var i = 0, _len79 = items.length; i < _len79; i++) {
            if (items[i][field]) {
              return true;
            }
          }

          return false;
        }
      }, {
        key: "createAnchor",
        value: function createAnchor(item) {
          var tempItem = this.enableHtmlSanitizer ? _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(item.text) : item.text;
          return this.createElement('a', {
            className: 'e-menu-text e-menu-url',
            innerHTML: tempItem,
            attrs: {
              'href': item.url
            }
          });
        }
      }, {
        key: "initialize",
        value: function initialize() {
          this.button = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"]({
            iconCss: this.iconCss,
            iconPosition: this.iconPosition,
            cssClass: this.cssClass,
            content: this.content,
            disabled: this.disabled,
            enableRtl: this.enableRtl,
            enablePersistence: this.enablePersistence
          });
          this.button.createElement = this.createElement;
          this.button.appendTo(this.element);

          if (!this.element.id) {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName());
          }

          this.appendArrowSpan();
          this.createPopup();
          this.setActiveElem([this.element]);
        }
      }, {
        key: "appendArrowSpan",
        value: function appendArrowSpan() {
          this.element.appendChild(this.createElement('span', {
            className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1 ? 'bottom' : 'right') + ' e-caret'
          }));
        }
      }, {
        key: "setActiveElem",
        value: function setActiveElem(elem) {
          this.activeElem = elem;
        }
        /**
         * Get component name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'dropdown-btn';
        }
      }, {
        key: "canOpen",
        value: function canOpen() {
          return this.getPopUpElement().classList.contains('e-popup-close');
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this665 = this;

          _get(_getPrototypeOf(DropDownButton.prototype), "destroy", this).call(this);

          if (this.getModuleName() === 'dropdown-btn') {
            var attrList;
            var classList$$1;

            if (this.element.querySelector('span.e-caret')) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(this.element.querySelector('span.e-caret'));
            }

            if (this.cssClass) {
              classList$$1 = this.cssClass.split(' ');
            }

            this.button.destroy();

            if (classList$$1) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classList$$1);
            }

            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(this.activeElem, ['e-active']);
            attrList = this.element.getAttribute('class') ? ['aria-haspopup', 'aria-expanded', 'aria-owns', 'type'] : ['aria-haspopup', 'aria-expanded', 'aria-owns', 'type', 'class'];
            attrList.forEach(function (key) {
              _this665.element.removeAttribute(key);
            });
            this.dropDown.destroy();
            var popupEle = document.getElementById(this.getPopUpElement().id);

            if (popupEle) {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([popupEle], ['e-popup-open', 'e-popup-close']);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(popupEle);
            }

            if (!this.disabled) {
              this.unWireEvents();
            }
          }
        }
      }, {
        key: "getPopUpElement",
        value: function getPopUpElement() {
          return this.dropDown.element;
        }
      }, {
        key: "getULElement",
        value: function getULElement() {
          return this.getPopUpElement().children[0];
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          var popupElement = this.getPopUpElement();
          this.delegateMousedownHandler = this.mousedownHandler.bind(this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(popupElement, 'click', this.clickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'keydown', this.keyBoardHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(popupElement, 'keydown', this.keyBoardHandler, this);

          this.rippleFn = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["rippleEffect"])(popupElement, {
            selector: '.' + classNames.ITEM
          });
        }
        /** @hidden */

      }, {
        key: "keyBoardHandler",
        value: function keyBoardHandler(e) {
          if (e.target === this.element && (e.keyCode === 9 || !e.altKey && e.keyCode === 40 || e.keyCode === 38)) {
            return;
          }

          switch (e.keyCode) {
            case 38:
            case 40:
              if (e.altKey && (e.keyCode === 38 || e.keyCode === 40)) {
                this.keyEventHandler(e);
              } else {
                this.upDownKeyHandler(e);
              }

              break;

            case 9:
            case 13:
            case 27:
            case 32:
              this.keyEventHandler(e);
              break;
          }
        }
      }, {
        key: "upDownKeyHandler",
        value: function upDownKeyHandler(e) {
          if (this.target && (e.keyCode === 38 || e.keyCode === 40)) {
            return;
          }

          e.preventDefault();

          _upDownKeyHandler(this.getULElement(), e.keyCode);
        }
      }, {
        key: "keyEventHandler",
        value: function keyEventHandler(e) {
          if (this.target && (e.keyCode === 13 || e.keyCode === 9)) {
            return;
          }

          if (e.keyCode !== 9) {
            e.preventDefault();
          }

          if (e.keyCode === 27 || e.keyCode === 38 || e.keyCode === 9) {
            if (!this.canOpen()) {
              this.closePopup(e, this.element);
            }
          } else {
            this.clickHandler(e);
          }
        }
      }, {
        key: "getLI",
        value: function getLI(elem) {
          return elem.tagName === 'LI' ? elem : Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(elem, 'li');
        }
      }, {
        key: "mousedownHandler",
        value: function mousedownHandler(e) {
          var trgt = e.target;

          if (!this.canOpen() && !(Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '#' + this.getPopUpElement().id) || Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '#' + this.element.id))) {
            this.closePopup(e);
          }
        }
      }, {
        key: "clickHandler",
        value: function clickHandler(e) {
          var trgt = e.target;
          var canOpen = this.canOpen();

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '#' + this.element.id)) {
            if (canOpen) {
              this.openPopUp(e);
            } else {
              this.closePopup(e, this.activeElem[0]);
            }
          } else {
            if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["closest"])(trgt, '#' + this.getPopUpElement().id)) {
              var eventArgs;
              var liIdx;
              var item;
              var li = this.getLI(trgt);

              if (li) {
                liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
                item = this.items[liIdx];

                if (item) {
                  eventArgs = {
                    element: li,
                    item: item
                  };
                  this.trigger('select', eventArgs);
                }

                this.closePopup(e, this.activeElem[0]);
              }
            }
          }
        }
      }, {
        key: "openPopUp",
        value: function openPopUp() {
          var _this666 = this;

          var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;

          if (!this.target) {
            this.createItems(true);
          }

          var ul = this.getULElement();
          var beforeOpenArgs = {
            element: ul,
            items: this.items,
            event: e,
            cancel: false
          };
          this.trigger('beforeOpen', beforeOpenArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              var _ul4 = _this666.getULElement();

              _this666.dropDown.show(null, _this666.element);

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([_this666.element], 'e-active');

              _this666.element.setAttribute('aria-expanded', 'true');

              _ul4.focus();

              var openArgs = {
                element: _ul4,
                items: _this666.items
              };

              _this666.trigger('open', openArgs);
            }
          });
        }
      }, {
        key: "closePopup",
        value: function closePopup() {
          var _this667 = this;

          var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
          var focusEle = arguments.length > 1 ? arguments[1] : undefined;
          var ul = this.getULElement();
          var beforeCloseArgs = {
            element: ul,
            items: this.items,
            event: e,
            cancel: false
          };
          this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
            if (!observedArgs.cancel) {
              var _ul5 = _this667.getULElement();

              var selectedLi = _ul5.querySelector('.e-selected');

              if (selectedLi) {
                selectedLi.classList.remove('e-selected');
              }

              _this667.dropDown.hide();

              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])(_this667.activeElem, 'e-active');

              _this667.element.setAttribute('aria-expanded', 'false');

              if (focusEle) {
                focusEle.focus();
              }

              var closeArgs = {
                element: _ul5,
                items: _this667.items
              };

              _this667.trigger('close', closeArgs);

              if (!_this667.target && _ul5) {
                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(_ul5);
              }
            }
          });
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(document, 'mousedown touchstart', this.delegateMousedownHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getPopUpElement(), 'click', this.clickHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'keydown', this.keyBoardHandler);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getPopUpElement(), 'keydown', this.keyBoardHandler);

          this.rippleFn();
        }
        /**
         * Called internally if any of the property value changed.
         * @param  {DropDownButtonModel} newProp
         * @param  {DropDownButtonModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var btnModel = ['content', 'cssClass', 'iconCss', 'iconPosition', 'disabled', 'enableRtl'];
          this.button.setProperties(getModel(newProp, btnModel));
          this.dropDown.setProperties(getModel(newProp, ['enableRtl']));
          var popupElement = this.getPopUpElement();

          for (var _i166 = 0, _Object$keys65 = Object.keys(newProp); _i166 < _Object$keys65.length; _i166++) {
            var prop = _Object$keys65[_i166];

            switch (prop) {
              case 'content':
                if (!this.element.querySelector('span.e-caret')) {
                  this.appendArrowSpan();
                }

                break;

              case 'disabled':
                if (newProp.disabled) {
                  this.unWireEvents();

                  if (!this.canOpen()) {
                    this.closePopup();
                  }
                } else {
                  this.wireEvents();
                }

                break;

              case 'cssClass':
                if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
                  var arrowSpan = this.element.querySelector('span.e-caret');
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["classList"])(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);
                }

                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([popupElement], oldProp.cssClass.split(' '));
                }

                if (newProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([popupElement], newProp.cssClass.split(' '));
                }

                break;

              case 'target':
                this.dropDown.content = this.getTargetElement();
                this.dropDown.dataBind();
                break;

              case 'items':
                if (!this.canOpen()) {
                  this.createItems();
                }

                break;
            }
          }
        }
        /**
         * Sets the focus to DropDownButton
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return DropDownButton;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Component"]);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], DropDownButton.prototype, "content", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], DropDownButton.prototype, "cssClass", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownButton.prototype, "disabled", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], DropDownButton.prototype, "iconCss", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], DropDownButton.prototype, "iconPosition", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], DropDownButton.prototype, "enableHtmlSanitizer", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Item)], DropDownButton.prototype, "items", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], DropDownButton.prototype, "target", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "beforeItemRender", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "beforeOpen", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "beforeClose", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "close", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "open", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "select", void 0);

    __decorate$1([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], DropDownButton.prototype, "created", void 0);

    DropDownButton = __decorate$1([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], DropDownButton);
    /**
     * DropDownButton modules
     */

    var __decorate$2 = undefined && undefined.__decorate || function (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;
    }; /// <reference path='../drop-down-button/drop-down-button-model.d.ts'/>


    var RTL = 'e-rtl';
    var TAGNAME = 'EJS-SPLITBUTTON';
    /**
     * SplitButton component has primary and secondary button. Primary button is used to select
     * default action and secondary button is used to toggle contextual overlays for displaying list of
     * action items. It can contain both text and images.
     * ```html
     * <button id="element"></button>
     * ```
     * ```typescript
     * <script>
     * var splitBtnObj = new SplitButton({content: 'SplitButton'});
     * splitBtnObj.appendTo("#element");
     * </script>
     * ```
     */

    var SplitButton = /*#__PURE__*/function (_DropDownButton) {
      _inherits(SplitButton, _DropDownButton);

      var _super246 = _createSuper(SplitButton);

      /**
       * Constructor for creating the widget
       * @param  {SplitButtonModel} options?
       * @param  {string|HTMLButtonElement} element?
       */
      function SplitButton(options, element) {
        _classCallCheck(this, SplitButton);

        return _super246.call(this, options, element);
      }
      /**
       * Initialize Angular support.
       * @private
       */


      _createClass2(SplitButton, [{
        key: "preRender",
        value: function preRender() {
          var ele = this.element;

          if (ele.tagName === TAGNAME) {
            var ejInstance = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getValue"])('ej2_instances', ele);
            var btn = this.createElement('button', {
              attrs: {
                'type': 'button'
              }
            });
            var wrapper = this.createElement(TAGNAME, {
              className: 'e-' + this.getModuleName() + '-wrapper'
            });

            for (var idx = 0, _len80 = ele.attributes.length; idx < _len80; idx++) {
              btn.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
            }

            ele.parentNode.insertBefore(wrapper, ele);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["detach"])(ele);
            ele = btn;
            wrapper.appendChild(ele);
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["setValue"])('ej2_instances', ejInstance, ele);
            this.wrapper = wrapper;
            this.element = ele;
          }

          if (!this.element.id) {
            this.element.id = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getUniqueID"])('e-' + this.getModuleName());
          }
        }
        /**
         * Initialize the Component rendering
         * @returns void
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          this.initWrapper();
          this.createPrimaryButton();
          this.renderControl();
        }
      }, {
        key: "renderControl",
        value: function renderControl() {
          this.createSecondaryButton();
          this.setActiveElem([this.element, this.secondaryBtnObj.element]);
          this.setAria();
          this.wireEvents();
          this.renderComplete();
        }
        /**
         * Adds a new item to the menu. By default, new item appends to the list as the last item,
         * but you can insert based on the text parameter.
         * @param  { ItemModel[] } items - Specifies an array of JSON data.
         * @param { string } text - Specifies the text to insert the newly added item in the menu.
         * @returns {void}.
         */

      }, {
        key: "addItems",
        value: function addItems(items, text) {
          _get(_getPrototypeOf(SplitButton.prototype), "addItems", this).call(this, items, text);

          this.secondaryBtnObj.items = this.items;
        }
        /**
         * Removes the items from the menu.
         * @param  { string[] } items - Specifies an array of string to remove the items.
         * @returns {void}.
         */

      }, {
        key: "removeItems",
        value: function removeItems(items) {
          _get(_getPrototypeOf(SplitButton.prototype), "removeItems", this).call(this, items);

          this.secondaryBtnObj.items = this.items;
        }
      }, {
        key: "initWrapper",
        value: function initWrapper() {
          if (!this.wrapper) {
            this.wrapper = this.createElement('div', {
              className: 'e-' + this.getModuleName() + '-wrapper'
            });
            this.element.parentNode.insertBefore(this.wrapper, this.element);
          }

          this.element.classList.remove('e-' + this.getModuleName());

          if (this.enableRtl) {
            this.wrapper.classList.add(RTL);
          }

          if (this.cssClass) {
            Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.wrapper], this.cssClass.split(' '));
          }
        }
      }, {
        key: "createPrimaryButton",
        value: function createPrimaryButton() {
          var btnModel = {
            cssClass: this.cssClass,
            enableRtl: this.enableRtl,
            iconCss: this.iconCss,
            iconPosition: this.iconPosition,
            content: this.content,
            disabled: this.disabled
          };
          this.primaryBtnObj = new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"](btnModel);
          this.primaryBtnObj.createElement = this.createElement;
          this.primaryBtnObj.appendTo(this.element);
          this.element.classList.add('e-' + this.getModuleName());
          this.element.type = 'button';
          this.wrapper.appendChild(this.element);
        }
      }, {
        key: "createSecondaryButton",
        value: function createSecondaryButton() {
          var _this668 = this;

          var dropDownBtnModel;
          var btnElem;
          btnElem = this.createElement('button', {
            className: 'e-icon-btn',
            attrs: {
              'tabindex': '-1'
            },
            id: this.element.id + '_dropdownbtn'
          });
          this.wrapper.appendChild(btnElem);
          dropDownBtnModel = {
            cssClass: this.cssClass,
            disabled: this.disabled,
            enableRtl: this.enableRtl,
            items: this.items,
            target: this.target
          };

          dropDownBtnModel.beforeItemRender = function (args) {
            _this668.trigger('beforeItemRender', args);
          };

          dropDownBtnModel.open = function (args) {
            _this668.trigger('open', args);
          };

          dropDownBtnModel.close = function (args) {
            _this668.trigger('close', args);
          };

          dropDownBtnModel.select = function (args) {
            _this668.trigger('select', args);
          };

          dropDownBtnModel.beforeOpen = function (args) {
            var callBackPromise = new Deferred();

            _this668.trigger('beforeOpen', args, function (observedArgs) {
              callBackPromise.resolve(observedArgs);
            });

            return callBackPromise;
          };

          dropDownBtnModel.beforeClose = function (args) {
            var callBackPromise = new Deferred();

            _this668.trigger('beforeClose', args, function (observedArgs) {
              callBackPromise.resolve(observedArgs);
            });

            return callBackPromise;
          };

          this.secondaryBtnObj = new DropDownButton(dropDownBtnModel);
          this.secondaryBtnObj.createElement = this.createElement;
          this.secondaryBtnObj.appendTo(btnElem);
          this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
          this.dropDown = this.secondaryBtnObj.dropDown;
          this.secondaryBtnObj.activeElem = [this.element, this.secondaryBtnObj.element];

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.getPopUpElement(), 'keydown', this.secondaryBtnObj.keyBoardHandler);

          this.secondaryBtnObj.element.querySelector('.e-btn-icon').classList.remove('e-icon-right');
        }
      }, {
        key: "setAria",
        value: function setAria() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-expanded': 'false',
            'aria-haspopup': 'true',
            'aria-label': this.element.textContent + ' splitbutton',
            'aria-owns': this.secondaryBtnObj.dropDown.element.id
          });
        }
        /**
         * Get component name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'split-btn';
        }
        /**
         * To open/close SplitButton popup based on current state of the SplitButton.
         * @returns void
         */

      }, {
        key: "toggle",
        value: function toggle() {
          this.secondaryBtnObj.toggle();
        }
      }, {
        key: "destroy",
        value: function destroy() {
          var _this669 = this;

          var classList$$1 = [RTL];
          var element = document.getElementById(this.element.id);

          if (this.cssClass) {
            classList$$1 = classList$$1.concat(this.cssClass.split(' '));
          }

          if (element && element.parentElement === this.wrapper) {
            if (this.wrapper.tagName === TAGNAME) {
              this.wrapper.innerHTML = '';
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.wrapper], ['e-rtl', 'e-' + this.getModuleName() + '-wrapper']);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.wrapper], this.cssClass.split(' '));
            } else {
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classList$$1);
              ['aria-label', 'aria-haspopup', 'aria-expanded', 'aria-owns', 'type'].forEach(function (key) {
                _this669.element.removeAttribute(key);
              });
              this.wrapper.parentNode.insertBefore(this.element, this.wrapper);
              Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.wrapper);
            }

            this.unWireEvents();
          }

          this.primaryBtnObj.destroy();
          this.secondaryBtnObj.destroy();

          _get(_getPrototypeOf(SplitButton.prototype), "destroy", this).call(this);

          if (!this.element.getAttribute('class')) {
            this.element.removeAttribute('class');
          }
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.primaryBtnClickHandler, this);

          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.getPopUpElement(), 'keydown', this.keyBoardHandler, this);

          new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"](this.element, {
            keyAction: this.btnKeyBoardHandler.bind(this),
            keyConfigs: {
              altdownarrow: 'alt+downarrow'
            }
          });
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.primaryBtnClickHandler);

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["getInstance"])(this.element, _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["KeyboardEvents"]).destroy();
        }
      }, {
        key: "primaryBtnClickHandler",
        value: function primaryBtnClickHandler() {
          this.trigger('click', {
            element: this.element
          });
        }
      }, {
        key: "btnKeyBoardHandler",
        value: function btnKeyBoardHandler(e) {
          switch (e.action) {
            case 'altdownarrow':
              this.clickHandler(e);
              break;
          }
        }
        /**
         * Called internally if any of the property value changed.
         * @param  {SplitButtonModel} newProp
         * @param  {SplitButtonModel} oldProp
         * @returns void
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var model = ['content', 'iconCss', 'iconPosition', 'cssClass', 'disabled', 'enableRtl'];
          this.primaryBtnObj.setProperties(getModel(newProp, model));
          model = ['beforeOpen', 'beforeItemRender', 'select', 'open', 'close', 'cssClass', 'disabled', 'enableRtl'];

          if (Object.keys(newProp).indexOf('items') > -1) {
            this.secondaryBtnObj.items = newProp.items;
            this.secondaryBtnObj.dataBind();
          }

          this.secondaryBtnObj.setProperties(getModel(newProp, model));

          for (var _i167 = 0, _Object$keys66 = Object.keys(newProp); _i167 < _Object$keys66.length; _i167++) {
            var prop = _Object$keys66[_i167];

            switch (prop) {
              case 'cssClass':
                if (oldProp.cssClass) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.wrapper], oldProp.cssClass.split(' '));
                }

                Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.wrapper], newProp.cssClass.split(' '));
                break;

              case 'enableRtl':
                if (newProp.enableRtl) {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([this.wrapper], RTL);
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.wrapper], RTL);
                }

                break;
            }
          }
        }
        /**
         * Sets the focus to SplitButton
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return SplitButton;
    }(DropDownButton);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], SplitButton.prototype, "content", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], SplitButton.prototype, "cssClass", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], SplitButton.prototype, "disabled", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], SplitButton.prototype, "iconCss", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], SplitButton.prototype, "iconPosition", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Collection"])([], Item)], SplitButton.prototype, "items", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], SplitButton.prototype, "target", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "beforeItemRender", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "beforeOpen", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "beforeClose", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "click", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "close", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "open", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "select", void 0);

    __decorate$2([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], SplitButton.prototype, "created", void 0);

    SplitButton = __decorate$2([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], SplitButton);
    /**
     * Deferred is used to handle asynchronous operation.
     */

    var Deferred = function Deferred() {
      var _this670 = this;

      _classCallCheck(this, Deferred);

      /**
       * Promise is an object that represents a value that may not be available yet, but will be resolved at some point in the future.
       */
      this.promise = new Promise(function (resolve, reject) {
        _this670.resolve = resolve;
        _this670.reject = reject;
      });
      /**
       * Defines the callback function triggers when the Deferred object is rejected.
       */

      this["catch"] = this.promise["catch"].bind(this.promise);
      /**
       * Defines the callback function triggers when the Deferred object is resolved.
       */

      this.then = this.promise.then.bind(this.promise);
    };
    /**
     * Split Button modules
     */

    /**
     * Initialize ButtonGroup CSS component with specified properties.
     * ```html
     * <div id='buttongroup'>
     * <button></button>
     * <button></button>
     * <button></button>
     * </div>
     * ```
     * ```typescript
     * createButtonGroup('#buttongroup', {
     *   cssClass: 'e-outline',
     *   buttons: [
     *       { content: 'Day' },
     *       { content: 'Week' },
     *       { content: 'Work Week'}
     *   ]
     * });
     * ```
     * @param {string} selector
     * @param {CreateButtonGroupModel} options
     * @returns HTMLElement
     */


    function createButtonGroup(selector) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var createElement$$1 = arguments.length > 2 ? arguments[2] : undefined;
      var child;
      var btnElem;
      var nextChild;
      var btnModel;

      if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"])(createElement$$1)) {
        createElement$$1 = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["createElement"];
      }

      var wrapper = document.querySelector(selector);
      Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["addClass"])([wrapper], ['e-btn-group', 'e-css']);
      wrapper.setAttribute('role', 'group');
      var childs = wrapper.children;
      options.buttons = options.buttons || [];

      for (var i = 0, j = 0; j < childs.length; i++, j++) {
        child = childs[j];
        btnModel = options.buttons[i];

        if (btnModel !== null) {
          if (child.tagName === 'BUTTON') {
            btnElem = child;
          } else {
            btnElem = createElement$$1('label');
            nextChild = childs[j + 1];

            if (nextChild) {
              wrapper.insertBefore(btnElem, nextChild);
            } else {
              wrapper.appendChild(btnElem);
            }

            if (child.id) {
              btnElem.setAttribute('for', child.id);
            }

            if (btnModel && btnModel.disabled) {
              child.disabled = true;
            }

            j++;
          }

          if (options.cssClass && btnModel && !btnModel.cssClass) {
            btnModel.cssClass = options.cssClass;
          }

          new _syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"](btnModel || {}, btnElem);
        }
      }

      return wrapper;
    }
    /**
     * ButtonGroup modules
     */


    var __decorate$3 = undefined && undefined.__decorate || function (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;
    };

    var HIDESPINNER = 'e-hide-spinner';
    var PROGRESS = 'e-progress';
    var PROGRESSACTIVE = 'e-progress-active';
    var CONTENTCLS = 'e-btn-content';
    /**
     * Defines the spin settings.
     */

    var SpinSettings = /*#__PURE__*/function (_syncfusion_ej2_base_61) {
      _inherits(SpinSettings, _syncfusion_ej2_base_61);

      var _super247 = _createSuper(SpinSettings);

      function SpinSettings() {
        _classCallCheck(this, SpinSettings);

        return _super247.apply(this, arguments);
      }

      return SpinSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(null)], SpinSettings.prototype, "template", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(16)], SpinSettings.prototype, "width", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], SpinSettings.prototype, "position", void 0);
    /**
     * Defines the animation settings.
     */


    var AnimationSettings = /*#__PURE__*/function (_syncfusion_ej2_base_62) {
      _inherits(AnimationSettings, _syncfusion_ej2_base_62);

      var _super248 = _createSuper(AnimationSettings);

      function AnimationSettings() {
        _classCallCheck(this, AnimationSettings);

        return _super248.apply(this, arguments);
      }

      return AnimationSettings;
    }(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["ChildProperty"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(400)], AnimationSettings.prototype, "duration", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('None')], AnimationSettings.prototype, "effect", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('ease')], AnimationSettings.prototype, "easing", void 0);
    /**
     * The ProgressButton visualizes the progression of an operation to indicate the user
     * that a process is happening in the background with visual representation.
     * ```html
     * <button id="element"></button>
     * ```
     * ```typescript
     * <script>
     * var progressButtonObj = new ProgressButton({ content: 'Progress Button' });
     * progressButtonObj.appendTo("#element");
     * </script>
     * ```
     */


    var ProgressButton = /*#__PURE__*/function (_syncfusion_ej2_butto) {
      _inherits(ProgressButton, _syncfusion_ej2_butto);

      var _super249 = _createSuper(ProgressButton);

      /**
       * Constructor for creating the widget
       * @param  {ProgressButtonModel} options?
       * @param  {string|HTMLButtonElement} element?
       */
      function ProgressButton(options, element) {
        var _this671;

        _classCallCheck(this, ProgressButton);

        _this671 = _super249.call(this, options, element);
        _this671.step = 1;
        return _this671;
      }

      _createClass2(ProgressButton, [{
        key: "preRender",
        value: function preRender() {
          _get(_getPrototypeOf(ProgressButton.prototype), "preRender", this).call(this);
        }
        /**
         * Initialize the Component rendering
         * @returns void
         * @private
         */

      }, {
        key: "render",
        value: function render() {
          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            this.isServerRendered = false;
          }

          _get(_getPrototypeOf(ProgressButton.prototype), "render", this).call(this);

          this.init();
          this.wireEvents();
          this.setAria();
          this.renderComplete();
        }
        /**
         * Starts the button progress at the specified percent.
         * @param percent Starts the button progress at this percent.
         * @returns void
         */

      }, {
        key: "start",
        value: function start(percent) {
          this.isPaused = false;
          this.startProgress(percent ? percent : this.percent, this.progressTime);
        }
        /**
         * Stops the button progress.
         * @returns void
         */

      }, {
        key: "stop",
        value: function stop() {
          this.isPaused = true;
          cancelAnimationFrame(this.timerId);
        }
        /**
         * Complete the button progress.
         * @returns void
         */

      }, {
        key: "progressComplete",
        value: function progressComplete() {
          this.isPaused = false;
          this.finishProgress();
        }
        /**
         * Get component name.
         * @returns string
         * @private
         */

      }, {
        key: "getModuleName",
        value: function getModuleName() {
          return 'progress-btn';
        }
        /**
         * Destroys the widget.
         * @returns void
         */

      }, {
        key: "destroy",
        value: function destroy() {
          var _this672 = this;

          var classList$$1 = [HIDESPINNER, PROGRESSACTIVE, 'e-round-corner', 'e-' + _get(_getPrototypeOf(ProgressButton.prototype), "getModuleName", this).call(this), 'e-spin-' + this.spinSettings.position.toLowerCase()];
          var css;

          _get(_getPrototypeOf(ProgressButton.prototype), "destroy", this).call(this);

          this.unWireEvents();
          this.element.innerHTML = '';

          if (this.cssClass) {
            classList$$1 = classList$$1.concat(this.cssClass.split(' '));
          }

          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["removeClass"])([this.element], classList$$1);
          css = this.element.getAttribute('class') ? ['aria-label', 'aria-valuemin', 'aria-valuemax', 'aria-valuenow'] : ['aria-label', 'aria-valuemin', 'aria-valuemax', 'aria-valuenow', 'class'];
          css.forEach(function (key) {
            _this672.element.removeAttribute(key);
          });

          if (this.disabled) {
            this.element.removeAttribute('disabled');
          }
        }
      }, {
        key: "init",
        value: function init() {
          this.element.classList.add('e-' + _get(_getPrototypeOf(ProgressButton.prototype), "getModuleName", this).call(this));
          this.setContent();
          this.createSpinner();

          if (this.enableProgress) {
            this.createProgress();
          }
        }
      }, {
        key: "createSpinner",
        value: function createSpinner() {
          var spinner = this.createElement('span', {
            className: 'e-spinner'
          });
          this.setSpinPosition(spinner);
          Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["createSpinner"])({
            target: spinner,
            width: this.spinSettings.width || 16,
            template: this.spinSettings.template
          }, this.createElement);
        }
      }, {
        key: "getSpinner",
        value: function getSpinner() {
          return this.element.getElementsByClassName('e-spinner')[0];
        }
      }, {
        key: "getProgress",
        value: function getProgress() {
          return this.element.getElementsByClassName(PROGRESS)[0];
        }
      }, {
        key: "setSpinPosition",
        value: function setSpinPosition(ele) {
          var position = this.spinSettings.position || 'Left';

          if (position === 'Left' || position === 'Top') {
            this.element.insertBefore(ele, this.element.getElementsByClassName(CONTENTCLS)[0]);
          } else {
            this.element.appendChild(ele);
          }

          this.element.classList.add('e-spin-' + position.toLowerCase());
        }
      }, {
        key: "createProgress",
        value: function createProgress() {
          this.element.appendChild(this.createElement('span', {
            className: PROGRESS
          }));
        }
      }, {
        key: "setContent",
        value: function setContent() {
          var cont;

          if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
            cont = this.content;

            if (this.enableHtmlSanitizer) {
              cont = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.content);
            }

            this.setContentIcon(cont);
          } else {
            cont = this.element.innerHTML;

            if (this.enableHtmlSanitizer) {
              cont = _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["SanitizeHtmlHelper"].sanitize(this.element.innerHTML);
            }

            this.element.innerHTML = '';
            this.element.appendChild(this.createElement('span', {
              className: CONTENTCLS,
              innerHTML: cont
            }));
          }
        }
      }, {
        key: "setContentIcon",
        value: function setContentIcon(content) {
          var contElem = this.createElement('span', {
            className: CONTENTCLS,
            innerHTML: content
          });

          if (this.iconCss) {
            var span = this.createElement('span', {
              className: 'e-btn-icon ' + this.iconCss
            });

            if (!this.element.textContent.trim()) {
              this.element.classList.add('e-icon-btn');
            } else {
              span.classList.add('e-icon-' + this.iconPosition.toLowerCase());

              if (this.iconPosition === 'Top' || this.iconPosition === 'Bottom') {
                this.element.classList.add('e-' + this.iconPosition.toLowerCase() + '-icon-btn');
              }
            }

            var node = contElem.childNodes[0];

            if (node && (this.iconPosition === 'Left' || this.iconPosition === 'Top')) {
              contElem.insertBefore(span, node);
            } else {
              contElem.appendChild(span);
            }
          }

          this.element.appendChild(contElem);
        }
      }, {
        key: "clickHandler",
        value: function clickHandler() {
          if (this.element.classList.contains(PROGRESSACTIVE)) {
            return;
          }

          this.startProgress();
        }
      }, {
        key: "startProgress",
        value: function startProgress(percent, progressTime) {
          var clsList = this.element.classList;
          var isVertical = clsList.contains('e-vertical');
          clsList.add(PROGRESSACTIVE);

          if (!clsList.contains(HIDESPINNER)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["showSpinner"])(this.element);
          }

          this.startAnimate(Date.now(), progressTime ? progressTime : 0, progressTime ? Date.now() - this.duration * 1 / 100 : Date.now(), percent ? percent : 0, 0, this.step, 0, isVertical);
          this.startContAnimate();
        }
      }, {
        key: "startAnimate",
        value: function startAnimate(timestamp, progressTime, prevTime, percent, prevPercent, step, prevProgressTime, isVertical) {
          var _this673 = this;

          try {
            var args;
            var timeDiff = timestamp - prevTime;
            var stepTime = this.duration * step / 100;
            var timeDiffBuffer = timeDiff ? timeDiff < stepTime ? timeDiff - stepTime : timeDiff % stepTime : 0;
            this.progressTime = progressTime = progressTime + timeDiff - timeDiffBuffer;
            prevTime = timestamp - timeDiffBuffer;
            percent = percent + (timeDiff - timeDiffBuffer) / this.duration * 100;
            prevPercent = (progressTime - prevProgressTime) % stepTime === 0 || percent === 100 ? percent : prevPercent;
            args = {
              percent: prevPercent,
              currentDuration: progressTime,
              step: step
            };
            this.eIsVertical = isVertical;

            if (percent === 0) {
              this.trigger('begin', args, function (observedArgs) {
                _this673.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
              });
            } else if (percent === 100 || progressTime === this.duration) {
              this.trigger('end', args, function (observedArgs) {
                _this673.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
              });
            } else {
              this.trigger('progress', args, function (observedArgs) {
                _this673.successCallback(observedArgs, percent, prevPercent, progressTime, prevProgressTime, timeDiffBuffer, prevTime);
              });
            }
          } catch (e) {
            cancelAnimationFrame(this.timerId);
            this.trigger('fail', e);
          }
        }
      }, {
        key: "successCallback",
        value: function successCallback(args, perc, pPerc, prgTim, pPrgTim, timDif, pTim) {
          var _this674 = this;

          var percent = perc;
          var prevPercent = pPerc;
          var timeDiffBuffer = timDif;
          var progressTime = prgTim;
          var prevProgressTime = pPrgTim;
          var prevTime = pTim;
          var isVertical = this.eIsVertical;

          if (percent !== args.percent && args.percent !== prevPercent) {
            percent = args.percent;
          }

          this.percent = percent;
          this.step = args.step;

          if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
            this.timerId = requestAnimationFrame(function () {
              if (_this674.enableProgress) {
                _this674.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
              }

              _this674.element.setAttribute('aria-valuenow', percent.toString());
            });
            prevPercent = percent;
            prevProgressTime = progressTime;
          }

          if (!this.isPaused) {
            if (progressTime < this.duration && percent < 100) {
              this.interval = window.setTimeout(function () {
                _this674.startAnimate(Date.now(), progressTime, prevTime, percent, prevPercent, args.step, prevProgressTime, isVertical); // tslint:disable-next-line

              }, this.duration / 100 - timeDiffBuffer);
            } else {
              this.interval = window.setTimeout(function () {
                _this674.progressTime = _this674.percent = 0;

                if (_this674.enableProgress) {
                  _this674.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
                }

                _this674.element.setAttribute('aria-valuenow', '0');

                _this674.hideSpin(); // tslint:disable-next-line

              }, 100);
            }
          }
        }
      }, {
        key: "startContAnimate",
        value: function startContAnimate() {
          var _this675 = this;

          var ele = this.element.getElementsByClassName(CONTENTCLS)[0];

          if (this.animationSettings.effect !== 'None') {
            new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Animation"]({}).animate(ele, {
              duration: this.animationSettings.duration,
              name: 'Progress' + this.animationSettings.effect,
              timingFunction: this.animationSettings.easing,
              begin: function begin() {
                if (_this675.spinSettings.position === 'Center') {
                  _this675.setSpinnerSize();
                }
              },
              end: function end() {
                ele.classList.add('e-animate-end');
              }
            });
          } else if (this.spinSettings.position === 'Center') {
            this.setSpinnerSize();
          }
        }
      }, {
        key: "finishProgress",
        value: function finishProgress() {
          var clsList = this.element.classList;
          var isVertical = clsList.contains('e-vertical');
          clsList.add(PROGRESSACTIVE);
          var args;
          var count = 100;

          for (var i = this.percent; i < count; i++) {
            i += 10;

            if (i > 100) {
              i = 100;
            }

            if (this.enableProgress) {
              this.getProgress().style[isVertical ? 'height' : 'width'] = this.percent < 100 ? i + '%' : '100%';
            }
          }

          this.element.setAttribute('aria-valuenow', '0');
          this.hideSpin();
          args = {
            step: this.step,
            currentDuration: this.progressTime,
            percent: 100
          };
          clearTimeout(this.interval);
          this.trigger('end', args);
          this.progressTime = this.percent = 0;
        }
      }, {
        key: "setSpinnerSize",
        value: function setSpinnerSize() {
          var ele = this.element.getElementsByClassName(CONTENTCLS)[0];
          var spinner = this.getSpinner();
          spinner.style.width = Math.max(spinner.offsetWidth, ele.offsetWidth) + 'px';
          spinner.style.height = Math.max(spinner.offsetHeight, ele.offsetHeight) + 'px';
          ele.classList.add('e-cont-animate');
        }
      }, {
        key: "hideSpin",
        value: function hideSpin() {
          var cont = this.element.getElementsByClassName(CONTENTCLS)[0];

          if (!this.element.classList.contains(HIDESPINNER)) {
            Object(_syncfusion_ej2_popups__WEBPACK_IMPORTED_MODULE_2__["hideSpinner"])(this.element);
          }

          this.element.classList.remove(PROGRESSACTIVE);

          if (this.animationSettings.effect !== 'None') {
            cont.classList.remove('e-animate-end');
          }

          if (this.spinSettings.position === 'Center') {
            var ele = this.getSpinner();
            cont.classList.remove('e-cont-animate');
            ele.style.width = 'auto';
            ele.style.height = 'auto';
          }
        }
      }, {
        key: "setIconSpan",
        value: function setIconSpan() {
          var cont = this.element.getElementsByClassName(CONTENTCLS)[0];
          var iconSpan = this.element.getElementsByClassName('e-btn-icon')[0];

          if (cont.childNodes[0] && (this.iconPosition === 'Left' || this.iconPosition === 'Top')) {
            cont.insertBefore(iconSpan, cont.childNodes[0]);
          } else {
            cont.appendChild(iconSpan);
          }
        }
      }, {
        key: "setAria",
        value: function setAria() {
          Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["attributes"])(this.element, {
            'aria-label': this.element.textContent + ' progress',
            'aria-valuemin': '0',
            'aria-valuemax': '100',
            'aria-valuenow': '0'
          });
        }
      }, {
        key: "wireEvents",
        value: function wireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].add(this.element, 'click', this.clickHandler, this);
        }
      }, {
        key: "unWireEvents",
        value: function unWireEvents() {
          _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["EventHandler"].remove(this.element, 'click', this.clickHandler);
        }
        /**
         * Called internally if any of the property value changed.
         * @param  {ProgressButtonModel} newProp
         * @param  {ProgressButtonModel} oldProp
         * @returns void
         * @private
         */

      }, {
        key: "onPropertyChanged",
        value: function onPropertyChanged(newProp, oldProp) {
          var ele = this.element;

          _get(_getPrototypeOf(ProgressButton.prototype), "onPropertyChanged", this).call(this, newProp, oldProp);

          for (var _i168 = 0, _Object$keys67 = Object.keys(newProp); _i168 < _Object$keys67.length; _i168++) {
            var prop = _Object$keys67[_i168];

            switch (prop) {
              case 'content':
                if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["isBlazor"])()) {
                  var btnElem = this.element.querySelector('.e-btn-content');

                  if (this.iconCss) {
                    if (this.iconPosition === 'Left' || this.iconPosition === 'Top') {
                      btnElem.childNodes[1].textContent = this.content;
                    } else {
                      btnElem.childNodes[0].textContent = this.content;
                    }
                  } else {
                    btnElem.textContent = this.content;
                  }
                } else {
                  this.setContent();
                  this.createSpinner();

                  if (this.enableProgress) {
                    this.createProgress();
                  }
                }

                ele.setAttribute('aria-label', ele.textContent + ' progress');
                break;

              case 'iconCss':
                if (!oldProp.iconCss) {
                  this.setIconSpan();
                }

                break;

              case 'iconPosition':
                this.setIconSpan();
                break;

              case 'enableProgress':
                if (newProp.enableProgress) {
                  this.createProgress();
                } else {
                  Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["remove"])(this.getProgress());
                }

                break;

              case 'spinSettings':
                if (newProp.spinSettings.position) {
                  ele.classList.remove('e-spin-' + oldProp.spinSettings.position.toLowerCase());
                  this.setSpinPosition(this.getSpinner());
                }

                if (newProp.spinSettings.template || newProp.spinSettings.width) {
                  ele.removeChild(this.getSpinner());
                  this.createSpinner();
                }

                break;
            }
          }
        }
        /**
         * Sets the focus to ProgressButton
         * its native method
         * @public
         */

      }, {
        key: "focusIn",
        value: function focusIn() {
          this.element.focus();
        }
      }]);

      return ProgressButton;
    }(_syncfusion_ej2_buttons__WEBPACK_IMPORTED_MODULE_1__["Button"]);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ProgressButton.prototype, "enableProgress", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(2000)], ProgressButton.prototype, "duration", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('Left')], ProgressButton.prototype, "iconPosition", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ProgressButton.prototype, "iconCss", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ProgressButton.prototype, "disabled", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ProgressButton.prototype, "isPrimary", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ProgressButton.prototype, "cssClass", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])('')], ProgressButton.prototype, "content", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ProgressButton.prototype, "isToggle", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Property"])(false)], ProgressButton.prototype, "enableHtmlSanitizer", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, SpinSettings)], ProgressButton.prototype, "spinSettings", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Complex"])({}, AnimationSettings)], ProgressButton.prototype, "animationSettings", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ProgressButton.prototype, "created", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ProgressButton.prototype, "begin", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ProgressButton.prototype, "progress", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ProgressButton.prototype, "end", void 0);

    __decorate$3([Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["Event"])()], ProgressButton.prototype, "fail", void 0);

    ProgressButton = __decorate$3([_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__["NotifyPropertyChanges"]], ProgressButton);
    /**
     * ProgressButton modules
     */

    /**
     * SplitButton all module
     */
    //# sourceMappingURL=ej2-splitbuttons.es2015.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/index.js":
  /*!*********************************************!*\
    !*** ./node_modules/rxjs/_esm2015/index.js ***!
    \*********************************************/

  /*! exports provided: Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asapScheduler, asyncScheduler, queueScheduler, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, Notification, 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, race, range, throwError, timer, using, zip, EMPTY, NEVER, config */

  /***/
  function node_modulesRxjs_esm2015IndexJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/groupBy.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/ReplaySubject.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/AsyncSubject.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/asap.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "asapScheduler", function () {
      return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"];
    });
    /* harmony import */


    var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ./internal/scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "asyncScheduler", function () {
      return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"];
    });
    /* harmony import */


    var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ./internal/scheduler/queue */
    "./node_modules/rxjs/_esm2015/internal/scheduler/queue.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "queueScheduler", function () {
      return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"];
    });
    /* harmony import */


    var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ./internal/scheduler/animationFrame */
    "./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function () {
      return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"];
    });
    /* harmony import */


    var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! ./internal/scheduler/VirtualTimeScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/Scheduler.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/Notification.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "Notification", function () {
      return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"];
    });
    /* harmony import */


    var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
    /*! ./internal/util/pipe */
    "./node_modules/rxjs/_esm2015/internal/util/pipe.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/noop.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/isObservable.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/concat.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/defer.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/generate.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/iif.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/interval.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/merge.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/never.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/of.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/observable/pairs.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "pairs", function () {
      return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"];
    });
    /* harmony import */


    var _internal_observable_race__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(
    /*! ./internal/observable/race */
    "./node_modules/rxjs/_esm2015/internal/observable/race.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "race", function () {
      return _internal_observable_race__WEBPACK_IMPORTED_MODULE_44__["race"];
    });
    /* harmony import */


    var _internal_observable_range__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(
    /*! ./internal/observable/range */
    "./node_modules/rxjs/_esm2015/internal/observable/range.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "range", function () {
      return _internal_observable_range__WEBPACK_IMPORTED_MODULE_45__["range"];
    });
    /* harmony import */


    var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
    /*! ./internal/observable/throwError */
    "./node_modules/rxjs/_esm2015/internal/observable/throwError.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "throwError", function () {
      return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_46__["throwError"];
    });
    /* harmony import */


    var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(
    /*! ./internal/observable/timer */
    "./node_modules/rxjs/_esm2015/internal/observable/timer.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "timer", function () {
      return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_47__["timer"];
    });
    /* harmony import */


    var _internal_observable_using__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(
    /*! ./internal/observable/using */
    "./node_modules/rxjs/_esm2015/internal/observable/using.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "using", function () {
      return _internal_observable_using__WEBPACK_IMPORTED_MODULE_48__["using"];
    });
    /* harmony import */


    var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(
    /*! ./internal/observable/zip */
    "./node_modules/rxjs/_esm2015/internal/observable/zip.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "zip", function () {
      return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_49__["zip"];
    });
    /* 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_50__ = __webpack_require__(
    /*! ./internal/config */
    "./node_modules/rxjs/_esm2015/internal/config.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "config", function () {
      return _internal_config__WEBPACK_IMPORTED_MODULE_50__["config"];
    }); //# sourceMappingURL=index.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/AsyncSubject.js":
  /*!*************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/AsyncSubject.js ***!
    \*************************************************************/

  /*! exports provided: AsyncSubject */

  /***/
  function node_modulesRxjs_esm2015InternalAsyncSubjectJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");

    var AsyncSubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP) {
      _inherits(AsyncSubject, _Subject__WEBPACK_IMP);

      var _super250 = _createSuper(AsyncSubject);

      function AsyncSubject() {
        var _this676;

        _classCallCheck(this, AsyncSubject);

        _this676 = _super250.apply(this, arguments);
        _this676.value = null;
        _this676.hasNext = false;
        _this676.hasCompleted = false;
        return _this676;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***!
    \****************************************************************/

  /*! exports provided: BehaviorSubject */

  /***/
  function node_modulesRxjs_esm2015InternalBehaviorSubjectJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./util/ObjectUnsubscribedError */
    "./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js");

    var BehaviorSubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP2) {
      _inherits(BehaviorSubject, _Subject__WEBPACK_IMP2);

      var _super251 = _createSuper(BehaviorSubject);

      function BehaviorSubject(_value) {
        var _this677;

        _classCallCheck(this, BehaviorSubject);

        _this677 = _super251.call(this);
        _this677._value = _value;
        return _this677;
      }

      _createClass2(BehaviorSubject, [{
        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);
        }
      }, {
        key: "value",
        get: function get() {
          return this.getValue();
        }
      }]);

      return BehaviorSubject;
    }(_Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]); //# sourceMappingURL=BehaviorSubject.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***!
    \****************************************************************/

  /*! exports provided: InnerSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalInnerSubscriberJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    var InnerSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_) {
      _inherits(InnerSubscriber, _Subscriber__WEBPACK_);

      var _super252 = _createSuper(InnerSubscriber);

      function InnerSubscriber(parent, outerValue, outerIndex) {
        var _this678;

        _classCallCheck(this, InnerSubscriber);

        _this678 = _super252.call(this);
        _this678.parent = parent;
        _this678.outerValue = outerValue;
        _this678.outerIndex = outerIndex;
        _this678.index = 0;
        return _this678;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Notification.js":
  /*!*************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Notification.js ***!
    \*************************************************************/

  /*! exports provided: NotificationKind, Notification */

  /***/
  function node_modulesRxjs_esm2015InternalNotificationJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* harmony import */


    var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./observable/of */
    "./node_modules/rxjs/_esm2015/internal/observable/of.js");
    /* harmony import */


    var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./observable/throwError */
    "./node_modules/rxjs/_esm2015/internal/observable/throwError.js");

    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

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Observable.js":
  /*!***********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***!
    \***********************************************************/

  /*! exports provided: Observable */

  /***/
  function node_modulesRxjs_esm2015InternalObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/canReportError.js");
    /* harmony import */


    var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./util/toSubscriber */
    "./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js");
    /* harmony import */


    var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../internal/symbol/observable */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");
    /* harmony import */


    var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./util/pipe */
    "./node_modules/rxjs/_esm2015/internal/util/pipe.js");
    /* harmony import */


    var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./config */
    "./node_modules/rxjs/_esm2015/internal/config.js");

    var Observable = /*#__PURE__*/function () {
      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 _this679 = this;

          promiseCtor = getPromiseCtor(promiseCtor);
          return new promiseCtor(function (resolve, reject) {
            var subscription;
            subscription = _this679.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: _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"],
        value: function value() {
          return this;
        }
      }, {
        key: "pipe",
        value: function pipe() {
          for (var _len81 = arguments.length, operations = new Array(_len81), _key27 = 0; _key27 < _len81; _key27++) {
            operations[_key27] = arguments[_key27];
          }

          if (operations.length === 0) {
            return this;
          }

          return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
        }
      }, {
        key: "toPromise",
        value: function toPromise(promiseCtor) {
          var _this680 = this;

          promiseCtor = getPromiseCtor(promiseCtor);
          return new promiseCtor(function (resolve, reject) {
            var value;

            _this680.subscribe(function (x) {
              return value = x;
            }, function (err) {
              return reject(err);
            }, function () {
              return resolve(value);
            });
          });
        }
      }]);

      return 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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Observer.js":
  /*!*********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Observer.js ***!
    \*********************************************************/

  /*! exports provided: empty */

  /***/
  function node_modulesRxjs_esm2015InternalObserverJs(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 */
    "./node_modules/rxjs/_esm2015/internal/config.js");
    /* harmony import */


    var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./util/hostReportError */
    "./node_modules/rxjs/_esm2015/internal/util/hostReportError.js");

    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

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js ***!
    \****************************************************************/

  /*! exports provided: OuterSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOuterSubscriberJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    var OuterSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_2) {
      _inherits(OuterSubscriber, _Subscriber__WEBPACK_2);

      var _super253 = _createSuper(OuterSubscriber);

      function OuterSubscriber() {
        _classCallCheck(this, OuterSubscriber);

        return _super253.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/ReplaySubject.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/ReplaySubject.js ***!
    \**************************************************************/

  /*! exports provided: ReplaySubject */

  /***/
  function node_modulesRxjs_esm2015InternalReplaySubjectJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./scheduler/queue */
    "./node_modules/rxjs/_esm2015/internal/scheduler/queue.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./operators/observeOn */
    "./node_modules/rxjs/_esm2015/internal/operators/observeOn.js");
    /* harmony import */


    var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./util/ObjectUnsubscribedError */
    "./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js");
    /* harmony import */


    var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ./SubjectSubscription */
    "./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js");

    var ReplaySubject = /*#__PURE__*/function (_Subject__WEBPACK_IMP3) {
      _inherits(ReplaySubject, _Subject__WEBPACK_IMP3);

      var _super254 = _createSuper(ReplaySubject);

      function ReplaySubject() {
        var _this681;

        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);

        _this681 = _super254.call(this);
        _this681.scheduler = scheduler;
        _this681._events = [];
        _this681._infiniteTimeWindow = false;
        _this681._bufferSize = bufferSize < 1 ? 1 : bufferSize;
        _this681._windowTime = windowTime < 1 ? 1 : windowTime;

        if (windowTime === Number.POSITIVE_INFINITY) {
          _this681._infiniteTimeWindow = true;
          _this681.next = _this681.nextInfiniteTimeWindow;
        } else {
          _this681.next = _this681.nextTimeWindow;
        }

        return _this681;
      }

      _createClass2(ReplaySubject, [{
        key: "nextInfiniteTimeWindow",
        value: function nextInfiniteTimeWindow(value) {
          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) {
          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 _i169 = 0; _i169 < len && !subscriber.closed; _i169++) {
              subscriber.next(_events[_i169].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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Scheduler.js":
  /*!**********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Scheduler.js ***!
    \**********************************************************/

  /*! exports provided: Scheduler */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Subject.js":
  /*!********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***!
    \********************************************************/

  /*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */

  /***/
  function node_modulesRxjs_esm2015InternalSubjectJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./util/ObjectUnsubscribedError */
    "./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js");
    /* harmony import */


    var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./SubjectSubscription */
    "./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js");
    /* harmony import */


    var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../internal/symbol/rxSubscriber */
    "./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js");

    var SubjectSubscriber = /*#__PURE__*/function (_Subscriber__WEBPACK_3) {
      _inherits(SubjectSubscriber, _Subscriber__WEBPACK_3);

      var _super255 = _createSuper(SubjectSubscriber);

      function SubjectSubscriber(destination) {
        var _this682;

        _classCallCheck(this, SubjectSubscriber);

        _this682 = _super255.call(this, destination);
        _this682.destination = destination;
        return _this682;
      }

      return SubjectSubscriber;
    }(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]);

    var Subject = /*#__PURE__*/function (_Observable__WEBPACK_) {
      _inherits(Subject, _Observable__WEBPACK_);

      var _super256 = _createSuper(Subject);

      function Subject() {
        var _this683;

        _classCallCheck(this, Subject);

        _this683 = _super256.call(this);
        _this683.observers = [];
        _this683.closed = false;
        _this683.isStopped = false;
        _this683.hasError = false;
        _this683.thrownError = null;
        return _this683;
      }

      _createClass2(Subject, [{
        key: _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__["rxSubscriber"],
        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 _len82 = observers.length;
            var copy = observers.slice();

            for (var i = 0; i < _len82; 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"]);

    Subject.create = function (destination, source) {
      return new AnonymousSubject(destination, source);
    };

    var AnonymousSubject = /*#__PURE__*/function (_Subject) {
      _inherits(AnonymousSubject, _Subject);

      var _super257 = _createSuper(AnonymousSubject);

      function AnonymousSubject(destination, source) {
        var _this684;

        _classCallCheck(this, AnonymousSubject);

        _this684 = _super257.call(this);
        _this684.destination = destination;
        _this684.source = source;
        return _this684;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***!
    \********************************************************************/

  /*! exports provided: SubjectSubscription */

  /***/
  function node_modulesRxjs_esm2015InternalSubjectSubscriptionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");

    var SubjectSubscription = /*#__PURE__*/function (_Subscription__WEBPAC) {
      _inherits(SubjectSubscription, _Subscription__WEBPAC);

      var _super258 = _createSuper(SubjectSubscription);

      function SubjectSubscription(subject, subscriber) {
        var _this685;

        _classCallCheck(this, SubjectSubscription);

        _this685 = _super258.call(this);
        _this685.subject = subject;
        _this685.subscriber = subscriber;
        _this685.closed = false;
        return _this685;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Subscriber.js":
  /*!***********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***!
    \***********************************************************/

  /*! exports provided: Subscriber, SafeSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalSubscriberJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isFunction.js");
    /* harmony import */


    var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./Observer */
    "./node_modules/rxjs/_esm2015/internal/Observer.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../internal/symbol/rxSubscriber */
    "./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js");
    /* harmony import */


    var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./config */
    "./node_modules/rxjs/_esm2015/internal/config.js");
    /* harmony import */


    var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ./util/hostReportError */
    "./node_modules/rxjs/_esm2015/internal/util/hostReportError.js");

    var Subscriber = /*#__PURE__*/function (_Subscription__WEBPAC2) {
      _inherits(Subscriber, _Subscription__WEBPAC2);

      var _super259 = _createSuper(Subscriber);

      function Subscriber(destinationOrNext, error, complete) {
        var _this686;

        _classCallCheck(this, Subscriber);

        _this686 = _super259.call(this);
        _this686.syncErrorValue = null;
        _this686.syncErrorThrown = false;
        _this686.syncErrorThrowable = false;
        _this686.isStopped = false;

        switch (arguments.length) {
          case 0:
            _this686.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"];
            break;

          case 1:
            if (!destinationOrNext) {
              _this686.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"];
              break;
            }

            if (typeof destinationOrNext === 'object') {
              if (destinationOrNext instanceof Subscriber) {
                _this686.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
                _this686.destination = destinationOrNext;
                destinationOrNext.add(_assertThisInitialized(_this686));
              } else {
                _this686.syncErrorThrowable = true;
                _this686.destination = new SafeSubscriber(_assertThisInitialized(_this686), destinationOrNext);
              }

              break;
            }

          default:
            _this686.syncErrorThrowable = true;
            _this686.destination = new SafeSubscriber(_assertThisInitialized(_this686), destinationOrNext, error, complete);
            break;
        }

        return _this686;
      }

      _createClass2(Subscriber, [{
        key: _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__["rxSubscriber"],
        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 _parent = this._parent,
              _parents = this._parents;
          this._parent = null;
          this._parents = null;
          this.unsubscribe();
          this.closed = false;
          this.isStopped = false;
          this._parent = _parent;
          this._parents = _parents;
          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"]);

    var SafeSubscriber = /*#__PURE__*/function (_Subscriber) {
      _inherits(SafeSubscriber, _Subscriber);

      var _super260 = _createSuper(SafeSubscriber);

      function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
        var _this687;

        _classCallCheck(this, SafeSubscriber);

        _this687 = _super260.call(this);
        _this687._parentSubscriber = _parentSubscriber;
        var next;

        var context = _assertThisInitialized(_this687);

        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)) {
              _this687.add(context.unsubscribe.bind(context));
            }

            context.unsubscribe = _this687.unsubscribe.bind(_assertThisInitialized(_this687));
          }
        }

        _this687._context = context;
        _this687._next = next;
        _this687._error = error;
        _this687._complete = complete;
        return _this687;
      }

      _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 _this688 = this;

          if (!this.isStopped) {
            var _parentSubscriber = this._parentSubscriber;

            if (this._complete) {
              var wrappedComplete = function wrappedComplete() {
                return _this688._complete.call(_this688._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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/Subscription.js":
  /*!*************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/Subscription.js ***!
    \*************************************************************/

  /*! exports provided: Subscription */

  /***/
  function node_modulesRxjs_esm2015InternalSubscriptionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./util/isObject */
    "./node_modules/rxjs/_esm2015/internal/util/isObject.js");
    /* harmony import */


    var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./util/isFunction */
    "./node_modules/rxjs/_esm2015/internal/util/isFunction.js");
    /* harmony import */


    var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./util/UnsubscriptionError */
    "./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js");

    var Subscription = /*#__PURE__*/function () {
      function Subscription(unsubscribe) {
        _classCallCheck(this, Subscription);

        this.closed = false;
        this._parent = null;
        this._parents = null;
        this._subscriptions = null;

        if (unsubscribe) {
          this._unsubscribe = unsubscribe;
        }
      }

      _createClass2(Subscription, [{
        key: "unsubscribe",
        value: function unsubscribe() {
          var hasErrors = false;
          var errors;

          if (this.closed) {
            return;
          }

          var _parent = this._parent,
              _parents = this._parents,
              _unsubscribe = this._unsubscribe,
              _subscriptions = this._subscriptions;
          this.closed = true;
          this._parent = null;
          this._parents = null;
          this._subscriptions = null;
          var index = -1;
          var len = _parents ? _parents.length : 0;

          while (_parent) {
            _parent.remove(this);

            _parent = ++index < len && _parents[index] || null;
          }

          if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
            try {
              _unsubscribe.call(this);
            } catch (e) {
              hasErrors = true;
              errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
            }
          }

          if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
            index = -1;
            len = _subscriptions.length;

            while (++index < len) {
              var sub = _subscriptions[index];

              if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
                try {
                  sub.unsubscribe();
                } catch (e) {
                  hasErrors = true;
                  errors = errors || [];

                  if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
                    errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
                  } else {
                    errors.push(e);
                  }
                }
              }
            }
          }

          if (hasErrors) {
            throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
          }
        }
      }, {
        key: "add",
        value: function add(teardown) {
          var subscription = teardown;

          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:
              {
                if (!teardown) {
                  return Subscription.EMPTY;
                }

                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
              }
          }

          if (subscription._addParent(this)) {
            var subscriptions = this._subscriptions;

            if (subscriptions) {
              subscriptions.push(subscription);
            } else {
              this._subscriptions = [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);
            }
          }
        }
      }, {
        key: "_addParent",
        value: function _addParent(parent) {
          var _parent = this._parent,
              _parents = this._parents;

          if (_parent === parent) {
            return false;
          } else if (!_parent) {
            this._parent = parent;
            return true;
          } else if (!_parents) {
            this._parents = [parent];
            return true;
          } else if (_parents.indexOf(parent) === -1) {
            _parents.push(parent);

            return true;
          }

          return false;
        }
      }]);

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/config.js":
  /*!*******************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/config.js ***!
    \*******************************************************/

  /*! exports provided: config */

  /***/
  function node_modulesRxjs_esm2015InternalConfigJs(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

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js":
  /*!*********************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***!
    \*********************************************************************************/

  /*! exports provided: ConnectableObservable, connectableObservableDescriptor */

  /***/
  function node_modulesRxjs_esm2015InternalObservableConnectableObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../operators/refCount */
    "./node_modules/rxjs/_esm2015/internal/operators/refCount.js");

    var ConnectableObservable = /*#__PURE__*/function (_Observable__WEBPACK_2) {
      _inherits(ConnectableObservable, _Observable__WEBPACK_2);

      var _super261 = _createSuper(ConnectableObservable);

      function ConnectableObservable(source, subjectFactory) {
        var _this689;

        _classCallCheck(this, ConnectableObservable);

        _this689 = _super261.call(this);
        _this689.source = source;
        _this689.subjectFactory = subjectFactory;
        _this689._refCount = 0;
        _this689._isComplete = false;
        return _this689;
      }

      _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;
            } else {
              this._connection = connection;
            }
          }

          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 connectableProto = ConnectableObservable.prototype;
    var connectableObservableDescriptor = {
      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_IMP4) {
      _inherits(ConnectableSubscriber, _Subject__WEBPACK_IMP4);

      var _super262 = _createSuper(ConnectableSubscriber);

      function ConnectableSubscriber(destination, connectable) {
        var _this690;

        _classCallCheck(this, ConnectableSubscriber);

        _this690 = _super262.call(this, destination);
        _this690.connectable = connectable;
        return _this690;
      }

      _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_4) {
      _inherits(RefCountSubscriber, _Subscriber__WEBPACK_4);

      var _super263 = _createSuper(RefCountSubscriber);

      function RefCountSubscriber(destination, connectable) {
        var _this691;

        _classCallCheck(this, RefCountSubscriber);

        _this691 = _super263.call(this, destination);
        _this691.connectable = connectable;
        return _this691;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js":
  /*!*********************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js ***!
    \*********************************************************************************/

  /*! exports provided: SubscribeOnObservable */

  /***/
  function node_modulesRxjs_esm2015InternalObservableSubscribeOnObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/asap */
    "./node_modules/rxjs/_esm2015/internal/scheduler/asap.js");
    /* harmony import */


    var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isNumeric */
    "./node_modules/rxjs/_esm2015/internal/util/isNumeric.js");

    var SubscribeOnObservable = /*#__PURE__*/function (_Observable__WEBPACK_3) {
      _inherits(SubscribeOnObservable, _Observable__WEBPACK_3);

      var _super264 = _createSuper(SubscribeOnObservable);

      function SubscribeOnObservable(source) {
        var _this692;

        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);

        _this692 = _super264.call(this);
        _this692.source = source;
        _this692.delayTime = delayTime;
        _this692.scheduler = scheduler;

        if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(delayTime) || delayTime < 0) {
          _this692.delayTime = 0;
        }

        if (!scheduler || typeof scheduler.schedule !== 'function') {
          _this692.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"];
        }

        return _this692;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js ***!
    \************************************************************************/

  /*! exports provided: bindCallback */

  /***/
  function node_modulesRxjs_esm2015InternalObservableBindCallbackJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../AsyncSubject */
    "./node_modules/rxjs/_esm2015/internal/AsyncSubject.js");
    /* harmony import */


    var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../operators/map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* harmony import */


    var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/canReportError */
    "./node_modules/rxjs/_esm2015/internal/util/canReportError.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    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 _len83 = arguments.length, args = new Array(_len83), _key28 = 0; _key28 < _len83; _key28++) {
          args[_key28] = arguments[_key28];
        }

        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 _len84 = arguments.length, innerArgs = new Array(_len84), _key29 = 0; _key29 < _len84; _key29++) {
                  innerArgs[_key29] = arguments[_key29];
                }

                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 _this693 = 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 _len85 = arguments.length, innerArgs = new Array(_len85), _key30 = 0; _key30 < _len85; _key30++) {
            innerArgs[_key30] = arguments[_key30];
          }

          var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;

          _this693.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js":
  /*!****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js ***!
    \****************************************************************************/

  /*! exports provided: bindNodeCallback */

  /***/
  function node_modulesRxjs_esm2015InternalObservableBindNodeCallbackJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../AsyncSubject */
    "./node_modules/rxjs/_esm2015/internal/AsyncSubject.js");
    /* harmony import */


    var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../operators/map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* harmony import */


    var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/canReportError */
    "./node_modules/rxjs/_esm2015/internal/util/canReportError.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");

    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 _len86 = arguments.length, args = new Array(_len86), _key31 = 0; _key31 < _len86; _key31++) {
          args[_key31] = arguments[_key31];
        }

        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 _len87 = arguments.length, innerArgs = new Array(_len87), _key32 = 0; _key32 < _len87; _key32++) {
                  innerArgs[_key32] = arguments[_key32];
                }

                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 _this694 = 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 _len88 = arguments.length, innerArgs = new Array(_len88), _key33 = 0; _key33 < _len88; _key33++) {
            innerArgs[_key33] = arguments[_key33];
          }

          var err = innerArgs.shift();

          if (err) {
            _this694.add(scheduler.schedule(dispatchError, 0, {
              err: err,
              subject: subject
            }));
          } else {
            var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;

            _this694.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js ***!
    \*************************************************************************/

  /*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalObservableCombineLatestJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _fromArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");

    var NONE = {};

    function combineLatest() {
      for (var _len89 = arguments.length, observables = new Array(_len89), _key34 = 0; _key34 < _len89; _key34++) {
        observables[_key34] = arguments[_key34];
      }

      var resultSelector = null;
      var scheduler = null;

      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__WEB) {
      _inherits(CombineLatestSubscriber, _OuterSubscriber__WEB);

      var _super265 = _createSuper(CombineLatestSubscriber);

      function CombineLatestSubscriber(destination, resultSelector) {
        var _this695;

        _classCallCheck(this, CombineLatestSubscriber);

        _this695 = _super265.call(this, destination);
        _this695.resultSelector = resultSelector;
        _this695.active = 0;
        _this695.values = [];
        _this695.observables = [];
        return _this695;
      }

      _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, observable, i));
            }
          }
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(unused) {
          if ((this.active -= 1) === 0) {
            this.destination.complete();
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/concat.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***!
    \******************************************************************/

  /*! exports provided: concat */

  /***/
  function node_modulesRxjs_esm2015InternalObservableConcatJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/of.js");
    /* harmony import */


    var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../operators/concatAll */
    "./node_modules/rxjs/_esm2015/internal/operators/concatAll.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/defer.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***!
    \*****************************************************************/

  /*! exports provided: defer */

  /***/
  function node_modulesRxjs_esm2015InternalObservableDeferJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/empty.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***!
    \*****************************************************************/

  /*! exports provided: EMPTY, empty, emptyScheduled */

  /***/
  function node_modulesRxjs_esm2015InternalObservableEmptyJs(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 export (binding) */


    __webpack_require__.d(__webpack_exports__, "emptyScheduled", function () {
      return emptyScheduled;
    });
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***!
    \********************************************************************/

  /*! exports provided: forkJoin */

  /***/
  function node_modulesRxjs_esm2015InternalObservableForkJoinJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _operators_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../operators/map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    function forkJoin() {
      for (var _len90 = arguments.length, sources = new Array(_len90), _key35 = 0; _key35 < _len90; _key35++) {
        sources[_key35] = arguments[_key35];
      }

      var resultSelector;

      if (typeof sources[sources.length - 1] === 'function') {
        resultSelector = sources.pop();
      }

      if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) {
        sources = sources[0];
      }

      if (sources.length === 0) {
        return _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
      }

      if (resultSelector) {
        return forkJoin(sources).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_5__["map"])(function (args) {
          return resultSelector.apply(void 0, _toConsumableArray(args));
        }));
      }

      return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        return new ForkJoinSubscriber(subscriber, sources);
      });
    }

    var ForkJoinSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB2) {
      _inherits(ForkJoinSubscriber, _OuterSubscriber__WEB2);

      var _super266 = _createSuper(ForkJoinSubscriber);

      function ForkJoinSubscriber(destination, sources) {
        var _this696;

        _classCallCheck(this, ForkJoinSubscriber);

        _this696 = _super266.call(this, destination);
        _this696.sources = sources;
        _this696.completed = 0;
        _this696.haveValues = 0;
        var len = sources.length;
        _this696.values = new Array(len);

        for (var i = 0; i < len; i++) {
          var source = sources[i];
          var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_assertThisInitialized(_this696), source, null, i);

          if (innerSubscription) {
            _this696.add(innerSubscription);
          }
        }

        return _this696;
      }

      _createClass2(ForkJoinSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.values[outerIndex] = innerValue;

          if (!innerSub._hasValue) {
            innerSub._hasValue = true;
            this.haveValues++;
          }
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var destination = this.destination,
              haveValues = this.haveValues,
              values = this.values;
          var len = values.length;

          if (!innerSub._hasValue) {
            destination.complete();
            return;
          }

          this.completed++;

          if (this.completed !== len) {
            return;
          }

          if (haveValues === len) {
            destination.next(values);
          }

          destination.complete();
        }
      }]);

      return ForkJoinSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]); //# sourceMappingURL=forkJoin.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/from.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***!
    \****************************************************************/

  /*! exports provided: from */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_isPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isPromise */
    "./node_modules/rxjs/_esm2015/internal/util/isPromise.js");
    /* harmony import */


    var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isArrayLike */
    "./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js");
    /* harmony import */


    var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/isInteropObservable */
    "./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js");
    /* harmony import */


    var _util_isIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isIterable */
    "./node_modules/rxjs/_esm2015/internal/util/isIterable.js");
    /* harmony import */


    var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ./fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _fromPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ./fromPromise */
    "./node_modules/rxjs/_esm2015/internal/observable/fromPromise.js");
    /* harmony import */


    var _fromIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ./fromIterable */
    "./node_modules/rxjs/_esm2015/internal/observable/fromIterable.js");
    /* harmony import */


    var _fromObservable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ./fromObservable */
    "./node_modules/rxjs/_esm2015/internal/observable/fromObservable.js");
    /* harmony import */


    var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ../util/subscribeTo */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js");

    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_9__["subscribeTo"])(input));
      }

      if (input != null) {
        if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__["isInteropObservable"])(input)) {
          return Object(_fromObservable__WEBPACK_IMPORTED_MODULE_8__["fromObservable"])(input, scheduler);
        } else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_1__["isPromise"])(input)) {
          return Object(_fromPromise__WEBPACK_IMPORTED_MODULE_6__["fromPromise"])(input, scheduler);
        } else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__["isArrayLike"])(input)) {
          return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(input, scheduler);
        } else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_4__["isIterable"])(input) || typeof input === 'string') {
          return Object(_fromIterable__WEBPACK_IMPORTED_MODULE_7__["fromIterable"])(input, scheduler);
        }
      }

      throw new TypeError((input !== null && typeof input || input) + ' is not observable');
    } //# sourceMappingURL=from.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromArray.js ***!
    \*********************************************************************/

  /*! exports provided: fromArray */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromArrayJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToArray */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js");

    function fromArray(input, scheduler) {
      if (!scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_2__["subscribeToArray"])(input));
      } else {
        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=fromArray.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js ***!
    \*********************************************************************/

  /*! exports provided: fromEvent */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromEventJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isFunction */
    "./node_modules/rxjs/_esm2015/internal/util/isFunction.js");
    /* harmony import */


    var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../operators/map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    var toString = 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, _len91 = sourceObj.length; i < _len91; 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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js":
  /*!****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js ***!
    \****************************************************************************/

  /*! exports provided: fromEventPattern */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromEventPatternJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isFunction */
    "./node_modules/rxjs/_esm2015/internal/util/isFunction.js");
    /* harmony import */


    var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../operators/map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    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 _len92 = arguments.length, e = new Array(_len92), _key36 = 0; _key36 < _len92; _key36++) {
            e[_key36] = arguments[_key36];
          }

          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromIterable.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromIterable.js ***!
    \************************************************************************/

  /*! exports provided: fromIterable */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromIterableJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "fromIterable", function () {
      return fromIterable;
    });
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../symbol/iterator */
    "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js");
    /* harmony import */


    var _util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToIterable */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js");

    function fromIterable(input, scheduler) {
      if (!input) {
        throw new Error('Iterable cannot be null');
      }

      if (!scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__["subscribeToIterable"])(input));
      } else {
        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=fromIterable.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromObservable.js":
  /*!**************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromObservable.js ***!
    \**************************************************************************/

  /*! exports provided: fromObservable */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromObservableJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "fromObservable", function () {
      return fromObservable;
    });
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../symbol/observable */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");
    /* harmony import */


    var _util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToObservable */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js");

    function fromObservable(input, scheduler) {
      if (!scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(input));
      } else {
        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=fromObservable.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/fromPromise.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/fromPromise.js ***!
    \***********************************************************************/

  /*! exports provided: fromPromise */

  /***/
  function node_modulesRxjs_esm2015InternalObservableFromPromiseJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "fromPromise", function () {
      return fromPromise;
    });
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToPromise */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js");

    function fromPromise(input, scheduler) {
      if (!scheduler) {
        return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__["subscribeToPromise"])(input));
      } else {
        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=fromPromise.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/generate.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/generate.js ***!
    \********************************************************************/

  /*! exports provided: generate */

  /***/
  function node_modulesRxjs_esm2015InternalObservableGenerateJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/identity */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/iif.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/iif.js ***!
    \***************************************************************/

  /*! exports provided: iif */

  /***/
  function node_modulesRxjs_esm2015InternalObservableIifJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/defer.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/interval.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/interval.js ***!
    \********************************************************************/

  /*! exports provided: interval */

  /***/
  function node_modulesRxjs_esm2015InternalObservableIntervalJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isNumeric */
    "./node_modules/rxjs/_esm2015/internal/util/isNumeric.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/merge.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***!
    \*****************************************************************/

  /*! exports provided: merge */

  /***/
  function node_modulesRxjs_esm2015InternalObservableMergeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");
    /* harmony import */


    var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../operators/mergeAll */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js");
    /* harmony import */


    var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");

    function merge() {
      var concurrent = Number.POSITIVE_INFINITY;
      var scheduler = null;

      for (var _len93 = arguments.length, observables = new Array(_len93), _key37 = 0; _key37 < _len93; _key37++) {
        observables[_key37] = arguments[_key37];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/never.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/never.js ***!
    \*****************************************************************/

  /*! exports provided: NEVER, never */

  /***/
  function node_modulesRxjs_esm2015InternalObservableNeverJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/noop */
    "./node_modules/rxjs/_esm2015/internal/util/noop.js");

    var NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);

    function never() {
      return NEVER;
    } //# sourceMappingURL=never.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/of.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***!
    \**************************************************************/

  /*! exports provided: of */

  /***/
  function node_modulesRxjs_esm2015InternalObservableOfJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");
    /* harmony import */


    var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* harmony import */


    var _scalar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./scalar */
    "./node_modules/rxjs/_esm2015/internal/observable/scalar.js");

    function of() {
      for (var _len94 = arguments.length, args = new Array(_len94), _key38 = 0; _key38 < _len94; _key38++) {
        args[_key38] = arguments[_key38];
      }

      var scheduler = args[args.length - 1];

      if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
        args.pop();
      } else {
        scheduler = undefined;
      }

      switch (args.length) {
        case 0:
          return Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(scheduler);

        case 1:
          return scheduler ? Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args, scheduler) : Object(_scalar__WEBPACK_IMPORTED_MODULE_3__["scalar"])(args[0]);

        default:
          return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args, scheduler);
      }
    } //# sourceMappingURL=of.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js ***!
    \*****************************************************************************/

  /*! exports provided: onErrorResumeNext */

  /***/
  function node_modulesRxjs_esm2015InternalObservableOnErrorResumeNextJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    function onErrorResumeNext() {
      for (var _len95 = arguments.length, sources = new Array(_len95), _key39 = 0; _key39 < _len95; _key39++) {
        sources[_key39] = arguments[_key39];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/pairs.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/pairs.js ***!
    \*****************************************************************/

  /*! exports provided: pairs, dispatch */

  /***/
  function node_modulesRxjs_esm2015InternalObservablePairsJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/race.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/race.js ***!
    \****************************************************************/

  /*! exports provided: race, RaceOperator, RaceSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalObservableRaceJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    function race() {
      for (var _len96 = arguments.length, observables = new Array(_len96), _key40 = 0; _key40 < _len96; _key40++) {
        observables[_key40] = arguments[_key40];
      }

      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__WEB3) {
      _inherits(RaceSubscriber, _OuterSubscriber__WEB3);

      var _super267 = _createSuper(RaceSubscriber);

      function RaceSubscriber(destination) {
        var _this697;

        _classCallCheck(this, RaceSubscriber);

        _this697 = _super267.call(this, destination);
        _this697.hasFirst = false;
        _this697.observables = [];
        _this697.subscriptions = [];
        return _this697;
      }

      _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, observable, i);

              if (this.subscriptions) {
                this.subscriptions.push(subscription);
              }

              this.add(subscription);
            }

            this.observables = null;
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/range.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/range.js ***!
    \*****************************************************************/

  /*! exports provided: range, dispatch */

  /***/
  function node_modulesRxjs_esm2015InternalObservableRangeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/scalar.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/scalar.js ***!
    \******************************************************************/

  /*! exports provided: scalar */

  /***/
  function node_modulesRxjs_esm2015InternalObservableScalarJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "scalar", function () {
      return scalar;
    });
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");

    function scalar(value) {
      var result = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
        subscriber.next(value);
        subscriber.complete();
      });
      result._isScalar = true;
      result.value = value;
      return result;
    } //# sourceMappingURL=scalar.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/throwError.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/throwError.js ***!
    \**********************************************************************/

  /*! exports provided: throwError */

  /***/
  function node_modulesRxjs_esm2015InternalObservableThrowErrorJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");

    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(_ref71) {
      var error = _ref71.error,
          subscriber = _ref71.subscriber;
      subscriber.error(error);
    } //# sourceMappingURL=throwError.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/timer.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***!
    \*****************************************************************/

  /*! exports provided: timer */

  /***/
  function node_modulesRxjs_esm2015InternalObservableTimerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isNumeric */
    "./node_modules/rxjs/_esm2015/internal/util/isNumeric.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/using.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/using.js ***!
    \*****************************************************************/

  /*! exports provided: using */

  /***/
  function node_modulesRxjs_esm2015InternalObservableUsingJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");
    /* harmony import */


    var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/observable/zip.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/observable/zip.js ***!
    \***************************************************************/

  /*! exports provided: zip, ZipOperator, ZipSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalObservableZipJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../../internal/symbol/iterator */
    "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js");

    function zip() {
      for (var _len97 = arguments.length, observables = new Array(_len97), _key41 = 0; _key41 < _len97; _key41++) {
        observables[_key41] = arguments[_key41];
      }

      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_5) {
      _inherits(ZipSubscriber, _Subscriber__WEBPACK_5);

      var _super268 = _createSuper(ZipSubscriber);

      function ZipSubscriber(destination, resultSelector) {
        var _this698;

        var values = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Object.create(null);

        _classCallCheck(this, ZipSubscriber);

        _this698 = _super268.call(this, destination);
        _this698.iterators = [];
        _this698.active = 0;
        _this698.resultSelector = typeof resultSelector === 'function' ? resultSelector : null;
        _this698.values = values;
        return _this698;
      }

      _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_5__["iterator"]] === 'function') {
            iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_5__["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(iterator, i));
            } 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 _i170 = 0; _i170 < len; _i170++) {
            var _iterator157 = iterators[_i170];

            var result = _iterator157.next();

            if (_iterator157.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 nextResult && nextResult.done;
        }
      }]);

      return StaticIterator;
    }();

    var StaticArrayIterator = /*#__PURE__*/function () {
      function StaticArrayIterator(array) {
        _classCallCheck(this, StaticArrayIterator);

        this.array = array;
        this.index = 0;
        this.length = 0;
        this.length = array.length;
      }

      _createClass2(StaticArrayIterator, [{
        key: _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_5__["iterator"],
        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;
    }();

    var ZipBufferIterator = /*#__PURE__*/function (_OuterSubscriber__WEB4) {
      _inherits(ZipBufferIterator, _OuterSubscriber__WEB4);

      var _super269 = _createSuper(ZipBufferIterator);

      function ZipBufferIterator(destination, parent, observable) {
        var _this699;

        _classCallCheck(this, ZipBufferIterator);

        _this699 = _super269.call(this, destination);
        _this699.parent = parent;
        _this699.observable = observable;
        _this699.stillUnsubscribed = true;
        _this699.buffer = [];
        _this699.isComplete = false;
        return _this699;
      }

      _createClass2(ZipBufferIterator, [{
        key: _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_5__["iterator"],
        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(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.buffer.push(innerValue);
          this.parent.checkIterators();
        }
      }, {
        key: "subscribe",
        value: function subscribe(value, index) {
          return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, this.observable, this, index);
        }
      }]);

      return ZipBufferIterator;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]); //# sourceMappingURL=zip.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/audit.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/audit.js ***!
    \****************************************************************/

  /*! exports provided: audit */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsAuditJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB5) {
      _inherits(AuditSubscriber, _OuterSubscriber__WEB5);

      var _super270 = _createSuper(AuditSubscriber);

      function AuditSubscriber(destination, durationSelector) {
        var _this700;

        _classCallCheck(this, AuditSubscriber);

        _this700 = _super270.call(this, destination);
        _this700.durationSelector = durationSelector;
        _this700.hasValue = false;
        return _this700;
      }

      _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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, duration);

            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 = null;
            throttled.unsubscribe();
          }

          if (hasValue) {
            this.value = null;
            this.hasValue = false;
            this.destination.next(value);
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex) {
          this.clearThrottle();
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete() {
          this.clearThrottle();
        }
      }]);

      return AuditSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=audit.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/auditTime.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/auditTime.js ***!
    \********************************************************************/

  /*! exports provided: auditTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsAuditTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./audit */
    "./node_modules/rxjs/_esm2015/internal/operators/audit.js");
    /* harmony import */


    var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/timer */
    "./node_modules/rxjs/_esm2015/internal/observable/timer.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/buffer.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/buffer.js ***!
    \*****************************************************************/

  /*! exports provided: buffer */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsBufferJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB6) {
      _inherits(BufferSubscriber, _OuterSubscriber__WEB6);

      var _super271 = _createSuper(BufferSubscriber);

      function BufferSubscriber(destination, closingNotifier) {
        var _this701;

        _classCallCheck(this, BufferSubscriber);

        _this701 = _super271.call(this, destination);
        _this701.buffer = [];

        _this701.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this701), closingNotifier));

        return _this701;
      }

      _createClass2(BufferSubscriber, [{
        key: "_next",
        value: function _next(value) {
          this.buffer.push(value);
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          var buffer = this.buffer;
          this.buffer = [];
          this.destination.next(buffer);
        }
      }]);

      return BufferSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=buffer.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js ***!
    \**********************************************************************/

  /*! exports provided: bufferCount */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsBufferCountJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_6) {
      _inherits(BufferCountSubscriber, _Subscriber__WEBPACK_6);

      var _super272 = _createSuper(BufferCountSubscriber);

      function BufferCountSubscriber(destination, bufferSize) {
        var _this702;

        _classCallCheck(this, BufferCountSubscriber);

        _this702 = _super272.call(this, destination);
        _this702.bufferSize = bufferSize;
        _this702.buffer = [];
        return _this702;
      }

      _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_7) {
      _inherits(BufferSkipCountSubscriber, _Subscriber__WEBPACK_7);

      var _super273 = _createSuper(BufferSkipCountSubscriber);

      function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
        var _this703;

        _classCallCheck(this, BufferSkipCountSubscriber);

        _this703 = _super273.call(this, destination);
        _this703.bufferSize = bufferSize;
        _this703.startBufferEvery = startBufferEvery;
        _this703.buffers = [];
        _this703.count = 0;
        return _this703;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js ***!
    \*********************************************************************/

  /*! exports provided: bufferTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsBufferTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    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_8) {
      _inherits(BufferTimeSubscriber, _Subscriber__WEBPACK_8);

      var _super274 = _createSuper(BufferTimeSubscriber);

      function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
        var _this704;

        _classCallCheck(this, BufferTimeSubscriber);

        _this704 = _super274.call(this, destination);
        _this704.bufferTimeSpan = bufferTimeSpan;
        _this704.bufferCreationInterval = bufferCreationInterval;
        _this704.maxBufferSize = maxBufferSize;
        _this704.scheduler = scheduler;
        _this704.contexts = [];

        var context = _this704.openContext();

        _this704.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;

        if (_this704.timespanOnly) {
          var timeSpanOnlyState = {
            subscriber: _assertThisInitialized(_this704),
            context: context,
            bufferTimeSpan: bufferTimeSpan
          };

          _this704.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
        } else {
          var closeState = {
            subscriber: _assertThisInitialized(_this704),
            context: context
          };
          var creationState = {
            bufferTimeSpan: bufferTimeSpan,
            bufferCreationInterval: bufferCreationInterval,
            subscriber: _assertThisInitialized(_this704),
            scheduler: scheduler
          };

          _this704.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));

          _this704.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
        }

        return _this704;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js ***!
    \***********************************************************************/

  /*! exports provided: bufferToggle */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsBufferToggleJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");

    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__WEB7) {
      _inherits(BufferToggleSubscriber, _OuterSubscriber__WEB7);

      var _super275 = _createSuper(BufferToggleSubscriber);

      function BufferToggleSubscriber(destination, openings, closingSelector) {
        var _this705;

        _classCallCheck(this, BufferToggleSubscriber);

        _this705 = _super275.call(this, destination);
        _this705.openings = openings;
        _this705.closingSelector = closingSelector;
        _this705.contexts = [];

        _this705.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this705), openings));

        return _this705;
      }

      _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, outerIndex, innerIndex, innerSub) {
          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js ***!
    \*********************************************************************/

  /*! exports provided: bufferWhen */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsBufferWhenJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB8) {
      _inherits(BufferWhenSubscriber, _OuterSubscriber__WEB8);

      var _super276 = _createSuper(BufferWhenSubscriber);

      function BufferWhenSubscriber(destination, closingSelector) {
        var _this706;

        _classCallCheck(this, BufferWhenSubscriber);

        _this706 = _super276.call(this, destination);
        _this706.closingSelector = closingSelector;
        _this706.subscribing = false;

        _this706.openBuffer();

        return _this706;
      }

      _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 = null;
          this.subscribing = false;
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier));
          this.subscribing = false;
        }
      }]);

      return BufferWhenSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=bufferWhen.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/catchError.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***!
    \*********************************************************************/

  /*! exports provided: catchError */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsCatchErrorJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB9) {
      _inherits(CatchSubscriber, _OuterSubscriber__WEB9);

      var _super277 = _createSuper(CatchSubscriber);

      function CatchSubscriber(destination, selector, caught) {
        var _this707;

        _classCallCheck(this, CatchSubscriber);

        _this707 = _super277.call(this, destination);
        _this707.selector = selector;
        _this707.caught = caught;
        return _this707;
      }

      _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 _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__["InnerSubscriber"](this, undefined, undefined);
            this.add(innerSubscriber);
            Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
          }
        }
      }]);

      return CatchSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=catchError.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/combineAll.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/combineAll.js ***!
    \*********************************************************************/

  /*! exports provided: combineAll */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsCombineAllJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js");

    function combineAll(project) {
      return function (source) {
        return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project));
      };
    } //# sourceMappingURL=combineAll.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js ***!
    \************************************************************************/

  /*! exports provided: combineLatest */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsCombineLatestJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../observable/combineLatest */
    "./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js");
    /* harmony import */


    var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");

    var none = {};

    function combineLatest() {
      for (var _len98 = arguments.length, observables = new Array(_len98), _key42 = 0; _key42 < _len98; _key42++) {
        observables[_key42] = arguments[_key42];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/concat.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/concat.js ***!
    \*****************************************************************/

  /*! exports provided: concat */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsConcatJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/concat.js");

    function concat() {
      for (var _len99 = arguments.length, observables = new Array(_len99), _key43 = 0; _key43 < _len99; _key43++) {
        observables[_key43] = arguments[_key43];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/concatAll.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***!
    \********************************************************************/

  /*! exports provided: concatAll */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsConcatAllJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js");

    function concatAll() {
      return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
    } //# sourceMappingURL=concatAll.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/concatMap.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***!
    \********************************************************************/

  /*! exports provided: concatMap */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsConcatMapJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js");

    function concatMap(project, resultSelector) {
      return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
    } //# sourceMappingURL=concatMap.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js ***!
    \**********************************************************************/

  /*! exports provided: concatMapTo */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsConcatMapToJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/concatMap.js");

    function concatMapTo(innerObservable, resultSelector) {
      return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () {
        return innerObservable;
      }, resultSelector);
    } //# sourceMappingURL=concatMapTo.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/count.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/count.js ***!
    \****************************************************************/

  /*! exports provided: count */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsCountJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_9) {
      _inherits(CountSubscriber, _Subscriber__WEBPACK_9);

      var _super278 = _createSuper(CountSubscriber);

      function CountSubscriber(destination, predicate, source) {
        var _this708;

        _classCallCheck(this, CountSubscriber);

        _this708 = _super278.call(this, destination);
        _this708.predicate = predicate;
        _this708.source = source;
        _this708.count = 0;
        _this708.index = 0;
        return _this708;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/debounce.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/debounce.js ***!
    \*******************************************************************/

  /*! exports provided: debounce */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDebounceJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB10) {
      _inherits(DebounceSubscriber, _OuterSubscriber__WEB10);

      var _super279 = _createSuper(DebounceSubscriber);

      function DebounceSubscriber(destination, durationSelector) {
        var _this709;

        _classCallCheck(this, DebounceSubscriber);

        _this709 = _super279.call(this, destination);
        _this709.durationSelector = durationSelector;
        _this709.hasValue = false;
        _this709.durationSubscription = null;
        return _this709;
      }

      _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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, duration);

          if (subscription && !subscription.closed) {
            this.add(this.durationSubscription = subscription);
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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 = null;
              subscription.unsubscribe();
              this.remove(subscription);
            }

            this.value = null;
            this.hasValue = false;

            _get(_getPrototypeOf(DebounceSubscriber.prototype), "_next", this).call(this, value);
          }
        }
      }]);

      return DebounceSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=debounce.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js ***!
    \***********************************************************************/

  /*! exports provided: debounceTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDebounceTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");

    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_10) {
      _inherits(DebounceTimeSubscriber, _Subscriber__WEBPACK_10);

      var _super280 = _createSuper(DebounceTimeSubscriber);

      function DebounceTimeSubscriber(destination, dueTime, scheduler) {
        var _this710;

        _classCallCheck(this, DebounceTimeSubscriber);

        _this710 = _super280.call(this, destination);
        _this710.dueTime = dueTime;
        _this710.scheduler = scheduler;
        _this710.debouncedSubscription = null;
        _this710.lastValue = null;
        _this710.hasValue = false;
        return _this710;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js ***!
    \*************************************************************************/

  /*! exports provided: defaultIfEmpty */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDefaultIfEmptyJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_11) {
      _inherits(DefaultIfEmptySubscriber, _Subscriber__WEBPACK_11);

      var _super281 = _createSuper(DefaultIfEmptySubscriber);

      function DefaultIfEmptySubscriber(destination, defaultValue) {
        var _this711;

        _classCallCheck(this, DefaultIfEmptySubscriber);

        _this711 = _super281.call(this, destination);
        _this711.defaultValue = defaultValue;
        _this711.isEmpty = true;
        return _this711;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/delay.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/delay.js ***!
    \****************************************************************/

  /*! exports provided: delay */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDelayJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isDate */
    "./node_modules/rxjs/_esm2015/internal/util/isDate.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../Notification */
    "./node_modules/rxjs/_esm2015/internal/Notification.js");

    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_12) {
      _inherits(DelaySubscriber, _Subscriber__WEBPACK_12);

      var _super282 = _createSuper(DelaySubscriber);

      function DelaySubscriber(destination, delay, scheduler) {
        var _this712;

        _classCallCheck(this, DelaySubscriber);

        _this712 = _super282.call(this, destination);
        _this712.delay = delay;
        _this712.scheduler = scheduler;
        _this712.queue = [];
        _this712.active = false;
        _this712.errored = false;
        return _this712;
      }

      _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 _delay = Math.max(0, queue[0].time - scheduler.now());

            this.schedule(state, _delay);
          } 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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js ***!
    \********************************************************************/

  /*! exports provided: delayWhen */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDelayWhenJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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__WEB11) {
      _inherits(DelayWhenSubscriber, _OuterSubscriber__WEB11);

      var _super283 = _createSuper(DelayWhenSubscriber);

      function DelayWhenSubscriber(destination, delayDurationSelector) {
        var _this713;

        _classCallCheck(this, DelayWhenSubscriber);

        _this713 = _super283.call(this, destination);
        _this713.delayDurationSelector = delayDurationSelector;
        _this713.completed = false;
        _this713.delayNotifierSubscriptions = [];
        _this713.index = 0;
        return _this713;
      }

      _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_4) {
      _inherits(SubscriptionDelayObservable, _Observable__WEBPACK_4);

      var _super284 = _createSuper(SubscriptionDelayObservable);

      function SubscriptionDelayObservable(source, subscriptionDelay) {
        var _this714;

        _classCallCheck(this, SubscriptionDelayObservable);

        _this714 = _super284.call(this);
        _this714.source = source;
        _this714.subscriptionDelay = subscriptionDelay;
        return _this714;
      }

      _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_13) {
      _inherits(SubscriptionDelaySubscriber, _Subscriber__WEBPACK_13);

      var _super285 = _createSuper(SubscriptionDelaySubscriber);

      function SubscriptionDelaySubscriber(parent, source) {
        var _this715;

        _classCallCheck(this, SubscriptionDelaySubscriber);

        _this715 = _super285.call(this);
        _this715.parent = parent;
        _this715.source = source;
        _this715.sourceSubscribed = false;
        return _this715;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js ***!
    \************************************************************************/

  /*! exports provided: dematerialize */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDematerializeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_14) {
      _inherits(DeMaterializeSubscriber, _Subscriber__WEBPACK_14);

      var _super286 = _createSuper(DeMaterializeSubscriber);

      function DeMaterializeSubscriber(destination) {
        _classCallCheck(this, DeMaterializeSubscriber);

        return _super286.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/distinct.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/distinct.js ***!
    \*******************************************************************/

  /*! exports provided: distinct, DistinctSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDistinctJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB12) {
      _inherits(DistinctSubscriber, _OuterSubscriber__WEB12);

      var _super287 = _createSuper(DistinctSubscriber);

      function DistinctSubscriber(destination, keySelector, flushes) {
        var _this716;

        _classCallCheck(this, DistinctSubscriber);

        _this716 = _super287.call(this, destination);
        _this716.keySelector = keySelector;
        _this716.values = new Set();

        if (flushes) {
          _this716.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this716), flushes));
        }

        return _this716;
      }

      _createClass2(DistinctSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.values.clear();
        }
      }, {
        key: "notifyError",
        value: function notifyError(error, innerSub) {
          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;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=distinct.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js":
  /*!*******************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***!
    \*******************************************************************************/

  /*! exports provided: distinctUntilChanged */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDistinctUntilChangedJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_15) {
      _inherits(DistinctUntilChangedSubscriber, _Subscriber__WEBPACK_15);

      var _super288 = _createSuper(DistinctUntilChangedSubscriber);

      function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
        var _this717;

        _classCallCheck(this, DistinctUntilChangedSubscriber);

        _this717 = _super288.call(this, destination);
        _this717.keySelector = keySelector;
        _this717.hasKey = false;

        if (typeof compare === 'function') {
          _this717.compare = compare;
        }

        return _this717;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js":
  /*!**********************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js ***!
    \**********************************************************************************/

  /*! exports provided: distinctUntilKeyChanged */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsDistinctUntilKeyChangedJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/elementAt.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/elementAt.js ***!
    \********************************************************************/

  /*! exports provided: elementAt */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsElementAtJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js");
    /* harmony import */


    var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./filter */
    "./node_modules/rxjs/_esm2015/internal/operators/filter.js");
    /* harmony import */


    var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./throwIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js");
    /* harmony import */


    var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./defaultIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js");
    /* harmony import */


    var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./take */
    "./node_modules/rxjs/_esm2015/internal/operators/take.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/endWith.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/endWith.js ***!
    \******************************************************************/

  /*! exports provided: endWith */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsEndWithJs(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_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../observable/fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../observable/scalar */
    "./node_modules/rxjs/_esm2015/internal/observable/scalar.js");
    /* harmony import */


    var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* harmony import */


    var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../observable/concat */
    "./node_modules/rxjs/_esm2015/internal/observable/concat.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    function endWith() {
      for (var _len100 = arguments.length, array = new Array(_len100), _key44 = 0; _key44 < _len100; _key44++) {
        array[_key44] = arguments[_key44];
      }

      return function (source) {
        var scheduler = array[array.length - 1];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(scheduler)) {
          array.pop();
        } else {
          scheduler = null;
        }

        var len = array.length;

        if (len === 1 && !scheduler) {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(source, Object(_observable_scalar__WEBPACK_IMPORTED_MODULE_1__["scalar"])(array[0]));
        } else if (len > 0) {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(source, Object(_observable_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(array, scheduler));
        } else {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(source, Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(scheduler));
        }
      };
    } //# sourceMappingURL=endWith.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/every.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/every.js ***!
    \****************************************************************/

  /*! exports provided: every */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsEveryJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_16) {
      _inherits(EverySubscriber, _Subscriber__WEBPACK_16);

      var _super289 = _createSuper(EverySubscriber);

      function EverySubscriber(destination, predicate, thisArg, source) {
        var _this718;

        _classCallCheck(this, EverySubscriber);

        _this718 = _super289.call(this, destination);
        _this718.predicate = predicate;
        _this718.thisArg = thisArg;
        _this718.source = source;
        _this718.index = 0;
        _this718.thisArg = thisArg || _assertThisInitialized(_this718);
        return _this718;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/exhaust.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaust.js ***!
    \******************************************************************/

  /*! exports provided: exhaust */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsExhaustJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB13) {
      _inherits(SwitchFirstSubscriber, _OuterSubscriber__WEB13);

      var _super290 = _createSuper(SwitchFirstSubscriber);

      function SwitchFirstSubscriber(destination) {
        var _this719;

        _classCallCheck(this, SwitchFirstSubscriber);

        _this719 = _super290.call(this, destination);
        _this719.hasCompleted = false;
        _this719.hasSubscription = false;
        return _this719;
      }

      _createClass2(SwitchFirstSubscriber, [{
        key: "_next",
        value: function _next(value) {
          if (!this.hasSubscription) {
            this.hasSubscription = true;
            this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, value));
          }
        }
      }, {
        key: "_complete",
        value: function _complete() {
          this.hasCompleted = true;

          if (!this.hasSubscription) {
            this.destination.complete();
          }
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          this.remove(innerSub);
          this.hasSubscription = false;

          if (this.hasCompleted) {
            this.destination.complete();
          }
        }
      }]);

      return SwitchFirstSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=exhaust.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js ***!
    \*********************************************************************/

  /*! exports provided: exhaustMap */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsExhaustMapJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* harmony import */


    var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../observable/from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");

    function exhaustMap(project, resultSelector) {
      if (resultSelector) {
        return function (source) {
          return source.pipe(exhaustMap(function (a, i) {
            return Object(_observable_from__WEBPACK_IMPORTED_MODULE_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["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 (_OuterSubscriber__WEB14) {
      _inherits(ExhaustMapSubscriber, _OuterSubscriber__WEB14);

      var _super291 = _createSuper(ExhaustMapSubscriber);

      function ExhaustMapSubscriber(destination, project) {
        var _this720;

        _classCallCheck(this, ExhaustMapSubscriber);

        _this720 = _super291.call(this, destination);
        _this720.project = project;
        _this720.hasSubscription = false;
        _this720.hasCompleted = false;
        _this720.index = 0;
        return _this720;
      }

      _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, value, index);
        }
      }, {
        key: "_innerSub",
        value: function _innerSub(result, value, index) {
          var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__["InnerSubscriber"](this, undefined, undefined);
          var destination = this.destination;
          destination.add(innerSubscriber);
          Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index, innerSubscriber);
        }
      }, {
        key: "_complete",
        value: function _complete() {
          this.hasCompleted = true;

          if (!this.hasSubscription) {
            this.destination.complete();
          }

          this.unsubscribe();
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.destination.next(innerValue);
        }
      }, {
        key: "notifyError",
        value: function notifyError(err) {
          this.destination.error(err);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var destination = this.destination;
          destination.remove(innerSub);
          this.hasSubscription = false;

          if (this.hasCompleted) {
            this.destination.complete();
          }
        }
      }]);

      return ExhaustMapSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=exhaustMap.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/expand.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/expand.js ***!
    \*****************************************************************/

  /*! exports provided: expand, ExpandOperator, ExpandSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsExpandJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    function expand(project) {
      var concurrent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;
      var scheduler = arguments.length > 2 && arguments[2] !== undefined ? 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 (_OuterSubscriber__WEB15) {
      _inherits(ExpandSubscriber, _OuterSubscriber__WEB15);

      var _super292 = _createSuper(ExpandSubscriber);

      function ExpandSubscriber(destination, project, concurrent, scheduler) {
        var _this721;

        _classCallCheck(this, ExpandSubscriber);

        _this721 = _super292.call(this, destination);
        _this721.project = project;
        _this721.concurrent = concurrent;
        _this721.scheduler = scheduler;
        _this721.index = 0;
        _this721.active = 0;
        _this721.hasCompleted = false;

        if (concurrent < Number.POSITIVE_INFINITY) {
          _this721.buffer = [];
        }

        return _this721;
      }

      _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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, result, value, index));
        }
      }, {
        key: "_complete",
        value: function _complete() {
          this.hasCompleted = true;

          if (this.hasCompleted && this.active === 0) {
            this.destination.complete();
          }

          this.unsubscribe();
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this._next(innerValue);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var buffer = this.buffer;
          var destination = this.destination;
          destination.remove(innerSub);
          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;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=expand.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/filter.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/filter.js ***!
    \*****************************************************************/

  /*! exports provided: filter */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsFilterJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_17) {
      _inherits(FilterSubscriber, _Subscriber__WEBPACK_17);

      var _super293 = _createSuper(FilterSubscriber);

      function FilterSubscriber(destination, predicate, thisArg) {
        var _this722;

        _classCallCheck(this, FilterSubscriber);

        _this722 = _super293.call(this, destination);
        _this722.predicate = predicate;
        _this722.thisArg = thisArg;
        _this722.count = 0;
        return _this722;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/finalize.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/finalize.js ***!
    \*******************************************************************/

  /*! exports provided: finalize */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsFinalizeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");

    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_18) {
      _inherits(FinallySubscriber, _Subscriber__WEBPACK_18);

      var _super294 = _createSuper(FinallySubscriber);

      function FinallySubscriber(destination, callback) {
        var _this723;

        _classCallCheck(this, FinallySubscriber);

        _this723 = _super294.call(this, destination);

        _this723.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](callback));

        return _this723;
      }

      return FinallySubscriber;
    }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=finalize.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/find.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/find.js ***!
    \***************************************************************/

  /*! exports provided: find, FindValueOperator, FindValueSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsFindJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_19) {
      _inherits(FindValueSubscriber, _Subscriber__WEBPACK_19);

      var _super295 = _createSuper(FindValueSubscriber);

      function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
        var _this724;

        _classCallCheck(this, FindValueSubscriber);

        _this724 = _super295.call(this, destination);
        _this724.predicate = predicate;
        _this724.source = source;
        _this724.yieldIndex = yieldIndex;
        _this724.thisArg = thisArg;
        _this724.index = 0;
        return _this724;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/findIndex.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/findIndex.js ***!
    \********************************************************************/

  /*! exports provided: findIndex */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsFindIndexJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/find.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/first.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***!
    \****************************************************************/

  /*! exports provided: first */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsFirstJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js");
    /* harmony import */


    var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./filter */
    "./node_modules/rxjs/_esm2015/internal/operators/filter.js");
    /* harmony import */


    var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./take */
    "./node_modules/rxjs/_esm2015/internal/operators/take.js");
    /* harmony import */


    var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./defaultIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js");
    /* harmony import */


    var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./throwIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js");
    /* harmony import */


    var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../util/identity */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/groupBy.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/groupBy.js ***!
    \******************************************************************/

  /*! exports provided: groupBy, GroupedObservable */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsGroupByJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../Subject */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");

    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 _super296 = _createSuper(GroupBySubscriber);

      function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
        var _this725;

        _classCallCheck(this, GroupBySubscriber);

        _this725 = _super296.call(this, destination);
        _this725.keySelector = keySelector;
        _this725.elementSelector = elementSelector;
        _this725.durationSelector = durationSelector;
        _this725.subjectSelector = subjectSelector;
        _this725.groups = null;
        _this725.attemptedToUnsubscribe = false;
        _this725.count = 0;
        return _this725;
      }

      _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 _super297 = _createSuper(GroupDurationSubscriber);

      function GroupDurationSubscriber(key, group, parent) {
        var _this726;

        _classCallCheck(this, GroupDurationSubscriber);

        _this726 = _super297.call(this, group);
        _this726.key = key;
        _this726.group = group;
        _this726.parent = parent;
        return _this726;
      }

      _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_5) {
      _inherits(GroupedObservable, _Observable__WEBPACK_5);

      var _super298 = _createSuper(GroupedObservable);

      function GroupedObservable(key, groupSubject, refCountSubscription) {
        var _this727;

        _classCallCheck(this, GroupedObservable);

        _this727 = _super298.call(this);
        _this727.key = key;
        _this727.groupSubject = groupSubject;
        _this727.refCountSubscription = refCountSubscription;
        return _this727;
      }

      _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 _super299 = _createSuper(InnerRefCountSubscription);

      function InnerRefCountSubscription(parent) {
        var _this728;

        _classCallCheck(this, InnerRefCountSubscription);

        _this728 = _super299.call(this);
        _this728.parent = parent;
        parent.count++;
        return _this728;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js ***!
    \*************************************************************************/

  /*! exports provided: ignoreElements */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsIgnoreElementsJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_22) {
      _inherits(IgnoreElementsSubscriber, _Subscriber__WEBPACK_22);

      var _super300 = _createSuper(IgnoreElementsSubscriber);

      function IgnoreElementsSubscriber() {
        _classCallCheck(this, IgnoreElementsSubscriber);

        return _super300.apply(this, arguments);
      }

      _createClass2(IgnoreElementsSubscriber, [{
        key: "_next",
        value: function _next(unused) {}
      }]);

      return IgnoreElementsSubscriber;
    }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=ignoreElements.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js ***!
    \******************************************************************/

  /*! exports provided: isEmpty */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsIsEmptyJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_23) {
      _inherits(IsEmptySubscriber, _Subscriber__WEBPACK_23);

      var _super301 = _createSuper(IsEmptySubscriber);

      function IsEmptySubscriber(destination) {
        _classCallCheck(this, IsEmptySubscriber);

        return _super301.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/last.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***!
    \***************************************************************/

  /*! exports provided: last */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsLastJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js");
    /* harmony import */


    var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./filter */
    "./node_modules/rxjs/_esm2015/internal/operators/filter.js");
    /* harmony import */


    var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./takeLast */
    "./node_modules/rxjs/_esm2015/internal/operators/takeLast.js");
    /* harmony import */


    var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./throwIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js");
    /* harmony import */


    var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./defaultIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js");
    /* harmony import */


    var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ../util/identity */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/map.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/map.js ***!
    \**************************************************************/

  /*! exports provided: map, MapOperator */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMapJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_24) {
      _inherits(MapSubscriber, _Subscriber__WEBPACK_24);

      var _super302 = _createSuper(MapSubscriber);

      function MapSubscriber(destination, project, thisArg) {
        var _this729;

        _classCallCheck(this, MapSubscriber);

        _this729 = _super302.call(this, destination);
        _this729.project = project;
        _this729.count = 0;
        _this729.thisArg = thisArg || _assertThisInitialized(_this729);
        return _this729;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/mapTo.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***!
    \****************************************************************/

  /*! exports provided: mapTo */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMapToJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_25) {
      _inherits(MapToSubscriber, _Subscriber__WEBPACK_25);

      var _super303 = _createSuper(MapToSubscriber);

      function MapToSubscriber(destination, value) {
        var _this730;

        _classCallCheck(this, MapToSubscriber);

        _this730 = _super303.call(this, destination);
        _this730.value = value;
        return _this730;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/materialize.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/materialize.js ***!
    \**********************************************************************/

  /*! exports provided: materialize */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMaterializeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Notification */
    "./node_modules/rxjs/_esm2015/internal/Notification.js");

    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_26) {
      _inherits(MaterializeSubscriber, _Subscriber__WEBPACK_26);

      var _super304 = _createSuper(MaterializeSubscriber);

      function MaterializeSubscriber(destination) {
        _classCallCheck(this, MaterializeSubscriber);

        return _super304.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/max.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/max.js ***!
    \**************************************************************/

  /*! exports provided: max */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMaxJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/reduce.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/merge.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/merge.js ***!
    \****************************************************************/

  /*! exports provided: merge */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMergeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/merge.js");

    function merge() {
      for (var _len101 = arguments.length, observables = new Array(_len101), _key45 = 0; _key45 < _len101; _key45++) {
        observables[_key45] = arguments[_key45];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***!
    \*******************************************************************/

  /*! exports provided: mergeAll */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMergeAllJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js");
    /* harmony import */


    var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/identity */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***!
    \*******************************************************************/

  /*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMergeMapJs(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 import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* harmony import */


    var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../observable/from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");

    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_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["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 (_OuterSubscriber__WEB16) {
      _inherits(MergeMapSubscriber, _OuterSubscriber__WEB16);

      var _super305 = _createSuper(MergeMapSubscriber);

      function MergeMapSubscriber(destination, project) {
        var _this731;

        var concurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.POSITIVE_INFINITY;

        _classCallCheck(this, MergeMapSubscriber);

        _this731 = _super305.call(this, destination);
        _this731.project = project;
        _this731.concurrent = concurrent;
        _this731.hasCompleted = false;
        _this731.buffer = [];
        _this731.active = 0;
        _this731.index = 0;
        return _this731;
      }

      _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, value, index);
        }
      }, {
        key: "_innerSub",
        value: function _innerSub(ish, value, index) {
          var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
          var destination = this.destination;
          destination.add(innerSubscriber);
          Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_0__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
        }
      }, {
        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(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.destination.next(innerValue);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var buffer = this.buffer;
          this.remove(innerSub);
          this.active--;

          if (buffer.length > 0) {
            this._next(buffer.shift());
          } else if (this.active === 0 && this.hasCompleted) {
            this.destination.complete();
          }
        }
      }]);

      return MergeMapSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=mergeMap.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js ***!
    \*********************************************************************/

  /*! exports provided: mergeMapTo */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMergeMapToJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js ***!
    \********************************************************************/

  /*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMergeScanJs(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 _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");

    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 (_OuterSubscriber__WEB17) {
      _inherits(MergeScanSubscriber, _OuterSubscriber__WEB17);

      var _super306 = _createSuper(MergeScanSubscriber);

      function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
        var _this732;

        _classCallCheck(this, MergeScanSubscriber);

        _this732 = _super306.call(this, destination);
        _this732.accumulator = accumulator;
        _this732.acc = acc;
        _this732.concurrent = concurrent;
        _this732.hasValue = false;
        _this732.hasCompleted = false;
        _this732.buffer = [];
        _this732.active = 0;
        _this732.index = 0;
        return _this732;
      }

      _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, value, index);
          } else {
            this.buffer.push(value);
          }
        }
      }, {
        key: "_innerSub",
        value: function _innerSub(ish, value, index) {
          var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
          var destination = this.destination;
          destination.add(innerSubscriber);
          Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_0__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
        }
      }, {
        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(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          var destination = this.destination;
          this.acc = innerValue;
          this.hasValue = true;
          destination.next(innerValue);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var buffer = this.buffer;
          var destination = this.destination;
          destination.remove(innerSub);
          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;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=mergeScan.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/min.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/min.js ***!
    \**************************************************************/

  /*! exports provided: min */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMinJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/reduce.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/multicast.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/multicast.js ***!
    \********************************************************************/

  /*! exports provided: multicast, MulticastOperator */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsMulticastJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/observeOn.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/observeOn.js ***!
    \********************************************************************/

  /*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsObserveOnJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Notification */
    "./node_modules/rxjs/_esm2015/internal/Notification.js");

    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_27) {
      _inherits(ObserveOnSubscriber, _Subscriber__WEBPACK_27);

      var _super307 = _createSuper(ObserveOnSubscriber);

      function ObserveOnSubscriber(destination, scheduler) {
        var _this733;

        var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;

        _classCallCheck(this, ObserveOnSubscriber);

        _this733 = _super307.call(this, destination);
        _this733.scheduler = scheduler;
        _this733.delay = delay;
        return _this733;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js":
  /*!****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js ***!
    \****************************************************************************/

  /*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsOnErrorResumeNextJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");
    /* harmony import */


    var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isArray */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    function onErrorResumeNext() {
      for (var _len102 = arguments.length, nextSources = new Array(_len102), _key46 = 0; _key46 < _len102; _key46++) {
        nextSources[_key46] = arguments[_key46];
      }

      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 _len103 = arguments.length, nextSources = new Array(_len103), _key47 = 0; _key47 < _len103; _key47++) {
        nextSources[_key47] = arguments[_key47];
      }

      var source = null;

      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, null).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 (_OuterSubscriber__WEB18) {
      _inherits(OnErrorResumeNextSubscriber, _OuterSubscriber__WEB18);

      var _super308 = _createSuper(OnErrorResumeNextSubscriber);

      function OnErrorResumeNextSubscriber(destination, nextSources) {
        var _this734;

        _classCallCheck(this, OnErrorResumeNextSubscriber);

        _this734 = _super308.call(this, destination);
        _this734.destination = destination;
        _this734.nextSources = nextSources;
        return _this734;
      }

      _createClass2(OnErrorResumeNextSubscriber, [{
        key: "notifyError",
        value: function notifyError(error, innerSub) {
          this.subscribeToNextSource();
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          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 _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
            var destination = this.destination;
            destination.add(innerSubscriber);
            Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
          } else {
            this.destination.complete();
          }
        }
      }]);

      return OnErrorResumeNextSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=onErrorResumeNext.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/pairwise.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/pairwise.js ***!
    \*******************************************************************/

  /*! exports provided: pairwise */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPairwiseJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_28) {
      _inherits(PairwiseSubscriber, _Subscriber__WEBPACK_28);

      var _super309 = _createSuper(PairwiseSubscriber);

      function PairwiseSubscriber(destination) {
        var _this735;

        _classCallCheck(this, PairwiseSubscriber);

        _this735 = _super309.call(this, destination);
        _this735.hasPrev = false;
        return _this735;
      }

      _createClass2(PairwiseSubscriber, [{
        key: "_next",
        value: function _next(value) {
          if (this.hasPrev) {
            this.destination.next([this.prev, value]);
          } else {
            this.hasPrev = true;
          }

          this.prev = value;
        }
      }]);

      return PairwiseSubscriber;
    }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=pairwise.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/partition.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/partition.js ***!
    \********************************************************************/

  /*! exports provided: partition */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPartitionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/not.js");
    /* harmony import */


    var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./filter */
    "./node_modules/rxjs/_esm2015/internal/operators/filter.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/pluck.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/pluck.js ***!
    \****************************************************************/

  /*! exports provided: pluck */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPluckJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    function pluck() {
      for (var _len104 = arguments.length, properties = new Array(_len104), _key48 = 0; _key48 < _len104; _key48++) {
        properties[_key48] = arguments[_key48];
      }

      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[props[i]];

          if (typeof p !== 'undefined') {
            currentProp = p;
          } else {
            return undefined;
          }
        }

        return currentProp;
      };

      return mapper;
    } //# sourceMappingURL=pluck.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/publish.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/publish.js ***!
    \******************************************************************/

  /*! exports provided: publish */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPublishJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./multicast */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js":
  /*!**************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js ***!
    \**************************************************************************/

  /*! exports provided: publishBehavior */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPublishBehaviorJs(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 */
    "./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js");
    /* harmony import */


    var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./multicast */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/publishLast.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/publishLast.js ***!
    \**********************************************************************/

  /*! exports provided: publishLast */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPublishLastJs(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 */
    "./node_modules/rxjs/_esm2015/internal/AsyncSubject.js");
    /* harmony import */


    var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./multicast */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js ***!
    \************************************************************************/

  /*! exports provided: publishReplay */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsPublishReplayJs(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 */
    "./node_modules/rxjs/_esm2015/internal/ReplaySubject.js");
    /* harmony import */


    var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./multicast */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/race.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/race.js ***!
    \***************************************************************/

  /*! exports provided: race */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRaceJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");
    /* harmony import */


    var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../observable/race */
    "./node_modules/rxjs/_esm2015/internal/observable/race.js");

    function race() {
      for (var _len105 = arguments.length, observables = new Array(_len105), _key49 = 0; _key49 < _len105; _key49++) {
        observables[_key49] = arguments[_key49];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/reduce.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/reduce.js ***!
    \*****************************************************************/

  /*! exports provided: reduce */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsReduceJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/scan.js");
    /* harmony import */


    var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./takeLast */
    "./node_modules/rxjs/_esm2015/internal/operators/takeLast.js");
    /* harmony import */


    var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./defaultIfEmpty */
    "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js");
    /* harmony import */


    var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/pipe */
    "./node_modules/rxjs/_esm2015/internal/util/pipe.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/refCount.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/refCount.js ***!
    \*******************************************************************/

  /*! exports provided: refCount */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRefCountJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_29) {
      _inherits(RefCountSubscriber, _Subscriber__WEBPACK_29);

      var _super310 = _createSuper(RefCountSubscriber);

      function RefCountSubscriber(destination, connectable) {
        var _this736;

        _classCallCheck(this, RefCountSubscriber);

        _this736 = _super310.call(this, destination);
        _this736.connectable = connectable;
        return _this736;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/repeat.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/repeat.js ***!
    \*****************************************************************/

  /*! exports provided: repeat */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRepeatJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../observable/empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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_30) {
      _inherits(RepeatSubscriber, _Subscriber__WEBPACK_30);

      var _super311 = _createSuper(RepeatSubscriber);

      function RepeatSubscriber(destination, count, source) {
        var _this737;

        _classCallCheck(this, RepeatSubscriber);

        _this737 = _super311.call(this, destination);
        _this737.count = count;
        _this737.source = source;
        return _this737;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js ***!
    \*********************************************************************/

  /*! exports provided: repeatWhen */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRepeatWhenJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB19) {
      _inherits(RepeatWhenSubscriber, _OuterSubscriber__WEB19);

      var _super312 = _createSuper(RepeatWhenSubscriber);

      function RepeatWhenSubscriber(destination, notifier, source) {
        var _this738;

        _classCallCheck(this, RepeatWhenSubscriber);

        _this738 = _super312.call(this, destination);
        _this738.notifier = notifier;
        _this738.source = source;
        _this738.sourceIsBeingSubscribedTo = true;
        return _this738;
      }

      _createClass2(RepeatWhenSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.sourceIsBeingSubscribedTo = true;
          this.source.subscribe(this);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          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();
          }
        }
      }, {
        key: "_unsubscribe",
        value: function _unsubscribe() {
          var notifications = this.notifications,
              retriesSubscription = this.retriesSubscription;

          if (notifications) {
            notifications.unsubscribe();
            this.notifications = null;
          }

          if (retriesSubscription) {
            retriesSubscription.unsubscribe();
            this.retriesSubscription = null;
          }

          this.retries = null;
        }
      }, {
        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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, retries);
        }
      }]);

      return RepeatWhenSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=repeatWhen.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/retry.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/retry.js ***!
    \****************************************************************/

  /*! exports provided: retry */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRetryJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_31) {
      _inherits(RetrySubscriber, _Subscriber__WEBPACK_31);

      var _super313 = _createSuper(RetrySubscriber);

      function RetrySubscriber(destination, count, source) {
        var _this739;

        _classCallCheck(this, RetrySubscriber);

        _this739 = _super313.call(this, destination);
        _this739.count = count;
        _this739.source = source;
        return _this739;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js ***!
    \********************************************************************/

  /*! exports provided: retryWhen */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsRetryWhenJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB20) {
      _inherits(RetryWhenSubscriber, _OuterSubscriber__WEB20);

      var _super314 = _createSuper(RetryWhenSubscriber);

      function RetryWhenSubscriber(destination, notifier, source) {
        var _this740;

        _classCallCheck(this, RetryWhenSubscriber);

        _this740 = _super314.call(this, destination);
        _this740.notifier = notifier;
        _this740.source = source;
        return _this740;
      }

      _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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, retries);
            } else {
              this.errors = null;
              this.retriesSubscription = null;
            }

            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 = null;
          }

          if (retriesSubscription) {
            retriesSubscription.unsubscribe();
            this.retriesSubscription = null;
          }

          this.retries = null;
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          var _unsubscribe = this._unsubscribe;
          this._unsubscribe = null;

          this._unsubscribeAndRecycle();

          this._unsubscribe = _unsubscribe;
          this.source.subscribe(this);
        }
      }]);

      return RetryWhenSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=retryWhen.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/sample.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/sample.js ***!
    \*****************************************************************/

  /*! exports provided: sample */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSampleJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(sampleSubscriber, this.notifier));
          return subscription;
        }
      }]);

      return SampleOperator;
    }();

    var SampleSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB21) {
      _inherits(SampleSubscriber, _OuterSubscriber__WEB21);

      var _super315 = _createSuper(SampleSubscriber);

      function SampleSubscriber() {
        var _this741;

        _classCallCheck(this, SampleSubscriber);

        _this741 = _super315.apply(this, arguments);
        _this741.hasValue = false;
        return _this741;
      }

      _createClass2(SampleSubscriber, [{
        key: "_next",
        value: function _next(value) {
          this.value = value;
          this.hasValue = true;
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=sample.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js ***!
    \*********************************************************************/

  /*! exports provided: sampleTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSampleTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");

    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_32) {
      _inherits(SampleTimeSubscriber, _Subscriber__WEBPACK_32);

      var _super316 = _createSuper(SampleTimeSubscriber);

      function SampleTimeSubscriber(destination, period, scheduler) {
        var _this742;

        _classCallCheck(this, SampleTimeSubscriber);

        _this742 = _super316.call(this, destination);
        _this742.period = period;
        _this742.scheduler = scheduler;
        _this742.hasValue = false;

        _this742.add(scheduler.schedule(dispatchNotification, period, {
          subscriber: _assertThisInitialized(_this742),
          period: period
        }));

        return _this742;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/scan.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***!
    \***************************************************************/

  /*! exports provided: scan */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsScanJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_33) {
      _inherits(ScanSubscriber, _Subscriber__WEBPACK_33);

      var _super317 = _createSuper(ScanSubscriber);

      function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
        var _this743;

        _classCallCheck(this, ScanSubscriber);

        _this743 = _super317.call(this, destination);
        _this743.accumulator = accumulator;
        _this743._seed = _seed;
        _this743.hasSeed = hasSeed;
        _this743.index = 0;
        return _this743;
      }

      _createClass2(ScanSubscriber, [{
        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);
        }
      }, {
        key: "seed",
        get: function get() {
          return this._seed;
        },
        set: function set(value) {
          this.hasSeed = true;
          this._seed = value;
        }
      }]);

      return ScanSubscriber;
    }(_Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]); //# sourceMappingURL=scan.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js ***!
    \************************************************************************/

  /*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSequenceEqualJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_34) {
      _inherits(SequenceEqualSubscriber, _Subscriber__WEBPACK_34);

      var _super318 = _createSuper(SequenceEqualSubscriber);

      function SequenceEqualSubscriber(destination, compareTo, comparator) {
        var _this744;

        _classCallCheck(this, SequenceEqualSubscriber);

        _this744 = _super318.call(this, destination);
        _this744.compareTo = compareTo;
        _this744.comparator = comparator;
        _this744._a = [];
        _this744._b = [];
        _this744._oneComplete = false;

        _this744.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _assertThisInitialized(_this744))));

        return _this744;
      }

      _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_35) {
      _inherits(SequenceEqualCompareToSubscriber, _Subscriber__WEBPACK_35);

      var _super319 = _createSuper(SequenceEqualCompareToSubscriber);

      function SequenceEqualCompareToSubscriber(destination, parent) {
        var _this745;

        _classCallCheck(this, SequenceEqualCompareToSubscriber);

        _this745 = _super319.call(this, destination);
        _this745.parent = parent;
        return _this745;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/share.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/share.js ***!
    \****************************************************************/

  /*! exports provided: share */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsShareJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");
    /* harmony import */


    var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./refCount */
    "./node_modules/rxjs/_esm2015/internal/operators/refCount.js");
    /* harmony import */


    var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Subject */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js ***!
    \**********************************************************************/

  /*! exports provided: shareReplay */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsShareReplayJs(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 */
    "./node_modules/rxjs/_esm2015/internal/ReplaySubject.js");

    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(_ref72) {
      var _ref72$bufferSize = _ref72.bufferSize,
          bufferSize = _ref72$bufferSize === void 0 ? Number.POSITIVE_INFINITY : _ref72$bufferSize,
          _ref72$windowTime = _ref72.windowTime,
          windowTime = _ref72$windowTime === void 0 ? Number.POSITIVE_INFINITY : _ref72$windowTime,
          useRefCount = _ref72.refCount,
          scheduler = _ref72.scheduler;
      var subject;
      var refCount = 0;
      var subscription;
      var hasError = false;
      var isComplete = false;
      return function shareReplayOperation(source) {
        refCount++;

        if (!subject || hasError) {
          hasError = false;
          subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
          subscription = source.subscribe({
            next: function next(value) {
              subject.next(value);
            },
            error: function error(err) {
              hasError = true;
              subject.error(err);
            },
            complete: function complete() {
              isComplete = true;
              subject.complete();
            }
          });
        }

        var innerSub = subject.subscribe(this);
        this.add(function () {
          refCount--;
          innerSub.unsubscribe();

          if (subscription && !isComplete && useRefCount && refCount === 0) {
            subscription.unsubscribe();
            subscription = undefined;
            subject = undefined;
          }
        });
      };
    } //# sourceMappingURL=shareReplay.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/single.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/single.js ***!
    \*****************************************************************/

  /*! exports provided: single */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSingleJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/EmptyError */
    "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js");

    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_36) {
      _inherits(SingleSubscriber, _Subscriber__WEBPACK_36);

      var _super320 = _createSuper(SingleSubscriber);

      function SingleSubscriber(destination, predicate, source) {
        var _this746;

        _classCallCheck(this, SingleSubscriber);

        _this746 = _super320.call(this, destination);
        _this746.predicate = predicate;
        _this746.source = source;
        _this746.seenValue = false;
        _this746.index = 0;
        return _this746;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/skip.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/skip.js ***!
    \***************************************************************/

  /*! exports provided: skip */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSkipJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_37) {
      _inherits(SkipSubscriber, _Subscriber__WEBPACK_37);

      var _super321 = _createSuper(SkipSubscriber);

      function SkipSubscriber(destination, total) {
        var _this747;

        _classCallCheck(this, SkipSubscriber);

        _this747 = _super321.call(this, destination);
        _this747.total = total;
        _this747.count = 0;
        return _this747;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/skipLast.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/skipLast.js ***!
    \*******************************************************************/

  /*! exports provided: skipLast */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSkipLastJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/ArgumentOutOfRangeError */
    "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js");

    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_38) {
      _inherits(SkipLastSubscriber, _Subscriber__WEBPACK_38);

      var _super322 = _createSuper(SkipLastSubscriber);

      function SkipLastSubscriber(destination, _skipCount) {
        var _this748;

        _classCallCheck(this, SkipLastSubscriber);

        _this748 = _super322.call(this, destination);
        _this748._skipCount = _skipCount;
        _this748._count = 0;
        _this748._ring = new Array(_skipCount);
        return _this748;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js ***!
    \********************************************************************/

  /*! exports provided: skipUntil */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSkipUntilJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB22) {
      _inherits(SkipUntilSubscriber, _OuterSubscriber__WEB22);

      var _super323 = _createSuper(SkipUntilSubscriber);

      function SkipUntilSubscriber(destination, notifier) {
        var _this749;

        _classCallCheck(this, SkipUntilSubscriber);

        _this749 = _super323.call(this, destination);
        _this749.hasValue = false;
        var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__["InnerSubscriber"](_assertThisInitialized(_this749), undefined, undefined);

        _this749.add(innerSubscriber);

        _this749.innerSubscription = innerSubscriber;
        Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_assertThisInitialized(_this749), notifier, undefined, undefined, innerSubscriber);
        return _this749;
      }

      _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(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.hasValue = true;

          if (this.innerSubscription) {
            this.innerSubscription.unsubscribe();
          }
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete() {}
      }]);

      return SkipUntilSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=skipUntil.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js ***!
    \********************************************************************/

  /*! exports provided: skipWhile */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSkipWhileJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_39) {
      _inherits(SkipWhileSubscriber, _Subscriber__WEBPACK_39);

      var _super324 = _createSuper(SkipWhileSubscriber);

      function SkipWhileSubscriber(destination, predicate) {
        var _this750;

        _classCallCheck(this, SkipWhileSubscriber);

        _this750 = _super324.call(this, destination);
        _this750.predicate = predicate;
        _this750.skipping = true;
        _this750.index = 0;
        return _this750;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/startWith.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***!
    \********************************************************************/

  /*! exports provided: startWith */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsStartWithJs(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_fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../observable/fromArray */
    "./node_modules/rxjs/_esm2015/internal/observable/fromArray.js");
    /* harmony import */


    var _observable_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../observable/scalar */
    "./node_modules/rxjs/_esm2015/internal/observable/scalar.js");
    /* harmony import */


    var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");
    /* harmony import */


    var _observable_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../observable/concat */
    "./node_modules/rxjs/_esm2015/internal/observable/concat.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    function startWith() {
      for (var _len106 = arguments.length, array = new Array(_len106), _key50 = 0; _key50 < _len106; _key50++) {
        array[_key50] = arguments[_key50];
      }

      return function (source) {
        var scheduler = array[array.length - 1];

        if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(scheduler)) {
          array.pop();
        } else {
          scheduler = null;
        }

        var len = array.length;

        if (len === 1 && !scheduler) {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_scalar__WEBPACK_IMPORTED_MODULE_1__["scalar"])(array[0]), source);
        } else if (len > 0) {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(array, scheduler), source);
        } else {
          return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_3__["concat"])(Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(scheduler), source);
        }
      };
    } //# sourceMappingURL=startWith.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js ***!
    \**********************************************************************/

  /*! exports provided: subscribeOn */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSubscribeOnJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/switchAll.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/switchAll.js ***!
    \********************************************************************/

  /*! exports provided: switchAll */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSwitchAllJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/switchMap.js");
    /* harmony import */


    var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/identity */
    "./node_modules/rxjs/_esm2015/internal/util/identity.js");

    function switchAll() {
      return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
    } //# sourceMappingURL=switchAll.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/switchMap.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***!
    \********************************************************************/

  /*! exports provided: switchMap */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSwitchMapJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../InnerSubscriber */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");
    /* harmony import */


    var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* harmony import */


    var _observable_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../observable/from */
    "./node_modules/rxjs/_esm2015/internal/observable/from.js");

    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_4__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_3__["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 (_OuterSubscriber__WEB23) {
      _inherits(SwitchMapSubscriber, _OuterSubscriber__WEB23);

      var _super325 = _createSuper(SwitchMapSubscriber);

      function SwitchMapSubscriber(destination, project) {
        var _this751;

        _classCallCheck(this, SwitchMapSubscriber);

        _this751 = _super325.call(this, destination);
        _this751.project = project;
        _this751.index = 0;
        return _this751;
      }

      _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, value, index);
        }
      }, {
        key: "_innerSub",
        value: function _innerSub(result, value, index) {
          var innerSubscription = this.innerSubscription;

          if (innerSubscription) {
            innerSubscription.unsubscribe();
          }

          var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_1__["InnerSubscriber"](this, undefined, undefined);
          var destination = this.destination;
          destination.add(innerSubscriber);
          this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index, innerSubscriber);
        }
      }, {
        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 = null;
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          var destination = this.destination;
          destination.remove(innerSub);
          this.innerSubscription = null;

          if (this.isStopped) {
            _get(_getPrototypeOf(SwitchMapSubscriber.prototype), "_complete", this).call(this);
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.destination.next(innerValue);
        }
      }]);

      return SwitchMapSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=switchMap.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js ***!
    \**********************************************************************/

  /*! exports provided: switchMapTo */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsSwitchMapToJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/switchMap.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/take.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***!
    \***************************************************************/

  /*! exports provided: take */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTakeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/ArgumentOutOfRangeError */
    "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js");
    /* harmony import */


    var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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_40) {
      _inherits(TakeSubscriber, _Subscriber__WEBPACK_40);

      var _super326 = _createSuper(TakeSubscriber);

      function TakeSubscriber(destination, total) {
        var _this752;

        _classCallCheck(this, TakeSubscriber);

        _this752 = _super326.call(this, destination);
        _this752.total = total;
        _this752.count = 0;
        return _this752;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/takeLast.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***!
    \*******************************************************************/

  /*! exports provided: takeLast */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTakeLastJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/ArgumentOutOfRangeError */
    "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js");
    /* harmony import */


    var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/empty */
    "./node_modules/rxjs/_esm2015/internal/observable/empty.js");

    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_41) {
      _inherits(TakeLastSubscriber, _Subscriber__WEBPACK_41);

      var _super327 = _createSuper(TakeLastSubscriber);

      function TakeLastSubscriber(destination, total) {
        var _this753;

        _classCallCheck(this, TakeLastSubscriber);

        _this753 = _super327.call(this, destination);
        _this753.total = total;
        _this753.ring = new Array();
        _this753.count = 0;
        return _this753;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js ***!
    \********************************************************************/

  /*! exports provided: takeUntil */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTakeUntilJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(takeUntilSubscriber, this.notifier);

          if (notifierSubscription && !takeUntilSubscriber.seenValue) {
            takeUntilSubscriber.add(notifierSubscription);
            return source.subscribe(takeUntilSubscriber);
          }

          return takeUntilSubscriber;
        }
      }]);

      return TakeUntilOperator;
    }();

    var TakeUntilSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB24) {
      _inherits(TakeUntilSubscriber, _OuterSubscriber__WEB24);

      var _super328 = _createSuper(TakeUntilSubscriber);

      function TakeUntilSubscriber(destination) {
        var _this754;

        _classCallCheck(this, TakeUntilSubscriber);

        _this754 = _super328.call(this, destination);
        _this754.seenValue = false;
        return _this754;
      }

      _createClass2(TakeUntilSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.seenValue = true;
          this.complete();
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete() {}
      }]);

      return TakeUntilSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=takeUntil.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***!
    \********************************************************************/

  /*! exports provided: takeWhile */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTakeWhileJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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_42) {
      _inherits(TakeWhileSubscriber, _Subscriber__WEBPACK_42);

      var _super329 = _createSuper(TakeWhileSubscriber);

      function TakeWhileSubscriber(destination, predicate, inclusive) {
        var _this755;

        _classCallCheck(this, TakeWhileSubscriber);

        _this755 = _super329.call(this, destination);
        _this755.predicate = predicate;
        _this755.inclusive = inclusive;
        _this755.index = 0;
        return _this755;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/tap.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/tap.js ***!
    \**************************************************************/

  /*! exports provided: tap */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTapJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/noop */
    "./node_modules/rxjs/_esm2015/internal/util/noop.js");
    /* harmony import */


    var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/isFunction */
    "./node_modules/rxjs/_esm2015/internal/util/isFunction.js");

    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_43) {
      _inherits(TapSubscriber, _Subscriber__WEBPACK_43);

      var _super330 = _createSuper(TapSubscriber);

      function TapSubscriber(destination, observerOrNext, error, complete) {
        var _this756;

        _classCallCheck(this, TapSubscriber);

        _this756 = _super330.call(this, destination);
        _this756._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
        _this756._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
        _this756._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
        _this756._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
        _this756._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];

        if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(observerOrNext)) {
          _this756._context = _assertThisInitialized(_this756);
          _this756._tapNext = observerOrNext;
        } else if (observerOrNext) {
          _this756._context = observerOrNext;
          _this756._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this756._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
          _this756._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"];
        }

        return _this756;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/throttle.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/throttle.js ***!
    \*******************************************************************/

  /*! exports provided: defaultThrottleConfig, throttle */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsThrottleJs(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 _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB25) {
      _inherits(ThrottleSubscriber, _OuterSubscriber__WEB25);

      var _super331 = _createSuper(ThrottleSubscriber);

      function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
        var _this757;

        _classCallCheck(this, ThrottleSubscriber);

        _this757 = _super331.call(this, destination);
        _this757.destination = destination;
        _this757.durationSelector = durationSelector;
        _this757._leading = _leading;
        _this757._trailing = _trailing;
        _this757._hasValue = false;
        return _this757;
      }

      _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 = null;
        }
      }, {
        key: "throttle",
        value: function throttle(value) {
          var duration = this.tryDurationSelector(value);

          if (!!duration) {
            this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, duration));
          }
        }
      }, {
        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 = null;

          if (_trailing) {
            this.send();
          }
        }
      }, {
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.throttlingDone();
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete() {
          this.throttlingDone();
        }
      }]);

      return ThrottleSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"]); //# sourceMappingURL=throttle.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js ***!
    \***********************************************************************/

  /*! exports provided: throttleTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsThrottleTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./throttle */
    "./node_modules/rxjs/_esm2015/internal/operators/throttle.js");

    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_44) {
      _inherits(ThrottleTimeSubscriber, _Subscriber__WEBPACK_44);

      var _super332 = _createSuper(ThrottleTimeSubscriber);

      function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
        var _this758;

        _classCallCheck(this, ThrottleTimeSubscriber);

        _this758 = _super332.call(this, destination);
        _this758.duration = duration;
        _this758.scheduler = scheduler;
        _this758.leading = leading;
        _this758.trailing = trailing;
        _this758._hasTrailingValue = false;
        _this758._trailingValue = null;
        return _this758;
      }

      _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);
            }
          }
        }
      }, {
        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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***!
    \***********************************************************************/

  /*! exports provided: throwIfEmpty */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsThrowIfEmptyJs(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 _tap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./tap */
    "./node_modules/rxjs/_esm2015/internal/operators/tap.js");
    /* harmony import */


    var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/EmptyError */
    "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js");

    var throwIfEmpty = function throwIfEmpty() {
      var errorFactory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultErrorFactory;
      return Object(_tap__WEBPACK_IMPORTED_MODULE_0__["tap"])({
        hasValue: false,
        next: function next() {
          this.hasValue = true;
        },
        complete: function complete() {
          if (!this.hasValue) {
            throw errorFactory();
          }
        }
      });
    };

    function defaultErrorFactory() {
      return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
    } //# sourceMappingURL=throwIfEmpty.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js ***!
    \***********************************************************************/

  /*! exports provided: timeInterval, TimeInterval */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTimeIntervalJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./scan */
    "./node_modules/rxjs/_esm2015/internal/operators/scan.js");
    /* harmony import */


    var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../observable/defer */
    "./node_modules/rxjs/_esm2015/internal/observable/defer.js");
    /* harmony import */


    var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    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 (_ref73, value) {
            var current = _ref73.current;
            return {
              value: value,
              current: scheduler.now(),
              last: current
            };
          }, {
            current: scheduler.now(),
            value: undefined,
            last: undefined
          }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_ref74) {
            var current = _ref74.current,
                last = _ref74.last,
                value = _ref74.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/timeout.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/timeout.js ***!
    \******************************************************************/

  /*! exports provided: timeout */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTimeoutJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/TimeoutError */
    "./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js");
    /* harmony import */


    var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./timeoutWith */
    "./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js");
    /* harmony import */


    var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../observable/throwError */
    "./node_modules/rxjs/_esm2015/internal/observable/throwError.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js ***!
    \**********************************************************************/

  /*! exports provided: timeoutWith */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTimeoutWithJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/isDate */
    "./node_modules/rxjs/_esm2015/internal/util/isDate.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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 (_OuterSubscriber__WEB26) {
      _inherits(TimeoutWithSubscriber, _OuterSubscriber__WEB26);

      var _super333 = _createSuper(TimeoutWithSubscriber);

      function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
        var _this759;

        _classCallCheck(this, TimeoutWithSubscriber);

        _this759 = _super333.call(this, destination);
        _this759.absoluteTimeout = absoluteTimeout;
        _this759.waitFor = waitFor;
        _this759.withObservable = withObservable;
        _this759.scheduler = scheduler;
        _this759.action = null;

        _this759.scheduleTimeout();

        return _this759;
      }

      _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 = null;
          this.scheduler = null;
          this.withObservable = null;
        }
      }], [{
        key: "dispatchTimeout",
        value: function dispatchTimeout(subscriber) {
          var withObservable = subscriber.withObservable;

          subscriber._unsubscribeAndRecycle();

          subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(subscriber, withObservable));
        }
      }]);

      return TimeoutWithSubscriber;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]); //# sourceMappingURL=timeoutWith.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/timestamp.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/timestamp.js ***!
    \********************************************************************/

  /*! exports provided: timestamp, Timestamp */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsTimestampJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./map */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/toArray.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/toArray.js ***!
    \******************************************************************/

  /*! exports provided: toArray */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsToArrayJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/reduce.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/window.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/window.js ***!
    \*****************************************************************/

  /*! exports provided: window */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWindowJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
          }

          return sourceSubscription;
        }
      }]);

      return WindowOperator;
    }();

    var WindowSubscriber = /*#__PURE__*/function (_OuterSubscriber__WEB27) {
      _inherits(WindowSubscriber, _OuterSubscriber__WEB27);

      var _super334 = _createSuper(WindowSubscriber);

      function WindowSubscriber(destination) {
        var _this760;

        _classCallCheck(this, WindowSubscriber);

        _this760 = _super334.call(this, destination);
        _this760.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();
        destination.next(_this760.window);
        return _this760;
      }

      _createClass2(WindowSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.openWindow();
        }
      }, {
        key: "notifyError",
        value: function notifyError(error, innerSub) {
          this._error(error);
        }
      }, {
        key: "notifyComplete",
        value: function notifyComplete(innerSub) {
          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;
    }(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]); //# sourceMappingURL=window.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/windowCount.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/windowCount.js ***!
    \**********************************************************************/

  /*! exports provided: windowCount */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWindowCountJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subject */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");

    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_45) {
      _inherits(WindowCountSubscriber, _Subscriber__WEBPACK_45);

      var _super335 = _createSuper(WindowCountSubscriber);

      function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
        var _this761;

        _classCallCheck(this, WindowCountSubscriber);

        _this761 = _super335.call(this, destination);
        _this761.destination = destination;
        _this761.windowSize = windowSize;
        _this761.startWindowEvery = startWindowEvery;
        _this761.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]()];
        _this761.count = 0;
        destination.next(_this761.windows[0]);
        return _this761;
      }

      _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 _window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();

            windows.push(_window);
            destination.next(_window);
          }
        }
      }, {
        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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/windowTime.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/windowTime.js ***!
    \*********************************************************************/

  /*! exports provided: windowTime */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWindowTimeJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../scheduler/async */
    "./node_modules/rxjs/_esm2015/internal/scheduler/async.js");
    /* harmony import */


    var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Subscriber */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/isNumeric */
    "./node_modules/rxjs/_esm2015/internal/util/isNumeric.js");
    /* harmony import */


    var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ../util/isScheduler */
    "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js");

    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 = 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 = 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_IMP5) {
      _inherits(CountedSubject, _Subject__WEBPACK_IMP5);

      var _super336 = _createSuper(CountedSubject);

      function CountedSubject() {
        var _this762;

        _classCallCheck(this, CountedSubject);

        _this762 = _super336.apply(this, arguments);
        _this762._numberOfNextedValues = 0;
        return _this762;
      }

      _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_46) {
      _inherits(WindowTimeSubscriber, _Subscriber__WEBPACK_46);

      var _super337 = _createSuper(WindowTimeSubscriber);

      function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
        var _this763;

        _classCallCheck(this, WindowTimeSubscriber);

        _this763 = _super337.call(this, destination);
        _this763.destination = destination;
        _this763.windowTimeSpan = windowTimeSpan;
        _this763.windowCreationInterval = windowCreationInterval;
        _this763.maxWindowSize = maxWindowSize;
        _this763.scheduler = scheduler;
        _this763.windows = [];

        var window = _this763.openWindow();

        if (windowCreationInterval !== null && windowCreationInterval >= 0) {
          var closeState = {
            subscriber: _assertThisInitialized(_this763),
            window: window,
            context: null
          };
          var creationState = {
            windowTimeSpan: windowTimeSpan,
            windowCreationInterval: windowCreationInterval,
            subscriber: _assertThisInitialized(_this763),
            scheduler: scheduler
          };

          _this763.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));

          _this763.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
        } else {
          var timeSpanOnlyState = {
            subscriber: _assertThisInitialized(_this763),
            window: window,
            windowTimeSpan: windowTimeSpan
          };

          _this763.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
        }

        return _this763;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js ***!
    \***********************************************************************/

  /*! exports provided: windowToggle */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWindowToggleJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../Subscription */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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__WEB28) {
      _inherits(WindowToggleSubscriber, _OuterSubscriber__WEB28);

      var _super338 = _createSuper(WindowToggleSubscriber);

      function WindowToggleSubscriber(destination, openings, closingSelector) {
        var _this764;

        _classCallCheck(this, WindowToggleSubscriber);

        _this764 = _super338.call(this, destination);
        _this764.openings = openings;
        _this764.closingSelector = closingSelector;
        _this764.contexts = [];

        _this764.add(_this764.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_assertThisInitialized(_this764), openings, openings));

        return _this764;
      }

      _createClass2(WindowToggleSubscriber, [{
        key: "_next",
        value: function _next(value) {
          var contexts = this.contexts;

          if (contexts) {
            var _len107 = contexts.length;

            for (var i = 0; i < _len107; i++) {
              contexts[i].window.next(value);
            }
          }
        }
      }, {
        key: "_error",
        value: function _error(err) {
          var contexts = this.contexts;
          this.contexts = null;

          if (contexts) {
            var _len108 = contexts.length;
            var index = -1;

            while (++index < _len108) {
              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 _len109 = contexts.length;
            var index = -1;

            while (++index < _len109) {
              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 _len110 = contexts.length;
            var index = -1;

            while (++index < _len110) {
              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 _window4 = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]();

            var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
            var context = {
              window: _window4,
              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(_window4);
          } 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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js ***!
    \*********************************************************************/

  /*! exports provided: windowWhen */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWindowWhenJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subject.js");
    /* harmony import */


    var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../OuterSubscriber */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    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__WEB29) {
      _inherits(WindowSubscriber, _OuterSubscriber__WEB29);

      var _super339 = _createSuper(WindowSubscriber);

      function WindowSubscriber(destination, closingSelector) {
        var _this765;

        _classCallCheck(this, WindowSubscriber);

        _this765 = _super339.call(this, destination);
        _this765.destination = destination;
        _this765.closingSelector = closingSelector;

        _this765.openWindow();

        return _this765;
      }

      _createClass2(WindowSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          this.openWindow(innerSub);
        }
      }, {
        key: "notifyError",
        value: function notifyError(error, innerSub) {
          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js ***!
    \*************************************************************************/

  /*! exports provided: withLatestFrom */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsWithLatestFromJs(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 */
    "./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js");
    /* harmony import */


    var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../util/subscribeToResult */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js");

    function withLatestFrom() {
      for (var _len111 = arguments.length, args = new Array(_len111), _key51 = 0; _key51 < _len111; _key51++) {
        args[_key51] = arguments[_key51];
      }

      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__WEB30) {
      _inherits(WithLatestFromSubscriber, _OuterSubscriber__WEB30);

      var _super340 = _createSuper(WithLatestFromSubscriber);

      function WithLatestFromSubscriber(destination, observables, project) {
        var _this766;

        _classCallCheck(this, WithLatestFromSubscriber);

        _this766 = _super340.call(this, destination);
        _this766.observables = observables;
        _this766.project = project;
        _this766.toRespond = [];
        var len = observables.length;
        _this766.values = new Array(len);

        for (var i = 0; i < len; i++) {
          _this766.toRespond.push(i);
        }

        for (var _i171 = 0; _i171 < len; _i171++) {
          var observable = observables[_i171];

          _this766.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(_assertThisInitialized(_this766), observable, observable, _i171));
        }

        return _this766;
      }

      _createClass2(WithLatestFromSubscriber, [{
        key: "notifyNext",
        value: function notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/zip.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/zip.js ***!
    \**************************************************************/

  /*! exports provided: zip */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsZipJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/zip.js");

    function zip() {
      for (var _len112 = arguments.length, observables = new Array(_len112), _key52 = 0; _key52 < _len112; _key52++) {
        observables[_key52] = arguments[_key52];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/operators/zipAll.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/operators/zipAll.js ***!
    \*****************************************************************/

  /*! exports provided: zipAll */

  /***/
  function node_modulesRxjs_esm2015InternalOperatorsZipAllJs(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 */
    "./node_modules/rxjs/_esm2015/internal/observable/zip.js");

    function zipAll(project) {
      return function (source) {
        return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project));
      };
    } //# sourceMappingURL=zipAll.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/Action.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/Action.js ***!
    \*****************************************************************/

  /*! exports provided: Action */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerActionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscription.js");

    var Action = /*#__PURE__*/function (_Subscription__WEBPAC4) {
      _inherits(Action, _Subscription__WEBPAC4);

      var _super341 = _createSuper(Action);

      function Action(scheduler, work) {
        _classCallCheck(this, Action);

        return _super341.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js":
  /*!*******************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js ***!
    \*******************************************************************************/

  /*! exports provided: AnimationFrameAction */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAnimationFrameActionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js");

    var AnimationFrameAction = /*#__PURE__*/function (_AsyncAction__WEBPACK) {
      _inherits(AnimationFrameAction, _AsyncAction__WEBPACK);

      var _super342 = _createSuper(AnimationFrameAction);

      function AnimationFrameAction(scheduler, work) {
        var _this767;

        _classCallCheck(this, AnimationFrameAction);

        _this767 = _super342.call(this, scheduler, work);
        _this767.scheduler = scheduler;
        _this767.work = work;
        return _this767;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js":
  /*!**********************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js ***!
    \**********************************************************************************/

  /*! exports provided: AnimationFrameScheduler */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAnimationFrameSchedulerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js");

    var AnimationFrameScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP) {
      _inherits(AnimationFrameScheduler, _AsyncScheduler__WEBP);

      var _super343 = _createSuper(AnimationFrameScheduler);

      function AnimationFrameScheduler() {
        _classCallCheck(this, AnimationFrameScheduler);

        return _super343.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js ***!
    \*********************************************************************/

  /*! exports provided: AsapAction */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsapActionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/Immediate.js");
    /* harmony import */


    var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./AsyncAction */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js");

    var AsapAction = /*#__PURE__*/function (_AsyncAction__WEBPACK2) {
      _inherits(AsapAction, _AsyncAction__WEBPACK2);

      var _super344 = _createSuper(AsapAction);

      function AsapAction(scheduler, work) {
        var _this768;

        _classCallCheck(this, AsapAction);

        _this768 = _super344.call(this, scheduler, work);
        _this768.scheduler = scheduler;
        _this768.work = work;
        return _this768;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js ***!
    \************************************************************************/

  /*! exports provided: AsapScheduler */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsapSchedulerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js");

    var AsapScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP2) {
      _inherits(AsapScheduler, _AsyncScheduler__WEBP2);

      var _super345 = _createSuper(AsapScheduler);

      function AsapScheduler() {
        _classCallCheck(this, AsapScheduler);

        return _super345.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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js ***!
    \**********************************************************************/

  /*! exports provided: AsyncAction */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsyncActionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/Action.js");

    var AsyncAction = /*#__PURE__*/function (_Action__WEBPACK_IMPO) {
      _inherits(AsyncAction, _Action__WEBPACK_IMPO);

      var _super346 = _createSuper(AsyncAction);

      function AsyncAction(scheduler, work) {
        var _this769;

        _classCallCheck(this, AsyncAction);

        _this769 = _super346.call(this, scheduler, work);
        _this769.scheduler = scheduler;
        _this769.work = work;
        _this769.pending = false;
        return _this769;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js ***!
    \*************************************************************************/

  /*! exports provided: AsyncScheduler */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsyncSchedulerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Scheduler.js");

    var AsyncScheduler = /*#__PURE__*/function (_Scheduler__WEBPACK_I) {
      _inherits(AsyncScheduler, _Scheduler__WEBPACK_I);

      var _super347 = _createSuper(AsyncScheduler);

      function AsyncScheduler(SchedulerAction) {
        var _this770;

        var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"].now;

        _classCallCheck(this, AsyncScheduler);

        _this770 = _super347.call(this, SchedulerAction, function () {
          if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _assertThisInitialized(_this770)) {
            return AsyncScheduler.delegate.now();
          } else {
            return now();
          }
        });
        _this770.actions = [];
        _this770.active = false;
        _this770.scheduled = undefined;
        return _this770;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js ***!
    \**********************************************************************/

  /*! exports provided: QueueAction */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerQueueActionJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js");

    var QueueAction = /*#__PURE__*/function (_AsyncAction__WEBPACK3) {
      _inherits(QueueAction, _AsyncAction__WEBPACK3);

      var _super348 = _createSuper(QueueAction);

      function QueueAction(scheduler, work) {
        var _this771;

        _classCallCheck(this, QueueAction);

        _this771 = _super348.call(this, scheduler, work);
        _this771.scheduler = scheduler;
        _this771.work = work;
        return _this771;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js ***!
    \*************************************************************************/

  /*! exports provided: QueueScheduler */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerQueueSchedulerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js");

    var QueueScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP3) {
      _inherits(QueueScheduler, _AsyncScheduler__WEBP3);

      var _super349 = _createSuper(QueueScheduler);

      function QueueScheduler() {
        _classCallCheck(this, QueueScheduler);

        return _super349.apply(this, arguments);
      }

      return QueueScheduler;
    }(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"]); //# sourceMappingURL=QueueScheduler.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js":
  /*!*******************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js ***!
    \*******************************************************************************/

  /*! exports provided: VirtualTimeScheduler, VirtualAction */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerVirtualTimeSchedulerJs(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 */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js");
    /* harmony import */


    var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./AsyncScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js");

    var VirtualTimeScheduler = /*#__PURE__*/function (_AsyncScheduler__WEBP4) {
      _inherits(VirtualTimeScheduler, _AsyncScheduler__WEBP4);

      var _super350 = _createSuper(VirtualTimeScheduler);

      function VirtualTimeScheduler() {
        var _this772;

        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);

        _this772 = _super350.call(this, SchedulerAction, function () {
          return _this772.frame;
        });
        _this772.maxFrames = maxFrames;
        _this772.frame = 0;
        _this772.index = -1;
        return _this772;
      }

      _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 _super351 = _createSuper(VirtualAction);

      function VirtualAction(scheduler, work) {
        var _this773;

        var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : scheduler.index += 1;

        _classCallCheck(this, VirtualAction);

        _this773 = _super351.call(this, scheduler, work);
        _this773.scheduler = scheduler;
        _this773.work = work;
        _this773.index = index;
        _this773.active = true;
        _this773.index = scheduler.index = index;
        return _this773;
      }

      _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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js ***!
    \*************************************************************************/

  /*! exports provided: animationFrame */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAnimationFrameJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "animationFrame", function () {
      return animationFrame;
    });
    /* harmony import */


    var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./AnimationFrameAction */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js");
    /* harmony import */


    var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./AnimationFrameScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js");

    var animationFrame = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]); //# sourceMappingURL=animationFrame.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/asap.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/asap.js ***!
    \***************************************************************/

  /*! exports provided: asap */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsapJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "asap", function () {
      return asap;
    });
    /* harmony import */


    var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./AsapAction */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js");
    /* harmony import */


    var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./AsapScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js");

    var asap = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]); //# sourceMappingURL=asap.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/async.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/async.js ***!
    \****************************************************************/

  /*! exports provided: async */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerAsyncJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "async", function () {
      return async;
    });
    /* harmony import */


    var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./AsyncAction */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js");
    /* harmony import */


    var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./AsyncScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js");

    var async = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); //# sourceMappingURL=async.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/scheduler/queue.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/scheduler/queue.js ***!
    \****************************************************************/

  /*! exports provided: queue */

  /***/
  function node_modulesRxjs_esm2015InternalSchedulerQueueJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "queue", function () {
      return queue;
    });
    /* harmony import */


    var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./QueueAction */
    "./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js");
    /* harmony import */


    var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./QueueScheduler */
    "./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js");

    var queue = new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]); //# sourceMappingURL=queue.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***!
    \****************************************************************/

  /*! exports provided: getSymbolIterator, iterator, $$iterator */

  /***/
  function node_modulesRxjs_esm2015InternalSymbolIteratorJs(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

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/symbol/observable.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/symbol/observable.js ***!
    \******************************************************************/

  /*! exports provided: observable */

  /***/
  function node_modulesRxjs_esm2015InternalSymbolObservableJs(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 = typeof Symbol === 'function' && Symbol.observable || '@@observable'; //# sourceMappingURL=observable.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***!
    \********************************************************************/

  /*! exports provided: rxSubscriber, $$rxSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalSymbolRxSubscriberJs(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 = typeof Symbol === 'function' ? Symbol('rxSubscriber') : '@@rxSubscriber_' + Math.random();
    var $$rxSubscriber = rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***!
    \*****************************************************************************/

  /*! exports provided: ArgumentOutOfRangeError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilArgumentOutOfRangeErrorJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function () {
      return ArgumentOutOfRangeError;
    });

    function ArgumentOutOfRangeErrorImpl() {
      Error.call(this);
      this.message = 'argument out of range';
      this.name = 'ArgumentOutOfRangeError';
      return this;
    }

    ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);
    var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; //# sourceMappingURL=ArgumentOutOfRangeError.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/EmptyError.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/EmptyError.js ***!
    \****************************************************************/

  /*! exports provided: EmptyError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilEmptyErrorJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "EmptyError", function () {
      return EmptyError;
    });

    function EmptyErrorImpl() {
      Error.call(this);
      this.message = 'no elements in sequence';
      this.name = 'EmptyError';
      return this;
    }

    EmptyErrorImpl.prototype = Object.create(Error.prototype);
    var EmptyError = EmptyErrorImpl; //# sourceMappingURL=EmptyError.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/Immediate.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/Immediate.js ***!
    \***************************************************************/

  /*! exports provided: Immediate */

  /***/
  function node_modulesRxjs_esm2015InternalUtilImmediateJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "Immediate", function () {
      return Immediate;
    });

    var nextHandle = 1;
    var tasksByHandle = {};

    function runIfPresent(handle) {
      var cb = tasksByHandle[handle];

      if (cb) {
        cb();
      }
    }

    var Immediate = {
      setImmediate: function setImmediate(cb) {
        var handle = nextHandle++;
        tasksByHandle[handle] = cb;
        Promise.resolve().then(function () {
          return runIfPresent(handle);
        });
        return handle;
      },
      clearImmediate: function clearImmediate(handle) {
        delete tasksByHandle[handle];
      }
    }; //# sourceMappingURL=Immediate.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js":
  /*!*****************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***!
    \*****************************************************************************/

  /*! exports provided: ObjectUnsubscribedError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilObjectUnsubscribedErrorJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function () {
      return ObjectUnsubscribedError;
    });

    function ObjectUnsubscribedErrorImpl() {
      Error.call(this);
      this.message = 'object unsubscribed';
      this.name = 'ObjectUnsubscribedError';
      return this;
    }

    ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);
    var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; //# sourceMappingURL=ObjectUnsubscribedError.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js ***!
    \******************************************************************/

  /*! exports provided: TimeoutError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilTimeoutErrorJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "TimeoutError", function () {
      return TimeoutError;
    });

    function TimeoutErrorImpl() {
      Error.call(this);
      this.message = 'Timeout has occurred';
      this.name = 'TimeoutError';
      return this;
    }

    TimeoutErrorImpl.prototype = Object.create(Error.prototype);
    var TimeoutError = TimeoutErrorImpl; //# sourceMappingURL=TimeoutError.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js ***!
    \*************************************************************************/

  /*! exports provided: UnsubscriptionError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilUnsubscriptionErrorJs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function () {
      return UnsubscriptionError;
    });

    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);
    var UnsubscriptionError = UnsubscriptionErrorImpl; //# sourceMappingURL=UnsubscriptionError.js.map

    /***/
  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/canReportError.js":
  /*!********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***!
    \********************************************************************/

  /*! exports provided: canReportError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilCanReportErrorJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/hostReportError.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***!
    \*********************************************************************/

  /*! exports provided: hostReportError */

  /***/
  function node_modulesRxjs_esm2015InternalUtilHostReportErrorJs(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;
      });
    } //# sourceMappingURL=hostReportError.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/identity.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***!
    \**************************************************************/

  /*! exports provided: identity */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIdentityJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isArray.js":
  /*!*************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***!
    \*************************************************************/

  /*! exports provided: isArray */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsArrayJs(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 = Array.isArray || function (x) {
      return x && typeof x.length === 'number';
    }; //# sourceMappingURL=isArray.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***!
    \*****************************************************************/

  /*! exports provided: isArrayLike */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsArrayLikeJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isDate.js":
  /*!************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isDate.js ***!
    \************************************************************/

  /*! exports provided: isDate */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsDateJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isFunction.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isFunction.js ***!
    \****************************************************************/

  /*! exports provided: isFunction */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsFunctionJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***!
    \*************************************************************************/

  /*! exports provided: isInteropObservable */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsInteropObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");

    function isInteropObservable(input) {
      return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
    } //# sourceMappingURL=isInteropObservable.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isIterable.js":
  /*!****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***!
    \****************************************************************/

  /*! exports provided: isIterable */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsIterableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js");

    function isIterable(input) {
      return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
    } //# sourceMappingURL=isIterable.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isNumeric.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***!
    \***************************************************************/

  /*! exports provided: isNumeric */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsNumericJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/isArray.js");

    function isNumeric(val) {
      return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && val - parseFloat(val) + 1 >= 0;
    } //# sourceMappingURL=isNumeric.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isObject.js":
  /*!**************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***!
    \**************************************************************/

  /*! exports provided: isObject */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsObjectJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isObservable.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isObservable.js ***!
    \******************************************************************/

  /*! exports provided: isObservable */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isPromise.js":
  /*!***************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***!
    \***************************************************************/

  /*! exports provided: isPromise */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsPromiseJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/isScheduler.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/isScheduler.js ***!
    \*****************************************************************/

  /*! exports provided: isScheduler */

  /***/
  function node_modulesRxjs_esm2015InternalUtilIsSchedulerJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/noop.js":
  /*!**********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***!
    \**********************************************************/

  /*! exports provided: noop */

  /***/
  function node_modulesRxjs_esm2015InternalUtilNoopJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/not.js":
  /*!*********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/not.js ***!
    \*********************************************************/

  /*! exports provided: not */

  /***/
  function node_modulesRxjs_esm2015InternalUtilNotJs(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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/pipe.js":
  /*!**********************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/pipe.js ***!
    \**********************************************************/

  /*! exports provided: pipe, pipeFromArray */

  /***/
  function node_modulesRxjs_esm2015InternalUtilPipeJs(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 _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ./noop */
    "./node_modules/rxjs/_esm2015/internal/util/noop.js");

    function pipe() {
      for (var _len113 = arguments.length, fns = new Array(_len113), _key53 = 0; _key53 < _len113; _key53++) {
        fns[_key53] = arguments[_key53];
      }

      return pipeFromArray(fns);
    }

    function pipeFromArray(fns) {
      if (!fns) {
        return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
      }

      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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js":
  /*!*****************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***!
    \*****************************************************************/

  /*! exports provided: subscribeTo */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToJs(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 _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! ../Observable */
    "./node_modules/rxjs/_esm2015/internal/Observable.js");
    /* harmony import */


    var _subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./subscribeToArray */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js");
    /* harmony import */


    var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ./subscribeToPromise */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js");
    /* harmony import */


    var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./subscribeToIterable */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js");
    /* harmony import */


    var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! ./subscribeToObservable */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js");
    /* harmony import */


    var _isArrayLike__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! ./isArrayLike */
    "./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js");
    /* harmony import */


    var _isPromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! ./isPromise */
    "./node_modules/rxjs/_esm2015/internal/util/isPromise.js");
    /* harmony import */


    var _isObject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ./isObject */
    "./node_modules/rxjs/_esm2015/internal/util/isObject.js");
    /* harmony import */


    var _symbol_iterator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../symbol/iterator */
    "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js");
    /* harmony import */


    var _symbol_observable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ../symbol/observable */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");

    var subscribeTo = function subscribeTo(result) {
      if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
        return function (subscriber) {
          if (result._isScalar) {
            subscriber.next(result.value);
            subscriber.complete();
            return undefined;
          } else {
            return result.subscribe(subscriber);
          }
        };
      } else if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_9__["observable"]] === 'function') {
        return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_4__["subscribeToObservable"])(result);
      } else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_5__["isArrayLike"])(result)) {
        return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(result);
      } else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_6__["isPromise"])(result)) {
        return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_2__["subscribeToPromise"])(result);
      } else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_8__["iterator"]] === 'function') {
        return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_3__["subscribeToIterable"])(result);
      } else {
        var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_7__["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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js ***!
    \**********************************************************************/

  /*! exports provided: subscribeToArray */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToArrayJs(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, _len114 = array.length; i < _len114 && !subscriber.closed; i++) {
          subscriber.next(array[i]);
        }

        if (!subscriber.closed) {
          subscriber.complete();
        }
      };
    }; //# sourceMappingURL=subscribeToArray.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js ***!
    \*************************************************************************/

  /*! exports provided: subscribeToIterable */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToIterableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/symbol/iterator.js");

    var subscribeToIterable = function subscribeToIterable(iterable) {
      return function (subscriber) {
        var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();

        do {
          var item = iterator.next();

          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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js":
  /*!***************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***!
    \***************************************************************************/

  /*! exports provided: subscribeToObservable */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToObservableJs(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 */
    "./node_modules/rxjs/_esm2015/internal/symbol/observable.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js":
  /*!************************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***!
    \************************************************************************/

  /*! exports provided: subscribeToPromise */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToPromiseJs(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 */
    "./node_modules/rxjs/_esm2015/internal/util/hostReportError.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***!
    \***********************************************************************/

  /*! exports provided: subscribeToResult */

  /***/
  function node_modulesRxjs_esm2015InternalUtilSubscribeToResultJs(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 */
    "./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js");
    /* harmony import */


    var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ./subscribeTo */
    "./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js");

    function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
      var destination = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);

      if (destination.closed) {
        return;
      }

      return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
    } //# sourceMappingURL=subscribeToResult.js.map

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js":
  /*!******************************************************************!*\
    !*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***!
    \******************************************************************/

  /*! exports provided: toSubscriber */

  /***/
  function node_modulesRxjs_esm2015InternalUtilToSubscriberJs(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 */
    "./node_modules/rxjs/_esm2015/internal/Subscriber.js");
    /* harmony import */


    var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! ../symbol/rxSubscriber */
    "./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js");
    /* harmony import */


    var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! ../Observer */
    "./node_modules/rxjs/_esm2015/internal/Observer.js");

    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

    /***/

  },

  /***/
  "./node_modules/rxjs/_esm2015/operators/index.js":
  /*!*******************************************************!*\
    !*** ./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 node_modulesRxjs_esm2015OperatorsIndexJs(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 */
    "./node_modules/rxjs/_esm2015/internal/operators/audit.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/auditTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/buffer.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/catchError.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/combineAll.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/concat.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/concatAll.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/concatMap.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/count.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/debounce.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/delay.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/distinct.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/elementAt.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/endWith.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/every.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/exhaust.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/expand.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/filter.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/finalize.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/find.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/findIndex.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/first.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/groupBy.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/last.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/map.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mapTo.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/materialize.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/max.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/merge.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js");
    /* 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__["mergeMap"];
    });
    /* harmony import */


    var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
    /*! ../internal/operators/mergeMapTo */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/min.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/multicast.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/observeOn.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/pairwise.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/partition.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/pluck.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/publish.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/publishLast.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/race.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/reduce.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/repeat.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/retry.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/refCount.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/sample.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/scan.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/share.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/single.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/skip.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/skipLast.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/startWith.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/switchAll.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/switchMap.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/take.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/takeLast.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/tap.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/throttle.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/timeout.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/timestamp.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/toArray.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/window.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/windowCount.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/windowTime.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/zip.js");
    /* 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 */
    "./node_modules/rxjs/_esm2015/internal/operators/zipAll.js");
    /* harmony reexport (safe) */


    __webpack_require__.d(__webpack_exports__, "zipAll", function () {
      return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"];
    }); //# sourceMappingURL=index.js.map

    /***/

  }
}]);
//# sourceMappingURL=vendor-es5.js.map